Key Remapper (GCN) [mdmwii] - Printable Version +- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com) +-- Forum: Cheat Codes (https://mariokartwii.com/forumdisplay.php?fid=51) +--- Forum: Misc/Other (https://mariokartwii.com/forumdisplay.php?fid=55) +--- Thread: Key Remapper (GCN) [mdmwii] (/showthread.php?tid=48) |
Key Remapper (GCN) [mdmwii] - Vega - 02-15-2018 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) Code created by: mdmwii Code credits: Melg (fixed bug when both keys pressed simultaneously, optimized source) RE: Key Remapper (GCN) [mdmwii] - Melg - 12-01-2021 Sorry for the random thread bump, but I was going to use this code and I should mention that due to this source using an add instruction, it can create undefined inputs if for some reason you press both the remapped and the assigned key. Let's say you remap Y (0x800) to D-Pad up (0x8), and you press both at the same time: your combined input will be 0x888, the code will retract 0x800 and then add 0x8 for a total of 0x90 (80+8+8), which is definitely not D-Pad up and actually not even a GCN key. Using or instead fixes the issue: Code: #inject(0x801AFBF8)\n\n (PAL) RE: Key Remapper (GCN) [mdmwii] - Vega - 12-02-2021 Thank you very much. Post updated. RE: Key Remapper (GCN) [mdmwii] - toothicc - 11-19-2023 This code isn't working for me for some reason. I tried remapping my gcn d-pad up button to the z buttton: C21AFB58 00000004 38C00090 7C073039 41A20010 38E00088 7C003278 7C003B78 B0040000 00000000 But when I tried to use this in game, the game acts like I'm holding down the d-pad up button, even when I'm not pressing down anything. RE: Key Remapper (GCN) [mdmwii] - Vega - 11-20-2023 It was an issue with the X/Y values having a mask of 0x0080 assigned ever since the source was updated using Xor for bit subtraction. Updated code. Tested and works now. RE: Key Remapper (GCN) [mdmwii] - Yuri Bacon - 11-26-2023 If you want to remap multiple buttons, then duplicate lines 2-4 (shown in green below, XY values in red), then add 3 to the number at the end of the line (show in blue below), rinse and repeat for each button. Original / 1 Button Remap: C21AFB58 00000004 38C0XXXX 7C073039 41A20010 38E0YYYY 7C003278 7C003B78 B0040000 00000000 New / 2 Buttons Remap: C21AFB58 00000007 38C0XXXX 7C073039 41A20010 38E0YYYY 7C003278 7C003B78 38C0WWWW 7C073039 41A20010 38E0ZZZZ 7C003278 7C003B78 B0040000 00000000 Notes:
Original Post... I just gave this code a shot, with the aim to replace Y with L (item on Y), and replace L with Dpad Up (wheelie on L), but I had two issues. 1) Using two instances of the code, only the second one in the GCT actually does anything. 2) In the case of wheelie on L, it does not disable original function of the button, and thus L would trigger both items and wheelies (both if that was the second in the GCT, and after I removed the Y is item). I made the GCT with mkw.com/GCT, and loaded it using USB Loader GX on my Wii. The 1st problem could be anything, but the second is really weird 'cause I can see in the source that the r0 r6 xor ought to remove the original button press but it doesn't, maybe it wasn't compiled as shown in the source? IDK about much about Wii ASM tho, so maybe I'm way off. EDIT: WAIT I FIGURED IT OUT: Item uses analog L to trigger items, not just digital L, so while this removes the digital L input from being able to trigger items, analog L still can. I was able to hold down L while plugging in the controller to "disable" analog L, and L wheelie suddenly worked perfectly without triggering items. Fucking analog triggers >.> Now if only I can figure out how to make two replacements, might have to fuck around find out with Wii ASM. EDIT 2: I got it! For the first problem, its because the game basically reads from location A (real controller inputs), the gecko code modifies it then saves it to location B (inputs given to game), then repeats the process with the second copy of the code thus making the second one overwrite the first. I had busted out dolphin to see the original instructions to confirm that much, gotten CodeWrite to make a modified version of the source that can handle two replacements in one go, ended up copy pasting the first 6 instructions (minus the "end" label) and then compiling and building GCT, and it didn't work because for whatever reason codewrite generated different hex instructions than the original post and nothing happened in game. I looked at the known good instructions on this page, and I ended up figuring out that if I just copy paste lines 2-4, then change the number of total ASM lines at the end of the first line to 7, it *finally* worked out perfectly! Of course, since both replacements involved the L button, I had to make sure to do L -> Dpad Up replacment first, then Y -> L second. In the end, my code ended up looking like this: Code: C21AFB58 00000007 |