I've made some Game Genie codes starting from PAR codes:
The procedure i've used is this:
1. load the target rom in snes9x debugger
2. start the game, then set a write breakpoint at the PAR RAM address
3. play the game until that address is written (eg. lose a life)
4. the debug console will show a single new record:
"AAAAAA" is the ROM address containing the code
"II" is the instruction code (eg. "CE" means decrement)
"O1" is the operator 1 (may not be present)
"O2" is the operator 2 (may not be present)
5. now encode the new GG code with ucon64:
if there was "O1" add another code:
if there was "O2" add another code:
6. test the new codes with another accurate emulator like bsnes and see if they works.
This is dead simple and works in most simple cases (eg. infinite lives/health etc.).
I think anyone can make GG codes this way!
Now i have some questions:
For instance, in the above case i would do:
(O2 will be skipped)
Branching this way should also be faster because it takes 3 cycles vs 3*NOPs will need 3*2=6 cycles.
Code:
Spriggan Powered (J) Infinite lives 3CB6-34D9 3CB6-3409 3CB6-3469 BS F-Zero Grand Prix 2 (J) (BS) [h1C] Inifinite continues 3C64-0DA4 3C64-0FD4 Kendo Rage (U) Infinite HP 3C3C-D1EE 3C3C-D57E Infinite Lives 3CBF-055A 3CBF-058A 3CBF-05EA
1. load the target rom in snes9x debugger
2. start the game, then set a write breakpoint at the PAR RAM address
3. play the game until that address is written (eg. lose a life)
4. the debug console will show a single new record:
Code:
$AA/AAAA:II O1 O2 DEC $ABBE [$7F:ABBE] A:0090 X:0026 Y:0002 P:envmxdizc
"II" is the instruction code (eg. "CE" means decrement)
"O1" is the operator 1 (may not be present)
"O2" is the operator 2 (may not be present)
5. now encode the new GG code with ucon64:
Code:
ucon64 --snes --gge=AAAAAA:EA
Code:
ucon64 --snes --gge=AAAAAA+1:EA
Code:
ucon64 --snes --gge=AAAAAA+2:EA
This is dead simple and works in most simple cases (eg. infinite lives/health etc.).
I think anyone can make GG codes this way!
Now i have some questions:
- according to this guide using AD is probably a better choice than EA (for replacing CE) But i don't understand why, "AD" means "Load Accumulator from Memory" - shouldn't have side-effects?
- according to this guide "if it's going to take more than 2 codes, you can use a 'Branch Always' instruction". But it does not provide an example.
For instance, in the above case i would do:
Code:
ucon64 --snes --gge=AAAAAA:80 ucon64 --snes --gge=AAAAAA+1:02
Branching this way should also be faster because it takes 3 cycles vs 3*NOPs will need 3*2=6 cycles.
Comment