Checkpoint Region Display [Vega]
#1
Checkpoint Region Display [Vega]

This code will display (via the milliseconds section of the timer) the current checkpoint region that you are in. Works in Solo TT and Online only.

NTSC-U
C2530930 00000005
A0DE000A 3D808053
64CB38A0 956C10A0
7C00606C 7C0004AC
7C0067AC 4C00012C
60000000 00000000

PAL
C2535478 00000005
A0DE000A 3D808053
64CB38A0 956C5BE8
7C00606C 7C0004AC
7C0067AC 4C00012C
60000000 00000000

NTSC-J
C2534DF8 00000005
A0DE000A 3D808053
64CB38A0 956C5568
7C00606C 7C0004AC
7C0067AC 4C00012C
60000000 00000000

NTSC-K
C25234D0 00000005
A0DE000A 3D808052
64CB38A0 956C3C40
7C00606C 7C0004AC
7C0067AC 4C00012C
60000000 00000000



Source:

#Address ports
#80530930 = NTSC-U
#80535478 = PAL
#80534DF8 = NTSC-J
#805234D0 = NTSC-K

.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
    .err
.endif

#Default Instruction, r6 holds checkpoint region value
lhz r6, 0x000A (r30)

#Set Address upper bits, Or in ckpt value
lis r12, _1sthalf
oris r11, r6, 0x38A0 #Or 0x38A00000 to r6

#Write new instruction in memory, store data cache, invalidate instruction cache
stwu r11, _2ndhalf (r12)
dcbst 0, r12
sync
icbi 0, r12
isync

Code creator: Vega
Code credits: SwareJonge (Used his original code to help find the checkpoint value in dynamic/high Mem80, which helped setup a read breakpoint); Bully (Millisecond Display Modifier Code creator); mdmwii (subroutine founder for Millisecond Display)
Reply
#2
Code doesn't work properly for me. The CP display is stuck from the beginning of the race and doesn't update when new checkpoints are reached. I'm on dolphin, so that may be the issue :/
Reply
#3
Were you in Solo TT or an online VS race?

What version of Dolphin are you using? Are you using a modified codehandler?

Do you have the option 'Store XFB Copies to Texture Only' disabled in your Graphics settings?
Reply
#4
I tested it (NTSC-U and NTSC-K) and it gets stuck at 35 (on MG) at the start and doesn't update.
Discord: Alina.#6309
Twitter: @RMCW01

[Image: Screenshot_2021-02-15_184623.png]
Reply
#5
(09-15-2020, 04:13 PM)Jeffy/Wrath Wrote: I tested it (NTSC-U and NTSC-K) and it gets stuck at 35 (on MG) at the start and doesn't update.

Are you on Dolphin? If not, how are you loading your cheats. I remember making this and had no issues during testing.
Reply
#6
Im on dolphin, im using the dolphin code loader thing (in the game settings > Gecko Codes.). I have XFB off, I can test on wii if you want
Discord: Alina.#6309
Twitter: @RMCW01

[Image: Screenshot_2021-02-15_184623.png]
Reply
#7
Try it on any HBC app that uses the original Gecko 1.9.3.1 code handler (ex: any version of USB loader GX). Go on Solo TT or online, and see how it goes.
Reply
#8
works fine on wii (tested on Gecko 1.9.3.1, NTSC-J, VBI Hooktype) so its just a problem with dolphin
Discord: Alina.#6309
Twitter: @RMCW01

[Image: Screenshot_2021-02-15_184623.png]
Reply
#9
its updating an instruction, try flushing the cache on that address and it should fix the bug
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply
#10
(09-17-2020, 06:00 AM)JoshuaMK Wrote: its updating an instruction, try flushing the cache on that address and it should fix the bug

Ty Josh.

here's a new version for anyone to try

Code:
NTSC-U
C2530930 00000005
A0DE000A 3D808053
64CB38A0 956C10A0
7C00606C 7C0004AC
7C0067AC 4C00012C
60000000 00000000

PAL
C2535478 00000005
A0DE000A 3D808053
64CB38A0 956C5BE8
7C00606C 7C0004AC
7C0067AC 4C00012C
60000000 00000000

NTSC-J
C2534DF8 00000005
A0DE000A 3D808053
64CB38A0 956C5568
7C00606C 7C0004AC
7C0067AC 4C00012C
60000000 00000000

NTSC-K
C25234D0 00000005
A0DE000A 3D808052
64CB38A0 956C3C40
7C00606C 7C0004AC
7C0067AC 4C00012C
60000000 00000000

#Address ports
#80530930 = NTSC-U
#80535478 = PAL
#80534DF8 = NTSC-J
#805234D0 = NTSC-K

#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
    .err
.endif

#Default Instruction, r6 holds checkpoint region value
lhz r6, 0x000A (r30)

#Set Address upper bits, Or in ckpt value
lis r12, _1sthalf
oris r11, r6, 0x38A0 #Or 0x38A00000 to r6

#Write new instruction in memory, store data cache, invalidate instruction cache
stwu r11, _2ndhalf (r12)
dcbst 0, r12
sync
icbi 0, r12
isync
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)