Ultimate Region ID Cycler In Between Races [Vega] - Printable Version +- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com) +-- Forum: Cheat Codes (https://mariokartwii.com/forumdisplay.php?fid=51) +--- Forum: Online Non-Item (https://mariokartwii.com/forumdisplay.php?fid=52) +--- Thread: Ultimate Region ID Cycler In Between Races [Vega] (/showthread.php?tid=1070) |
Ultimate Region ID Cycler In Between Races [Vega] - Vega - 02-12-2019 Ultimate Region ID Cycler In Between Races [Vega] 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. Nutmeg would also change the default geo-location too, not just the Region ID line color itself. Only thing he didn't change was the flag image if said Region ID had one, which I decided to include in this code since I like the look of the flag images. 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 (on your screen AND opponents' screen) along with the Region ID's default geo-location, and your flag image (if country code has a flag available) will cycle after every single race. For example, your first race online will have all your normal Region ID, flag, and globe settings. But once you go to the next race of the session, your Region ID value will increment by 1 (the Region ID's default geolocation will be applied, and flag too if available). This cycle will repeat once per race. Once China's Region ID is used, the cycle will reset at Japan's Region ID. Let's say you end your current WW session, and you were at Korea Region ID from the last cycle. You will see that you will now be at Seoul, S.Korea with the Korean Flag on the globe. Opponents will see these effects too if you are in a Room. Obviously whatever Region ID cycle you are on during the middle of a WW session, opponents will see the current Region ID Cycle's Globe & Flag settings when they join your WW. NOTE: This code makes use of memory addresses 0x80001648 thru 0x8000164B, make sure no other codes you have on are using those addresses! NTSC-U C2612330 0000000E 89080228 9421FFB0 BDC10008 3DC08024 61CE5A90 3DE08042 61EF67E7 3E008000 82301648 8A5100C5 3A520001 2C120007 41A00008 3A400000 1E720008 7E8E9A14 82B40000 82D40004 9A4F0000 92AF0071 92CF1075 9A5100C5 92B100B8 92D100BC B9C10008 38210050 60000000 00000000 C2661090 00000002 3FC08000 93FE1648 981F00C5 00000000 PAL C2643750 0000000E 89080228 9421FFB0 BDC10008 3DC08024 61CE5DA8 3DE08042 61EFAB67 3E008000 82301648 8A5100C5 3A520001 2C120007 41A00008 3A400000 1E720008 7E8E9A14 82B40000 82D40004 9A4F0000 92AF0071 92CF1075 9A5100C5 92B100B8 92D100BC B9C10008 38210050 60000000 00000000 C2663174 00000002 3FC08000 93FE1648 981F00C5 00000000 NTSC-J C2642DBC 0000000E 89080228 9421FFB0 BDC10008 3DC08024 61CE5758 3DE08042 61EFA4E7 3E008000 82301648 8A5100C5 3A520001 2C120007 41A00008 3A400000 1E720008 7E8E9A14 82B40000 82D40004 9A4F0000 92AF0071 92CF1075 9A5100C5 92B100B8 92D100BC B9C10008 38210050 60000000 00000000 C26627E0 00000002 3FC08000 93FE1648 981F00C5 00000000 NTSC-K C2631A68 0000000E 89080228 9421FFB0 BDC10008 3DC08024 61CE5B88 3DE08041 61EF8B87 3E008000 82301648 8A5100C5 3A520001 2C120007 41A00008 3A400000 1E720008 7E8E9A14 82B40000 82D40004 9A4F0000 92AF0071 92CF1075 9A5100C5 92B100B8 92D100BC B9C10008 38210050 60000000 00000000 C265148C 00000002 3FC08000 93FE1648 981F00C5 00000000 List of Sources: Source (Region ID Cycler; NTSC-K): #~~~~~~~~~~~~~~~~# # START ASSEMBLY # #~~~~~~~~~~~~~~~~# # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Varying Static Mem Address Notes # # 0x80245A90 (NTSC-U, Start of List of Country/Res Codes + Default Geolocation) # # 0x80245DA8 (PAL, Start of List of Country/Res Codes + Default Geolocation) # # 0x80245758 (NTSC-J, Start of List of Country/Res Codes + Default Geolocation) # # 0x80245B88 (NTSC-K) Start of List of Country/Res Codes + Default Geolocation) # # -- # # 0x804267E7 (NTSC-U, Reg ID Changer Address for your screen) # # 0x8042AB67 (PAL, Reg ID Changer Address for your screen) # # 0x8042A4E7 (NTSC-J, Reg ID Changer Address for your screen) # # 0x80418B87 (NTSC-K, Reg ID Changer Address for your screen) # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Default Instruction, Start Register Safety # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# lbz r8, 0x0228 (r8) stwu r1,-80(r1) stmw r14,8(r1) #~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Static Mem Address Config # #~~~~~~~~~~~~~~~~~~~~~~~~~~~# lis r14, 0x8024 #Set 1st half address (NTSC-K) where default Japan country code word then geo-location word are stored ori r14, r14, 0x5B88 #Set 2nd half address lis r15, 0x8041 #Set 1st half address (NTSC-K) to Region ID byte location of Anarions' Region ID Changer Code ori r15, r15, 0x8B87 #Set 2nd half address #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Load Pointer, Load Red ID byte from USER Record Pointer # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# lis r16, 0x8000 #Set 1st half address to load pointer from lwz r17, 0x1648 (r16) #Load Word (pointer) from 0x80001648 lbz r18, 0xC5 (r17) #Load the byte from the address of the pointer plus offset 0xC5, this will be the region ID byte in your USER Record #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Cycle Region ID, Make Comparison Check # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# addi r18, r18, 1 #Add one to the current value of the Region ID User Record byte cmpwi r18, 0x7 #Compare Region ID byte to 0x7 (1 beyond China) blt+ dont_zero #If less than 7 (most likely to be), branch to dont_zero label #~~~~~~~~~~~~~# # Reset Cycle # #~~~~~~~~~~~~~# li r18, 0x0 #If NOT less than 7, reset Region ID byte to 0, we only need to use Region ID's 0 thru 6 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # dont_zero label (Don't Reset Cycle) # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# dont_zero: mulli r19, r18, 0x8 #Multiple Region ID byte by 0x8 to get offset amount to add to address of Japan country code + residence code word value add r20, r14, r19 #Add result of r19 to address of r15. r20's result will hold exact address location to corresponding Region ID's country code + res code word location lwz r21, 0x0 (r20) #Load current Region ID's country code + residence code word value (0000 follows country code and res. code bytes) from address of r20 lwz r22, 0x4 (r20) #Load current Region ID's default geo location word value from address of 20 plus 0x4 stb r18, 0 (r15) #Store Region ID byte to proper location of Anarion's Region ID Changer Code stw r21, 0x0071 (r15) #Store Country Code + Region Residence Code to proper location of Anarion's Country Flag Changer Code stw r22, 0x1075 (r15) #Store Globe Location to proper location of Anarion's Globe Location Changer Code stb r18, 0xC5 (r17) #Store Region ID byte to proper location in USER Record (the pointer) stw r21, 0xB8 (r17) #Store Country Code + Region Residence Code to proper location in USER Record (the pointer with negative 0xD offset) stw r22, 0xBC (r17) #Store Globe Location to proper location in USER Record (the pointer with negative 0x9 offset) #~~~~~~~~~~~~~~~~~~~~~# # End Register Safety # #~~~~~~~~~~~~~~~~~~~~~# lmw r14,8(r1) addi r1,r1,80 # #~~~~~~~~~~~~~~# # END ASSEMBLY # #~~~~~~~~~~~~~~# USER Record Pointer Save ASM: #r30 safe for use, gets written to two steps later in subroutine# lis r30, 0x8000 #Set 1st half address of where pointer will be stored in the crash handler stw r31, 0x1648 (r30) #Store word of r31 (our pointer) to 0x80001648 stb r0, 0x00C5 (r31) #Default instruction, store Region ID Byte to spot in USER record when a room is first imitated Code creator: Vega Code credits: Anarion (used his Reg ID, Flag, Globe Loc code addresses to make effects appear on your screen); Atlas (addresses for Default Geolocations in memory) |