@Mrneo240 I'm in the early stages of developing an open source cheat device and have been researching how GameShark and CodeBreaker work. I think you might find my notes useful! I can share my IDA database with you if you'd like as well.
Cheat Engine Locations
- GS installs its engine at 8C007200
- CB installs its engine at 8C004800
Enable/Master Codes:
- Adding code 0B400000 00000002 (note that this is in the decrypted form) changes the address where the engine is installed to:
- 8C008300 (IP.BIN entrypoint) on CB
- 8C008000 (IP.BIN start) on GS. It looks like a different engine is used as well on GS, though it might use different engines depending on the codes being used
CodeBreaker checks for the 00000002 value and doesn't seem to support any other values. I think the default location CodeBreaker uses for its engine is more compatible since games like Crazy Taxi normally require this code to be active when using GameShark.
- Adding code 0BFFFFFF xxxxxxxx changes the engine address to xxxxxxxx (user defined address)
- F355 Challenge uses this code to set the engine address to 8C007800
- Similarly, PSO 2 uses this code to set the engine address to 8C5FF000
- For both of these codes, DCCrypt tries to decrypt the value despite already being in its decrypted form.
GameShark v3.3
Before launching a game, a patch is made at
8C0004F4 to disable checks against the IP.BIN file loaded in memory.
A patch to jump to the code engine is made at
8C0018F0.
CodeBreaker 197/Xploder 198
The US versions of these are virtually identical. In fact, the compile times listed are mere seconds apart!
Something interesting I noticed is that the loader seems to delete flashrom partition 4 and then overwrite it with data before launching a game. I haven't confirmed this to be the exact behavior, but there is code in there to do that while setting up the engine hooks.
A patch is made at
0x8C00118C before launching a game. This is normally an offset to the gdGdcInitSystem() function at
8C001890. The value is added to
8C001180 (the beginning of the jump table; this is the third offset in the table) to get the actual address to jump to.
It changes the offset to cause a to jump to
A020C000. This is within flashrom partition 4... isn't that odd??
Original values: 10 07 00 00
Patched values: 80 AE 20 14
CodeBreaker defines special codes to allow these addresses and values to be changed. I don't think any game uses these but they must have been added to address potential compatibility issues that could have occurred as new games were released.
- The address of the offset table (default 8C001180) can be changed using code 0BFFFFFE xxxxxxxx
- The address where the jump offset is written (default 8C00118C) can be changed using code 0BFFFFFC xxxxxxxx
- The address to jump to (default A020C000) can be changed by using code 0BFFFFFD xxxxxxxx
A patch to jump to the code engine is made at
8C0018F8, similar to how GS does it.