Change Region ID In Between Races #2 [Vega]
#1
Change Region ID In Between Races #2 [Vega]

NOTE: Outdated by Star's version

This code will let you change your region ID in between races online. Everyone will see the effects. However, nothing will change on your screen.

Code only takes effect from changes in between races (not during the actual race itself). Press your activators during the course vote! If you press your activators during a race, and not press them on the next course vote, your changes will not take effect when the next race begins.

NTSC-U
C26609D8 00000009
3D808034 618CXXXX
A16C0000 38E0ZZZZ
38C0zzzz 7D603838
7C003800 41820014
7D603038 7C003000
41820010 48000014
3980000R 48000008
3980000r 998300C5
88030000 00000000

PAL
C2662ABC 00000009
3D808034 618CXXXX
A16C0000 38E0ZZZZ
38C0zzzz 7D603838
7C003800 41820014
7D603038 7C003000
41820010 48000014
3980000R 48000008
3980000r 998300C5
88030000 00000000

NTSC-J
C2662128 00000009
3D808034 618CXXXX
A16C0000 38E0ZZZZ
38C0zzzz 7D603838
7C003800 41820014
7D603038 7C003000
41820010 48000014
3980000R 48000008
3980000r 998300C5
88030000 00000000

NTSC-K
C2650DD4 00000009
3D808033 618CXXXX
A16C0000 38E0ZZZZ
38C0zzzz 7D603838
7C003800 41820014
7D603038 7C003000
41820010 48000014
3980000R 48000008
3980000r 998300C5
88030000 00000000

XXXX = Controller Address
ZZZZ = Button to activate R region value
zzzz = Button to activate r region value
R, r = Region ID values to switch back and forth with

R/r values:
0 - Japan; red line
1 - Americas; blue line
2 - Europe; green line
3 - Aus/NZ; yellow line
4 - Taiwan; white line
5 - South Korea purple line
6 - China; white line



Source (NTSC-K Code)
#~~~~~~~~~~~~~~~~#
# START ASSEMBLY #
#~~~~~~~~~~~~~~~~#

#

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#                              Register Safety Notes                                     #
#       r0 is safe to use because it is used by the default ASM at end of code           #
# r6 & r7 are safe to use because regardless of which subroutine route is later taken... #
#               r6 later gets overwritten by a rlwinm. function &...                     #
#                    r7 later gets overwritten by a lwz function                         #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

#~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Controller Address Config #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~#

lis r12, 0x8033 #Set the first half of the Korean controller address
ori r12, r12, 0xXXXX #Set specific second half of Korean controller address

#~~~~~~~~~~~~~~~~~~~~~~~#
# Load Controller Input #
#~~~~~~~~~~~~~~~~~~~~~~~#

lhz r11, 0 (r12) #Load the halfword from address of r12 into r11

#~~~~~~~~~~~~~~~~~ #
# Set User's Acts #
#~~~~~~~~~~~~~~~~~~~~#

li r7, 0xZZZZ #Load 0xZZZZ value in r7; Set first activator
li r6, 0xzzzz #Load 0xzzzz value in r6; Set other activator

#~~~~~~~~~~~~~~~#
# Logical AND 1 #
#~~~~~~~~~~~~~~~#

and r0, r11, r7 #Logically AND the contents of r11 & r7, store result into r0
cmpw r0, r7 #Compare value of r0 to r7.
beq- set_regionoption1 #If equal (activator is pressed), jump to set_regionoption1 label

#~~~~~~~~~~~~~~~#
# Logical AND 2 #
#~~~~~~~~~~~~~~~#

and r0, r11, r6 #Logically AND the contents of r11 & r6, store result into r0
cmpw r0, r6 #Compare value of r0 to r6
beq- set_regionoption2 #If equal (other activator is pressed), jump to set_regionoption2 label

b dont_doshit #If ZZZZ or zzzz wasn't pressed, jump to dont_doshit label

#~~~~~~~~~~~~~~~~~~~~~~~~~#
# set_regionoption1 label #
#~~~~~~~~~~~~~~~~~~~~~~~~~#

set_regionoption1:
li r12, 0xR #Activate R region ID
b finalize_value #Jump to finalize_value, because we don't want the r Region ID to set

#~~~~~~~~~~~~~~~~~~~~~~~~~#
# set_regionoption2 label #
#~~~~~~~~~~~~~~~~~~~~~~~~~#

set_regionoption2:
li r12, 0xr #Activate r Region ID

#~~~~~~~~~~~~~~~~~~~~~~#
# finalize_value label #
#~~~~~~~~~~~~~~~~~~~~~~#

finalize_value:
stb r12, 0x00C5 (r3) #Store the new Region ID value to its proper location on USER record

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# dont_doshit label; Default ASM #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

dont_doshit:
lbz r0, 0 (r3)

#

#~~~~~~~~~~~~~~#
# END ASSEMBLY #
#~~~~~~~~~~~~~~#


Code creator: Vega
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)