Golden Mushroom Timer (Online only) [Vega]
NOTE: Outdated by JoshuaMK's Item Timer Code
Works Online only!
This code will keep track (via Milliseconds in timer) of how long you have left before your Golden Mushroom runs out. Whenever you are not using a Golden, the timer will function normally.
NTSC-U
C2658828 00000003
3D808053 3D6080A1
616B0024 916C10A0
9903001F 00000000
C27ADD30 00000005
3403FFFF 3D808053
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C10A0 00000000
PAL
C2660764 00000003
3D808053 3D6080A1
616B0024 916C5BE8
9903001F 00000000
C27BC790 00000005
3403FFFF 3D808053
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C5BE8 00000000
NTSC-J
C265FDD0 00000003
3D808053 3D6080A1
616B0024 916C5568
9903001F 00000000
C27BBDFC 00000005
3403FFFF 3D808053
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C5568 00000000
NTSC-K
C264EA7C 00000003
3D808052 3D6080A1
616B0024 916C3C40
9903001F 00000000
C27AAB50 00000005
3403FFFF 3D808052
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C3C40 00000000
Source for Timer Reset In Between Races:
#Values per Region
.set region, '' #Must set region value, or else source will not compile
.if (region == 'E' || region == 'e') # RMCE
.set _1sthalf, 0x8053
.set _2ndhalf, 0x10A0
.elseif (region == 'P' || region == 'p') # RMCP
.set _1sthalf, 0x8053
.set _2ndhalf, 0x5BE8
.elseif (region == 'J' || region == 'j') # RMCJ
.set _1sthalf, 0x8053
.set _2ndhalf, 0x5568
.elseif (region == 'K' || region == 'k') # RMCK
.set _1sthalf, 0x8052
.set _2ndhalf, 0x3C40
.else # Invalid Region
.abort
.endif
lis r12, _1sthalf
lis r11, 0x80A1 #Default Word Value (instruction) at Millisecond Display Code Address
ori r11, r11, 0x0024
stw r11, _2ndhalf (r12)
stb r8, 0x001F (r3) #Default Instruction
=====
Source for Golden Mushroom Timer (NTSC-K):
subic. r0, r3, 1 #Default ASM, Condition Register is now set
lis r12, 0x8052 #Set 1st half address for Millisecond Display Modifier address
beq- fix_timer #If value in r0 is equal to 0, we need to now set the timer back to normal, jump to fix_timer label
lis r11, 0x38A0 #Set 1st half of word value to write to Millisecond Display address
add r11, r11, r0 #Add r11 and r0 together to get finalized word value
b the_end #No need to fix timer ofc, jump to the_end label
fix_timer:
lis r11, 0x80A1 #Set 1st half of default word value to write to Millisecond Display address
ori r11, r11, 0x0024 #Set 2nd half of default word value
the_end:
stw r11, 0x3C40 (r12) #Store word of r11 to 0x80523C40, 2nd half of address completed by offset
Code creator: Vega
Code credits: Bully (Millisecond Display Modifier & Address founder for Golden Mushroom ASM)
NOTE: Outdated by JoshuaMK's Item Timer Code
Works Online only!
This code will keep track (via Milliseconds in timer) of how long you have left before your Golden Mushroom runs out. Whenever you are not using a Golden, the timer will function normally.
NTSC-U
C2658828 00000003
3D808053 3D6080A1
616B0024 916C10A0
9903001F 00000000
C27ADD30 00000005
3403FFFF 3D808053
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C10A0 00000000
PAL
C2660764 00000003
3D808053 3D6080A1
616B0024 916C5BE8
9903001F 00000000
C27BC790 00000005
3403FFFF 3D808053
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C5BE8 00000000
NTSC-J
C265FDD0 00000003
3D808053 3D6080A1
616B0024 916C5568
9903001F 00000000
C27BBDFC 00000005
3403FFFF 3D808053
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C5568 00000000
NTSC-K
C264EA7C 00000003
3D808052 3D6080A1
616B0024 916C3C40
9903001F 00000000
C27AAB50 00000005
3403FFFF 3D808052
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C3C40 00000000
Source for Timer Reset In Between Races:
#Values per Region
.set region, '' #Must set region value, or else source will not compile
.if (region == 'E' || region == 'e') # RMCE
.set _1sthalf, 0x8053
.set _2ndhalf, 0x10A0
.elseif (region == 'P' || region == 'p') # RMCP
.set _1sthalf, 0x8053
.set _2ndhalf, 0x5BE8
.elseif (region == 'J' || region == 'j') # RMCJ
.set _1sthalf, 0x8053
.set _2ndhalf, 0x5568
.elseif (region == 'K' || region == 'k') # RMCK
.set _1sthalf, 0x8052
.set _2ndhalf, 0x3C40
.else # Invalid Region
.abort
.endif
lis r12, _1sthalf
lis r11, 0x80A1 #Default Word Value (instruction) at Millisecond Display Code Address
ori r11, r11, 0x0024
stw r11, _2ndhalf (r12)
stb r8, 0x001F (r3) #Default Instruction
=====
Source for Golden Mushroom Timer (NTSC-K):
subic. r0, r3, 1 #Default ASM, Condition Register is now set
lis r12, 0x8052 #Set 1st half address for Millisecond Display Modifier address
beq- fix_timer #If value in r0 is equal to 0, we need to now set the timer back to normal, jump to fix_timer label
lis r11, 0x38A0 #Set 1st half of word value to write to Millisecond Display address
add r11, r11, r0 #Add r11 and r0 together to get finalized word value
b the_end #No need to fix timer ofc, jump to the_end label
fix_timer:
lis r11, 0x80A1 #Set 1st half of default word value to write to Millisecond Display address
ori r11, r11, 0x0024 #Set 2nd half of default word value
the_end:
stw r11, 0x3C40 (r12) #Store word of r11 to 0x80523C40, 2nd half of address completed by offset
Code creator: Vega
Code credits: Bully (Millisecond Display Modifier & Address founder for Golden Mushroom ASM)