Ultimate Region ID Cycler In Between Races [Vega]
#1
Ultimate Region ID Cycler In Between Races [Vega]

This is similar to other "Change Region ID in between Races Online" Codes but it also changes your Flag + Globe Location, and you will see the effects also occur on your own screen (other Change Region ID codes will only update the effects on the opponents' screens).

I have made this code in honor of Nutmeg who was the first person ever (in Feb 2012) to change Region ID's in between races online.

This code will cycle through all 7 Region IDs in ascending order and then repeat once China has been used. It's automated, no button activators required. Your Region ID, the Region ID's default geo-location, and your flag image (if applicable) will cycle after every single race. Everyone will see the effects.

NTSC-U
C2612328 0000000C
3D40809C 3D808024
3D608042 814AD958
618C5A90 616B67E7
892A00C5 39290001
28090007 41A00008
39200000 55251838
7C85602E 38A50004
7C05602E 992B0000
908B0071 900B1075
992A00C5 908A00B8
900A00BC 88880220
60000000 00000000

PAL
C2643748 0000000C
3D40809C 3D808024
3D608042 814A2108
618C5DA8 616BAB67
892A00C5 39290001
28090007 41A00008
39200000 55251838
7C85602E 38A50004
7C05602E 992B0000
908B0071 900B1075
992A00C5 908A00B8
900A00BC 88880220
60000000 00000000

NTSC-J
C2642DB4 0000000C
3D40809C 3D808024
3D608042 814A1168
618C5758 616BA4E7
892A00C5 39290001
28090007 41A00008
39200000 55251838
7C85602E 38A50004
7C05602E 992B0000
908B0071 900B1075
992A00C5 908A00B8
900A00BC 88880220
60000000 00000000

NTSC-K
C2631A60 0000000C
3D40809B 3D808024
3D608041 814A0748
618C5B88 616B8B87
892A00C5 39290001
28090007 41A00008
39200000 55251838
7C85602E 38A50004
7C05602E 992B0000
908B0071 900B1075
992A00C5 908A00B8
900A00BC 88880220
60000000 00000000

Code creator: Vega
Code credits: Anarion (Your Region ID, Flag, Globe Location static locations, Atlas (Default Geo Table static locations), Seeky (USER static ptr)

Source:
Code:
#C2 Hook Addresses
#NTSC-U 80612328
#PAL    80643748
#NTSC-J 80642DB4
#NTSC-K 80631A60

#Region Setting
.set region, '' #Set e p j or k

#Hook Notes
#Hooked at j_SadRKNetSELECTHandler_DestroyInstance func which occurs once per online event (the very moment your vote is casted)

#Set Static Ptrs
.if     (region == 'E' || region == 'e') #NTSC-U
        .set geo_table, 0x80245A90
        .set anarion, 0x804267E7
        .set user_static, 0x809BD958
.elseif (region == 'P' || region == 'p') #PAL
        .set geo_table, 0x80245DA8
        .set anarion, 0x8042AB67
        .set user_static, 0x809C2108
.elseif (region == 'J' || region == 'j') #NTSC-J
        .set geo_table, 0x80245758
        .set anarion, 0x8042A4E7
        .set user_static, 0x809C1168
.elseif (region == 'K' || region == 'k') #NTSC-K
        .set geo_table, 0x80245B88
        .set anarion, 0x80418B87
        .set user_static, 0x809B0748
.else #Invalid Region
        .err #Region match not detected. Tell the Assembler to halt and throw an error.
.endif

#Register Safety Notes
#r0, r4, r5, r9 thru r12 safe for use
#LR safe for use

#Set a register to hold USER Static instance ptr, make it signed cuz we will directly load from it
lis r10, user_static@ha

#Set a register to hold the static ptr to the default geo table
lis r12, geo_table@h

#Set a register to hold the static ptr to memory region where game keeps your legit Region Information
lis r11, anarion@h

#Complete ptr's
lwz r10, user_static@l (r10)
ori r12, r12, geo_table@l
ori r11, r11, anarion@l

#Load your USER Packet Region ID, increment, and check against upper bound
lbz r9, 0x00C5 (r10)
addi r9, r9, 1
cmplwi r9, 7
blt+ 0x8

#Reset Region ID
li r9, 0

#Multiply Region ID by 8 to get exact ptr within geo table
slwi r5, r9, 3

#Load new Country+State+City Values from geo table
lwzx r4, r5, r12

#Load new Globe Location
addi r5, r5, 4
lwzx r0, r5, r12

#Write new Values to Anarion's "Packet"
stb r9, 0 (r11)
stw r4, 0x0071 (r11)
stw r0, 0x1075 (r11)

#Write all new values to USER Packet
stb r9, 0xC5 (r10)
stw r4, 0xB8 (r10)
stw r0, 0xBC (r10)

#Original Instruction of Hook Address
lbz r4, 0x0220 (r8)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)