Hacking these kinds of codes can be simple or very hard. You need to know assembly for that particular system.
Example : Super Mario Bros - FDS
Emulator used : FCEUX
This game is very easy because it has a value in memory. The address 0x1D in RAM changes
from 0 to 1 when jumping. I put a breakpoint on read on 0x1D. Click run until the debugger snaps here:
I changed that part to a BPL or 0x10. It makes the game think that he is still on the ground
thus you can jump again. Every game use different routines for jumping. Some games have a routine for the initial jump and the other for ascending and descending. It helps to find the controller address. I'll show another example later.
Example : Super Mario Bros - FDS
Emulator used : FCEUX
This game is very easy because it has a value in memory. The address 0x1D in RAM changes
from 0 to 1 when jumping. I put a breakpoint on read on 0x1D. Click run until the debugger snaps here:
Code:
00:9458:A5 1D LDA $001D = #$00 00:945A:C9 03 CMP #$03 00:945C:D0 23 BNE $9481 branch if Mario is not climbing After the branch: 00:9481:AD 0E 07 LDA $070E = #$00 00:9484:D0 0A BNE $9490 00:9486:A5 0A LDA $000A = #$80 this address holds the A button value 00:9488:29 80 AND #$80 00:948A:F0 04 BEQ $9490 if A is pressed continue 00:948C:25 0D AND $000D = #$00 00:948E:F0 03 BEQ $9493 00:9490:4C 24 95 JMP $9524 00:9493:A5 1D LDA $001D = #$00 00:9495:F0 11 BEQ $94A8 this is the part that we want to change.
thus you can jump again. Every game use different routines for jumping. Some games have a routine for the initial jump and the other for ascending and descending. It helps to find the controller address. I'll show another example later.
Comment