Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hex Editor, ASCII editor, cheats, memory card editor, assembler, disassembler, memory hacks, memory dumping and restoring. #22

Open
ADormant opened this issue Nov 7, 2015 · 12 comments

Comments

@ADormant
Copy link

ADormant commented Nov 7, 2015

I think these features would be very useful for cheats, translations, game hacking and memory hacks.
Plugin-based PSX emulators have a plugin called PSX Emulation Cheater(PEC) for it. I believe PSX/PSXFin has built-in Hex editor.

http://ngemu.com/threads/playstation-emulator-cheater-setup-guide.101186/
http://pec.duttke.de/
http://www.aldostools.org/pecedit.html
https://github.com/strobejb/HexEdit
https://github.com/evanmiller/hecate
http://www.zophar.net/utilities/hexutil.html
http://homepage.ntlworld.com/simon.mallion/PSXMemTool/

@ADormant ADormant changed the title Hex Editor, cheats, memory dumping and restoring. Hex Editor, cheats, memory hacks, memory dumping and restoring. Nov 7, 2015
@ADormant ADormant changed the title Hex Editor, cheats, memory hacks, memory dumping and restoring. Hex Editor, cheats, memory card editor, memory hacks, memory dumping and restoring. Nov 7, 2015
@simias
Copy link
Owner

simias commented Nov 8, 2015

I was hoping that the current debug interface (implementing the GDB protocol over a debug socket) could be extended to implement a cheat engine. I already use it to step through the assembly and display RAM values and it works decently well.

That being said the GDB protocol might prove limiting for certain applications, or at least require a few hacks or extensions to work well. For instance I have no direct access to the video RAM at the moment.

I think I'll have to try one of the existing cheat engines to see how it looks like and what's the best way to reimplement the same features.

Memory cards should have their own issue I think, it's not directly related to the cheat/debugging interface.

@ADormant
Copy link
Author

ADormant commented Nov 9, 2015

Yeah hex editor in particular would be very helpful for hacking. I doubt things like Hex editor , memory and framebuffer dumping can be done with just GDB. It'll probably need dedicated interface/GUI of some sort.

@ADormant
Copy link
Author

Found this memory, ascii and hex editor https://github.com/bryanperris/Soft64-Bryan/commit/a32c8417d654ad1f1b2d5d123a25d8c7bd876be3
https://github.com/bryanperris/Soft64-Bryan/commit/cbc5900fe9003bec3f505f798a350124b1f748ba
https://github.com/bryanperris/Soft64-Bryan/commit/ae12be0b95193d1188353b234fda5e8d751ba073
https://github.com/bryanperris/Soft64-Bryan/commit/317792db0a60221a7275bbd7ebadc5b5ca24d056
https://github.com/bryanperris/Soft64-Bryan/commit/30bade4a1422f81909693bdeba9f5ab8e2958845
https://github.com/bryanperris/Soft64-Bryan/commit/983a2123ca0850c139daf38343341cbc3c5cb0e2
https://github.com/bryanperris/Soft64-Bryan/commit/73cccc85990ebd942cf233ae552a71d0d9d7cf79
https://github.com/bryanperris/Soft64-Bryan/commit/547f411fbfade98796db9e273680567db7a3e30c
https://github.com/bryanperris/Soft64-Bryan/commit/fc87976f1f66a0377fd75f11868c552c4495920a
https://github.com/bryanperris/Soft64-Bryan/commit/ef23217f69cba4bb7b89fcd202360432070ad00b
https://github.com/bryanperris/Soft64-Bryan/commit/e395d0ebe2e3fed33583c135c96cd50f04c5edf7
https://github.com/bryanperris/Soft64-Bryan/commit/26912be38688650a24e82e0307204ea17fe6171a
https://github.com/bryanperris/Soft64-Bryan/commit/e6e18d683c4dbacfee362435c9ccb4a7339c9124
https://github.com/bryanperris/Soft64-Bryan/commit/c1058582e1e3cbc2cf796c0ecb17373e921b1196
https://github.com/bryanperris/Soft64-Bryan/commit/5cd103903fe40c0e9ac9e913e899ad9daa63c50b
https://github.com/bryanperris/Soft64-Bryan/commit/e90bbabb2fea1622f09051b0cc130340bc6c5c3e
https://github.com/bryanperris/Soft64-Bryan/commit/6f11e13cff36d551390531e797f34e4296fe956b
https://github.com/bryanperris/Soft64-Bryan/commit/9dd6eff6c5f7f06c5bbf472a06f74b02098f7cc1
https://github.com/bryanperris/Soft64-Bryan/commit/fdfa10b08f34798f357a76c3444083d6a991dcb7
https://github.com/bryanperris/Soft64-Bryan/commit/0f21f4a96e33d3b382ca3c3fbe622d72f6977ab3
https://github.com/bryanperris/Soft64-Bryan/commit/96b3b6328186353e9da4944428cfffe0db54debb
https://github.com/bryanperris/Soft64-Bryan/commit/824c96abd61561cea4d84e71460d1a01609150a6

@simias
Copy link
Owner

simias commented Dec 1, 2015

It's using HTML/Javascript for the UI it seems which might make it a bit painful to integrate. Do you know which emulator is considered to have the best memory editor? I suck at UI design...

@ADormant ADormant changed the title Hex Editor, cheats, memory card editor, memory hacks, memory dumping and restoring. Hex Editor, cheats, memory card editor, disassembler, memory hacks, memory dumping and restoring. Dec 10, 2015
@ADormant
Copy link
Author

@ADormant ADormant changed the title Hex Editor, cheats, memory card editor, disassembler, memory hacks, memory dumping and restoring. Hex Editor, Ascii editor, cheats, memory card editor, disassembler, memory hacks, memory dumping and restoring. Dec 23, 2015
@ADormant ADormant changed the title Hex Editor, Ascii editor, cheats, memory card editor, disassembler, memory hacks, memory dumping and restoring. Hex Editor, ASCII editor, cheats, memory card editor, disassembler, memory hacks, memory dumping and restoring. Dec 23, 2015
@ADormant
Copy link
Author

@ADormant ADormant changed the title Hex Editor, ASCII editor, cheats, memory card editor, disassembler, memory hacks, memory dumping and restoring. Hex Editor, ASCII editor, cheats, memory card editor, assembler, disassembler, memory hacks, memory dumping and restoring. Jan 3, 2016
@simias
Copy link
Owner

simias commented Jan 6, 2016

Sorry if I didn't get back to you yet, I'm shoulders deep in the libretro port and I still have some work ahead of me.

I have turned the Rustation code into a stand-alone library though so it should be possible to implement alternative frontends easily if libretro doesn't cut it for some of these things.

@simias
Copy link
Owner

simias commented Jan 22, 2016

I think I'm going to try to extend the GDB interface to implement GPU debugging. Now that I'm almost done converting the code into a libretro core I can't really implement a proper "internal" debugger since I can't really build a GUI in libretro. I'm thinking of having a separate application connect to the running emulators and fetch the necessary data for debugging.

An other possibility would be having a stand alone version of the emulator for debugging but I don't feel like implementing and supporting both at this point.

@simias
Copy link
Owner

simias commented Jun 23, 2016

So I've been thinking about how to handle memory cards. It's a bit tricky to handle right.

My current approach would be to have a game-specific memory card in slot 1 and a common memory card (always the same no matter the game you play) in slot 2. I think it's relatively straightforward and it would fit my particular needs I think. Maybe some people would prefer to have two game-specific memory cards though, if they like to make many saves for a given game.

A potential problem is that "game-specific" can be tricky to do right, especially for multi-disc games. At first I thought I could use the serial number (it's normally the main binary name in all licensed PlayStation games). Unfortunately I've discovered that multi-disc games have a different serial number per-game. For instance MGS (USA) disc 1 is SLUS-00594 while disc 2 is SLUS-00776.

Mednafen handles this by using m3u playlists, but that seems pretty user-unfriendly. Unfortunately the only other approach I can think of would be to use a database containing all PSX games and use that to catch the multi-disc scenario.

With a database we could decide to standardize on the serial number of the first disc for instance, that would give us files named like:

SLUS-00594_Metal-Gear-Solid.mcr
SCPS-10031_Crash-Bandicoot.mcr
SCES-01438_Spyro-the-Dragon.mcr

Having a DB could also avoid having to mess with m3u when changing discs, the emulator could just look for a disc image in the current directory with the correct serial number, although that might be a bit slow if you have a shitload of disc images in the directory. But that's an other problem.

Serial numbers are different between regions, but that's probably a feature since we can't be sure that the memory card format would be compatible anyway.

I'm going to try to compile such a database and see how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants