Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

DukeMod Plugin Vita: Difference between revisions

From GameBrew
No edit summary
No edit summary
Line 26: Line 26:


==Media==
==Media==
<youtube>RIaJHh60hQY</youtube>
Duke Nukem 3D Megaton Edition PC Game Review<br>
 
<youtube>lMgeJTwvad8</youtube>
==Screenshots==
https://dlhb.gamebrew.org/vitahomebrews/dukemodpluginvita-01.jpg
https://dlhb.gamebrew.org/vitahomebrews/dukemodpluginvita-02.jpg


==Notes==
==Notes==
Line 51: Line 48:
Making multiplayer work without PSN would be nice too, but not a high priority for me (and possibly will be more difficult than what I listed above, but I have to see about that).
Making multiplayer work without PSN would be nice too, but not a high priority for me (and possibly will be more difficult than what I listed above, but I have to see about that).


==Suggestions==
If anyone has any other feature suggestions, I'd like to hear them.
If anyone has any other feature suggestions, I'd like to hear them.



Revision as of 04:07, 15 November 2022

DukeMod Plugin
File:Dukemodpluginvita.jpg
General
Authorforcefiftythree
TypePlugins
Version000
LicenseMixed
Last Updated2016/10/11
Links
Download
Website

DukeMod is a plugin that enables extra features for Duke Nukem 3D: Megaton Edition.

DukeMod's Instructions

  • Place plugin suprx file into ux0:plugins/
  • Edit game.txt in same directory to include line: "ux0:plugins/dukemod.suprx 1"
  • start a supported dump of Duke3D

Media

Duke Nukem 3D Megaton Edition PC Game Review

Notes

You can use the plugin at the same time as eg. rinCheat, there should be no conficts. The plugin will disable itself after startup if you're not running Duke3D or your dump is not supported (memory layout not as expected). You will see a message on screen which tells you if the plugin is active. While this is message is showing, you can press X to toggle graphics filtering (by default OFF or CIRCLE to toggle debug text output (default ON).

When you get into the actual game, you can use the touchscreen to switch weapons quickly. The edges of the screen are divided into 4 equally sized sections, left edge is for weapons 3-6 (shotgun to pipebomb) and right edge is for weapons 7-10 (shrinker/grower to freezer). Center of the screen is for weapon 2 (pistol). There is no touch location for the foot, at least not for now. Place your finger on screen, if necessary move it around until the weapon number you see is the one you wanted to switch to, release finger and the weapon will be switched.

Currently the switching is implemented in a way which sometimes causes a small delay before the switch actually happens, I'll try to fix this later. The only debugging text you see currently (if you don't disable it on startup) is related to this, the plugin will tell you it's waiting for the weapon change in game code to start or end.

The switcher is also not currently disabled when you're not actually in game (but in menus or watching a demo / "user clip", between levels, etc...) and you can break things with this, will be fixed later.

Currently, the game's own touchscreen inputs (touching the left or right half of screen can be bound to an action in game) aren't disabled so bind something that doesn't get in the way when switching weapons to them. eg. I currently have quick kick bound to left half of screen and show scoreboard (does nothing in single player) bound to right half of screen in the game's own input configuration settings. I'll try to figure out a way to disable the inputs via memory patching or savedata config file hack ASAP.

Plugin source code will be released eventually when it's more complete.

Since there is no homebrew Duke 3D port for the Vita yet (and who knows if there ever will be anything or even a good port, Duke/Build codebase is not that clean and nice to work on or as easily portable as for example id's games are...), I thought I'd try to add some improvements to the reasonably well working closed source, official port we already have.

So far I've got a plugin that works with one version of the game (EU, unpatched I think, dumped with Vitamin 1.0) and allows quick switching of weapons from the touchscreen (and also disables graphics filtering but I'll make this optional later). Other features I've been thinking about would be quick weapon switching with analog sticks (via a weapon wheel or something) for Vita TV users, loading user maps and mods and accessing all PC version cheats (all the code is still there, it's just not possible to activate them).

Making multiplayer work without PSN would be nice too, but not a high priority for me (and possibly will be more difficult than what I listed above, but I have to see about that).

Suggestions

If anyone has any other feature suggestions, I'd like to hear them.

If you have any tips on how to get IDA to show names for sce* OS/library calls in dumped game ELFs, I'm interested. vitadump.py fixes a lot of the data references but I'm not seeing any function names... Oh well, at least Duke isn't that hard to hack regardless because partial source code available.

If you have any tips on how to patch game code on the fly from a plugin thread, I'm interested. Patching data is ok, but patching code will always cause a crash, I guess because executable memory is write protected. AFAIK HENkaku should at least allow allocating new blocks of writable+executable memory due to emulator coders requiring this for JIT. But can I change permissions for memory that the OS allocated for the game binary on startup somehow?

If you have any tips on how to deal with ASLR/relocation in a plugin thread that's supposed to read/write variables in the game's address space, I'm interested. I guess this is the problem that prevents me from reading/writing data too, when using a dump of the game that has been made with newer/better dumping tools than Vitamin 1.0. With the Vitamin v1 dump, using addresses taken straight from IDA in plugin code works as expected buth with a Vitamin v2 dump or MaiDumpTool dump it does not.

I guess one easy option would be to patch the eboot itself too (I'd want to use the newest and best version of the game as the base then), but I think it'd be much neater if everything could be kept in a single plugin PRX that would work with any version of the game I happen to have on hand for analysis...

Changelog

(v.000)

  • First Release.

External links

Advertising: