Hacking New Classic Controller Hacks

  • Thread starter Thread starter Vague Rant
  • Start date Start date
  • Views Views 252,378
  • Replies Replies 690
  • Likes Likes 42
I would like the Metroid Prime Trilogy and also the Prince of Persia for Wii, the fourth game in the saga
Hi! If I can recommend a Wii game to do with this 'Hack' I would recommend The Sims 3 on Wii if you want a Recommendation! :)
You guys know that Vague Rant retired ?
 
  • Sad
Reactions: RAMONCHITO
A rest probably would have been more productive. The gap between the last couple of hacks was really just that I hit against a long string of games I couldn't figure out the motion controls for. The accelerometers also tend to be what I get to last unless the game needs them right at the beginning, so I basically went through most of the process of making a Classic Controller hack multiple times, then got stuck with nothing releasable because one part of the controls just didn't work. Then I picked up Tornado just because it seemed like a pretty simple game, control-wise, and I wanted to find one I could actually finish. (And then I got stuck figuring out how to fix its weird broken widescreen feature.)

Fluidity definitely forced me to learn more about how accelerometer input works and the math behind it. It wanted some pretty specific/accurate info that I wasn't initially providing. Pretty great that you 100%'ed it already with the hack. I ended up playing through quite a lot of it again just to test that everything was working correctly, but nowhere near 100%!

Nice to know that USB Loader GX uses RC24's code database. They mirror GameHacking.org's, and technically I got approved to post to GameHacking a couple of months ago. I never actually took them up on the offer, mainly because I got sidetracked doing a bunch of Classic Controller hacks, haha. I'll have to see if they'll still have me.


Actually, alternate control schemes mostly boil down to how much energy I've got when I'm posting the code set. For the last few codes though (I think starting with New Super Mario Bros. Wii, actually?) I've been including the assembly code in the Technical Notes section, which you can use to remap the controls any way you like. I know it sounds kind of complicated, but it's really quite simple to modify the controls if anybody wants a different setup and you don't need any technical knowledge at all.

With the assembly copied from the Technical Notes, you can just paste it into the app CodeWrite, put the insertion address (the number you see at the top of the assembly file) into the top field, then click the right arrow to generate the Gecko code for you, so all you have to do is swap the button numbers around. You can see in the screenshot below where the A/B/X/Y buttons are mapped.

View attachment 473563

Each button is labelled with a friendly name like CLASSIC_A and then to change what emulated button gets pressed, you just change the last line for that button, e.g. ori r6, r6, 0x100 ; 2. To swap NSMBWii around to using a B/A approach, you'd just want to do something like this:
Code:
    CLASSIC_A:
      andi. r9, r8, 0x10
      beq- CLASSIC_B
      ori r6, r6, 0x100     ; 2

    CLASSIC_B:
      andi. r9, r8, 0x40
      beq- CLASSIC_X
      ori r6, r6, 0x200     ; 1

    CLASSIC_X:
      andi. r9, r8, 0x8
      beq- CLASSIC_Y
      ori r6, r6, 0x80      ; shake

    CLASSIC_Y:
      andi. r9, r8, 0x20
      beq- REVISION
      ori r6, r6, 0x800     ; a
Once you've built your code, you can just replace the button mapping part in the original hack with your custom version.



View attachment 473572

A collaboration between Namco and tri-Crescendo (Star Ocean, Baten Kaitos, Tales of ...), Fragile Dreams: Farewell Ruins of the Moon is a genre-bending ... survival horror RPG? As one of the few remaining humans still alive in post-apocalyptic future Japan, Seto braves the dangerous outside world looking for other survivors and an explanation of just what has happened to this ruined world. Gameplay involves real-time combat with a level up and inventory system interrupted by more thoughtful segments involving environmental and other puzzles.

USAEURJPN

  1. Code:
    Classic Controller Support [Vague Rant]
    04244BE0 38000001
    041108D8 38000001
    C223EF28 0000000E
    889E005C 2C040002
    40820060 809E0004
    4800000D 00000000
    BF800000 7CA802A6
    C0050004 D01E04DC
    70800080 41820010
    38C00004 90C50000
    48000020 80C50000
    2C060000 40810024
    2C140001 4082000C
    38C6FFFF 90C50000
    FC800090 D09E04D8
    FC042028 D01E04DC
    80C3000C 00000000
    C223F998 00000027
    90010024 2C040000
    40820128 8803005C
    2C000002 4082011C
    2C140001 408200D8
    48000019 3DCCCCCD
    801FA430 3FAAAAAB
    3DCCCCCD 3F800000
    7CA802A6 90A1000C
    80830000 70800400
    40820044 38000002
    9803005E C0030074
    D0030020 C0230078
    FC200850 D0230024
    FC000210 FC200A10
    FC00082A C0250000
    FC000800 41810078
    38000000 9803005E
    4800006C 38000002
    9803005E 81850004
    7D8803A6 4E800021
    2C030001 7FE3FB78
    80A1000C C0450008
    40820008 EC4200B2
    C065000C C0030060
    C0230074 FC20082A
    C0030020 FC211024
    48000035 D0030020
    C0030064 C0230078
    FC20082A C0030024
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C0250010 FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    04240890 7FC3F378
    C223E9A4 0000001A
    2C040002 408200BC
    38800001 71090800
    41820008 60C68000
    71090001 41820008
    60C60008 71094000
    41820008 60C60004
    71090002 41820008
    60C60001 71098000
    41820008 60C60002
    71090010 41820008
    60C60800 71090040
    41820008 60C60400
    71090008 41820008
    60C60080 71090020
    41820008 60C60800
    71092000 41820008
    60C64000 71090200
    41820008 60C60800
    71090080 41820008
    60C62000 71090004
    41820008 60C60400
    71090400 41820008
    60C60010 71091000
    41820008 60C61000
    7CC73378 70C99FFF
    60000000 00000000
  2. Code:
    Classic Controller Support [Vague Rant]
    04245240 38000001
    041108E8 38000001
    C223F588 0000000E
    881E005C 2C000002
    40820060 809E0004
    4800000D 00000000
    BF800000 7CA802A6
    C0050004 D01E04DC
    70800080 41820010
    38C00004 90C50000
    48000020 80C50000
    2C060000 40810024
    2C140001 4082000C
    38C6FFFF 90C50000
    FC800090 D09E04D8
    FC042028 D01E04DC
    80C3000C 00000000
    C223FFF8 00000027
    90010024 2C040000
    40820128 8803005C
    2C000002 4082011C
    2C140001 408200D8
    48000019 3DCCCCCD
    801FAA90 3FAAAAAB
    3DCCCCCD 3F800000
    7CA802A6 90A1000C
    80830000 70800400
    40820044 38000002
    9803005E C0030074
    D0030020 C0230078
    FC200850 D0230024
    FC000210 FC200A10
    FC00082A C0250000
    FC000800 41810078
    38000000 9803005E
    4800006C 38000002
    9803005E 81850004
    7D8803A6 4E800021
    2C030001 7FE3FB78
    80A1000C C0450008
    40820008 EC4200B2
    C065000C C0030060
    C0230074 FC20082A
    C0030020 FC211024
    48000035 D0030020
    C0030064 C0230078
    FC20082A C0030024
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C0250010 FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    04240EF0 7FC3F378
    C223F004 0000001A
    2C040002 408200BC
    38800001 71090800
    41820008 60C68000
    71090001 41820008
    60C60008 71094000
    41820008 60C60004
    71090002 41820008
    60C60001 71098000
    41820008 60C60002
    71090010 41820008
    60C60800 71090040
    41820008 60C60400
    71090008 41820008
    60C60080 71090020
    41820008 60C60800
    71092000 41820008
    60C64000 71090200
    41820008 60C60800
    71090080 41820008
    60C62000 71090004
    41820008 60C60400
    71090400 41820008
    60C60010 71091000
    41820008 60C61000
    7CC73378 70C99FFF
    60000000 00000000
  3. Code:
    Classic Controller Support [Vague Rant]
    04031148 38000001
    C2228398 0000000E
    881E005C 2C000002
    40820060 809E0004
    4800000D 00000000
    BF800000 7CA802A6
    C0050004 D01E04A8
    70800080 41820010
    38C00004 90C50000
    48000020 80C50000
    2C060000 40810024
    2C0F0001 4082000C
    38C6FFFF 90C50000
    FC800090 D09E04A4
    FC042028 D01E04A8
    80C3000C 00000000
    C2228DE0 00000027
    90010024 2C040000
    40820128 8803005C
    2C000002 4082011C
    2C0F0001 408200D8
    48000019 3DCCCCCD
    801E5378 3FAAAAAB
    3DCCCCCD 3F800000
    7CA802A6 90A1000C
    80830000 70800400
    40820044 38000002
    9803005E C0030074
    D0030020 C0230078
    FC200850 D0230024
    FC000210 FC200A10
    FC00082A C0250000
    FC000800 41810078
    38000000 9803005E
    4800006C 38000002
    9803005E 81850004
    7D8803A6 4E800021
    2C030001 7FE3FB78
    80A1000C C0450008
    40820008 EC4200B2
    C065000C C0030060
    C0230074 FC20082A
    C0030020 FC211024
    48000035 D0030020
    C0030064 C0230078
    FC20082A C0030024
    FC200850 48000019
    D0030024 80010024
    7C0803A6 38210020
    4E800020 FC0100FA
    C0250010 FC000800
    4180000C FC000890
    48000014 FC200850
    FC000800 41810008
    FC000890 4E800020
    60000000 00000000
    04229C98 7FC3F378
    C222A388 0000001A
    2C040002 408200BC
    38800001 71200800
    41820008 60E78000
    71200001 41820008
    60E70008 71204000
    41820008 60E70004
    71200002 41820008
    60E70001 71208000
    41820008 60E70002
    71200010 41820008
    60E70800 71200040
    41820008 60E70400
    71200008 41820008
    60E70080 71200020
    41820008 60E70800
    71202000 41820008
    60E74000 71200200
    41820008 60E70800
    71200080 41820008
    60E72000 71200004
    41820008 60E70400
    71200400 41820008
    60E70010 71201000
    41820008 60E71000
    7CE83B78 70E09FFF
    60000000 00000000

Button Mapping​

[TABLE=full]
[TR]
[th]Wii Remote/Nunchuk[/th][th]Classic Controller[/th][th]Function[/th]
[/TR]
[TR]
[td]Wiimote Home[/td][td]Home
You must hold the B button to enable the pointer[/td][td]Open/Close Home Menu[/td]
[/TR]
[TR]
[td]Wiimote D-Pad[/td][td]D-Pad[/td][td]Menus
Navigation
Gameplay
Open Menus[/td]
[/TR]
[TR]
[td]Wiimote A[/td][td]A
Y
R[/td][td]Menus
Confirm
Gameplay
Attack
Interact[/td]
[/TR]
[TR]
[td]Wiimote B[/td][td]B
ZR[/td][td]Menus
Cancel
Gameplay
First-Person View[/td]
[/TR]
[TR]
[td]Wiimote 1 & 2[/td][td]Not mapped[/td][td]Not used?[/td]
[/TR]
[TR]
[td]Wiimote Plus[/td][td]Plus[/td][td]Zoom In Map[/td]
[/TR]
[TR]
[td]Wiimote Minus[/td][td]Minus[/td][td]Zoom Out Map[/td]
[/TR]
[TR]
[td]Wiimote Tilt[/td][td]X[/td][td]Gameplay
Hint from PF[/td]
[/TR]
[TR]
[td]Wiimote Pointer[/td][td]Third-Person
Right Stick
First-Person
Left Stick
Right Stick[/td][td]Gameplay
Aim Flashlight[/td]
[/TR]
[TR]
[td]Nunchuk Stick[/td][td]Left Stick[/td][td]Menus
Navigation
Gameplay
Movement[/td]
[/TR]
[TR]
[td]Nunchuk C[/td][td]L[/td][td]Gameplay
Crouch[/td]
[/TR]
[TR]
[td]Nunchuk Z[/td][td]ZL[/td][td]Gameplay
Re-Center Camera[/td]
[/TR]
[/TABLE]

General Notes​

  • Fragile Dreams is a game where you walk around pointing a flashlight for the entire game. Ordinarily, this is controlled with the IR pointer, so this required some specific handing to make it work on a stick. When you're walking around in third-person view, the flashlight is directly mapped on the Right Stick in an absolute sense: you're not controlling a cursor, you just point the stick in the direction you want to point the flashlight. When you're not using the stick, the flashlight is simply pointed straight ahead of your character.

    When you hold the B button to enter the first-person view to inspect objects, this switches to a cursor-based setup where you control where the flashlight is pointing in a relative fashion; the cursor position moves based on what you do on the stick (in first-person, that means either stick) and stays wherever you leave it rather than snapping back to the center. Neither of these is quite as good as a real IR pointer, but this was the best way I could find to accommodate the flashlight.

  • I recommend going into the Options menu and disabling the cursor icon. It's quite distracting when playing in third-person mode because the Right Stick will flail the cursor around awkwardly. You don't really need it anyway because the position of the flashlight beam already indicates where the cursor is pointing.
    • Technically, you don't have the flashlight for the first couple of minutes of the game. The cursor is slightly useful right at the beginning since you don't have the flashlight to behave as a substitute cursor. You might want to play up to the first save point then turn off the cursor in the Options. Alternatively, you can just deal with having no cursor for a couple of minutes until you grab the flashlight, whatever works for you.

  • Fragile Dreams has an optional feature that has you use audio from the Wiimote speaker to hear hints and find things in your surroundings. The game has been confirmed to work as a Wii U VC injection (thanks @KeinesR!), but you absolutely must go into the Fragile Dreams Options screen and turn off the Wiimote speaker. Wii VC does not emulate that feature, so if you leave it enabled, it will be impossible to progress. Disabling this feature will pipe the Wiimote audio into the normal game audio so you're not missing anything. While you're in the Options, I would also recommend enabling the visual indicator for sounds.
    • The game's tutorial screens will still say things like "Hold the Wii Remote to your ear." I'm ... I'm not in charge of those, that's just how they made the game. Any time something wants you to hold the Wiimote to your ear, just listen to the audio coming from your normal speakers. This has nothing to do with the Classic Controller hack, the original game just doesn't account for people turning off that feature.

Technical Notes​

Code breakdown:
  • 04 in setKpad(): disable leftover Classic Controller support in the Home Button Menu because it interferes with the simulated Wiimote & Nunchuk; not necessary in JPN version
  • 04: disable Nunchuk error
  • C2 in read_kpad_acc(): simulate tilting the Wiimote to receive a hint from PF
  • C2 in calc_dpd_variable(): dual-mode pointer emulation with absolute and delta variants
  • 04 in read_kpad_ext(): redirect Classic Left Stick into Nunchuk Stick
  • C2 in read_kpad_button() (USA/EUR)/KPADiRead() (JPN): button injector

USA/EURJPN

  1. Code:
    ; read_kpad_button
    ; 8023E9A4 for USA
    ; 8023F004 for EUR
    ; r4 holds extType
    ; r6 holds wiimote bitfield
    ; r7 holds wiimote+nunchuk bitfield
    ; r8 holds classic bitfield
    
    CLASSIC:
      cmpwi r4, 0x2
      bne- RETURN
    
      li r4, 0x1            ; i'm a nunchuk
    
        CLASSIC_HOME:
          andi. r9, r8, 0x800
          beq- CLASSIC_UP
          ori r6, r6, 0x8000    ; home
    
        CLASSIC_UP:
          andi. r9, r8, 0x1
          beq- CLASSIC_DOWN
          ori r6, r6, 0x8       ; up (v) / left (h)
    
        CLASSIC_DOWN:
          andi. r9, r8, 0x4000
          beq- CLASSIC_LEFT
          ori r6, r6, 0x4       ; down (v) / right (h)
    
        CLASSIC_LEFT:
          andi. r9, r8, 0x2
          beq- CLASSIC_RIGHT
          ori r6, r6, 0x1       ; left (v) / down (h)
    
        CLASSIC_RIGHT:
          andi. r9, r8, 0x8000
          beq- CLASSIC_A
          ori r6, r6, 0x2       ; right (v) / up (h)
    
        CLASSIC_A:
          andi. r9, r8, 0x10
          beq- CLASSIC_B
          ori r6, r6, 0x800     ; a
    
        CLASSIC_B:
          andi. r9, r8, 0x40
          beq- CLASSIC_X
          ori r6, r6, 0x400     ; b
    
        CLASSIC_X:
          andi. r9, r8, 0x8
          beq- CLASSIC_Y
          ori r6, r6, 0x80      ; tilt
    
        CLASSIC_Y:
          andi. r9, r8, 0x20
          beq- CLASSIC_L
          ori r6, r6, 0x800     ; a
    
        CLASSIC_L:
          andi. r9, r8, 0x2000
          beq- CLASSIC_R
          ori r6, r6, 0x4000    ; c
    
        CLASSIC_R:
          andi. r9, r8, 0x200
          beq- CLASSIC_ZL
          ori r6, r6, 0x800     ; a
    
        CLASSIC_ZL:
          andi. r9, r8, 0x80
          beq- CLASSIC_ZR
          ori r6, r6, 0x2000    ; z
    
        CLASSIC_ZR:
          andi. r9, r8, 0x4
          beq- CLASSIC_PLUS
          ori r6, r6, 0x400     ; b
    
        CLASSIC_PLUS:
          andi. r9, r8, 0x400
          beq- CLASSIC_MINUS
          ori r6, r6, 0x10      ; plus
    
        CLASSIC_MINUS:
          andi. r9, r8, 0x1000
          beq- RETURN
          ori r6, r6, 0x1000    ; minus
    
    RETURN:
      mr r7, r6
      andi. r9, r6, 0x9FFF
  2. Code:
    ; KPADRead
    ; 8022A388 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 r7, r7, 0x8000    ; home
    
        CLASSIC_UP:
          andi. r0, r9, 0x1
          beq- CLASSIC_DOWN
          ori r7, r7, 0x8       ; up (v) / left (h)
    
        CLASSIC_DOWN:
          andi. r0, r9, 0x4000
          beq- CLASSIC_LEFT
          ori r7, r7, 0x4       ; down (v) / right (h)
    
        CLASSIC_LEFT:
          andi. r0, r9, 0x2
          beq- CLASSIC_RIGHT
          ori r7, r7, 0x1       ; left (v) / down (h)
    
        CLASSIC_RIGHT:
          andi. r0, r9, 0x8000
          beq- CLASSIC_A
          ori r7, r7, 0x2       ; right (v) / up (h)
    
        CLASSIC_A:
          andi. r0, r9, 0x10
          beq- CLASSIC_B
          ori r7, r7, 0x800     ; a
    
        CLASSIC_B:
          andi. r0, r9, 0x40
          beq- CLASSIC_X
          ori r7, r7, 0x400     ; b
    
        CLASSIC_X:
          andi. r0, r9, 0x8
          beq- CLASSIC_Y
          ori r7, r7, 0x80      ; tilt
    
        CLASSIC_Y:
          andi. r0, r9, 0x20
          beq- CLASSIC_L
          ori r7, r7, 0x800     ; a
    
        CLASSIC_L:
          andi. r0, r9, 0x2000
          beq- CLASSIC_R
          ori r7, r7, 0x4000    ; c
    
        CLASSIC_R:
          andi. r0, r9, 0x200
          beq- CLASSIC_ZL
          ori r7, r7, 0x800     ; a
    
        CLASSIC_ZL:
          andi. r0, r9, 0x80
          beq- CLASSIC_ZR
          ori r7, r7, 0x2000    ; z
    
        CLASSIC_ZR:
          andi. r0, r9, 0x4
          beq- CLASSIC_PLUS
          ori r7, r7, 0x400     ; b
    
        CLASSIC_PLUS:
          andi. r0, r9, 0x400
          beq- CLASSIC_MINUS
          ori r7, r7, 0x10      ; plus
    
        CLASSIC_MINUS:
          andi. r0, r9, 0x1000
          beq- RETURN
          ori r7, r7, 0x1000    ; minus
    
    RETURN:
      mr r8, r7
      andi. r0, r7, 0x9FFF


Does the Fragile Dreams hack work on Dolphin's emulated classic controller? Apparently I can't use the IR pointer.
 
It's a shame that this work with the code is stalled. It gave new perspectives to many Wii games that practically forced motion controls unnecessarily...

And I love games that innovate in the way they're played, using motion controls intelligently, but some created tedious movements for things that would be much more fun with the press of a button.

One example is "Pirates Plund-Arrr," which would be a pretty decent clone of "Castle Crasher," if it didn't force the Wii Remote to swing during every attack...
 
Last edited by RAMONCHITO,
  • Like
Reactions: creedof69
It's a shame that this work with the code is stalled. It gave new perspectives to many Wii games that practically forced motion controls unnecessarily...

And I love games that innovate in the way they're played, using motion controls intelligently, but some created tedious movements for things that would be much more fun with the press of a button.

One example is "Pirates Plund-Arrr," which would be a pretty decent clone of "Castle Crasher," if it didn't force the Wii Remote to swing during every attack...
I totally agree with you, on some multiplatform games you can have 2 "policy":
- Devs can say that as the game is already coming for PS2/PS3 and 360, We have prebuilt layout for classic controller layout, let's go.

Or (you are a Lego game dev 😅)

- As the game is already coming for PS2/PS3 and 360, let's get the Wii an original gameplay layout. If they don't like it they probably have a PS3.

The problem is the 1st one include the 2nd one, so basically they just didn't spend time to code a CC layout when they could and even less a GameCube controller one.
 
would this sort of thing also work with mario galaxy 1 and 2?
or can this only be played on switch with normal controls?
 
would this sort of thing also work with mario galaxy 1 and 2?
or can this only be played on switch with normal controls?
Just search for super mario galaxy 1 and 2 with the wii u gamepad on gbatemp. Those two started this whole thing here.
 
i found it, hadnt had a chance to try it, yet tho!
Does it work well?
Depend on your feelings, I tried to get the Nintendo switch experience so I set the all stars mapping, but the B button is mapped as ZR for Anywhere in the game including menus. So "back" button is ZR. I did finally set the controls like the Nvidia version even if you can't jump with B and spin with Y.
 
Depend on your feelings, I tried to get the Nintendo switch experience so I set the all stars mapping, but the B button is mapped as ZR for Anywhere in the game including menus. So "back" button is ZR. I did finally set the controls like the Nvidia version even if you can't jump with B and spin with Y.
i tried it now, allstars. i really like it!

EDIT: I did wonder tho if theres a way to remove the cursor from the screen?
The blue star you use to collect shinesprites and use pull-stars etc.
For me its constantly on the screen.
 
Last edited by Nakamichi,
i tried it now, allstars. i really like it!

EDIT: I did wonder tho if theres a way to remove the cursor from the screen?
The blue star you use to collect shinesprites and use pull-stars etc.
For me its constantly on the screen.
Not as far as I know. Keep in mind that the patch doesn't "add classic controller support" as a Nintendo could do themselves, but map the wiimote+nunchuk button to the controller.
 
I stopped using my Wii and switched to Dolphin on PC and I thought maybe these could help on Dolphin but I think I have a pretty good config to use for all games that use Wiimote + nunchuk if anyone needs it let me know I could probably upload it.
 
  • Like
Reactions: Nakamichi
Not as far as I know. Keep in mind that the patch doesn't "add classic controller support" as a Nintendo could do themselves, but map the wiimote+nunchuk button to the controller.
i guess thats not so bad, i can just move it to the corner.
i still prefer this over galaxy 1 and 2 on switch, so much fun!
Post automatically merged:

I stopped using my Wii and switched to Dolphin on PC and I thought maybe these could help on Dolphin but I think I have a pretty good config to use for all games that use Wiimote + nunchuk if anyone needs it let me know I could probably upload it.
Sorry for double-post, but yes! i would like that config very much.

Only ever emulated the wii games listed here as well as galaxy 1 and 2 with classic controls. more would always be better
 
Last edited by Nakamichi,

Site & Scene News

Popular threads in this forum