Hacking New Classic Controller Hacks

awesomeee

Well-Known Member
Member
Joined
Oct 7, 2024
Messages
141
Trophies
0
XP
189
Country
United States
Many thanks to you master @Vague Rant . i want to report 2 games

1. Endless ocean doesn't work on wii u, classic controller or force classic controller, neither works.

2. Resident evil 4 eur region does something VERY usefull, in the past to play in other languages with the gamepad you needed to make a savefile with the pal region, the install the usa region and convert the save file from pal to usa, and then you will be able to play, It is something not too difficult, but little annoying to do. With this awesome cheat code you dont need to do this, you can convert the pal version and voila! get fun killing ganados.
Oh no! Sorry to hear endless ocean not working.

@Vague Rant When you were working on endless ocean, by any chance was the KPAD / WPAD functions different then other games? Same goes for NSMBWII, i think the issue is that both of those games use different code for controller report data then other ones.
 

KeinesR

Well-Known Member
Member
Joined
Feb 14, 2020
Messages
176
Trophies
0
Age
34
XP
494
Country
Venezuela
Oh no! Sorry to hear endless ocean not working.

@Vague Rant When you were working on endless ocean, by any chance was the KPAD / WPAD functions different then other games? Same goes for NSMBWII, i think the issue is that both of those games use different code for controller report data then other ones.
i just re-checked and endless ocean works with force classic controller.

My sims agents works perfect on wii u gamepad (i tried force classic controller)
 
  • Like
Reactions: Vague Rant

Vague Rant

Deceptively cute
OP
Member
Joined
Aug 7, 2008
Messages
2,533
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,913
Country
Oh no! Sorry to hear endless ocean not working.

@Vague Rant When you were working on endless ocean, by any chance was the KPAD / WPAD functions different then other games? Same goes for NSMBWII, i think the issue is that both of those games use different code for controller report data then other ones.
Looks like Endless Ocean turned out to work after all (thanks again @KeinesR! I'll add that note to the EO post), but re: NSMBWii, from my end it looked the same as any other game. I think I only messed with KPAD for that game, so if there were any low-level differences I wouldn't know about them. If I had to speculate why some games don't work I'd say that the ARM-side code (the original game IOS vs. Wii U HAI-IOS) respond differently. Each Wii game specifically tells the console which IOS version it wants to run on, but VC injections ignore this and run them all on HAI-IOS, similar to how USB loaders mostly just force all games to run using a hacked cIOS (e.g. 249). If HAI-IOS is incompatible with the original game's IOS, that might explain the issue.

Is there a list anywhere or which Wii games run on which IOSes? I guess that might be interesting to see, maybe other games which run on the same IOS as NSMBWii would have the same problem?



3d466a14063d1c638f1367670a1e706f.png


Sticking with EA Redwood Shores/Visceral Games for a moment, The Simpsons Game was the quasi-tie-in game to The Simpsons Movie. Though featuring its own plot unrelated to the film, both released in 2007 to a resoundingly all right reception. Featuring performances from the entire cast and a story by the show's writers, The Simpsons Game is a licensed 3D action-platformer about the concept of licensed 3D action-platformers, skewering the cliches of game design at the same time as it uses them. The result is a self-awarely generic game, which makes sense for The Simpsons. GameSpot said "The gameplay isn't atrociously bad or anything, though the significantly more irritating control scheme on the Wii version does a lot to drag it down when compared to its other console counterparts." Let's bump that up so the controls are average too!
The separate European releases (UK, France, Italy/Spain and Germany) are all compatible with the EUR code given below.

USAEUR

  1. Code:
    Classic Controller Support [Vague Rant]
    C2189534 00000003
    887E022C 2C030002
    40820008 38600001
    60000000 00000000
    C2330DF8 00000016
    2C0F0001 408200A0
    48000015 4059999A
    00000000 4059999A
    00000000 7CA802A6
    57661838 7CA53214
    C0050000 80030004
    700000C0 41820010
    FC000210 38000001
    90050004 80C30000
    70C00080 41820024
    A8050004 68000001
    B0050004 2C000000
    41820010 FC800090
    D08304A4 FC000050
    70C00040 4182002C
    A8050006 68000001
    B0050006 2C000000
    40820010 90030068
    9003006C 4800000C
    D0030068 D003006C
    D0050000 D08304A8
    60000000 00000000
    C2331A34 0000001F
    90010024 2C040000
    408200E8 8803005C
    2C000002 408200DC
    2C0F0001 40820098
    9803005E 48000015
    8031F180 3FAAAAAB
    3DCCCCCD 3F800000
    7CA802A6 80030004
    70008000 41820010
    38000000 90030020
    90030024 80650000
    28030001 40810018
    90A1000C 7C6803A6
    4E800021 80A1000C
    90650000 2C030001
    7FE3FB78 C0450004
    40820008 EC4200B2
    C0650008 C0030020
    C0230060 FC211024
    4800002D D0030020
    C0030024 C0230064
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C025000C FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    04332708 7FC3F378
    C2332740 00000012
    4E800421 2C0F0001
    40820080 4800000D
    3F000000 00000000
    7C6802A6 C0430000
    C0630004 809EFFA0
    80BEFFA4 80DEFFA8
    C03E0014 39000001
    48000021 C03E0018
    39000004 48000015
    909EFFA0 90BEFFA4
    90DEFFA8 48000034
    FC000A10 FC001040
    4D800020 FC011840
    41800008 5508083C
    7CC04039 40820008
    7CA54378 7C844378
    7CC64079 4E800020
    60000000 00000000
    C2332DE4 0000001A
    2C040002 408200BC
    38800001 71200800
    41820008 61088000
    71200001 41820008
    61084008 71204000
    41820008 61084004
    71200002 41820008
    61084001 71208000
    41820008 61084002
    71200010 41820008
    61080080 71200040
    41820008 61080800
    71200008 41820008
    610800C0 71200020
    41820008 61080400
    71202000 41820008
    61081000 71200200
    41820008 61080010
    71200080 41820008
    61082000 71200004
    41820008 61080400
    71200400 41820008
    61080100 71201000
    41820008 61080200
    7CE74378 70E09FFF
    60000000 00000000
  2. Code:
    Classic Controller Support [Vague Rant]
    C21893E4 00000003
    887E022C 2C030002
    40820008 38600001
    60000000 00000000
    C2330C4C 00000016
    2C0F0001 408200A0
    48000015 4059999A
    00000000 4059999A
    00000000 7CA802A6
    57661838 7CA53214
    C0050000 80030004
    700000C0 41820010
    FC000210 38000001
    90050004 80C30000
    70C00080 41820024
    A8050004 68000001
    B0050004 2C000000
    41820010 FC800090
    D08304A4 FC000050
    70C00040 4182002C
    A8050006 68000001
    B0050006 2C000000
    40820010 90030068
    9003006C 4800000C
    D0030068 D003006C
    D0050000 D08304A8
    60000000 00000000
    C2331888 0000001F
    90010024 2C040000
    408200E8 8803005C
    2C000002 408200DC
    2C0F0001 40820098
    9803005E 48000015
    8031EF80 3FAAAAAB
    3DCCCCCD 3F800000
    7CA802A6 80030004
    70008000 41820010
    38000000 90030020
    90030024 80650000
    28030001 40810018
    90A1000C 7C6803A6
    4E800021 80A1000C
    90650000 2C030001
    7FE3FB78 C0450004
    40820008 EC4200B2
    C0650008 C0030020
    C0230060 FC211024
    4800002D D0030020
    C0030024 C0230064
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C025000C FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    0433255C 7FC3F378
    C2332594 00000012
    4E800421 2C0F0001
    40820080 4800000D
    3F000000 00000000
    7C6802A6 C0430000
    C0630004 809EFFA0
    80BEFFA4 80DEFFA8
    C03E0014 39000001
    48000021 C03E0018
    39000004 48000015
    909EFFA0 90BEFFA4
    90DEFFA8 48000034
    FC000A10 FC001040
    4D800020 FC011840
    41800008 5508083C
    7CC04039 40820008
    7CA54378 7C844378
    7CC64079 4E800020
    60000000 00000000
    C2332C38 0000001A
    2C040002 408200BC
    38800001 71200800
    41820008 61088000
    71200001 41820008
    61084008 71204000
    41820008 61084004
    71200002 41820008
    61084001 71208000
    41820008 61084002
    71200010 41820008
    61080080 71200040
    41820008 61080800
    71200008 41820008
    610800C0 71200020
    41820008 61080400
    71202000 41820008
    61081000 71200200
    41820008 61080010
    71200080 41820008
    61082000 71200004
    41820008 61080400
    71200400 41820008
    61080100 71201000
    41820008 61080200
    7CE74378 70E09FFF
    60000000 00000000

Button Mapping​

Wii Remote/NunchukClassic ControllerFunction
Wiimote HomeHome
Works normally
Open/Close Home Menu
Wiimote D-PadD-Pad
Right Stick
Menus
Navigation
Gameplay
Camera Controls
Wiimote ABMenus
Confirm
Gameplay
Jump
Interact
Wiimote BY
ZR
Menus
Cancel
Gameplay
Attack
Wiimote 1MinusGameplay
View To-Do List
Wiimote 2PlusGameplay
Pause
Wiimote PlusRGameplay
Second Transformation
Wiimote MinusLGameplay
First Transformation
Wiimote ShakeAGameplay
Special Move
Wiimote PointerLeft StickHome Button Menu
Navigation
Nunchuk StickLeft StickMenus
Navigation
Gameplay
Movement
Nunchuk CD-Pad
(any)
Gameplay
Switch Character
Nunchuk ZZLGameplay
Re-Center Camera
Wiimote & Nunchuk ShakeXGameplay
Power Move

General Notes​

  • EDIT: If you're using this to build a Wii VC injection on Wii U, you must enable the "Force Classic Controller connected" option in your injection software. Thanks @KeinesR for reporting!

  • First up, the Wii version features two bonus, Wii-exclusive, motion controlled minigames, Bite Night and Bart Wings. I really don't care about these or think they're very fun. Fortunately, there's absolutely no requirement that you play them at any time, so I didn't bother implementing support for them.

    • That said, Bite Night can be made playable if you really want. This game involves alternating Wiimote and Nunchuk shakes. The code above does not accommodate this functionality. If you want to play Bite Night with a Classic Controller for some reason, please see the Technical Notes section for instructions to modify the code with a separate Nunchuk Shake button. It's not going to be much fun, but it's your funeral.

    • Bart Wings is not playable here at all. This one has you angling the Wiimote to steer Bart as he flies through rings. If you want to play it, you'll have to use real motion controls. Sorry.

  • The button mapping here is an approximation of the schemes used on the traditional console versions, but some accommodations were necessary. Several abilities which shared inputs in other versions were broken out into different motions on Wii, e.g. Homer's Attack (Wiimote B) and Ball Dash (Wiimote Shake) are both on the left face button in other versions, but here they're on Y/ZR and A respectively due to changes made for the Wii version.

    • On other consoles, pressing the D-Pad in any direction behaves as a "button" to switch your current character. That has been added here, but the D-Pad is double-mapped to provide regular D-Pad directions as well. This is just so that people who prefer to use the D-Pad for menu navigation can continue to do so. In gameplay, the D-Pad is camera controls, but trying to use it in this way will toggle your character as well. Instead, use the Right Stick for camera controls.

Technical Notes​

Code breakdown:
  • C2 in Platform_Update(): bypass Nunchuk error
  • C2 in read_kpad_acc(): simulate Wiimote and Nunchuk shakes
  • C2 in calc_dpd_variable(): IR pointer emulation
  • 04 and C2 in read_kpad_stick(): Classic to Nunchuk stick redirection and Right Stick D-Pad emulation
  • C2 in KPADRead(): button injector

Bite Night support:

If you absolutely must play Bite Night with a Classic Controller, the easiest thing to do is Ctrl+F inside the cheat code for 610800C0 (Wiimote and Nunchuk shake) and replace it with 61080040 (solo Nunchuk shake), modifying your X button mapping.

This will make Bite Night playable, but since you absolutely never need solo Nunchuk shakes in normal gameplay, you now have to deal with the minor inconvenience of needing to press A and X (Wiimote and Nunchuk shake) simultaneously any time you want to trigger a Power Move.

Alternatively, you can adjust the control scheme however you like using the assembly below and the CodeWrite app. There's a long comment in the source explaining the "button" values for the different shakes, so if you don't want to put your dedicated Nunchuk shake on X you can have it wherever you want.​

Code:
; KPADRead
; 80332DE4 for USA
; 80332C38 for EUR
; r4 holds extType
; r7 holds wiimote bitfield
; r8 holds wiimote+nunchuk bitfield
; r9 holds classic bitfield

CLASSIC:
  cmpwi r4, 0x2
  bne- RETURN

  li r4, 0x1            ; i'm a nunchuk

    CLASSIC_HOME:
      andi. r0, r9, 0x800
      beq- CLASSIC_UP
      ori r8, r8, 0x8000    ; home

    CLASSIC_UP:
      andi. r0, r9, 0x1
      beq- CLASSIC_DOWN
      ori r8, r8, 0x4008    ; c and up (v) / left (h)

    CLASSIC_DOWN:
      andi. r0, r9, 0x4000
      beq- CLASSIC_LEFT
      ori r8, r8, 0x4004    ; c and down (v) / right (h)

    CLASSIC_LEFT:
      andi. r0, r9, 0x2
      beq- CLASSIC_RIGHT
      ori r8, r8, 0x4001    ; c and left (v) / down (h)

    CLASSIC_RIGHT:
      andi. r0, r9, 0x8000
      beq- CLASSIC_A
      ori r8, r8, 0x4002    ; c and right (v) / up (h)

    CLASSIC_A:
      andi. r0, r9, 0x10
      beq- CLASSIC_B
      ori r8, r8, 0x80      ; wiimote shake

    CLASSIC_B:
      andi. r0, r9, 0x40
      beq- CLASSIC_X
      ori r8, r8, 0x800     ; a

; hi it's vague rant here

; the below value, 0xC0, is a combined wiimote (0x80) and nunchuk (0x40) shake
; if you have enough energy, this triggers your current character's power move
; this combined button layout means you have no standalone nunchuk shake button

; standalone nunchuk shakes are only used in the optional bite night minigame
; if you want to play that game on a classic controller, you should change ...
; ... the below value to 0x40 so that X becomes a solo nunchuk shake

; this will also mean that you need to press X and A simultaneously to trigger
; power moves in normal gameplay. i preferred the single button power moves ...
; ... over supporting a single optional minigame you might play once
    CLASSIC_X:
      andi. r0, r9, 0x8
      beq- CLASSIC_Y
      ori r8, r8, 0xC0      ; wiimote + nunchuk shake

    CLASSIC_Y:
      andi. r0, r9, 0x20
      beq- CLASSIC_L
      ori r8, r8, 0x400     ; b

    CLASSIC_L:
      andi. r0, r9, 0x2000
      beq- CLASSIC_R
      ori r8, r8, 0x1000    ; minus

    CLASSIC_R:
      andi. r0, r9, 0x200
      beq- CLASSIC_ZL
      ori r8, r8, 0x10      ; plus

    CLASSIC_ZL:
      andi. r0, r9, 0x80
      beq- CLASSIC_ZR
      ori r8, r8, 0x2000    ; z

    CLASSIC_ZR:
      andi. r0, r9, 0x4
      beq- CLASSIC_PLUS
      ori r8, r8, 0x400     ; b

    CLASSIC_PLUS:
      andi. r0, r9, 0x400
      beq- CLASSIC_MINUS
      ori r8, r8, 0x100     ; 2

    CLASSIC_MINUS:
      andi. r0, r9, 0x1000
      beq- RETURN
      ori r8, r8, 0x200     ; 1

RETURN:
  or r7, r7, r8
  andi. r0, r7, 0x9FFF
 
Last edited by Vague Rant,

awesomeee

Well-Known Member
Member
Joined
Oct 7, 2024
Messages
141
Trophies
0
XP
189
Country
United States
I remember playing this game when i was younger! I got so confused with the controls, ill try it out now if it works!!! Thank you!
Post automatically merged:

but re: NSMBWii, from my end it looked the same as any other game. I think I only messed with KPAD for that game, so if there were any low-level differences I wouldn't know about them. If I had to speculate why some games don't work I'd say that the ARM-side code (the original game IOS vs. Wii U HAI-IOS) respond differently. Each Wii game specifically tells the console which IOS version it wants to run on, but VC injections ignore this and run them all on HAI-IOS, similar to how USB loaders mostly just force all games to run using a hacked cIOS (e.g. 249). If HAI-IOS is incompatible with the original game's IOS, that might explain the issue.

Is there a list anywhere or which Wii games run on which IOSes? I guess that might be interesting to see, maybe other games which run on the same IOS as NSMBWii would have the same problem?

Dolphin can tell you what games run on which ios afaik

The thing is, new super mario bros wii works normally with wii remotes, so maybe HAI-IOS’s module to convert bluetooth signals from the gamepad into wiimote signals is not working properly because of the ios issue?
Post automatically merged:

Now we need the rest of the controller hacks yall!

Featuring:
Guitar controller hacks
Drum kit controller hacks
DJ Turntable controller hacks
uDraw GameTablet controller hacks
Drawsome Tablet controller hacks
Taiko Drum controller hacks
And last but not least, Shinkansen controller hacks!
Almost forgot, vitality sensor controller hacks XD
😂
It would be ridiculous though, but after all it is a joke
Post automatically merged:

@Vague Rant Regarding NES D-pad steering request for mkwii wii remote:

I believe there are enough buttons, but you would have to map B to items, minus button to looking behind you, flipping the camera. And if you wanted to, A for wheelie, or keep wheelie as it is. 👍
The wheelie thing would make it have no motion needed from WPAD at all, but sorry to hear the low level data in MKWII.

The controls would basically be
DPAD: steer
2: accelerate
1: Drift
Minus button: Flip camera
B button: Use items
A button (OPTIONAL): wheelie

The minus button is actually used in MK8, where dpad steering exists in the wiimote!
 
Last edited by awesomeee,
  • Like
Reactions: Vague Rant

awesomeee

Well-Known Member
Member
Joined
Oct 7, 2024
Messages
141
Trophies
0
XP
189
Country
United States
@Vague Rant
1. No luck on uno sadly, the WPADProbe method works, but KPADRead is going to be very tricky to find, theres a good amount of calls / callers or whatever it is 😬
2. When you made those nunchuk hacks, did you just instead make the instructions be like “NUNCHUK_DOWN”? In codewrite and change the bitfield to wiimote and nunchuk
 

pearlfect

Well-Known Member
Newcomer
Joined
May 13, 2017
Messages
50
Trophies
0
Age
23
XP
287
Country
This is really amazing work. Incredible to see so many more games get this kind of support when I'd been so used to it just being the old Kirby/DKCR/NSMBWii patches and nothing else. Thrown some on my Wii U and they're a godsend.

Saw that some people have asked about Sonic Riders: Zero Gravity earlier in the thread and while I would definitely love to see that, I'd like to propose another Sonic game which might be easier to tackle, that being Sonic and the Black Knight. You shake the wiimote to attack and shake the nunchuk with B for a different attack and that's the extent of the motion controls for the game, everything else is control stick + A/B/Z.
 
  • Like
Reactions: Vague Rant

awesomeee

Well-Known Member
Member
Joined
Oct 7, 2024
Messages
141
Trophies
0
XP
189
Country
United States
This is really amazing work. Incredible to see so many more games get this kind of support when I'd been so used to it just being the old Kirby/DKCR/NSMBWii patches and nothing else. Thrown some on my Wii U and they're a godsend.

Saw that some people have asked about Sonic Riders: Zero Gravity earlier in the thread and while I would definitely love to see that, I'd like to propose another Sonic game which might be easier to tackle, that being Sonic and the Black Knight. You shake the wiimote to attack and shake the nunchuk with B for a different attack and that's the extent of the motion controls for the game, everything else is control stick + A/B/Z.

Can you try a standard nunchuk waggle instead of a shake? The nunchuk accelerometer is a complicated library, Vague did manage to get waggles working. Thank you!
Post automatically merged:

@Vague Rant Im going to look into Mario Strikers with other people in its discord. If we get anywhere, i might send you a DM, Ill keep you updated 👍
 
Last edited by awesomeee,
  • Like
Reactions: Vague Rant

awesomeee

Well-Known Member
Member
Joined
Oct 7, 2024
Messages
141
Trophies
0
XP
189
Country
United States
I followed the guide and i actually managed to make a semi working hack! I cant seem to find how to inject the buttons. Do i merge both assemblies together or something? (The button and ir pointer assembly) and insert it at the andi address?
 
  • Like
Reactions: Vague Rant

Vague Rant

Deceptively cute
OP
Member
Joined
Aug 7, 2008
Messages
2,533
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,913
Country
@Vague Rant
1. No luck on uno sadly, the WPADProbe method works, but KPADRead is going to be very tricky to find, theres a good amount of calls / callers or whatever it is 😬
2. When you made those nunchuk hacks, did you just instead make the instructions be like “NUNCHUK_DOWN”? In codewrite and change the bitfield to wiimote and nunchuk
Yeah, WPADProbe() absolutely gets called all over the place. It's definitely my less-preferred way to locate KPADRead().

Nunchuk hacking is very much game-specific. It doesn't happen via the button injector at all, rather it's a fairly tedious process of running Dolphin with a Nunchuk emulated and breakpointing all of the places where the Nunchuk Stick values get read and written. Besides being tedious, it's a fairly involved process and usually involves being able to read/write a little custom assembly. In more detail, the process looks something like:
  1. Configure Dolphin to emulate a Wiimote and Nunchuk and boot into your game

  2. Locate KPADStatus struct (the final controller report from KPADRead)

    • This is fairly easy to find if you've got any of the KPAD functions, usually r3 will be pointing to the KPADStatus struct at the beginning of any of the major read functions, e.g. if you set a breakpoint on the first instruction of calc_dpd_variable(), r3 is a pointer to KPADStatus. Same goes for read_kpad_button(), etc.

  3. Set a read breakpoint on the value at the offset 0x60 from r3, which is the Nunchuk Stick's X axis (left/right).

    • It's useful to hold a direction on your emulated stick before doing this so that you can keep following the same value through memory; it's easier to track a meaningful number than a 0.

  4. When the game reads that value in and writes it to somewhere else in memory (KPADRead() usually does this 3 to 6 times, then the game's own code might do it one or two more before actually processing the data), set a read breakpoint on each of those new addresses and run again until they get hit.

    • Weed out (disable) any breakpoints that are no longer holding the Nunchuk Stick data, sometimes they'll be overwritten with something else and in that case there's no longer any reason for you to keep tracking them, any hits will just be false positives that waste your time.

    • When the data is just being "moved around", it's usually done by loading to and from the general purpose registers (r0, r3-r31). These registers don't "understand" what floating point numbers are, they're just treating these values as generic hex bytes, so you can be reasonably sure that it isn't being meaningfully processed there.

  5. Locate where the stick data actually starts being read, to be used by the game for movement or whatever else the stick does in this game.

    • Continuing on from the previous step of just setting read breakpoints until something interesting happens: if you start seeing the stick data being loaded in via lfs (load floating-point single) instructions, you're almost certain to be on the right track. The floating point registers are used to process the values in terms of what the numbers actually represent. Make a note of anywhere you see floating-point operations going on.

  6. Switch the extension controller to Classic Controller in Dolphin.

    • At this point, you should probably hit Save on your breakpoints, then Clear. You don't strictly need all of those old breakpoints any more and it will get confusing fast having so many around. If you make a mistake and need them back, you can hit Load to get roughly back to where you were.

  7. Breakpoint the location you identified in step 5. If the game no longer hits this address, you've identified where the behavior is different between the Nunchuk and Classic Controller.

  8. Using custom assembly in a Gecko code, rewrite that portion of code to also support reading the Classic Left Stick.

    • This will look completely different from game to game, there's no generalized solution to what this will look like.

  9. If the Classic Stick is now able to control the game, you've correctly hacked in Nunchuk Stick emulation.

    • If that didn't help, you either wrote your code incorrectly or this wasn't the final or only place which reads Nunchuk Stick data and you need to do more breakpointing until you find the right one.

This is really amazing work. Incredible to see so many more games get this kind of support when I'd been so used to it just being the old Kirby/DKCR/NSMBWii patches and nothing else. Thrown some on my Wii U and they're a godsend.

Saw that some people have asked about Sonic Riders: Zero Gravity earlier in the thread and while I would definitely love to see that, I'd like to propose another Sonic game which might be easier to tackle, that being Sonic and the Black Knight. You shake the wiimote to attack and shake the nunchuk with B for a different attack and that's the extent of the motion controls for the game, everything else is control stick + A/B/Z.
You know, besides the Nunchuk stuff which is definitely a bit tougher than most other things like awesomeee mentioned, that doesn't sound all that bad, in the scheme of things. I actually discounted the Sonic storybook games pretty early on in the process of looking at games to CC hack, because at that point I had no idea how to do any accelerometer stuff at all. But I'll add it to my investigate list now. 👍

I followed the guide and i actually managed to make a semi working hack! I cant seem to find how to inject the buttons. Do i merge both assemblies together or something? (The button and ir pointer assembly) and insert it at the andi address?
Nice work, congrats. The way you do multiple assembly hacks is to make multiple separate codes then just paste the final results together into one. If you look at the Technical Notes sections for any of the recent hacks, I include a code breakdown which lists how many separate codes there are in each hack and what each one does. I know it seems like it's all one hack because it comes under one heading and then a bunch of gibberish numbers and letters, but each of these hacks is actually multiple codes one after the other. Here's an example:

Code:
; 80004000 for USA
  cmpwi r0, 0x1
  bne- RETURN
  cmpwi r0, 0x2

RETURN:
Code:
; 80005000 for USA
  lbz r0, 0x905(r8)
  cmpwi r0, 0x2
  bne- RETURN
  li r0, 0x1
  stb r0, 0x905(r8)

RETURN:

Above is two separate code injections, like the buttons and the IR pointer are two separate injections. So you build them in CodeWrite separately, giving you two different codes:

Code:
C2004000 00000002
2C000001 40820008
2C000002 00000000
Code:
C2005000 00000003
88080905 2C000002
4082000C 38000001
98080905 00000000

It's useful to keep the codes separate like this while you're working, because if you realize you made a mistake in one, it's easier to fix just that one code while the rest remain unchanged. Then, when it's time to publish your code for other people to use, you just combine them one after the other like they're one big code. It doesn't really matter what order you put them in.

In my hacks I mostly put them in address order from lowest to highest (so in this example, 80004000 first, then 80005000). I always put the button injector last in my hacks because that's the part people are most likely to want to change by editing the button values, so having it reliably in the same place in the full code makes it easier for those people.

Code:
Fake Code [Vague Rant]
C2004000 00000002
2C000001 40820008
2C000002 00000000
C2005000 00000003
88080905 2C000002
4082000C 38000001
98080905 00000000

As you can see, that's just the two codes we made above stuck together under one heading. Now when somebody enables this code, both of those injections get enabled at the same time. Usually, a Classic Controller hack is a bunch of separate parts all working together to make "one" code. The only way this is different to having all the codes separately is that you don't have to separately go into the cheats menu and enable "Classic Controller Pointer Hack", "Classic Controller Button Hack", "Classic Controller Accelerometer Hack", etc.



title.png


In 2007, Strawdog Studios introduced the psychedelic action maze puzzle game Geon: Emotions on XBLA. This was followed by a more refined version for PSN in 2008, simply called Geon. Finally, they released what they referred to as the definitive version in 2009 on the Wii, as Geon Cube. At the base level, the Geon games are pellet-collecting maze chase games ala the original Pac-Man. Geon makes a number of additions to the formula, with attack and defense moves, power-ups and a competitive angle with opposing Geons snatching up the pellets. After enough pellets have been collected, players must strike out to reach their opponents' goal area, leaving their own goal undefended.

USA

  1. Code:
    Classic Controller Support [Vague Rant]
    C21CAA24 00000002
    28000001 41820008
    28000002 00000000
    041CB060 41820020
    C2287034 00000025
    90010024 8803005C
    2C000002 40820118
    2C190001 408200D4
    48000019 C0A00000
    8023EA3C 3FAAAAAB
    3D99999A 3F800000
    7CA802A6 80830020
    80C30024 7C843214
    2C040000 40820014
    C0050000 D0030020
    38000001 9003006C
    80830004 70848000
    8883005E 4182001C
    68840002 9883005E
    C0030020 C043006C
    D003006C D0430020
    2C040000 41820064
    80650004 28030001
    40810018 90A1000C
    7C6803A6 4E800021
    80A1000C 90650004
    2C030001 7FE3FB78
    C0450008 40820008
    EC4200B2 C065000C
    C0030020 C0230060
    FC211024 4800002D
    D0030020 C0030024
    C0230064 FC200850
    48000019 D0030024
    80010024 7C0803A6
    38210020 4E800020
    FC0100FA C0250010
    FC000800 4180000C
    FC000890 48000014
    FC200850 FC000800
    41810008 FC000890
    4E800020 00000000
    04287F00 7FC3F378
    C2287F18 00000003
    801EFFA0 70000080
    40820008 4E800421
    60000000 00000000
    C2287F38 00000012
    4E800421 2C190001
    40820080 4800000D
    3F000000 00000000
    7C6802A6 C0430000
    C0630004 809EFFA0
    80BEFFA4 80DEFFA8
    C03E0014 39000001
    48000021 C03E0018
    39000004 48000015
    909EFFA0 90BEFFA4
    90DEFFA8 48000034
    FC000A10 FC001040
    4D800020 FC011840
    41800008 5508083C
    7CC04039 40820008
    7CA54378 7C844378
    7CC64079 4E800020
    60000000 00000000
    C2286090 00000026
    2C040002 40820124
    80830068 7D042078
    91030068 71090800
    41820008 60E78000
    71094001 4182001C
    60E70080 71098002
    40820028 71090001
    40820028 48000034
    71098002 41820064
    60E70080 71098000
    40820048 48000034
    70890001 4182000C
    3D203F80 48000010
    70894000 41820014
    3D20BF80 91230064
    39200000 91230060
    70890002 4182000C
    3D20BF80 48000010
    70898000 41820014
    3D203F80 91230060
    39200000 91230064
    71090010 41820008
    60E70800 71090040
    41820008 60E70400
    71090008 41820008
    60E72000 71090020
    41820008 60E74000
    71092000 41820008
    60E74000 71090200
    41820008 60E70800
    71090080 41820008
    60E72000 71090004
    41820008 60E70400
    71090400 41820008
    60E70200 71091000
    41820008 60E70200
    7CC63B78 38800001
    70C99FFF 00000000
    Code:
    Fix Aspect Ratio [Vague Rant]
    0404F650 C00283CC
    0421B284 38A00008
    0421B2B0 38C002C0

Button Mapping​

Wii Remote/NunchukClassic ControllerFunction
Wiimote HomeHome
Pointer is enabled/disabled by pressing Home
Open/Close Home Menu
Wiimote D-PadRight StickMenus
Navigation
Gameplay
Camera Controls
Wiimote AA
R
Menus
Confirm
Gameplay
Jump
Attack
Flip Over
Wiimote BB
ZR
Menus
Cancel
Gameplay
Powerball
Wiimote 1Plus
Minus
Gameplay
Pause
Wiimote 2Not mappedNot used?
Wiimote Plus/MinusNot mappedNot used?
Wiimote ShakeNot mappedGameplay
Attack
(just press A)
Wiimote PointerLeft StickHome Button Menu
Navigation
Nunchuk StickD-Pad
Left Stick
Menus
Navigation
Gameplay
Movement
Nunchuk CY
L
Gameplay
Re-Focus Camera
Nunchuk ZX
ZL
Gameplay
Shield

General Notes​

  • What is it with Wii games and broken aspect ratios? Geon Cube uses the incorrect aspect ratio regardless of whether you're playing in 4:3 fullscreen or 16:9 widescreen. In 4:3, the game is actually running at 1:1, and at 16:9 the game is actually running at 4:3. Basically, the aspect ratio needs to be multiplied by a factor of 4/3 across the board. This is particularly distracting in a game about cubes that roll around collecting spheres, so there's a code included above to fix this issue.

  • The pointer handling here is somewhat awkward. The original game supports navigating the menus with either the IR pointer or the Nunchuk Stick/Wiimote D-Pad. On a traditional controller, it doesn't make much sense to navigate the menus using a virtual pointer, so the pointer is only enabled when you press the Home button. There weren't any free analog sticks to be a permanent pointer and anyway you don't need one to play the game.

    • You can get yourself into a mildly broken situation if you do something weird like double-tapping Home, or pressing Home during a loading screen or similar where the menu can't open. The hack doesn't actually know whether or not the HBM opened, it only knows you pressed Home and toggles the pointer. If you get into the "wrong" setup, where the pointer is available in-game but not in the HBM, double-tap Home to toggle the pointer off and on again (or vice versa).

  • The original game doesn't support playing with the D-Pad, only the Nunchuk Stick is recognized for movement. This didn't sit right for me in a game that's entirely based around moving in the cardinal directions, with no support for analog or even diagonal movement, so the Nunchuk Stick has also been mapped to the D-Pad and the D-Pad moved over to the Right Stick. This gives you movement on either the D-Pad or Left Stick, and camera controls on the Right Stick, basically how you'd expect it to work.

Technical Notes​

Code breakdown:
  • C2: support reading the "Nunchuk Stick" even when there is no Nunchuk attached
  • 04: bypass Nunchuk error
  • C2 in calc_dpd_variable(): IR pointer emulation; this game needed special pointer handling because the virtual cursor is always enabled (even when the Wiimote is not pointed at the TV), so I'm manually moving the pointer off the side of the screen whenever it gets disabled then restoring it when it's enabled again
  • 04, C2 and C2 in read_kpad_ext(): redirect Left Stick into Nunchuk Stick, disable reading the Left Stick if player is using D-Pad currently, and emulate the D-Pad on the Right Stick
  • C2 in read_kpad_button(): button injector and emulating the Nunchuk Stick via D-Pad direction presses
The button injector got a lot more complicated for this game because of the aforementioned Nunchuk Stick emulation. Counter-intuitively, given this game's four-directional movement, the most complex part of this is how to handle diagonals on the D-Pad. The solution is basically to use whichever D-Pad direction was pressed last, so if you're moving left then press D-Pad Up-Left, you'll start moving Up even if you continue holding Left as well. Effectively, this means the D-Pad will only ever input a single direction, with the oldest part of any diagonal press being discarded. Am I making sense?
Code:
; read_kpad_button
; 80286090 for USA
; r4 holds extType
; r6 holds wiimote bitfield
; r7 holds wiimote+nunchuk bitfield
; r8 holds classic bitfield
  cmpwi r4, 0x2
  bne- RETURN

; custom previously-held classic
  lwz r4, 0x68(r3)
  andc r4, r8, r4
  stw r8, 0x68(r3)

    CLASSIC_HOME:
      andi. r9, r8, 0x800
      beq- CLASSIC_DPAD_Y
      ori r7, r7, 0x8000    ; home

        CLASSIC_DPAD_Y:
          andi. r9, r8, 0x4001  ; up or down
          beq- CLASSIC_DPAD_X
          ori r7, r7, 0x80      ; stick emulation only
          andi. r9, r8, 0x8002  ; left or right
          bne- CLASSIC_DPAD_DIAGONAL

          andi. r9, r8, 0x1     ; up
          bne- WRITE_UP
          b WRITE_DOWN

        CLASSIC_DPAD_X:
          andi. r9, r8, 0x8002  ; left or right
          beq- CLASSIC_A
          ori r7, r7, 0x80      ; stick emulation only

          andi. r9, r8, 0x8000  ; right
          bne- WRITE_RIGHT
          b WRITE_LEFT

        CLASSIC_DPAD_DIAGONAL:
            CLASSIC_UP:
              andi. r9, r4, 0x1
              beq- CLASSIC_DOWN
            WRITE_UP:
              lis r9, 0x3F80        ; 0x3F800000 is 1.0f
              b WRITE_Y

            CLASSIC_DOWN:
              andi. r9, r4, 0x4000
              beq- CLASSIC_LEFT
            WRITE_DOWN:
              lis r9, 0xBF80        ; 0xBF800000 is -1.0f

        WRITE_Y:
          stw r9, 0x64(r3)
          li r9, 0x0
          stw r9, 0x60(r3)

            CLASSIC_LEFT:
              andi. r9, r4, 0x2
              beq- CLASSIC_RIGHT
            WRITE_LEFT:
              lis r9, 0xBF80        ; 0xBF800000 is -1.0f
              b WRITE_X

            CLASSIC_RIGHT:
              andi. r9, r4, 0x8000
              beq- CLASSIC_A
            WRITE_RIGHT:
              lis r9, 0x3F80        ; 0x3F800000 is 1.0f

        WRITE_X:
            stw r9, 0x60(r3)
            li r9, 0x0
            stw r9, 0x64(r3)

    CLASSIC_A:
      andi. r9, r8, 0x10
      beq- CLASSIC_B
      ori r7, r7, 0x800     ; a

    CLASSIC_B:
      andi. r9, r8, 0x40
      beq- CLASSIC_X
      ori r7, r7, 0x400     ; b

    CLASSIC_X:
      andi. r9, r8, 0x8
      beq- CLASSIC_Y
      ori r7, r7, 0x2000    ; z

    CLASSIC_Y:
      andi. r9, r8, 0x20
      beq- CLASSIC_L
      ori r7, r7, 0x4000    ; c

    CLASSIC_L:
      andi. r9, r8, 0x2000
      beq- CLASSIC_R
      ori r7, r7, 0x4000    ; c

    CLASSIC_R:
      andi. r9, r8, 0x200
      beq- CLASSIC_ZL
      ori r7, r7, 0x800     ; a

    CLASSIC_ZL:
      andi. r9, r8, 0x80
      beq- CLASSIC_ZR
      ori r7, r7, 0x2000    ; z

    CLASSIC_ZR:
      andi. r9, r8, 0x4
      beq- CLASSIC_PLUS
      ori r7, r7, 0x400     ; b

    CLASSIC_PLUS:
      andi. r9, r8, 0x400
      beq- CLASSIC_MINUS
      ori r7, r7, 0x200     ; 1

    CLASSIC_MINUS:
      andi. r9, r8, 0x1000
      beq- CLASSIC_DONE
      ori r7, r7, 0x200     ; 1

    CLASSIC_DONE:
      or r6, r6, r7
      li r4, 0x1            ; i'm a nunchuk

RETURN:
  andi. r9, r6, 0x9FFF
 

awesomeee

Well-Known Member
Member
Joined
Oct 7, 2024
Messages
141
Trophies
0
XP
189
Country
United States
Wii play was a game known for tanks and target shooting. Wow!
1735664615325.png

Anyhoo, i have somehow made a mod LMAO!

This hack does not support the left stick as the D pad. I do not know why. I have tried copying @Vague Rant 's D pad assembly and add it to my hack, but it just does not work.
(Any idea why that is?)

This hack is to be intended to use with Tanks. Other modes may or may not work.
Controls
ZL: Landmine
ZR: Shoot bullet
Right stick: aim
D pad: d pad, move

This hack actually uses the Rhythm Heaven Fever mappings. Thank you @Vague Rant for the handy button mappings. It works well with tanks!
This hack only supports NTSC revision 1.
Classic Controller Hack (Awesomeee) (Vague Rant, gave assembly code example)


C20C8D18 00000024
90010024 2C040000
40820110 8803005C
2C000002 40820104
48000021 800F8350
3FAAAAAB 3C75C28F
00000000 00000000
3DCCCCCD 3F800000
7CA802A6 90A1000C
5727083C 38E7000C
C0030074 FC000210
C0230078 FC200A10
FC00082A C0450014
FC001040 4180000C
38C0012C 48000014
7CC53AAE 28060000
408100A0 38C6FFFF
7CC53B2E 38C00002
98C3005E 81850000
7D8803A6 4E800021
2C030001 7FE3FB78
80A1000C C0450004
40820008 EC4200B2
C0650008 C0030020
C0230074 FC211024
4800002D D0030020
C0030024 C0230078
FC200850 48000019
D0030024 80010024
7C0803A6 38210020
4E800020 FC0100FA
C0250018 FC000800
4180000C FC000890
48000014 FC200850
FC000800 41810008
FC000890 4E800020
60000000 00000000
C20CA0C8 00000019
2C040002 408200B8
71200800 41820008
60E78000 71200001
41820008 60E70008
71204000 41820008
60E70004 71200002
41820008 60E70001
71208000 41820008
60E70002 71200010
41820008 60E70800
71200040 41820008
60E70400 71200008
41820008 60E70100
71200020 41820008
60E70200 71202000
41820008 60E70800
71200200 41820008
60E70400 71200080
41820008 60E70800
71200004 41820008
60E70400 71200400
41820008 60E70010
71201000 41820008
60E71000 70E09FFF
70E09FFF 00000000
Post automatically merged:

@Vague Rant I am sad to report that Uno may be one of those games that does not use KPADRead. I looked into it earlier and i could not trace read_kpad_dpd at all in the KPAD read strategy you use.
 
Last edited by awesomeee,

KeinesR

Well-Known Member
Member
Joined
Feb 14, 2020
Messages
176
Trophies
0
Age
34
XP
494
Country
Venezuela
master @Vague Rant , as always, many thanks for your work. I tried the last 2 games on wii u and:

1. The simpsons game has 5 different versions:
RSND69 The Simpsons Game (PAL) (not tested)
RSNE69 The Simpsons Game (NTSC-U) - Tested, needs force classic controller, otherwise it will show connect nunchuck message
RSNF69 The Simpsons Game (PAL) (not tested)
RSNP69 The Simpsons Game (PAL) (not tested)
RSNX69 The Simpsons Game (PAL) (doesn't work, but it's because my wii u is USA so it give me a black screen)

2. Geon cube works perfect, doesn't need force classic controller
 
  • Like
Reactions: Vague Rant

awesomeee

Well-Known Member
Member
Joined
Oct 7, 2024
Messages
141
Trophies
0
XP
189
Country
United States
@Vague Rant I am in the process of making my next hack, but i cant seem to get left stick D pad emulation working. Do you know how to fix that?

Another question: How do you drop Nunchuk values into Codewrite?
Post automatically merged:

Currently im looking into Wii Music. I think my next game will be Sonic and the Secret Rings.
Vague, do you know any of the data you used in Fluidity for tilting? Perhaps that could be re used for this game. Maybe make the job simpler!

EDIT: I scrapped the sonic idea. Would be too tedious.
Post automatically merged:

Hello all. I have found a post that lists ALL of the controller values for games (No accelerometer values)
Hopefully this helps!
https://mariokartwii.com/showthread.php?tid=44
 
Last edited by awesomeee,

Honkinghard

Member
Newcomer
Joined
Jun 4, 2018
Messages
22
Trophies
0
XP
329
Country
United States

2010's Blaster Master: Overdrive is perhaps the most forgotten entry in the storied Sunsoft Metroidvania franchise. Released exclusively to the Wii Shop Channel as WiiWare, they had high hopes of reviving the franchise after several previous failed attempts. Instead, this would be yet another unsuccessful title, a pattern which wouldn't turn around until the celebrated Blaster Master Zero trilogy.

Overdrive closely follows the formula of the NES classic, with a sprawling, Metroid-style overworld navigated in the upgradable SOPHIA tank giving way to top-down shooter levels outside the tank. The most prominent additions here are a world map and the ability to save. While it retained the core of what makes Blaster Master fun, critics and players noted two major flaws with this release: the budget presentation (4:3, 480i and a generic art style missing the character of the NES game) and the awkward Wiimote controls (with the Wiimote held sideways and requiring frequent use of the uncomfortable A/B buttons). What to do?
Besides the Classic Controller hack itself, there's a few more codes here to make the game look slightly nicer. It's never going to be a great looking game, but forcing 480p, disabling the copy (deflicker) filter and forcing 4:3 all help to sharpen up the image.

Blaster Master has no widescreen support anyway; it just draws black bars in the extra space, so forcing 4:3 allows the full resolution to be dedicated to drawing the actual gameplay area.

The viWidth mod is more subjective: this will reduce the sharpness slightly but corrects the aspect ratio so that round objects like enemy bullets and SOPHIA's tires are ... round.

USAEUR

  1. Code:
    Classic Controller Support [Vague Rant]
    C2129C78 0000001D
    90010024 2C040000
    408200D8 8803005C
    2C000002 408200CC
    48000015 800E4480
    3FAAAAAB 3C75C28F
    3F800000 7CA802A6
    90A1000C 80030004
    70008000 41820010
    38000000 90030020
    90030024 38C00002
    98C3005E 81850000
    7D8803A6 4E800021
    2C030001 7FE3FB78
    80A1000C C0450004
    40820008 EC4200B2
    C0650008 C0030020
    C023006C FC211024
    4800002D D0030020
    C0030024 C0230070
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C025000C FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    C212ABA8 00000020
    4E800421 2C140001
    408200F4 48000011
    00000000 3F000000
    00000000 7C6802A6
    809EFFA0 80BEFFA4
    80DEFFA8 80E30000
    39200000 C0430004
    C0630008 C03E0014
    FC200850 39000004
    48000069 C03E0018
    39000001 4800005D
    91230000 2C090000
    4182001C 7C093800
    41820010 7084FFF0
    61290200 48000024
    39200600 C03E000C
    FC200850 39000004
    48000049 C03E0010
    39000001 4800003D
    7C844B78 909EFFA0
    90BEFFA4 7CC62079
    90DEFFA8 48000050
    FC000A10 FC001040
    4D800020 FC011840
    41800008 5508083C
    7D294378 4E800020
    FC000A10 FC001040
    4D800020 FC011840
    41800008 5508083C
    7CC04039 40820008
    7CA54378 7C844378
    4E800020 00000000
    C2128C84 00000019
    2C040002 408200B8
    71090800 41820008
    60C68000 71090001
    41820008 60C60002
    71094000 41820008
    60C60001 71090002
    41820008 60C60008
    71098000 41820008
    60C60004 71090010
    41820008 60C60200
    71090040 41820008
    60C60100 71090008
    41820008 60C60010
    71090020 41820008
    60C60200 71092000
    41820008 60C60800
    71090200 41820008
    60C60400 71090080
    41820008 60C60800
    71090004 41820008
    60C60400 71090400
    41820008 60C61000
    71091000 41820008
    60C61000 70C99FFF
    60000000 00000000
    Code:
    Disable Copy Filter [Vague Rant]
    040C02E0 48000040
    Code:
    Force 480p [Vague Rant]
    041EF558 00000002
    021EF56E 00000000
    041EF5D0 00000016
    021EF5E6 00000000
    Code:
    Force 4:3 [Vague Rant]
    040E44AC 38000000
    Code:
    Force 704 viWidth [Vague Rant]
    021EF562 00000008
    021EF566 000002C0
    021EF5DA 00000008
    021EF5DE 000002C0
  2. Code:
    Classic Controller Support [Vague Rant]
    C212A588 0000001D
    90010024 2C040000
    408200D8 8803005C
    2C000002 408200CC
    48000015 800E4D90
    3FAAAAAB 3C75C28F
    3F800000 7CA802A6
    90A1000C 80030004
    70008000 41820010
    38000000 90030020
    90030024 38C00002
    98C3005E 81850000
    7D8803A6 4E800021
    2C030001 7FE3FB78
    80A1000C C0450004
    40820008 EC4200B2
    C0650008 C0030020
    C023006C FC211024
    4800002D D0030020
    C0030024 C0230070
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C025000C FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    C212B4B8 00000020
    4E800421 2C140001
    408200F4 48000011
    00000000 3F000000
    00000000 7C6802A6
    809EFFA0 80BEFFA4
    80DEFFA8 80E30000
    39200000 C0430004
    C0630008 C03E0014
    FC200850 39000004
    48000069 C03E0018
    39000001 4800005D
    91230000 2C090000
    4182001C 7C093800
    41820010 7084FFF0
    61290200 48000024
    39200600 C03E000C
    FC200850 39000004
    48000049 C03E0010
    39000001 4800003D
    7C844B78 909EFFA0
    90BEFFA4 7CC62079
    90DEFFA8 48000050
    FC000A10 FC001040
    4D800020 FC011840
    41800008 5508083C
    7D294378 4E800020
    FC000A10 FC001040
    4D800020 FC011840
    41800008 5508083C
    7CC04039 40820008
    7CA54378 7C844378
    4E800020 00000000
    C2129594 00000019
    2C040002 408200B8
    71090800 41820008
    60C68000 71090001
    41820008 60C60002
    71094000 41820008
    60C60001 71090002
    41820008 60C60008
    71098000 41820008
    60C60004 71090010
    41820008 60C60200
    71090040 41820008
    60C60100 71090008
    41820008 60C60010
    71090020 41820008
    60C60200 71092000
    41820008 60C60800
    71090200 41820008
    60C60400 71090080
    41820008 60C60800
    71090004 41820008
    60C60400 71090400
    41820008 60C61000
    71091000 41820008
    60C61000 70C99FFF
    60000000 00000000
    Code:
    Disable Copy Filter [Vague Rant]
    040C0BF0 48000040
    Code:
    Force 480p [Vague Rant]
    041F0598 00000002
    021F05AE 00000000
    041F0610 00000016
    021F0626 00000000
    Code:
    Force 4:3 [Vague Rant]
    040E4DBC 38000000
    Code:
    Force 704 viWidth [Vague Rant]
    021F05A2 00000008
    021F05A6 000002C0
    021F061A 00000008
    021F061E 000002C0
View attachment 466938

The archive above includes several tools, IPS patches and a Windows batch script to make applying this hack directly to a WAD relatively painless.

In addition to that ZIP, you will need:
  • a Blaster Master: Overdrive WAD (either USA or EUR)
  • common-key.bin
I will not help you find either of the above.

To use the script:

  1. extract the ZIP file somewhere sensible

  2. add the common-key.bin to that directory

  3. drag and drop your Blaster Master: Overdrive WAD onto the apply-patch.bat file
    • alternatively, you can run the script directly and drag and drop the WAD into the window that opens or just type the path to your WAD manually

  4. answer the y/n prompts for which patches you want to apply

  5. once you're ready, the script will use the included tools to unpack, patch and repack a new WAD with your chosen patches
    • the original WAD will not be modified

  6. do whatever you normally would do with a WAD file
    • if you're making a Wii U Wii VC injection, use the "Force Classic Controller connected" option in your injection software.

    • if you enabled the Force 4:3 patch, also remember to use the "Force 4:3 (vWii NAND titles only)" option in the injection software, unless you want the game to be stretched to fill 16:9
As a general rule, you shouldn't download and run random executables and batch scripts you find on the Internet. If you can't or don't want to run any of these on your machine, the IPS patches are included in the patches directory and you can figure out how to apply them in whatever way you feel comfortable. There is a readme.txt included with slightly more details on how to apply the patches in platform-agnostic terms (e.g. "Unpack your WAD").

Button Mapping​

Wii RemoteClassic ControllerFunction
HomeHome
Remember that L/ZL are your A button
Open/Close Home Button Menu
D-PadD-Pad
Left Stick
Menus
Navigation
Gameplay
Movement
AL
ZL
Gameplay
Change Weapon
BR
ZR
SOPHIA
Lock Cannon Angle
On-Foot
Strafe
1Y
A
Menus
Confirm (seriously)
Gameplay
Shoot
2BMenus
Cancel (seriously)
SOPHIA
Jump
On-Foot
Bomb
D-Pad + 1 + BRight StickOn-Foot
Aim, Shoot and Strafe
PlusXGameplay
Enter/Exit SOPHIA
MinusPlus
Minus
SOPHIA
Overworld Map

General Notes​

  • You only need to use one or the other of the Gecko codes or pre-patched WAD. If you're booting via a method which can apply Gecko codes, that will be much easier. If you need the hack patched directly into the game (e.g. for use as a Wii U injection), use the WAD patches.

  • Hacking WiiWare titles is a lot more difficult than I expected. Gecko codes loaded via app work exactly as they do for disc games, but appending a code section to the main.dol prevents the title from booting. That's why the WAD patches are here, primarily for anybody who wants to use this as a Wii U Wii VC injection.
    • The WAD patches completely break accelerometer compatibility, as I needed somewhere to inject the patches and the accelerometer is not used here except to help the Wii Remote locate the sensor bar while the Home Button Menu is open. Too bad.
      • This is not a workable solution for games which do use the accelerometer. I don't have a plan for what to do in that situation currently. Besides, this was a lot of extra effort because I had to manually create every branch to and from modified code, since I no longer have a code handler running here. Look at me. ✌️ I'm the code handler now.

  • The major addition here is twin-stick controls for the top-down stages. As an alternative to moving and aiming with the D-Pad/Left Stick, this allows you to move with the D-Pad/Left Stick and shoot in any direction with the Right Stick. Blaster Master: Overdrive can be quite challenging, so this is very helpful.
    • Obviously, if you prefer the traditional controls, they are also preserved here. You can just use the normal movement, shoot and strafe buttons and ignore the Right Stick.

  • While some mappings might seem odd (A on L/ZL; Plus on X), this control scheme is largely adapted from the Blaster Master Zero trilogy which followed this game. If you've played any of those games, you should be right at home here. The only other slightly weird thing is mapping 1 to both Y and A. This game has inverted Confirm/Cancel controls, so this was solely done to make menu navigation work naturally while keeping Shoot on Y. Or you can shoot with A and Confirm with Y if you're weird like that.

  • Blaster Master: Overdrive is a pretty 6/10 kind of game. I have a soft spot for it as I really like the Blaster Master franchise, but there's a reason this one has been forgotten. It's not a series low-point like Blaster Master 2 for Sega Genesis but neither does it reach the highs of the original game or the modern Blaster Master Zero trilogy. Still, at the time of release it was probably the second-best mainline game in the series (not as good as the NES original but better than the Game Boy Color version).
    • Fixing the controls and making it less blurry doesn't completely redeem the game, but maybe it takes it from a 6 to a 6.5. It's not a hidden gem, it's not a forgotten classic, it's just an all right game held back by controls and visuals that aren't all right. Give it a shot if you really like Blaster Master games.

    • EDIT: Bonus note. Back when this game launched in 2010, publisher Gaijinworks's Victor Ireland made a number of posts on gaming message boards about his intention to push Sunsoft to release an update to add Classic Controller and progressive scan support. That never ended up happening, but even though it took 14 years, we've finally made it to the future.

Technical Notes​

Yeesh, this really blew out. Writing the original Gecko codes went about as well as any disc-based game, but when it came to injecting the hacks into the WAD, everything got a lot more complicated. I don't really know anything about the NAND title loading process, but my understanding is that a loader.bin file runs before the actual title contents. I think it must be this which fails to handle the expanded main.dol. At a guess, the situation is something like, the expanded main.dol bumps up the addressing where all other data is placed in memory by the loader.bin, so none of the data is where the code inside main.dol expects to find it any more and it immediately falls apart when it tries to read it. Is this fixable? Can somebody fix this? Please? A way to apply code modifications to WiiWare that is less "manual" would be great.

Quickly skimming through the different parts of the Classic Controller hack, you've got a C2 for the pointer in calc_dpd_variable(), a C2 in read_kpad_ext() for the left stick emulation and twin-stick aiming support (I'll come back to that) and another C2 in read_kpad_button() for the button input.

The twin-stick aiming code is kind of spaghetti. It's derived from the standard D-Pad emulation setup, but has to do a bunch of trickery to accommodate movement on the real D-Pad/Left Stick and aiming on the Right Stick when the original game was controlled entirely on a single D-Pad. The way this is done is that any time you move the Right Stick in a new direction, D-Pad emulation occurs on that stick for a single frame. The right stick also handles "pressing" the shoot and strafe buttons for you. Broken down frame by frame, here's how it works:
  • frame 0: player is holding D-Pad Right and Alex is running to the right

  • frame 1: player moves Right Stick to the left
    • for a single frame, D-Pad emulation occurs on the right stick and Alex turns to face left

    • at the same time, the shoot button is pressed and held and Alex begins shooting left

  • frame 2+: the strafe button is pressed and held so that Alex continues facing/shooting left
    • at the same time, normal D-Pad operation is restored and Alex resumes moving to the right

  • ... time passes ...

  • frame 201: the player moves the Right Stick from the left to the up-left position
    • for a single frame, the strafe button is released so that Alex can turn to face the new direction

    • for that same frame, D-Pad emulation is back on the right stick and Alex turns to face up-left

  • frame 202+: the strafe button is pressed and held so that Alex continues facing/shooting up-left
    • at the same time, normal D-Pad operation is restored and Alex resumes moving to the right
In this way, everything that's happening is technically possible in normal gameplay with frame perfect input, since that's all this is. Arguably, it's not twin-stick aiming, it's tool-assisted frame-perfect strafing.

Thank you very much, but the batch file fails with "ERROR: Could not find 00000007.app file." Any idea how to remedy this?

1733991362419.png
 

Honkinghard

Member
Newcomer
Joined
Jun 4, 2018
Messages
22
Trophies
0
XP
329
Country
United States
Can you verify your backup in dolphin? Right click the game, properties, and verify the backup.
If its a bad dump, re install it from the Wii Shop Channel, dump it and try again. 👍
I appreciate the quick reply!
Here's what I got by verifying with the latest version of Dolphin:
1734045965822.png


The European WAD shows the same messages except "key index is 20 but should be 0."

I then tried WADs from different sources but got the same result as before, the USA WAD saying "key index is 199" and European "key index is 20."
 

awesomeee

Well-Known Member
Member
Joined
Oct 7, 2024
Messages
141
Trophies
0
XP
189
Country
United States
I appreciate the quick reply!
Here's what I got by verifying with the latest version of Dolphin:
View attachment 475679

The European WAD shows the same messages except "key index is 20 but should be 0."

I then tried WADs from different sources but got the same result as before, the USA WAD saying "key index is 199" and European "key index is 20."
Dude, piracy is not allowed. Please legally extract your game if this is some joke, if not, please leave. This thread does not support piracy. GBA temp does not support piracy either.
 
Last edited by awesomeee,

Vague Rant

Deceptively cute
OP
Member
Joined
Aug 7, 2008
Messages
2,533
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,913
Country
Anyhoo, i have somehow made a mod LMAO!

This hack does not support the left stick as the D pad. I do not know why. I have tried copying @Vague Rant 's D pad assembly and add it to my hack, but it just does not work.
(Any idea why that is?)
That's fantastic, great work. I just took a look at Wii Play and like Excite Truck (another launch title), KPAD is quite different to how it works in basically anything else but launch titles. That's why you had trouble with the D-Pad emulation and stuff. The D-Pad assembly hack would need some changes to work on this or other launch titles. If you don't mind, I'll add Wii Play to my investigate list and see if I can add D-Pad emulation or Nunchuk support to your code as a collab.

@Vague Rant I am sad to report that Uno may be one of those games that does not use KPADRead. I looked into it earlier and i could not trace read_kpad_dpd at all in the KPAD read strategy you use.
I took a look at Uno too, it definitely uses KPADRead, it's just a bit tougher to locate because of the newish SDK in use. Once I found it (via WPADProbe()) I was able to get a CC hack up pretty quick, since this game only needs the buttons and pointer. I still need to port the code to other regions and generate an IPS patch/builder script, so I'm not posting the code yet, but I don't foresee any major problems so this should be out soon-ish.

@Vague Rant I am in the process of making my next hack, but i cant seem to get left stick D pad emulation working. Do you know how to fix that?

Another question: How do you drop Nunchuk values into Codewrite?
I think the D-Pad thing is probably an issue with the poll count register. IIRC, my assembly hack checks whether r15 is equal to 0x1 before it continues. The tl;dr here is that while the buttons only get polled once, all of the analog stuff (sticks, accelerometers, pointer) get polled multiple times each frame. Since that's not needed for D-Pad emulation, I only do D-Pad emulation using the data from the final poll. The poll count decrements (goes down) from somewhere between 6 and 3, depending on the game. One of the registers holds how many polls are still left to do. Most of the time it's r15, but I've seen it in r19, r20 and r22 as well.

If the game you're looking at is using a different register for the poll count, checking r15 won't work. To find the correct register, set a breakpoint inside read_kpad_stick() (where the bctrl instruction is) and then look at the register list in Dolphin. Hit Play and look at which ones are displayed in red, indicating that their values have changed. If you find one that looks something like: 3, 2, 1, 3, 2, 1, 3, 2, 1 (changing each time you hit Play in Dolphin), you've found the poll register. Then you can edit the assembly to make the poll check use that register which should fix D-Pad emulation.

Unfortunately, there's not really a simple way to just write in Nunchuk values. That will require you to write some code specific to the individual game you're looking at to handle Classic/Nunchuk stick support. I can give an example, but it's only going to be specific to the one game I did it for. Here we go.

  1. Inside the button injector assembly, add an instruction li r4, 1 to make the game skip writing out the Classic Controller button values. You can see examples of this in any of my recent hacks in the Technical Notes section.

    • These would otherwise write to 0x60(r3). That's where the Classic Controller handles its buttons, but also where the Nunchuk handles its analog stick, so if we're pretending to be a Nunchuk, we can't have CC buttons stored there.

  2. Locate where read_kpad_stick() sets the address to write the Left Stick (or Right Stick if you're emulating the Nunchuk stick there) data in KPADStatus.

    • This part is pretty easy, especially because you're already tracking down those bctrl instructions. Here's the section you're interested in (example uses Left Stick):
      Code:
      802a07c4 mr		r12, r31
      802a07c8 addi	r3, r30, 12
      802a07cc lha	r4, 0x002C (r4)
      802a07d0 lha	r5, 0x002E (r29)
      802a07d4 lwz	r6, -0x3934 (r13)
      802a07d8 lwz	r7, -0x3930 (r13)
      802a07dc mtctr	r12
      802a07e0 bctrl

    • The specific address you want to adjust is the one with the addi r3, r30, 12, so 802a07c8 in this example.

  3. Modify this with an 04 Gecko codetype, replacing the instruction with an mr r3, r30. The code will look like this:
    Code:
    042A07C8 7FC3F378
    The 04 codetype replaces a single word (4 bytes) at a single address. You take the address you want to patch and replace 80 with 04 then put the assembled replacement (In this case, the mr instruction) on the right side.

  4. Follow the process I gave in this previous post to identify where the game handles reading the Nunchuk.

  5. Write some code to tell the game to read the Nunchuk stick even though the Nunchuk is not available.

    • This will look different for every game, so anything beyond this point won't be particularly useful unless you're hacking the same game as me. Here's the code from the example I'm using currently:
      Code:
      ; classic is nunchuk
      ; 80224770 for USA
        extsb r6, r4
        mulli r6, r6, 0xF00
        add r6, r3, r6
        lbz r0, 0xBC(r6)
        cmpwi r0, 0x2
        bne- RETURN
        li r0, 0x1
        stb r0, 0xBC(r6)
      
      RETURN:
        li r0, 0x0
        lis r6, 0x8032
      For this game, it was necessary to generate a pointer to the controller data (that's what the first three instructions are doing), then read in the extension value. Classic Controller is 2, so if the value is not 2 we just return (restoring the registers we clobbered with our extension check), otherwise we replace the extension byte with 1 (Nunchuk) and write it back to the controller data so that any future checks will believe we have a Nunchuk connected.

  6. If the Left Stick now handles Nunchuk interactions, you're done.

Currently im looking into Wii Music. I think my next game will be Sonic and the Secret Rings.
Vague, do you know any of the data you used in Fluidity for tilting? Perhaps that could be re used for this game. Maybe make the job simpler!
The main thing to know for Fluidity was that the water and ice forms used the raw accelerometer data (addresses at 0x0C(r3), 0x10(r3) and 0x14(r3) in KPADStatus while the cloud uses the vertical angle (vertical because the Wiimote is held sideways, so this is effectively the horizontal angle of the Wiimote in real terms) generated by calc_dpd_variable() at 0x58(r3). That was probably fairly specific to Fluidity though, it might only be relevant to other heavily tilting-based games like Super Monkey Ball.

Thank you very much, but the batch file fails with "ERROR: Could not find 00000007.app file." Any idea how to remedy this?

View attachment 475483
This is definitely odd, it sounds like your WAD is missing a file when it unpacks before the rebuild. I'll try to find if I can replicate what's causing this behavior. Thanks for reporting.



71NIQif1MJL.jpg


Lego Star Wars: The Complete Saga is an enhanced collection of the first two Lego Star Wars games (previously released on GameCube and other platforms). With improved graphics and level designs, new characters, extra collectibles and even the option to go back and play the original unmodified levels, this marked the definitive way to play the original Lego Star Wars games.

USA (Rev 1) / EUR (Rev 1)JPN

  1. Code:
    Classic Controller Support [Vague Rant]
    C219AC18 00000003
    28030002 40820008
    38600001 28030001
    60000000 00000000
    C232DDD8 0000001F
    90010024 2C040000
    408200E8 8803005C
    2C000002 408200DC
    9803005E 2C0F0001
    40820094 48000015
    803719A8 3FAAAAAB
    3D4CCCCD 3F800000
    7CA802A6 80030004
    70008000 41820010
    38000000 90030020
    90030024 80650000
    28030001 40810018
    90A1000C 7C6803A6
    4E800021 80A1000C
    90650000 2C030001
    7FE3FB78 C0450004
    40820008 EC4200B2
    C0650008 C0030020
    C0230060 FC211024
    4800002D D0030020
    C0030024 C0230064
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C025000C FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    0432EC90 7FC3F378
    C232F380 0000001A
    2C040002 408200BC
    38800001 71200800
    41820008 61088000
    71200001 41820008
    61080008 71204000
    41820008 61080004
    71200002 41820008
    61080001 71208000
    41820008 61080002
    71200010 41820008
    61082000 71200040
    41820008 61080800
    71200008 41820008
    61084000 71200020
    41820008 61080400
    71202000 41820008
    61080200 71200200
    41820008 61080100
    71200080 41820008
    61082000 71200004
    41820008 61080400
    71200400 41820008
    61080010 71201000
    41820008 61081000
    7CE74378 70E09FFF
    60000000 00000000
  2. Code:
    Classic Controller Support [Vague Rant]
    C219D980 00000003
    28030002 40820008
    38600001 28030001
    60000000 00000000
    C233A258 0000001F
    90010024 2C040000
    408200E8 8803005C
    2C000002 408200DC
    9803005E 2C0F0001
    40820094 48000015
    8037D164 3FAAAAAB
    3D4CCCCD 3F800000
    7CA802A6 80030004
    70008000 41820010
    38000000 90030020
    90030024 80650000
    28030001 40810018
    90A1000C 7C6803A6
    4E800021 80A1000C
    90650000 2C030001
    7FE3FB78 C0450004
    40820008 EC4200B2
    C0650008 C0030020
    C0230060 FC211024
    4800002D D0030020
    C0030024 C0230064
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C025000C FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    0433AF2C 7FC3F378
    C233B608 0000001A
    2C040002 408200BC
    38800001 71200800
    41820008 61088000
    71200001 41820008
    61080008 71204000
    41820008 61080004
    71200002 41820008
    61080001 71208000
    41820008 61080002
    71200010 41820008
    61082000 71200040
    41820008 61080800
    71200008 41820008
    61084000 71200020
    41820008 61080400
    71202000 41820008
    61080200 71200200
    41820008 61080100
    71200080 41820008
    61082000 71200004
    41820008 61080400
    71200400 41820008
    61080010 71201000
    41820008 61081000
    7CE74378 70E09FFF
    60000000 00000000

Button Mapping​

Wii Remote/NunchukClassic ControllerFunction
Wiimote HomeHome
Remember that B is your A button
Open/Close Home Menu
Wiimote D-PadD-PadMenus
Navigation
Gameplay
Movement
Wiimote ABMenus
Confirm
Gameplay
Jump
Wiimote BY
ZR
Menus
Cancel
Gameplay
Attack
Wiimote 1LGameplay
Switch Character
(Free Play)
Wiimote 2RGameplay
Switch Character
(Free Play)
Wiimote PlusPlusGameplay
Pause
Wiimote MinusMinusNot used?
Wiimote ShakeNot mappedGameplay
Attack
(use B)
Speed Up Building
(get the Red Brick)
Wiimote PointerLeft StickHome Button Menu
Navigation
Nunchuk StickLeft StickMenus
Navigation
Gameplay
Movement
Nunchuk CXGameplay
Switch Character
(Story)
Nunchuk ZA
ZL
Gameplay
Interact
(Build, Force, etc.)
Nunchuk ShakeNot mappedGameplay
Speed Up Force/Building
(get the Red Brick)

General Notes​

  • This game has multiple revisions in USA and EUR. I have only hacked the latest revision (Rev 1) for each version. I don't know what will happen if you try to use these codes on a USA/EUR Rev 0 game, but they probably won't work. Maybe try the JPN version code, since that's Rev 0 also. Once again, I have no idea whether that will work.

  • As mentioned in the Button Mapping table, I have not implemented any of the accelerometer stuff here at all. It's all optional and while it's nice to be able to speed up Force powers and Lego builds, there are Red Bricks which permanently enable Fast Force/Builds, and those are how you get those boosts on all other platforms anyway. This isn't entirely out of laziness, I just wasn't able to get the game to recognize alternating Wiimote/Nunchuk shakes and since they're extremely optional here anyway, they're not included at all.

  • The control scheme here is cribbed from the other platforms/later Lego games on Wii U, etc. This does give you some mildly weird Confirm/Cancel controls, but you don't spend that much time navigating menus in Lego games, anyway. If you don't like this control scheme, the assembly for the button injector is in the Technical Notes section, so you can remap it any way you like.

Technical Notes​

Code breakdown:
  • C2: enable reading Nunchuk Stick while Classic Controller is connected
  • C2 in calc_dpd_variable(): IR pointer emulation
  • 04 in read_kpad_stick(): Classic -> Nunchuk stick redirection
  • C2 in KPADRead(): button injector
Code:
; KPADRead
; 8032F380 for USA (Rev 1)/EUR (Rev 1)
; 8033B608 for JPN
; r4 holds extType
; r7 holds wiimote bitfield
; r8 holds wiimote+nunchuk bitfield
; r9 holds classic bitfield

CLASSIC:
  cmpwi r4, 0x2
  bne- RETURN

  li r4, 0x1            ; i'm a nunchuk

    CLASSIC_HOME:
      andi. r0, r9, 0x800
      beq- CLASSIC_UP
      ori r8, r8, 0x8000    ; home

    CLASSIC_UP:
      andi. r0, r9, 0x1
      beq- CLASSIC_DOWN
      ori r8, r8, 0x8       ; up (v) / left (h)

    CLASSIC_DOWN:
      andi. r0, r9, 0x4000
      beq- CLASSIC_LEFT
      ori r8, r8, 0x4       ; down (v) / right (h)

    CLASSIC_LEFT:
      andi. r0, r9, 0x2
      beq- CLASSIC_RIGHT
      ori r8, r8, 0x1       ; left (v) / down (h)

    CLASSIC_RIGHT:
      andi. r0, r9, 0x8000
      beq- CLASSIC_A
      ori r8, r8, 0x2       ; right (v) / up (h)

    CLASSIC_A:
      andi. r0, r9, 0x10
      beq- CLASSIC_B
      ori r8, r8, 0x2000    ; z

    CLASSIC_B:
      andi. r0, r9, 0x40
      beq- CLASSIC_X
      ori r8, r8, 0x800     ; a

    CLASSIC_X:
      andi. r0, r9, 0x8
      beq- CLASSIC_Y
      ori r8, r8, 0x4000    ; c

    CLASSIC_Y:
      andi. r0, r9, 0x20
      beq- CLASSIC_L
      ori r8, r8, 0x400     ; b

    CLASSIC_L:
      andi. r0, r9, 0x2000
      beq- CLASSIC_R
      ori r8, r8, 0x200     ; 1

    CLASSIC_R:
      andi. r0, r9, 0x200
      beq- CLASSIC_ZL
      ori r8, r8, 0x100     ; 2

    CLASSIC_ZL:
      andi. r0, r9, 0x80
      beq- CLASSIC_ZR
      ori r8, r8, 0x2000    ; z

    CLASSIC_ZR:
      andi. r0, r9, 0x4
      beq- CLASSIC_PLUS
      ori r8, r8, 0x400     ; b

    CLASSIC_PLUS:
      andi. r0, r9, 0x400
      beq- CLASSIC_MINUS
      ori r8, r8, 0x10      ; plus

    CLASSIC_MINUS:
      andi. r0, r9, 0x1000
      beq- RETURN
      ori r8, r8, 0x1000    ; minus

RETURN:
  or r7, r7, r8
  andi. r0, r7, 0x9FFF



19-crop.jpg


Flip's Twisted World is irredeemably awful, literally the worst game I have played in my life. Here's a Classic Controller hack.

USA

  1. Code:
    Classic Controller Support [Vague Rant]
    C2224770 00000006
    7C860774 1CC60F00
    7CC33214 880600BC
    2C000002 4082000C
    38000001 980600BC
    38000000 3CC08032
    60000000 00000000
    C22B3234 00000003
    889D0905 2C040002
    40820008 38800001
    60000000 00000000
    C229ECD4 0000000A
    8803005C 2C000002
    4082003C 48000011
    00000000 BF800000
    4059999A 7CA802A6
    C0830000 D08305BC
    C0030004 80830004
    70800080 4182000C
    C0050008 FC800090
    D00305C0 389E000C
    60000000 00000000
    C229F878 0000001F
    90010024 2C040000
    408200E8 8803005C
    2C000002 408200DC
    9803005E 2C160001
    40820094 48000015
    8026EF50 3FAAAAAB
    3CCCCCCD 3F800000
    7CA802A6 80030004
    70008200 41820010
    38000000 90030020
    90030024 80650000
    28030001 40810018
    90A1000C 7C6803A6
    4E800021 80A1000C
    90650000 2C030001
    7FE3FB78 C0450004
    40820008 EC4200B2
    C0650008 C0030020
    C0230060 FC211024
    4800002D D0030020
    C0030024 C0230064
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C025000C FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    042A07C8 7FC3F378
    C22A0800 00000012
    4E800421 2C160001
    40820084 4800000D
    3F000000 00000000
    7C6802A6 C0430000
    C0630004 809EFFA0
    80BEFFA4 80DEFFA8
    C03E0014 FC200850
    39000001 48000021
    C03E0018 39000004
    48000015 909EFFA0
    90BEFFA4 90DEFFA8
    48000034 FC000A10
    FC001040 4D800020
    FC011840 41800008
    5508083C 7CC04039
    40820008 7CA54378
    7C844378 7CC64079
    4E800020 00000000
    C229E734 0000001A
    2C040002 408200C0
    38800001 71000800
    41820008 60E78000
    71000001 41820008
    60E70008 71004000
    41820008 60E70004
    71000002 41820008
    60E70001 71008000
    41820008 60E70002
    71000010 41820008
    60E71000 71000040
    41820008 60E70800
    71000008 41820008
    60E70010 71000020
    41820008 60E70080
    71002000 41820008
    60E74000 71000200
    41820008 60E70800
    71000080 41820008
    60E72000 71000004
    41820008 60E70400
    71000400 41820008
    60E70200 71001000
    41820008 60E70100
    7CC63B78 70C09FFF
    60000000 00000000

Button Mapping​

Wii Remote/NunchukClassic ControllerFunction
Wiimote HomeHome
Remember that B is your A button
Open/Close Home Menu
Wiimote D-PadD-Pad
Right Stick
Gameplay
Camera Controls
Wiimote ABMenus
Confirm
Gameplay
Jump
Wiimote BZRMenus
Cancel
Gameplay
Manipulate Gravity
(with Stick)
Wiimote 1PlusGameplay
Pause
Wiimote 2MinusGameplay
Use Item
Wiimote PlusXGameplay
Zoom In
Wiimote MinusAGameplay
Zoom Out
Wiimote TiltNot mapped
(use Left Stick)
Gameplay
Manipulate Gravity
(with B)
Wiimote ShakeYGameplay
Attack
Wiimote PointerLeft StickMenus
Navigation
Nunchuk StickLeft StickGameplay
Movement
Manipulate Gravity
(with B)
Nunchuk CL
R
Gameplay
Select Weapon
Nunchuk ZZLGameplay
Interact
Hip Drop

General Notes​

  • This game is absolutely terrible. I was interested in whether a CC hack could improve it, and maybe it does a little bit, but it's such a miserable experience that nothing short of firing it directly into the Sun would improve it by an appreciable amount. In the brief period I spent testing, I had multiple crashes, culminating in a game-breaking bug which permanently hardlocked my save, forcing me to start a new game to continue testing. I don't think the concept itself is bad but everything about this game is fundamentally broken. Don't play this game, don't use this hack, shun everybody who thought it was acceptable to release this game.

  • Camera rotation is inverted in the original game, the Right Stick mapping in this hack un-inverts it. I was going to make a version without that feature but I forgot and don't care. Uh, if you want to re-invert the directions, Ctrl+F in the code for C03E0014 FC200850 and replace it with C03E0014 60000000. You monster. Have I told you this game is atrocious yet? Why are you still reading this?

  • If for whatever disgusting reason you try this game out in Dolphin, let me know whether it works for you. This game (even pre-hack) black screens on Dolphin for me when I try to start a save, so this whole hack was done old-school on real hardware. That's not why I hate the game, it's just that it's incomprehensibly poor, these are unrelated things. Still, if this is a genuine bug, somebody should report it to Dolphin. That said, my PC doesn't meet the minimum specs for Dolphin, so it could just be a me problem.

    • If it turns out this game doesn't work in Dolphin, then frankly that's a feature, not a bug.

Technical Notes​

Code breakdown:
  • C2: enable reading Nunchuk Stick while Classic Controller is connected (code from example above)
  • C2: bypass Nunchuk error
  • C2 in read_kpad_acc(): fake Wiimote shakes, dummy out all real ACC data
  • C2 in calc_dpd_variable(): IR pointer emulation
  • 04 and C2 in read_kpad_stick(): Classic -> Nunchuk stick redirection, D-Pad emulation
  • C2 in read_kpad_button(): button injector
Code:
; read_kpad_button
; 8029E734 for USA
  cmpwi r4, 0x2
  bne- RETURN

  li r4, 0x1            ; i'm a nunchuk

    CLASSIC_HOME:
      andi. r0, r8, 0x800
      beq- CLASSIC_UP
      ori r7, r7, 0x8000    ; home

    CLASSIC_UP:
      andi. r0, r8, 0x1
      beq- CLASSIC_DOWN
      ori r7, r7, 0x8       ; up (v) / left (h)

    CLASSIC_DOWN:
      andi. r0, r8, 0x4000
      beq- CLASSIC_LEFT
      ori r7, r7, 0x4       ; down (v) / right (h)

    CLASSIC_LEFT:
      andi. r0, r8, 0x2
      beq- CLASSIC_RIGHT
      ori r7, r7, 0x1       ; left (v) / down (h)

    CLASSIC_RIGHT:
      andi. r0, r8, 0x8000
      beq- CLASSIC_A
      ori r7, r7, 0x2       ; right (v) / up (h)

    CLASSIC_A:
      andi. r0, r8, 0x10
      beq- CLASSIC_B
      ori r7, r7, 0x1000    ; minus

    CLASSIC_B:
      andi. r0, r8, 0x40
      beq- CLASSIC_X
      ori r7, r7, 0x800     ; a

    CLASSIC_X:
      andi. r0, r8, 0x8
      beq- CLASSIC_Y
      ori r7, r7, 0x10      ; plus

    CLASSIC_Y:
      andi. r0, r8, 0x20
      beq- CLASSIC_L
      ori r7, r7, 0x80      ; shake

    CLASSIC_L:
      andi. r0, r8, 0x2000
      beq- CLASSIC_R
      ori r7, r7, 0x4000    ; c

    CLASSIC_R:
      andi. r0, r8, 0x200
      beq- CLASSIC_ZL
      ori r7, r7, 0x4000    ; c

    CLASSIC_ZL:
      andi. r0, r8, 0x80
      beq- CLASSIC_ZR
      ori r7, r7, 0x2000    ; z

    CLASSIC_ZR:
      andi. r0, r8, 0x4
      beq- CLASSIC_PLUS
      ori r7, r7, 0x400     ; b

    CLASSIC_PLUS:
      andi. r0, r8, 0x400
      beq- CLASSIC_MINUS
      ori r7, r7, 0x200     ; 1

    CLASSIC_MINUS:
      andi. r0, r8, 0x1000
      beq- CLASSIC_DONE
      ori r7, r7, 0x100     ; 2

    CLASSIC_DONE:
      or r6, r6, r7

RETURN:
  andi. r0, r6, 0x9FFF
 
Last edited by Vague Rant,

Sonic3320

Active Member
Newcomer
Joined
Feb 3, 2023
Messages
39
Trophies
0
Age
32
XP
370
Country
Brazil
I really appreciate this efforts!
I would really appreciate a Classic Controller hack for Sonic Riders Zero Gravity. For some reason the game supports the GameCube controller but not the Classic Controller and it is one of the cases that I think the motion controls are awful.
 

NestorM

Well-Known Member
Member
Joined
Feb 19, 2021
Messages
113
Trophies
1
Age
40
XP
1,155
Country
France
That's fantastic, great work. I just took a look at Wii Play and like Excite Truck (another launch title), KPAD is quite different to how it works in basically anything else but launch titles. That's why you had trouble with the D-Pad emulation and stuff. The D-Pad assembly hack would need some changes to work on this or other launch titles. If you don't mind, I'll add Wii Play to my investigate list and see if I can add D-Pad emulation or Nunchuk support to your code as a collab.


I took a look at Uno too, it definitely uses KPADRead, it's just a bit tougher to locate because of the newish SDK in use. Once I found it (via WPADProbe()) I was able to get a CC hack up pretty quick, since this game only needs the buttons and pointer. I still need to port the code to other regions and generate an IPS patch/builder script, so I'm not posting the code yet, but I don't foresee any major problems so this should be out soon-ish.


I think the D-Pad thing is probably an issue with the poll count register. IIRC, my assembly hack checks whether r15 is equal to 0x1 before it continues. The tl;dr here is that while the buttons only get polled once, all of the analog stuff (sticks, accelerometers, pointer) get polled multiple times each frame. Since that's not needed for D-Pad emulation, I only do D-Pad emulation using the data from the final poll. The poll count decrements (goes down) from somewhere between 6 and 3, depending on the game. One of the registers holds how many polls are still left to do. Most of the time it's r15, but I've seen it in r19, r20 and r22 as well.

If the game you're looking at is using a different register for the poll count, checking r15 won't work. To find the correct register, set a breakpoint inside read_kpad_stick() (where the bctrl instruction is) and then look at the register list in Dolphin. Hit Play and look at which ones are displayed in red, indicating that their values have changed. If you find one that looks something like: 3, 2, 1, 3, 2, 1, 3, 2, 1 (changing each time you hit Play in Dolphin), you've found the poll register. Then you can edit the assembly to make the poll check use that register which should fix D-Pad emulation.

Unfortunately, there's not really a simple way to just write in Nunchuk values. That will require you to write some code specific to the individual game you're looking at to handle Classic/Nunchuk stick support. I can give an example, but it's only going to be specific to the one game I did it for. Here we go.

  1. Inside the button injector assembly, add an instruction li r4, 1 to make the game skip writing out the Classic Controller button values. You can see examples of this in any of my recent hacks in the Technical Notes section.
    • These would otherwise write to 0x60(r3). That's where the Classic Controller handles its buttons, but also where the Nunchuk handles its analog stick, so if we're pretending to be a Nunchuk, we can't have CC buttons stored there.

  2. Locate where read_kpad_stick() sets the address to write the Left Stick (or Right Stick if you're emulating the Nunchuk stick there) data in KPADStatus.
    • This part is pretty easy, especially because you're already tracking down those bctrl instructions. Here's the section you're interested in (example uses Left Stick):
      Code:
      802a07c4 mr        r12, r31
      802a07c8 addi    r3, r30, 12
      802a07cc lha    r4, 0x002C (r4)
      802a07d0 lha    r5, 0x002E (r29)
      802a07d4 lwz    r6, -0x3934 (r13)
      802a07d8 lwz    r7, -0x3930 (r13)
      802a07dc mtctr    r12
      802a07e0 bctrl

    • The specific address you want to adjust is the one with the addi r3, r30, 12, so 802a07c8 in this example.

  3. Modify this with an 04 Gecko codetype, replacing the instruction with an mr r3, r30. The code will look like this:
    Code:
    042A07C8 7FC3F378
    The 04 codetype replaces a single word (4 bytes) at a single address. You take the address you want to patch and replace 80 with 04 then put the assembled replacement (In this case, the mr instruction) on the right side.

  4. Follow the process I gave in this previous post to identify where the game handles reading the Nunchuk.

  5. Write some code to tell the game to read the Nunchuk stick even though the Nunchuk is not available.
    • This will look different for every game, so anything beyond this point won't be particularly useful unless you're hacking the same game as me. Here's the code from the example I'm using currently:
      Code:
      ; classic is nunchuk
      ; 80224770 for USA
        extsb r6, r4
        mulli r6, r6, 0xF00
        add r6, r3, r6
        lbz r0, 0xBC(r6)
        cmpwi r0, 0x2
        bne- RETURN
        li r0, 0x1
        stb r0, 0xBC(r6)
      
      RETURN:
        li r0, 0x0
        lis r6, 0x8032
      For this game, it was necessary to generate a pointer to the controller data (that's what the first three instructions are doing), then read in the extension value. Classic Controller is 2, so if the value is not 2 we just return (restoring the registers we clobbered with our extension check), otherwise we replace the extension byte with 1 (Nunchuk) and write it back to the controller data so that any future checks will believe we have a Nunchuk connected.

  6. If the Left Stick now handles Nunchuk interactions, you're done.


The main thing to know for Fluidity was that the water and ice forms used the raw accelerometer data (addresses at 0x0C(r3), 0x10(r3) and 0x14(r3) in KPADStatus while the cloud uses the vertical angle (vertical because the Wiimote is held sideways, so this is effectively the horizontal angle of the Wiimote in real terms) generated by calc_dpd_variable() at 0x58(r3). That was probably fairly specific to Fluidity though, it might only be relevant to other heavily tilting-based games like Super Monkey Ball.


This is definitely odd, it sounds like your WAD is missing a file when it unpacks before the rebuild. I'll try to find if I can replicate what's causing this behavior. Thanks for reporting.



View attachment 475722

Lego Star Wars: The Complete Saga is an enhanced collection of the first two Lego Star Wars games (previously released on GameCube and other platforms). With improved graphics and level designs, new characters, extra collectibles and even the option to go back and play the original unmodified levels, this marked the definitive way to play the original Lego Star Wars games.

USA (Rev 1) / EUR (Rev 1)JPN

  1. Code:
    Classic Controller Support [Vague Rant]
    C219AC18 00000003
    28030002 40820008
    38600001 28030001
    60000000 00000000
    C232DDD8 0000001F
    90010024 2C040000
    408200E8 8803005C
    2C000002 408200DC
    9803005E 2C0F0001
    40820094 48000015
    803719A8 3FAAAAAB
    3D4CCCCD 3F800000
    7CA802A6 80030004
    70008000 41820010
    38000000 90030020
    90030024 80650000
    28030001 40810018
    90A1000C 7C6803A6
    4E800021 80A1000C
    90650000 2C030001
    7FE3FB78 C0450004
    40820008 EC4200B2
    C0650008 C0030020
    C0230060 FC211024
    4800002D D0030020
    C0030024 C0230064
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C025000C FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    0432EC90 7FC3F378
    C232F380 0000001A
    2C040002 408200BC
    38800001 71200800
    41820008 61088000
    71200001 41820008
    61080008 71204000
    41820008 61080004
    71200002 41820008
    61080001 71208000
    41820008 61080002
    71200010 41820008
    61082000 71200040
    41820008 61080800
    71200008 41820008
    61084000 71200020
    41820008 61080400
    71202000 41820008
    61080200 71200200
    41820008 61080100
    71200080 41820008
    61082000 71200004
    41820008 61080400
    71200400 41820008
    61080010 71201000
    41820008 61081000
    7CE74378 70E09FFF
    60000000 00000000
  2. Code:
    Classic Controller Support [Vague Rant]
    C219D980 00000003
    28030002 40820008
    38600001 28030001
    60000000 00000000
    C233A258 0000001F
    90010024 2C040000
    408200E8 8803005C
    2C000002 408200DC
    9803005E 2C0F0001
    40820094 48000015
    8037D164 3FAAAAAB
    3D4CCCCD 3F800000
    7CA802A6 80030004
    70008000 41820010
    38000000 90030020
    90030024 80650000
    28030001 40810018
    90A1000C 7C6803A6
    4E800021 80A1000C
    90650000 2C030001
    7FE3FB78 C0450004
    40820008 EC4200B2
    C0650008 C0030020
    C0230060 FC211024
    4800002D D0030020
    C0030024 C0230064
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C025000C FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    0433AF2C 7FC3F378
    C233B608 0000001A
    2C040002 408200BC
    38800001 71200800
    41820008 61088000
    71200001 41820008
    61080008 71204000
    41820008 61080004
    71200002 41820008
    61080001 71208000
    41820008 61080002
    71200010 41820008
    61082000 71200040
    41820008 61080800
    71200008 41820008
    61084000 71200020
    41820008 61080400
    71202000 41820008
    61080200 71200200
    41820008 61080100
    71200080 41820008
    61082000 71200004
    41820008 61080400
    71200400 41820008
    61080010 71201000
    41820008 61081000
    7CE74378 70E09FFF
    60000000 00000000

Button Mapping​

Wii Remote/NunchukClassic ControllerFunction
Wiimote HomeHome
Remember that B is your A button
Open/Close Home Menu
Wiimote D-PadD-PadMenus
Navigation
Gameplay
Movement
Wiimote ABMenus
Confirm
Gameplay
Jump
Wiimote BY
ZR
Menus
Cancel
Gameplay
Attack
Wiimote 1LGameplay
Switch Character
(Free Play)
Wiimote 2RGameplay
Switch Character
(Free Play)
Wiimote PlusPlusGameplay
Pause
Wiimote MinusMinusNot used?
Wiimote ShakeNot mappedGameplay
Attack
(use B)
Speed Up Building
(get the Red Brick)
Wiimote PointerLeft StickHome Button Menu
Navigation
Nunchuk StickLeft StickMenus
Navigation
Gameplay
Movement
Nunchuk CXGameplay
Switch Character
(Story)
Nunchuk ZA
ZL
Gameplay
Interact
(Build, Force, etc.)
Nunchuk ShakeNot mappedGameplay
Speed Up Force/Building
(get the Red Brick)

General Notes​

  • This game has multiple revisions in USA and EUR. I have only hacked the latest revision (Rev 1) for each version. I don't know what will happen if you try to use these codes on a USA/EUR Rev 0 game, but they probably won't work. Maybe try the JPN version code, since that's Rev 0 also. Once again, I have no idea whether that will work.

  • As mentioned in the Button Mapping table, I have not implemented any of the accelerometer stuff here at all. It's all optional and while it's nice to be able to speed up Force powers and Lego builds, there are Red Bricks which permanently enable Fast Force/Builds, and those are how you get those boosts on all other platforms anyway. This isn't entirely out of laziness, I just wasn't able to get the game to recognize alternating Wiimote/Nunchuk shakes and since they're extremely optional here anyway, they're not included at all.

  • The control scheme here is cribbed from the other platforms/later Lego games on Wii U, etc. This does give you some mildly weird Confirm/Cancel controls, but you don't spend that much time navigating menus in Lego games, anyway. If you don't like this control scheme, the assembly for the button injector is in the Technical Notes section, so you can remap it any way you like.

Technical Notes​

Code breakdown:
  • C2: enable reading Nunchuk Stick while Classic Controller is connected
  • C2 in calc_dpd_variable(): IR pointer emulation
  • 04 in read_kpad_stick(): Classic -> Nunchuk stick redirection
  • C2 in read_kpad_button(): button injector
Code:
; KPADRead
; 8032F380 for USA (Rev 1)/EUR (Rev 1)
; 8033B608 for JPN
; r4 holds extType
; r7 holds wiimote bitfield
; r8 holds wiimote+nunchuk bitfield
; r9 holds classic bitfield

CLASSIC:
  cmpwi r4, 0x2
  bne- RETURN

  li r4, 0x1            ; i'm a nunchuk

    CLASSIC_HOME:
      andi. r0, r9, 0x800
      beq- CLASSIC_UP
      ori r8, r8, 0x8000    ; home

    CLASSIC_UP:
      andi. r0, r9, 0x1
      beq- CLASSIC_DOWN
      ori r8, r8, 0x8       ; up (v) / left (h)

    CLASSIC_DOWN:
      andi. r0, r9, 0x4000
      beq- CLASSIC_LEFT
      ori r8, r8, 0x4       ; down (v) / right (h)

    CLASSIC_LEFT:
      andi. r0, r9, 0x2
      beq- CLASSIC_RIGHT
      ori r8, r8, 0x1       ; left (v) / down (h)

    CLASSIC_RIGHT:
      andi. r0, r9, 0x8000
      beq- CLASSIC_A
      ori r8, r8, 0x2       ; right (v) / up (h)

    CLASSIC_A:
      andi. r0, r9, 0x10
      beq- CLASSIC_B
      ori r8, r8, 0x2000    ; z

    CLASSIC_B:
      andi. r0, r9, 0x40
      beq- CLASSIC_X
      ori r8, r8, 0x800     ; a

    CLASSIC_X:
      andi. r0, r9, 0x8
      beq- CLASSIC_Y
      ori r8, r8, 0x4000    ; c

    CLASSIC_Y:
      andi. r0, r9, 0x20
      beq- CLASSIC_L
      ori r8, r8, 0x400     ; b

    CLASSIC_L:
      andi. r0, r9, 0x2000
      beq- CLASSIC_R
      ori r8, r8, 0x200     ; 1

    CLASSIC_R:
      andi. r0, r9, 0x200
      beq- CLASSIC_ZL
      ori r8, r8, 0x100     ; 2

    CLASSIC_ZL:
      andi. r0, r9, 0x80
      beq- CLASSIC_ZR
      ori r8, r8, 0x2000    ; z

    CLASSIC_ZR:
      andi. r0, r9, 0x4
      beq- CLASSIC_PLUS
      ori r8, r8, 0x400     ; b

    CLASSIC_PLUS:
      andi. r0, r9, 0x400
      beq- CLASSIC_MINUS
      ori r8, r8, 0x10      ; plus

    CLASSIC_MINUS:
      andi. r0, r9, 0x1000
      beq- RETURN
      ori r8, r8, 0x1000    ; minus

RETURN:
  or r7, r7, r8
  andi. r0, r7, 0x9FFF



View attachment 475723

Flip's Twisted World is irredeemably awful, literally the worst game I have played in my life. Here's a Classic Controller hack.

USA

  1. Code:
    Classic Controller Support [Vague Rant]
    C2224770 00000006
    7C860774 1CC60F00
    7CC33214 880600BC
    2C000002 4082000C
    38000001 980600BC
    38000000 3CC08032
    60000000 00000000
    C22B3234 00000003
    889D0905 2C040002
    40820008 38800001
    60000000 00000000
    C229ECD4 0000000A
    8803005C 2C000002
    4082003C 48000011
    00000000 BF800000
    4059999A 7CA802A6
    C0830000 D08305BC
    C0030004 80830004
    70800080 4182000C
    C0050008 FC800090
    D00305C0 389E000C
    60000000 00000000
    C229F878 0000001F
    90010024 2C040000
    408200E8 8803005C
    2C000002 408200DC
    9803005E 2C160001
    40820094 48000015
    8026EF50 3FAAAAAB
    3CCCCCCD 3F800000
    7CA802A6 80030004
    70008200 41820010
    38000000 90030020
    90030024 80650000
    28030001 40810018
    90A1000C 7C6803A6
    4E800021 80A1000C
    90650000 2C030001
    7FE3FB78 C0450004
    40820008 EC4200B2
    C0650008 C0030020
    C0230060 FC211024
    4800002D D0030020
    C0030024 C0230064
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C025000C FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    042A07C8 7FC3F378
    C22A0800 00000012
    4E800421 2C160001
    40820084 4800000D
    3F000000 00000000
    7C6802A6 C0430000
    C0630004 809EFFA0
    80BEFFA4 80DEFFA8
    C03E0014 FC200850
    39000001 48000021
    C03E0018 39000004
    48000015 909EFFA0
    90BEFFA4 90DEFFA8
    48000034 FC000A10
    FC001040 4D800020
    FC011840 41800008
    5508083C 7CC04039
    40820008 7CA54378
    7C844378 7CC64079
    4E800020 00000000
    C229E734 0000001A
    2C040002 408200C0
    38800001 71000800
    41820008 60E78000
    71000001 41820008
    60E70008 71004000
    41820008 60E70004
    71000002 41820008
    60E70001 71008000
    41820008 60E70002
    71000010 41820008
    60E71000 71000040
    41820008 60E70800
    71000008 41820008
    60E70010 71000020
    41820008 60E70080
    71002000 41820008
    60E74000 71000200
    41820008 60E70800
    71000080 41820008
    60E72000 71000004
    41820008 60E70400
    71000400 41820008
    60E70200 71001000
    41820008 60E70100
    7CC63B78 70C09FFF
    60000000 00000000

Button Mapping​

Wii Remote/NunchukClassic ControllerFunction
Wiimote HomeHome
Remember that B is your A button
Open/Close Home Menu
Wiimote D-PadD-Pad
Right Stick
Gameplay
Camera Controls
Wiimote ABMenus
Confirm
Gameplay
Jump
Wiimote BZRMenus
Cancel
Gameplay
Manipulate Gravity
(with Stick)
Wiimote 1PlusGameplay
Pause
Wiimote 2MinusGameplay
Use Item
Wiimote PlusXGameplay
Zoom In
Wiimote MinusAGameplay
Zoom Out
Wiimote TiltNot mapped
(use Left Stick)
Gameplay
Manipulate Gravity
(with B)
Wiimote ShakeYGameplay
Attack
Wiimote PointerLeft StickMenus
Navigation
Nunchuk StickLeft StickGameplay
Movement
Manipulate Gravity
(with B)
Nunchuk CL
R
Gameplay
Select Weapon
Nunchuk ZZLGameplay
Interact
Hip Drop

General Notes​

  • This game is absolutely terrible. I was interested in whether a CC hack could improve it, and maybe it does a little bit, but it's such a miserable experience that nothing short of firing it directly into the Sun would improve it by an appreciable amount. In the brief period I spent testing, I had multiple crashes, culminating in a game-breaking bug which permanently hardlocked my save, forcing me to start a new game to continue testing. I don't think the concept itself is bad but everything about this game is fundamentally broken. Don't play this game, don't use this hack, shun everybody who thought it was acceptable to release this game.

  • Camera rotation is inverted in the original game, the Right Stick mapping in this hack un-inverts it. I was going to make a version without that feature but I forgot and don't care. Uh, if you want to re-invert the directions, Ctrl+F in the code for C03E0014 FC200850 and replace it with C03E0014 60000000. You monster. Have I told you this game is atrocious yet? Why are you still reading this?

  • If for whatever disgusting reason you try this game out in Dolphin, let me know whether it works for you. This game (even pre-hack) black screens on Dolphin for me when I try to start a save, so this whole hack was done old-school on real hardware. That's not why I hate the game, it's just that it's incomprehensibly poor, these are unrelated things. Still, if this is a genuine bug, somebody should report it to Dolphin. That said, my PC doesn't meet the minimum specs for Dolphin, so it could just be a me problem.
    • If it turns out this game doesn't work in Dolphin, then frankly that's a feature, not a bug.

Technical Notes​

Code breakdown:
  • C2: enable reading Nunchuk Stick while Classic Controller is connected (code from example above)
  • C2: bypass Nunchuk error
  • C2 in read_kpad_acc(): fake Wiimote shakes, dummy out all real ACC data
  • C2 in calc_dpd_variable(): IR pointer emulation
  • 04 and C2 in read_kpad_stick(): Classic -> Nunchuk stick redirection, D-Pad emulation
  • C2 in read_kpad_button(): button injector
Code:
; read_kpad_button
; 8029E734 for USA
  cmpwi r4, 0x2
  bne- RETURN

  li r4, 0x1            ; i'm a nunchuk

    CLASSIC_HOME:
      andi. r0, r8, 0x800
      beq- CLASSIC_UP
      ori r7, r7, 0x8000    ; home

    CLASSIC_UP:
      andi. r0, r8, 0x1
      beq- CLASSIC_DOWN
      ori r7, r7, 0x8       ; up (v) / left (h)

    CLASSIC_DOWN:
      andi. r0, r8, 0x4000
      beq- CLASSIC_LEFT
      ori r7, r7, 0x4       ; down (v) / right (h)

    CLASSIC_LEFT:
      andi. r0, r8, 0x2
      beq- CLASSIC_RIGHT
      ori r7, r7, 0x1       ; left (v) / down (h)

    CLASSIC_RIGHT:
      andi. r0, r8, 0x8000
      beq- CLASSIC_A
      ori r7, r7, 0x2       ; right (v) / up (h)

    CLASSIC_A:
      andi. r0, r8, 0x10
      beq- CLASSIC_B
      ori r7, r7, 0x1000    ; minus

    CLASSIC_B:
      andi. r0, r8, 0x40
      beq- CLASSIC_X
      ori r7, r7, 0x800     ; a

    CLASSIC_X:
      andi. r0, r8, 0x8
      beq- CLASSIC_Y
      ori r7, r7, 0x10      ; plus

    CLASSIC_Y:
      andi. r0, r8, 0x20
      beq- CLASSIC_L
      ori r7, r7, 0x80      ; shake

    CLASSIC_L:
      andi. r0, r8, 0x2000
      beq- CLASSIC_R
      ori r7, r7, 0x4000    ; c

    CLASSIC_R:
      andi. r0, r8, 0x200
      beq- CLASSIC_ZL
      ori r7, r7, 0x4000    ; c

    CLASSIC_ZL:
      andi. r0, r8, 0x80
      beq- CLASSIC_ZR
      ori r7, r7, 0x2000    ; z

    CLASSIC_ZR:
      andi. r0, r8, 0x4
      beq- CLASSIC_PLUS
      ori r7, r7, 0x400     ; b

    CLASSIC_PLUS:
      andi. r0, r8, 0x400
      beq- CLASSIC_MINUS
      ori r7, r7, 0x200     ; 1

    CLASSIC_MINUS:
      andi. r0, r8, 0x1000
      beq- CLASSIC_DONE
      ori r7, r7, 0x100     ; 2

    CLASSIC_DONE:
      or r6, r6, r7

RETURN:
  andi. r0, r6, 0x9FFF
Great ! Please make hacks for all lego games. Will you modify Super Paper Mario to add shake support ? Thanks.
 

SPAC3W4IFU

Active Member
Newcomer
Joined
Mar 16, 2022
Messages
26
Trophies
0
Age
23
Location
Nyonya
XP
206
Country
United States
I appreciate your dedication and commitment to these hacks that you'd still make one for a game you straight up advise us not to play, lol.

Here's hoping the Kororinpa games are a possibility at some point.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    CoolMe @ CoolMe: he never leaves this chat aka his home