Force Ghost/Opaque Effect [JoshuaMK]
With this code you can force the game to load you as a ghost in Time Trials, and/or force the cpu to load as a normal racer.
In 1P vs. and Grand Prix mode this code causes three cpus to not drive at all. Multiplayer vs. mode has not been tested.
Not holding any buttons make everyone normal
(NTSC-U)
C258C810 00000008
80030038 28040004
4080002C 3D808034
618CXXXX A18C0000
280CYYYY 41820014
280CZZZZ 40820010
38000000 48000008
38000003 90030038
60000000 00000000
(PAL)
C2593034 00000008
80030038 28040004
4080002C 3D808034
618CXXXX A18C0000
280CYYYY 41820014
280CZZZZ 40820010
38000000 48000008
38000003 90030038
60000000 00000000
(NTSC-J)
C25929B4 00000008
80030038 28040004
4080002C 3D808034
618CXXXX A18C0000
280CYYYY 41820014
280CZZZZ 40820010
38000000 48000008
38000003 90030038
60000000 00000000
(NTSC-K)
C258108C 00000008
80030038 28040004
4080002C 3D808033
618CXXXX A18C0000
280CYYYY 41820014
280CZZZZ 40820010
38000000 48000008
38000003 90030038
60000000 00000000
Guide
Note: This code makes use of user input. See this guide for reference on filling in values: https://mkwii.com/showthread.php?tid=44
XXXX = Controller Address
YYYY = Button to Make you + CPU a ghost
ZZZZ = Button to Make you + CPU be opaque
#~~~~~~~#
#Source ASM#
#~~~~~~~#
#~~~~~~~~~~~~~~#
#Macros and Statements#
#~~~~~~~~~~~~~~#
.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
#~~~~~~~~~#
#Start Assembly#
#~~~~~~~~~#
lwz r0, 0x0038 (r3)
cmplwi r4, 4
bge the_end
controller_address
ori r12, r12, 0x3E80
lhz r12, 0 (r12)
cmplwi r12, 0x0088
beq make_everyone_ghost
cmplwi r12, 0x0084
bne the_end
li r0, 0
b the_end
make_everyone_ghost:
li r0, 3
the_end:
stw r0, 0x0038 (r3)
Code Creator: JoshuaMK
With this code you can force the game to load you as a ghost in Time Trials, and/or force the cpu to load as a normal racer.
In 1P vs. and Grand Prix mode this code causes three cpus to not drive at all. Multiplayer vs. mode has not been tested.
Not holding any buttons make everyone normal
(NTSC-U)
C258C810 00000008
80030038 28040004
4080002C 3D808034
618CXXXX A18C0000
280CYYYY 41820014
280CZZZZ 40820010
38000000 48000008
38000003 90030038
60000000 00000000
(PAL)
C2593034 00000008
80030038 28040004
4080002C 3D808034
618CXXXX A18C0000
280CYYYY 41820014
280CZZZZ 40820010
38000000 48000008
38000003 90030038
60000000 00000000
(NTSC-J)
C25929B4 00000008
80030038 28040004
4080002C 3D808034
618CXXXX A18C0000
280CYYYY 41820014
280CZZZZ 40820010
38000000 48000008
38000003 90030038
60000000 00000000
(NTSC-K)
C258108C 00000008
80030038 28040004
4080002C 3D808033
618CXXXX A18C0000
280CYYYY 41820014
280CZZZZ 40820010
38000000 48000008
38000003 90030038
60000000 00000000
Guide
Note: This code makes use of user input. See this guide for reference on filling in values: https://mkwii.com/showthread.php?tid=44
XXXX = Controller Address
YYYY = Button to Make you + CPU a ghost
ZZZZ = Button to Make you + CPU be opaque
#~~~~~~~#
#Source ASM#
#~~~~~~~#
#~~~~~~~~~~~~~~#
#Macros and Statements#
#~~~~~~~~~~~~~~#
.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
#~~~~~~~~~#
#Start Assembly#
#~~~~~~~~~#
lwz r0, 0x0038 (r3)
cmplwi r4, 4
bge the_end
controller_address
ori r12, r12, 0x3E80
lhz r12, 0 (r12)
cmplwi r12, 0x0088
beq make_everyone_ghost
cmplwi r12, 0x0084
bne the_end
li r0, 0
b the_end
make_everyone_ghost:
li r0, 3
the_end:
stw r0, 0x0038 (r3)
Code Creator: JoshuaMK
Super Mario Eclipse, what Super Mario Sunshine could've been.