Air-O-Meter; TT's Only [Vega]
#1
Air-O-Meter; TT's Only [Vega]

NOTE: Outdated by Universal Meter in main Codes forum since that can show Air in both TTs and Online

This code will tell you how long you have been in flight (air time). The unit of measurement is in frames. This will only work in Solo Time Trials.

NTSC-U
C2576FBC 00000003
8003001C 3D808053
3D6038A0 7D6B0214
916C10A0 00000000

PAL
C257D820 00000003
8003001C 3D808053
3D6038A0 7D6B0214
916C5BE8 00000000

NTSC-J
C257D1A0 00000003
8003001C 3D808053
3D6038A0 7D6B0214
916C5568 00000000

NTSC-K
C256B878 00000003
8003001C 3D808052
3D6038A0 7D6B0214
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

lwz r0, 0x001C (r3) #Default Instruction, r0 holds air time

lis r12, _1sthalf
lis r11, 0x38A0
add r11, r11, r0 #Can't do addis w/o lis due to r0 being source register
stw r11, _2ndhalf (r12)



Code creator: Vega
Code credit(s): Bully (Millisecond Display Modifier Code creator), mdmwii (subroutine founder for Millisecond Display)
Reply
#2
This Code doesn't seem to be working on Dolphin, But nice job on the code!
Also the unit of measurement is in frames.
Reply
#3
(11-29-2018, 04:08 PM)SwareJonge Wrote: This Code doesn't seem to be working on Dolphin, But nice job on the code!

Thank you. Regarding Dolphin. Make sure your Copy XFB Texture settings is unchecked/disabled.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)