Wow that would be a problem. I also fixed the player states too so you don't "slide" anymore, although a bug with the handling range is still present. Try this
(NTSC-U)
C258FDC0 00000009
3D80XXXX A18CYYYY
7180ZZZZ 3D808000
A0AC01C0 B00C01C0
7C8C2378 80840014
41820024 2C050000
40A2001C 68840010
908C0014 80AC0004
54A50104 54A50776
90AC0004 00000000
(PAL)
C25965E4 00000009
3D80XXXX A18CYYYY
7180ZZZZ 3D808000
A0AC01C0 B00C01C0
7C8C2378 80840014
41820024 2C050000
40A2001C 68840010
908C0014 80AC0004
54A50104 54A50776
90AC0004 00000000
(NTSC-J)
C2595F64 00000009
3D80XXXX A18CYYYY
7180ZZZZ 3D808000
A0AC01C0 B00C01C0
7C8C2378 80840014
41820024 2C050000
40A2001C 68840010
908C0014 80AC0004
54A50104 54A50776
90AC0004 00000000
(NTSC-K)
C258463C 00000009
3D80XXXX A18CYYYY
7180ZZZZ 3D808000
A0AC01C0 B00C01C0
7C8C2378 80840014
41820024 2C050000
40A2001C 68840010
908C0014 80AC0004
54A50104 54A50776
90AC0004 00000000
.set region, '' #Must set region value, or else source will not compile
.if (region == 'E' || region == 'e') # RMCE
.macro controller_address
lis r12, 0x8034
.endm
.elseif (region == 'P' || region == 'p') # RMCP
.macro controller_address
lis r12, 0x8034
.endm
.elseif (region == 'J' || region == 'j') # RMCJ
.macro controller_address
lis r12, 0x8034
.endm
.elseif (region == 'K' || region == 'k') # RMCK
.macro controller_address
lis r12, 0x8033
.endm
.else # Invalid Region
.abort
.endif
controller_address
lhz r12, 0x3E80 (r12)
andi. r0, r12, 0x10 #Z button
lis r12, 0x8000
lhz r5, 0x1C0 (r12)
sth r0, 0x1C0 (r12)
mr r12, r4
lwz r4, 0x14 (r4)
beq- noPress
cmpwi r5, 0
bne+ noPress
xori r4, r4, 0x10
stw r4, 0x14 (r12)
lwz r5, 0x4 (r12)
rlwinm r5, r5, 0, 4, 2
rlwinm r5, r5, 0, 29, 27
stw r5, 0x4 (r12)
noPress:
XXXX = Upper Controller Address
YYYY = Lower Controller Address
ZZZZ = Button to Press
(NTSC-U)
C258FDC0 00000009
3D80XXXX A18CYYYY
7180ZZZZ 3D808000
A0AC01C0 B00C01C0
7C8C2378 80840014
41820024 2C050000
40A2001C 68840010
908C0014 80AC0004
54A50104 54A50776
90AC0004 00000000
(PAL)
C25965E4 00000009
3D80XXXX A18CYYYY
7180ZZZZ 3D808000
A0AC01C0 B00C01C0
7C8C2378 80840014
41820024 2C050000
40A2001C 68840010
908C0014 80AC0004
54A50104 54A50776
90AC0004 00000000
(NTSC-J)
C2595F64 00000009
3D80XXXX A18CYYYY
7180ZZZZ 3D808000
A0AC01C0 B00C01C0
7C8C2378 80840014
41820024 2C050000
40A2001C 68840010
908C0014 80AC0004
54A50104 54A50776
90AC0004 00000000
(NTSC-K)
C258463C 00000009
3D80XXXX A18CYYYY
7180ZZZZ 3D808000
A0AC01C0 B00C01C0
7C8C2378 80840014
41820024 2C050000
40A2001C 68840010
908C0014 80AC0004
54A50104 54A50776
90AC0004 00000000
.set region, '' #Must set region value, or else source will not compile
.if (region == 'E' || region == 'e') # RMCE
.macro controller_address
lis r12, 0x8034
.endm
.elseif (region == 'P' || region == 'p') # RMCP
.macro controller_address
lis r12, 0x8034
.endm
.elseif (region == 'J' || region == 'j') # RMCJ
.macro controller_address
lis r12, 0x8034
.endm
.elseif (region == 'K' || region == 'k') # RMCK
.macro controller_address
lis r12, 0x8033
.endm
.else # Invalid Region
.abort
.endif
controller_address
lhz r12, 0x3E80 (r12)
andi. r0, r12, 0x10 #Z button
lis r12, 0x8000
lhz r5, 0x1C0 (r12)
sth r0, 0x1C0 (r12)
mr r12, r4
lwz r4, 0x14 (r4)
beq- noPress
cmpwi r5, 0
bne+ noPress
xori r4, r4, 0x10
stw r4, 0x14 (r12)
lwz r5, 0x4 (r12)
rlwinm r5, r5, 0, 4, 2
rlwinm r5, r5, 0, 29, 27
stw r5, 0x4 (r12)
noPress:
XXXX = Upper Controller Address
YYYY = Lower Controller Address
ZZZZ = Button to Press
Super Mario Eclipse, what Super Mario Sunshine could've been.