11-26-2023, 09:43 PM
(This post was last modified: 11-27-2023, 03:15 AM by Yuri Bacon.)
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:
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:
- For this example I used the NTSC-U version of this code (as that's what I needed), but refer to the original codes in the OP for other regions of the game.
- If you want to remap a physical button, then use that buttons original function (for example, L -> Dpad Up/Wheelie & Y -> L/Item), make sure to replace the physical button first (use L / 0040 in the XXXX section of the code) before giving that functionality to another button (use L / 0040 in the YYYY section of the code). If you do it the other way around, you'll just make a longer version of Y -> Dpad Up/Wheelie & L -> Dpad Up/Wheelie.
- No matter how many buttons you remap, even just 1, be careful mapping new functions to L and R, since this code will change digital L/R to the new function (wheelie), but analog L/R will still do the original function (item/drift). To avoid this, hold down L and/or R while plugging in your GC controller to "disable" analog L/R inputs.
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
38C00040 7C073039
41A20010 38E00008
7C003278 7C003B78
38C00800 7C073039
41A20010 38E00040
7C003278 7C003B78
B0040000 00000000