Example : Super Mario All Stars & SMW : Super Mario Bros - SNES
Emulator used : Geiger's SNES9X Debugger ep9r8
This kind of code I have only tried on Mario games. You can also do it for items if the game has them.
Now the way I found it for this game was to put a breakpoint on read on the star's address. That address is 0x7E07AF. Before you put the breakpoint start the game and at the beginning get close to the goomba like in the attachment. Then turn on the breakpoint and press run.
If we change at 03DE9C F0 to 24 the goomba gets kill instead just like having the star. The code before this address 03DE8F checks to see if you are close to an enemy or powerup. I changed
03DE8F 60 to 24. When changing it to an nop it wasn't working right so use 0x24. This will kill enemies and get powerups from a distance. Also if you don't change F0 to 24 at 03DE9C and you change 60 to 24 at 03DE8F is Mario who dies when getting close to enemies.
Emulator used : Geiger's SNES9X Debugger ep9r8
This kind of code I have only tried on Mario games. You can also do it for items if the game has them.
Now the way I found it for this game was to put a breakpoint on read on the star's address. That address is 0x7E07AF. Before you put the breakpoint start the game and at the beginning get close to the goomba like in the attachment. Then turn on the breakpoint and press run.
Code:
$03/ADEE AD AF 07 LDA $07AF [$03:07AF] The debugger snaps here often so just press run $03/828A B5 88 LDA $88,x [$00:07AF] The debugger snaps here often so just press run $03/DE83 A6 9E LDX $9E [$00:009E] $03/DE85 B0 09 BCS $09 [$DE90] If you are close to an enemy or powerup branch $03/DE87 BD 81 04 LDA $0481,x[$03:0481] $03/DE8A 29 FE AND #$FE $03/DE8C 9D 81 04 STA $0481,x[$03:0481] $03/DE8F 60 RTS $03/DE90 B4 1C LDY $1C,x [$00:001C] $03/DE92 C0 2E CPY #$2E $03/DE94 D0 03 BNE $03 [$DE99] $03/DE96 4C FA DD JMP $DDFA [$03:DDFA] [COLOR="Green"]$03/DE99 AD AF 07 LDA $07AF [$03:07AF][/COLOR] We land here. When Mario gets hit any enemy... $03/DE9C F0 06 BEQ $06 [$DEA4] it checks the value if zero mario gets hurt or killed. $03/DE9E 4C 81 DD JMP $DD81 [$03:DD81] $03/DEA1 0A ASL A $03/DEA2 06 04 ASL $04 [$00:0004] $03/DEA4 BD 81 04 LDA $0481,x[$03:0481] $03/DEA7 29 01 AND #$01
03DE8F 60 to 24. When changing it to an nop it wasn't working right so use 0x24. This will kill enemies and get powerups from a distance. Also if you don't change F0 to 24 at 03DE9C and you change 60 to 24 at 03DE8F is Mario who dies when getting close to enemies.

Comment