Mario Kart Wii Gecko Codes, Cheats, & Hacks
Line Tracers [Skullface] - Printable Version

+- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com)
+-- Forum: Cheat Codes (https://mariokartwii.com/forumdisplay.php?fid=51)
+--- Forum: Online Non-Item (https://mariokartwii.com/forumdisplay.php?fid=52)
+--- Thread: Line Tracers [Skullface] (/showthread.php?tid=2192)



Line Tracers [Skullface] - Skullface - 07-02-2024

Line Tracers [Skullface]

NTSC_U
C250C934 00000004
2C18FFFF 40810010
1DF80004 3DEF8000
908F0B30 C0040000
60000000 00000000
C25887A4 00000003
1DFD0004 3DEF8000
906F0B30 C0030000
60000000 00000000
C278EEF8 00000004
801D008C 1D9B0004
3D8C8150 900C0000
3D608151 93AB0000
60000000 00000000
C27E4C98 00000003
3DE08000 5460063E
1E600004 926F1534
60000000 00000000
C0000000 00000033
9421FF80 BC410008
7DE802A6 3D808151
818C0000 2C0C0000
41820170 3E408000
3DC0809C 81CED110
2C0E0000 4182015C
81CE0020 82721534
7DCE9A14 81CE0000
81CE0024 81CEFFF8
81CE0008 81CE0008
39CE0010 3BEE0068
3F808000 639C0B30
3BA00000 7FDCE82E
7C1EF800 41820031
2C1E0000 41820114
48000039 3BBD0004
7FDCE82E 7C1EF800
41820015 2C1E0000
418200F8 4800001D
4BFFFFE4 3BBD0004
7FDCE82E 7C1EF800
4CA20020 4BFFFFF0
7F6802A6 3D808016
618CDB94 7D8803A6
4E800021 38600009
38800001 3D808016
618CD304 7D8803A6
4E800021 38600000
38800009 38A00001
38C00004 38E00000
3D808016 618CDBC8
7D8803A6 4E800021
38600001 38800007
38A00001 3D808017
618C2784 7D8803A6
4E800021 38600010
38800000 3D808016
618CF274 7D8803A6
4E800021 386000A8
38800000 38A00002
3D808016 618CF050
7D8803A6 4E800021
C01F0000 C03F0004
C05F0008 D0038000
D0238000 D0438000
C01E0000 C03E0004
C05E0008 D0038000
D0238000 D0438000
7F6803A6 4E800020
7DE803A6 B8410008
38210080 4E800020

PAL
C2510DA8 00000004
2C18FFFF 40810010
1DF80004 3DEF8000
908F0B30 C0040000
60000000 00000000
C258EFC8 00000003
1DFD0004 3DEF8000
906F0B30 C0030000
60000000 00000000
C2797F04 00000004
801D008C 1D9B0004
3D8C8150 900C0000
3D608151 93AB0000
60000000 00000000
C27EEFA8 00000003
3DE08000 5460063E
1E600004 926F1534
60000000 00000000
C0000000 00000033
9421FF80 BC410008
7DE802A6 3D808151
818C0000 2C0C0000
41820170 3E408000
3DC0809C 81CE18F8
2C0E0000 4182015C
81CE0020 82721534
7DCE9A14 81CE0000
81CE0024 81CEFFF8
81CE0008 81CE0008
39CE0010 3BEE0068
3F808000 639C0B30
3BA00000 7FDCE82E
7C1EF800 41820031
2C1E0000 41820114
48000039 3BBD0004
7FDCE82E 7C1EF800
41820015 2C1E0000
418200F8 4800001D
4BFFFFE4 3BBD0004
7FDCE82E 7C1EF800
4CA20020 4BFFFFF0
7F6802A6 3D808016
618CDC34 7D8803A6
4E800021 38600009
38800001 3D808016
618CD3A4 7D8803A6
4E800021 38600000
38800009 38A00001
38C00004 38E00000
3D808016 618CDC68
7D8803A6 4E800021
38600001 38800007
38A00001 3D808017
618C2824 7D8803A6
4E800021 38600010
38800000 3D808016
618CF314 7D8803A6
4E800021 386000A8
38800000 38A00002
3D808016 618CF0F0
7D8803A6 4E800021
C01F0000 C03F0004
C05F0008 D0038000
D0238000 D0438000
C01E0000 C03E0004
C05E0008 D0038000
D0238000 D0438000
7F6803A6 4E800020
7DE803A6 B8410008
38210080 4E800020

NTSC_J
C2510728 00000004
2C18FFFF 40810010
1DF80004 3DEF8000
908F0B30 C0040000
60000000 00000000
C258E948 00000003
1DFD0004 3DEF8000
906F0B30 C0030000
60000000 00000000
C2797570 00000004
801D008C 1D9B0004
3D8C8150 900C0000
3D608151 93AB0000
60000000 00000000
C27EE614 00000003
3DE08000 5460063E
1E600004 926F1534
60000000 00000000
C0000000 00000033
9421FF80 BC410008
7DE802A6 3D808151
818C0000 2C0C0000
41820170 3E408000
3DC0809C 81CE0958
2C0E0000 4182015C
81CE0020 82721534
7DCE9A14 81CE0000
81CE0024 81CEFFF8
81CE0008 81CE0008
39CE0010 3BEE0068
3F808000 639C0B30
3BA00000 7FDCE82E
7C1EF800 41820031
2C1E0000 41820114
48000039 3BBD0004
7FDCE82E 7C1EF800
41820015 2C1E0000
418200F8 4800001D
4BFFFFE4 3BBD0004
7FDCE82E 7C1EF800
4CA20020 4BFFFFF0
7F6802A6 3D808016
618CDB54 7D8803A6
4E800021 38600009
38800001 3D808016
618CD2C4 7D8803A6
4E800021 38600000
38800009 38A00001
38C00004 38E00000
3D808016 618CDB88
7D8803A6 4E800021
38600001 38800007
38A00001 3D808017
618C2744 7D8803A6
4E800021 38600010
38800000 3D808016
618CF234 7D8803A6
4E800021 386000A8
38800000 38A00002
3D808016 618CF010
7D8803A6 4E800021
C01F0000 C03F0004
C05F0008 D0038000
D0238000 D0438000
C01E0000 C03E0004
C05E0008 D0038000
D0238000 D0438000
7F6803A6 4E800020
7DE803A6 B8410008
38210080 4E800020

NTSC_K
C24FEDC8 00000004
2C18FFFF 40810010
1DF80004 3DEF8000
908F0B30 C0040000
60000000 00000000
C257D020 00000003
1DFD0004 3DEF8000
906F0B30 C0030000
60000000 00000000
C27862C4 00000004
801D008C 1D9B0004
3D8C8150 900C0000
3D608151 93AB0000
60000000 00000000
C27DD368 00000003
3DE08000 5460063E
1E600004 926F1534
60000000 00000000
C0000000 00000033
9421FF80 BC410008
7DE802A6 3D808151
818C0000 2C0C0000
41820170 3E408000
3DC0809B 81CEFF38
2C0E0000 4182015C
81CE0020 82721534
7DCE9A14 81CE0000
81CE0024 81CEFFF8
81CE0008 81CE0008
39CE0010 3BEE0068
3F808000 639C0B30
3BA00000 7FDCE82E
7C1EF800 41820031
2C1E0000 41820114
48000039 3BBD0004
7FDCE82E 7C1EF800
41820015 2C1E0000
418200F8 4800001D
4BFFFFE4 3BBD0004
7FDCE82E 7C1EF800
4CA20020 4BFFFFF0
7F6802A6 3D808016
618CDCD0 7D8803A6
4E800021 38600009
38800001 3D808016
618CD440 7D8803A6
4E800021 38600000
38800009 38A00001
38C00004 38E00000
3D808016 618CDD04
7D8803A6 4E800021
38600001 38800007
38A00001 3D808017
618C28C0 7D8803A6
4E800021 38600010
38800000 3D808016
618CF3B0 7D8803A6
4E800021 386000A8
38800000 38A00002
3D808016 618CF18C
7D8803A6 4E800021
C01F0000 C03F0004
C05F0008 D0038000
D0238000 D0438000
C01E0000 C03E0004
C05E0008 D0038000
D0238000 D0438000
7F6803A6 4E800020
7DE803A6 B8410008
38210080 4E800020

Code Creator: Skullface
Code Contributors: Bully (Item Spy ASM), Hamster35000vr (Address), mdmwii (P1 Pointer Calculator Helper)

Code:
#============================================================#
#                           Source                           #
#------------------------------------------------------------#
# Unknown Address Ports:                                     #
# RMCE - 0x8050C934                                          #
# RMCP - 0x80510DA8                                          #
# RMCJ - 0x80510728                                          #
# RMCK - 0x804FEDC8                                          #
#============================================================#

.set EVA_Addr, 0x0B30

cmpwi r24, -0x1
ble- the_end
mulli r15, r24, 0x0004
subis r15, r15, 0x8000
stw r4, EVA_Addr (r15)

the_end:
lfs f0, 0x0000 (r4) # Original Instruction

Code:
#============================================================#
#                           Source                           #
#------------------------------------------------------------#
# Unknown Address Ports:                                     #
# RMCE - 0x805887A4                                          #
# RMCP - 0x8058EFC8                                          #
# RMCJ - 0x8058E948                                          #
# RMCK - 0x8057D020                                          #
#============================================================#

.set EVA_Addr, 0x0B30

mulli r15, r29, 0x0004
subis r15, r15, 0x8000
stw r3, EVA_Addr (r15)
lfs f0, 0x0000 (r3) # Original Instruction
Code:
#============================================================#
#                           Source                           #
#------------------------------------------------------------#
# Unknown Address Ports:                                     #
# RMCE - 0x8078EEF8                                          #
# RMCP - 0x80797F04                                          #
# RMCJ - 0x80797570                                          #
# RMCK - 0x807862C4                                          #
#============================================================#

lwz r0, 0x008C (r29) # Original Instruction
mulli r12, r27, 0x0004
addis r12, r12, 0x8150
stw r0, 0x0000 (r12)
lis r11, 0x8151
stw r29, 0x0000 (r11)
Code:
#============================================================#
#                           Source                           #
#------------------------------------------------------------#
# Unknown Address Ports:                                     #
# RMCE - 0x807E4C98                                          #
# RMCP - 0x807EEFA8                                          #
# RMCJ - 0x807EE614                                          #
# RMCK - 0x807DD368                                          #
#============================================================#

lis r15, 0x8000
rlwinm r0, r3, 0, 24, 31 # Original Instruction
mulli r19, r0, 0x0004
stw r19, 0x1534 (r15)
Code:
#============================================================#
#                           Source                           #
#------------------------------------------------------------#
# C0 Codetype                                                #
#============================================================#

.set region, '' # Put in e,p,j,k for compilation region
.set EVA_Addr, 0x0B30

# Push the Stack
stwu r1, -0x80 (r1)
stmw r2, 0x0008 (r1)

# Backup LR because C0
mflr r15

# Check if we're in a race
lis r12, 0x8151
lwz r12, 0x0000 (r12)
cmpwi r12, 0x0000
beq- the_end

lis r18, 0x8000

# KartManager_s_instance Address
.if (region == 'E' || region == 'e') # RMCE
lis r14, 0x809C
lwz r14, 0xFFFFD110 (r14)
.elseif (region == 'P' || region == 'p') # RMCP
lis r14, 0x809C
lwz r14, 0x18F8 (r14)
.elseif (region == 'J' || region == 'j') # RMCJ
lis r14, 0x809C
lwz r14, 0x0958 (r14)
.elseif (region == 'K' || region == 'k') # RMCK
lis r14, 0x809B
lwz r14, 0xFFFFFF38 (r14)
.endif

# Check if P1 Pointer is null (seems to only happen on real hardware)
cmpwi r14, 0x0000
beq- the_end

# Calculate P1 Pointer
lwz r14, 0x0020 (r14)
lwz r19, 0x1534 (r18)
add r14, r14, r19
lwz r14, 0x0000 (r14)
lwz r14, 0x0024 (r14)
lwz r14, -0x8 (r14)
lwz r14, 0x0008 (r14)
lwz r14, 0x0008 (r14)
addi r14, r14, 0x0010
addi r31, r14, 0x0068

# Check if the first pointer is a P1 Pointer
lis r28, 0x8000
ori r28, r28, EVA_Addr
li r29, 0x0000
lwzx r30, r28, r29
cmpw r30, r31
beql- fix_r30_value

# Check if we're at the end of the player pointer list
cmpwi r30, 0x0000
beq- the_end

bl call_draw_functions

loop:
addi r29, r29, 0x0004
lwzx r30, r28, r29
cmpw r30, r31
beql- fix_r30_value

# Check if we're at the end of the player pointer list
cmpwi r30, 0x0000
beq- the_end

bl call_draw_functions
b loop

fix_r30_value:
addi r29, r29, 0x0004
lwzx r30, r28, r29
cmpw r30, r31
bnelr+
b fix_r30_value

call_draw_functions:

# Backup LR
mflr r27

.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8016
ori r12, r12, 0xDB94
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8016
ori r12, r12, 0xDC34
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8016
ori r12, r12, 0xDB54
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8016
ori r12, r12, 0xDCD0
.endif
mtlr r12
blrl # Call GXClearVtxDesc

li r3, 0x9 # GX_VA_POS
li r4, 0x1 # GX_DIRECT
.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8016
ori r12, r12, 0xD304
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8016
ori r12, r12, 0xD3A4
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8016
ori r12, r12, 0xD2C4
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8016
ori r12, r12, 0xD440
.endif
mtlr r12
blrl # Call GXSetVtxDesc

li r3, 0   # GX_VTXFMT0
li r4, 0x9 # GX_VA_POS
li r5, 0x1 # GX_POS_XYZ
li r6, 0x4 # GX_F32
li r7, 0
.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8016
ori r12, r12, 0xDBC8
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8016
ori r12, r12, 0xDC68
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8016
ori r12, r12, 0xDB88
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8016
ori r12, r12, 0xDD04
.endif
mtlr r12
blrl # Call GXSetVtxAttrFmt

li r3, 0x1 # GX_TRUE
li r4, 0x7 # GX_ALWAYS
li r5, 0x1 # GX_TRUE
.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8017
ori r12, r12, 0x2784
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8017
ori r12, r12, 0x2824
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8017
ori r12, r12, 0x2744
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8017
ori r12, r12, 0x28C0
.endif
mtlr r12
blrl # Call GXSetZMode

li r3, 0x10 # Width of the lines
li r4, 0    # GX_TO_ZERO
.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8016
ori r12, r12, 0xF274
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8016
ori r12, r12, 0xF314
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8016
ori r12, r12, 0xF234
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8016
ori r12, r12, 0xF3B0
.endif
mtlr r12
blrl # Call GXSetLineWidth

li r3, 0xA8 # GX_LINES
li r4, 0x00 # GX_VTXFMT0
li r5, 0x02 # Amount of points
.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8016
ori r12, r12, 0xF050
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8016
ori r12, r12, 0xF0F0
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8016
ori r12, r12, 0xF010
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8016
ori r12, r12, 0xF18C
.endif
mtlr r12
blrl # Call GXBegin

# Get P1 X, Z, and Y and send it
lfs f0, 0x0000 (r31)
lfs f1, 0x0004 (r31)
lfs f2, 0x0008 (r31)
stfs f0, -0x8000 (r3)
stfs f1, -0x8000 (r3)
stfs f2, -0x8000 (r3)

# Get PX X, Z, and Y and send it
lfs f0, 0x0000 (r30)
lfs f1, 0x0004 (r30)
lfs f2, 0x0008 (r30)
stfs f0, -0x8000 (r3)
stfs f1, -0x8000 (r3)
stfs f2, -0x8000 (r3)

# Restore LR
mtlr r27

# Return from Call
blr

the_end:

# Restore LR because C0
mtlr r15

# Pop the Stack
lmw r2, 0x0008 (r1)
addi r1, r1, 0x0080