Race Tracker [jawa]
#1
My first code post here!

The byte at XXXXYYYY will be 1 if you're in a race, and 0 if you aren't.

(Region free)


C0000000 00000006
3D8080E4 896C74A4
3D80XXXX 2C0B0001
40820008 4800000C
39400000 48000008
39400001 994CYYYY
60000000 00000000


Source:


Code:
head:
    .set RACE, XXXX #replace XXXX with the lower 16 bits of your address
    lis r12, 0x80E4
    
    lbz r11, 0x74A4(r12) #load value into r11
    
    lis r12, 0xYYYY #replace YYYY with the upper 16 bits of your address
    cmpwi r11, 1
    bne not #if value != 1, we are not in a race, branch to not
    b in #else branch to in

not:
    li r10, 0
    b end

in:
    li r10, 1

end:
    stb r10, RACE(r12) #finally, store r10 at your desired location
Reply


Messages In This Thread
Race Tracker [jawa] - by jawa - 11-14-2021, 09:34 PM
RE: Race Tracker [jawa] - by Seeky - 11-15-2021, 01:02 PM
RE: Race Tracker [jawa] - by jawa - 11-15-2021, 01:49 PM
RE: Race Tracker [jawa] - by Seeky - 11-15-2021, 02:14 PM
RE: Race Tracker [jawa] - by Vega - 11-15-2021, 02:27 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)