FBUP [NES] Adventure of Lolo

Started by Crapulecorp, May 25, 2011, 06:11:14 PM

Previous topic - Next topic

Crapulecorp

FBUP
Adventure of Lolo


Unlimited Lives [Crapulecorp]
003C0117 00000009

Unlimited Beam [Crapulecorp]
003C0118 00000063

Enemy Freeze [Crapulecorp]
003C0125 00000002
*Code ported from ZiT Ntsc Usa Version*

Walks Free [Crapulecorp]
82000000 803C012D
28222912 BFFF4000
86000000 00000004
28222913 FFFE0001
86000000 FFFFFFFC
28222913 FFFD0002
86000000 00000004
28222913 7FFF8000
86000000 FFFFFFFC
E0000000 80008000
84000000 803C012D
*Classic Controller*
*Code ported from ZiT Ntsc Usa Version*

Walks Free [Crapulecorp]
82000000 803C012D
281AFCA8 FFFB0004
86000000 00000004
281AFCA9 FFF70008
86000000 FFFFFFFC
281AFCA9 FFFE0001
86000000 00000004
281AFCA9 FFFD0002
86000000 FFFFFFFC
E0000000 80008000
84000000 803C012D
*GameCube Controller*
*Code ported from ZiT Ntsc Usa Version*

Button Activator

Classic Controller [Crapulecorp]
28222912 YYYYZZZZ

GameCube Controller [Crapulecorp]
281AFCA8 YYYYZZZZ

dcx2

Ahhh, Gecko Registers.  It's too bad these are 8-bit bytes; if they were 32-bit words we could get rid of another line..

Two ways to shorten this.  Pull the 82/84 codes out of the cascade of ifs, and combine end-if with if's to get rid of terminators.

[spoiler]
Walks Free [Crapulecorp]
82000000 803BE12D # gr0 = (byte)[803BE12D]
281AFCA8 FFFB0004 # if down
86000000 00000004 # gr0 += 4
281AFCA9 FFF70008 # end if; if up
86000000 FFFFFFFC # gr0 -= 4
281AFCA9 FFFE0001 # end if; if left
86000000 00000004 # gr0 += 4
281AFCA9 FFFD0002 # end if; if right
86000000 FFFFFFFC # gr0 -= 4
E0000000 80008000 # end if
84000000 803BE12D # (byte)[803BE12D] = gr0
*GameCube Controller*
*Code ported from ZiT Ntsc Usa Version*[/spoiler]

dcx2

You forgot to add 1 to the addresses of the button activators.