(NTSC-U)
C252FEB4 00000011
3D808140 80AC179A
28050000 6000XXXX
41820010 80A30044
38A50001 90A30044
38A40001 40820008
90A30044 B0A30024
28050001 4182000C
7C040040 40810048
8B830023 3B9C0001
9B830023 838C179A
281C0000 40820030
28040000 40820028
894C1799 7D4903A6
838C17A2 A95C0024
7D405050 915C0044
3B9C00C4 4200FFF0
938C179A 00000000
C2791674 00000002
3D808140 8B84F0B0
9B8C1799 00000000
C27E4C9C 00000002
3D808140 807FEE20
906C179E 00000000
C27ED9F8 00000003
3D808140 838C17A2
2C1C0000 41820008
A39C0024 00000000
C25309C0 0000000A
807E0044 3D808140
816C179E 280B0000
41820038 896C17D2
280B0000 4082002C
888C1799 7C8903A6
618B179E 97CB0004
3BDE00C4 4200FFF8
396000C4 7D6B21D6
7FCBF050 9B0C17D2
60000000 00000000
C253068C 00000004
817A0044 899A0023
3803FFFF 398CFFFF
396BFFFF 917A0044
999A0023 00000000
04530110 A81D0022
(PAL)
C25349FC 00000011
3D808140 80AC179A
28050000 6000XXXX
41820010 80A30044
38A50001 90A30044
38A40001 40820008
90A30044 B0A30024
28050001 4182000C
7C040040 40810048
8B830023 3B9C0001
9B830023 838C179A
281C0000 40820030
28040000 40820028
894C1799 7D4903A6
838C17A2 A95C0024
7D405050 915C0044
3B9C00C4 4200FFF0
938C179A 00000000
C279A680 00000002
3D808140 8B8438B8
980C1799 00000000
C27EEFAC 00000002
3D808140 807F3618
906C179E 00000000
C27F84F8 00000003
3D808140 838C17A2
2C1C0000 41820008
A39C0024 00000000
C2535508 0000000A
807E0044 3D808140
816C179E 280B0000
41820038 896C17D2
280B0000 4082002C
888C1799 7C8903A6
618B179E 97CB0004
3BDE00C4 4200FFF8
396000C4 7D6B21D6
7FCBF050 9B0C17D2
60000000 00000000
C25351D4 00000004
817A0044 899A0023
3803FFFF 398CFFFF
396BFFFF 917A0044
999A0023 00000000
04534C58 A81D0022
(NTSC-J)
C253437C 00000011
3D808140 80AC179A
28050000 6000XXXX
41820010 80A30044
38A50001 90A30044
38A40001 40820008
90A30044 B0A30024
28050001 4182000C
7C040040 40810048
8B830023 3B9C0001
9B830023 838C179A
281C0000 40820030
28040000 40820028
894C1799 7D4903A6
838C17A2 A95C0024
7D405050 915C0044
3B9C00C4 4200FFF0
938C179A 00000000
C2799CEC 00000002
3D808140 8B842918
980C1799 00000000
C27EE618 00000002
3D808140 807F2678
906C179E 00000000
C27F7B64 00000003
3D808140 838C17A2
2C1C0000 41820008
A39C0024 00000000
C2534E88 0000000A
807E0044 3D808140
816C179E 280B0000
41820038 896C17D2
280B0000 4082002C
888C1799 7C8903A6
618B179E 97CB0004
3BDE00C4 4200FFF8
396000C4 7D6B21D6
7FCBF050 9B0C17D2
60000000 00000000
C2534B54 00000004
817A0044 899A0023
3803FFFF 398CFFFF
396BFFFF 917A0044
999A0023 00000000
045345D8 A81D0022
(NTSC-K)
C2522A58 00000011
3D808140 80AC179A
28050000 6000XXXX
41820010 80A30044
38A50001 90A30044
38A40001 40820008
90A30044 B0A30024
28050001 4182000C
7C040040 40810048
8B830023 3B9C0001
9B830023 838C179A
281C0000 40820030
28040000 40820028
894C1799 7D4903A6
838C17A2 A95C0024
7D405050 915C0044
3B9C00C4 4200FFF0
938C179A 00000000
C2791674 00000002
3D808140 8B84F0B0
9B8C1799 00000000
C27DD36C 00000002
3D808140 807F1C58
906C179E 00000000
C27E68B8 00000003
3D808140 838C17A2
2C1C0000 41820008
A39C0024 00000000
C2523560 0000000A
807E0044 3D808140
816C179E 280B0000
41820038 896C17D2
280B0000 4082002C
888C1799 7C8903A6
618B179E 97CB0004
3BDE00C4 4200FFF8
396000C4 7D6B21D6
7FCBF050 9B0C17D2
60000000 00000000
C252322C 00000004
817A0044 899A0023
3803FFFF 398CFFFF
396BFFFF 917A0044
999A0023 00000000
04522CB0 A81D0022
XXXX = Number of Extra Laps
#Source ASM (NTSC-U)
###################
#Inject > 807E4C9C#
###################
lis r12, 0x8140
lwz r3, -0x1130 (r31)
stw r3, 0x179e (r12)
###################
#Inject > 807ED9F8#
###################
lis r12, 0x8140 #Load Custom Lap Address in Mem81
lwz r28, 0x17a2 (r12)
cmpwi r28, 0
beq the_end
lhz r28, 0x0024 (r28)
the_end:
###################
#Inject > 8053068C#
###################
lwz r11, 0x0044 (r26)
lbz r12, 0x0023 (r26)
subi r0, r3, 1
subi r12, r12, 1
subi r11, r11, 1
stw r11, 0x0044 (r26)
stb r12, 0x0023 (r26)
###################
#Inject > 805309C0#
###################
lwz r3, 0x0044 (r30)
lis r12, 0x8140
lwz r11, 0x179e (r12)
cmplwi r11, 0
beq normal_code
lbz r11, 0x17d2 (r12)
cmplwi r11, 0
bne normal_code
lbz r4, 0x1799 (r12)
mtctr r4
ori r11, r12, 0x179e
loop_back:
stwu r30, 0x0004 (r11)
addi r30, r30, 0x00c4
bdnz+ loop_back
li r11, 0x00c4
mul r11, r11, r4
sub r30, r30, r11
stb r24, 0x17d2 (r12)
normal_code:
###################
#Inject > 80791674#
###################
lis r12, 0x8140
lbz r28, -0x0F50 (r4)
stb r0, 0 (r12)
###################
#Inject > 8052FEB4#
###################
lis r12, 0x8140
lwz r5, 0x179a (r12)
cmplwi r5, 0
ori r0, r0, 0xFFFF
beq normal
lwz r5, 0x0044 (r3)
addi r5, r5, 1
stw r5, 0x0044 (r3)
normal:
addi r5, r4, 1 #Add 1 and Compare To Wanted Lap Amount
bne store
stw r5, 0x0044 (r3) #Store Lap to Custom Position Tracker
store:
sth r5, 0x0024 (r3) #Store to Custom Lap Tracker
cmplwi r5, 1
beq lap_one #Branch If Crossing Onto Lap 1
cmplw r4, r0
ble the_end #Branch if Less Than Wanted Lap Amount
lap_one:
lbz r28, 0x0023 (r3) #Load Vanilla Lap Into Memory
addi r28, r28, 1 #Add 1 to Lap Amount
stb r28, 0x0023 (r3) #Store Lap Into Vanilla Lap Tracker
lwz r28, 0x179a (r12)
cmplwi r28, 0
bne the_end
cmplwi r4, 0 #Compare Vanilla Lap to Custom Lap Threshold + 2. (Looking at it I need to set r28 to r5.)
bne the_end
lbz r10, 0x1799 (r12) #Set CTR to 12 (For the 12 Racers.)
mtctr r10
lwz r28, 0x17a2 (r12)
loop: #This Loop Sets the Position Lap Tracker to be 3 or Less to Fix Position Issues. Don't Touch This.
lha r10, 0x0024 (r28)
sub r10, r10, r0
stw r10, 0x0044 (r28)
addi r28, r28, 0x00c4
bdnz+ loop
stw r28, 0x179a (r12)
the_end: