For anyone that knows how to use the debugger and wants to make patches for some games here's a little guide I wrote for some testers:
-----------------------------------------------------------------------
First what you need is a hex editor
Take XVI32 if you don't have any(free):
http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm
Ok, first of all , patch files are used to add/modify instructions in the emu memory for a specific game. It will be loaded at the same time the map is loaded.
Now, get your game ID and make a new file with the Id of your game, followed by .patch in your /data/ folder. After that, open your hex editor and go open your patch file you just created.
Now how it works :
address: CPU effective address to apply patch there
freeze: Apply patch after every VI frame, if 1
size: size of data to write at address (in bytes)
data: patch data (size : 1, 2, 4 or 8 bytes)
data bytes are started right from this offset,
not matter what size of data is applied.
unused bytes of data can be used as small comment
60 00 00 00 is the nop instruction, no need to put it in with the ASCII format, the instruction number is enough.If you need to get the number of other opcodes, just look in the debugger, it's the number in
green next to the adress.
example: put 'nop' opcode at the adress 0x8000B494
it makes : 80 00 B4 94 00 00 00 04 60 00 00 00 00 00 00 00
then you can enter another adress right after, no need to put anything between.
-Doc made by Knuckles for the GameCube emulator Dolwin by org
-----------------------------------------------------------------------
First what you need is a hex editor
Take XVI32 if you don't have any(free):
http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm
Ok, first of all , patch files are used to add/modify instructions in the emu memory for a specific game. It will be loaded at the same time the map is loaded.
Now, get your game ID and make a new file with the Id of your game, followed by .patch in your /data/ folder. After that, open your hex editor and go open your patch file you just created.
Now how it works :
Code:
XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
ADDRESS FREEZE SIZE NOP INSTRUCTION DUMMY DATA
address: CPU effective address to apply patch there
freeze: Apply patch after every VI frame, if 1
size: size of data to write at address (in bytes)
data: patch data (size : 1, 2, 4 or 8 bytes)
data bytes are started right from this offset,
not matter what size of data is applied.
unused bytes of data can be used as small comment
60 00 00 00 is the nop instruction, no need to put it in with the ASCII format, the instruction number is enough.If you need to get the number of other opcodes, just look in the debugger, it's the number in
green next to the adress.
example: put 'nop' opcode at the adress 0x8000B494
Code:
80 00 B4 94 00 00 00 04 60 00 00 00 00 00 00 00
address freeze size nop opcode dummy data
it makes : 80 00 B4 94 00 00 00 04 60 00 00 00 00 00 00 00
then you can enter another adress right after, no need to put anything between.
-Doc made by Knuckles for the GameCube emulator Dolwin by org
Last edited: