Key Remapper (GCN) [mdmwii]
#1
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:
#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)
Reply


Messages In This Thread
Key Remapper (GCN) [mdmwii] - by Vega - 02-15-2018, 12:49 AM
RE: Key Remapper (GCN) [mdmwii] - by Melg - 12-01-2021, 10:50 PM
RE: Key Remapper (GCN) [mdmwii] - by Vega - 12-02-2021, 02:10 PM
RE: Key Remapper (GCN) [mdmwii] - by toothicc - 11-19-2023, 08:17 PM
RE: Key Remapper (GCN) [mdmwii] - by Vega - 11-20-2023, 09:30 PM
RE: Key Remapper (GCN) [mdmwii] - by Yuri Bacon - 11-26-2023, 09:43 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)