Universal Meter (zak's version)
#1
Universal Meter (zak's version)

NOTE: Outdated by SwareJonge's version. Jonge's version also works in ghost TTs, Offline VS, and Grand Prix.

Works in Online VS and in TT's. When in TT mode, only do Solo Racing. Does NOT work in Grand Prix, Offline VS, or any type of Battle.

Instead of having separate codes/threads for Air, Mini-Turbo Charge, Shroom Boost, etc. This code will allow you to choose one of those options to use within one whole code. The Universal Meter can be broken up with the following...

Air-O-Meter
Boost from MT Release Meter
Boost from both MT & Stand Still Release Meter
Blue Mini Turbo Only Charge Meter**
Orange Mini Turbo Only Charge Meter**
Mushroom/Zipper Boost Meter
Stand Still Charge Meter
Trick Boost Meter

**If you are looking for the MT Charge Meter that reads both Blue & Orange levels, that is HERE.
***If you are looking for the Speed-O-Meter, that is HERE.

This code will read the output value of the selected option on the millisecond section of your timer.

XXX Values:
0FE = Blue Mini Turbo Only Charge Meter
100 = Orange Mini Turbo Only Charge Meter
102 = Boost from Mini Turbo Release Meter
10C = Boost from Both MT and Stand Still Release Meter
110 = Mushroom/Zipper Boost Meter
114 = Trick Boost Meter
14C = Stand Still Charge Meter
21A = Air Time Meter

NTSC-U
C2590F20 00000003
B36300C8 A1630XXX
3D808053 3D6B38A0
916C10A0 00000000

PAL
C2597744 00000003
B36300C8 A1630XXX
3D808053 3D6B38A0
916C5BE8 00000000

NTSC-J
C25970C4 00000003
B36300C8 A1630XXX
3D808053 3D6B38A0
916C5568 00000000

NTSC-K
C258579C 00000003
B36300C8 A1630XXX
3D808052 3D6B38A0
916C3C40 00000000



Source:
#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

.set _mtc , 0xFE #MT Charge
.set _omtc, 0x100 #Kart Only Orange MT Charge
.set _mtb, 0x102 #Boost from MT Release
.set _ssmtb, 0x10C #Boost from both Stand Still Charge & MT's
.set _mushb, 0x110 #Mushroom/Zipper Boost
.set _trikb, 0x114 #Trick Boost
.set _ssc, 0x14C #Stand Still Charge
.set _air, 0x21A #Air Time

sth r27, 0x00C8 (r3) #Default Instruction

lhz r11, _air (r3) #Air Time used just for compilation, use whatever value/label you want

lis r12, _1sthalf #Set 1st half address of Millisecond Display Mod
addis r11, r11, 0x38A0 #Add 0x38A00000 to value of r11
stw r11, _2ndhalf (r12) #Replace instruction at address of Millisecond Display Mod



Code creator: zak
Code credits: Bully (Millisecond Display Modifier Code creator); mdmwii (subroutine founder for Millisecond Display)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)