Key Remapper (GCN) [mdmwii]
Code will allow you to select a Button to be assigned/activated when using a different Button
NTSC-U
C21AFB58 00000004
38C0XXXX 7C073039
41A20010 38E0YYYY
7C003278 7C003B78
B0040000 00000000
PAL
C21AFBF8 00000004
38C0XXXX 7C073039
41A20010 38E0YYYY
7C003278 7C003B78
B0040000 00000000
NTSC-J
C21AFB18 00000004
38C0XXXX 7C073039
41A20010 38E0YYYY
7C003278 7C003B78
B0040000 00000000
NTSC-K
C21AFF54 00000004
38C0XXXX 7C073039
41A20010 38E0YYYY
7C003278 7C003B78
B0040000 00000000
XXXX = Key to have new feature (original feature will be disabled)
YYYY = Key to assign
Example: Replace Z button with D-Pad Up button so the User can use Z button to actuate Wheelies
XXXX = 0010
YYYY = 0008
X/Y Values:
0001 = D-Pad Left
0002 = D-Pad Right
0004 = D-Pad Down
0008 = D-Pad Up
0010 = Z
0020 = R
0040 = L
0100 = A
0200 = B
0400 = X
0800 = Y
1000 = Start
Source:
Code created by: mdmwii
Code credits: Melg (fixed bug when both keys pressed simultaneously, optimized source)
Code will allow you to select a Button to be assigned/activated when using a different Button
NTSC-U
C21AFB58 00000004
38C0XXXX 7C073039
41A20010 38E0YYYY
7C003278 7C003B78
B0040000 00000000
PAL
C21AFBF8 00000004
38C0XXXX 7C073039
41A20010 38E0YYYY
7C003278 7C003B78
B0040000 00000000
NTSC-J
C21AFB18 00000004
38C0XXXX 7C073039
41A20010 38E0YYYY
7C003278 7C003B78
B0040000 00000000
NTSC-K
C21AFF54 00000004
38C0XXXX 7C073039
41A20010 38E0YYYY
7C003278 7C003B78
B0040000 00000000
XXXX = Key to have new feature (original feature will be disabled)
YYYY = Key to assign
Example: Replace Z button with D-Pad Up button so the User can use Z button to actuate Wheelies
XXXX = 0010
YYYY = 0008
X/Y Values:
0001 = D-Pad Left
0002 = D-Pad Right
0004 = D-Pad Down
0008 = D-Pad Up
0010 = Z
0020 = R
0040 = L
0100 = A
0200 = B
0400 = X
0800 = Y
1000 = Start
Source:
Code:
#inject(0x801AFBF8)\n\n (PAL)
#inject(0x801AFB58)\n\n (NTSC-U)
#inject(0x801AFB18)\n\n (NTSC-J)
#inject(0x801AFF54)\n\n (NTSC-K)
li r6, 0xXXXX
and. r7, r0, r6
beq+ end #Small optimisation
li r7, 0xYYYY
xor r0, r0, r6 #A glorified sub
or r0, r0, r7 #Fix for the issue
end:
sth r0, 0x0(r4)
Code created by: mdmwii
Code credits: Melg (fixed bug when both keys pressed simultaneously, optimized source)