TLDR list of patches I've made so far
a bit more lengthy description is probably somewhere below in the text
- 3DS-NDS Key Remapper: generates patches to remap keys in any NDS game (probably?). Additionally allows to map the CPad, CStick and ZL&ZR buttons. To use visit the page, click some checkboxes, copy the resulting cheatcode, and insert it into your game in R4CCE. Requires the latest version of nds-bootstrap (v70.0 or newer).
- Animal Crossing: Wild World
- Chibi-Robo! Park Patrol
- Dragon Quest IX: Sentinels of the Starry Skies
- Final Fantasy III
- Final Fantasy IV
- Grand Theft Auto: Chinatown Wars
- Kingdom Hearts: 358-2 Days
- Kingdom Hearts: Re-coded
- LEGO Star Wars: The Complete Saga
- Magician's Quest: Mysterious Times
- Metroid Prime: Hunters (CPad + CStick + Gyroscope, New 3DS only):
- ZR to toggle the Scan Visor
- ZL + Down to enable/disable the gyroscope
- ZL + Up to recalibrate the gyro
- ZL + Left to switch the gyro's axis (from Y to Z and back) responsible for turning the camera left/right
- Mini Ninjas
- Nostalgia
- Okamiden
- Rayman DS
- Rune Factory 3: A Fantasy Harvest Moon
- Solatorobo: Red the Hunter
- Star Fox Command:
- Super Mario 64 DS:
- The Legend of Zelda: Phantom Hourglass and Spirit Tracks:
- CPad is additionally used to rotate the camera around the train/ship
- L + R + Down to unmap/map the CPad from the DPad (useful if you're using the DPad mods (i.e. Phantom Hourglass and Spirit Tracks))
Hello.
I couldn't find info about whether someone has already done this or not. My searching skills are terrible these days.
Anyway, I made this thing that allows playing sm64ds on 3DS using the Circle Pad like an almost normal human being. It was relatively simple, albeit time consuming. It requires
TWPatcher (the last version, preferably) with RTCom enabled (as well as the Luma's config option "Enable loading external FIRMs and modules"), although it's enabled by default and probably impossible to disable at that point. And If it doesn't work, it may help to update the TwilightMenu app to the last version.
The patch is in the form of Action Replay code. It's in the zip file. Just select one text file from it with the cheat code for your rom. Get the cheat database file `usrcheat.dat` from your 3DS. It's supposed to be at `/_nds/TWiLightMenu/extras/usrcheat.dat` . If it's not there, then it can be downloaded somewhere on the internet. After that, open the cheat database in the program "
r4cce" (or maybe somewhere else, i don't know), choose or add your game rom, and copy/paste this Action Replay code there. Save it and copy the file back to the device. By the way, there is also an already prepopulated `usrcheat.dat` (useful for quick testing). All what's left is to enable the cheat in the TwilightMenu menu. And it should work. Or maybe it won't, I don't know. It works for me (I've got New 2DS XL, the OS version is 11.12.0). There are too many things that can go wrong.
There are also cheat versions that allow camera rotation with the Nub stick X, ZL and ZR buttons. Nothing fancy here, they are just mapped to the buttons Left arrow / Right arrow on the touchscreen and obviously work only on the New 2DS/New 3DS devices. Plus, it looks like the Nub stick requires some additional preprocessing as its values seem to be rotated 45 degrees, so more chances of not-working, but whatever.
In case something doesn't work
(you get freezes, can't control your character, or it feels like all the buttons are pressed at the same time, etc)
- Games that don't support widescreen (or just mods for games that otherwise support widescreen) may need a separately patched TwlBg. Make two TwlBg versions in TWPatcher, one with widescreen and one without (both should have RTCom). Put the one with widescreen in "_nds/TWiLightMenu/TwlBg/" and rename it to "Widescreen.cxi" (or whatever the official guides say to enable widescreen). Leave the one without widescreen in "/luma/sysmodules" as "TwlBg.cxi". That way, TwilightMenu should swap them when a game has widescreen support and 16:10 mode is set, and not touch them otherwise.
- Make sure the "external FIRMs and modules" option is enabled in Luma's configuration screen.
- Update TWPatcher, TwilightMenu, Luma3DS, ...
- Get the correct cheatcode .txt file for your version of a game. Just as an example: "ASME-F486F859 (USA v1.1)". "ASME" is a rom code (bytes 0xC-0xF), "F486F859" is a bitwise NOT of CRC32 (aka CRC-32/JAMCRC) of the first 200 bytes of the game's header (the cheat engine uses it to identify a game). "v1.1" means the second revision (aka "Rev 1", byte 0x1E)
Update 2022-12-20:
The current version has a problem with the game's music slowdown by about 10-15%.
I've made an alternative version "v2" that uses slightly different faulty approach. Instead of working with the RTCom to communicate with the Arm11 all the time, it only uses it to upload a piece of code that would overwrite some RTC functionality of TwlBg (not permanently, of course) and would hijack the RTC regs to pass the CPad data instead of actual time.
Although, there are two problems with my implementation.
Firstly, in super rare cases it may (or maybe it can't anymore, I'm not sure) crash the console (because it modifies code at runtime, probably in front of another thread that theoretically can execute it at that moment; and I don't even want to think about caching). But it seems fine for now, I've relaunched the game like 40 times and it was okay.
Secondly, it overwrites part of functionality that may be actually important, but I've never seen this code executed myself (my guess is it has something to do with alarms, but I don't use them). In either way, I think this is an interesting idea when executed properly
Update 2022-12-23:
New version v2.3. This time the patch won't replace any potentially useful functionality of TwlBg (it most likely didn't before anyway). I've also changed a bit the way ZL&ZR work. They are no longer hardcoded to the camera rotation. They can be swapped or remapped to other functions such as crouching or jumping. To remap these two keys (and half of the others), just go
here, select your version, set preferred controls, and copy the AR code. Then the code can be added as usual in "r4cce" (as the new one, no need to extend this patch). However, I don't think this feature is very helpful.
In addition, I've added support for the iQue version of the game. And if someone's interested in the "technical" details of this project, there is also a
Github page for this whole project. The code may not be exactly understandable, but if one had enough motivation to include CPad, CStick, or Gyroscope support to another game, this part certainly wouldn't be the hardest.
Update 2023-01-03
v2.4. a few mostly cosmetic changes.
- Reduced the cheatcodes' size by half by using the "EXXXXXXX NNNNNNNN" AR instruction to copy bytes in bulk instead of word by word. The speed should also increase similarly. Before, I thought that these codes get somehow optimized or converted into ARM, but it seems like nds-bootstrap has
a piece of code that simply interprets them directly at runtime, 60 times per second, over and over again.
- The clock in nds-bootstrap's in-game menu now works properly. Solved by passing the CPad data through other RTC registers (alarm time 2 and DSi's counter).
- Reading RTC regs from NDS usually requires some kind of delay (gbatek says 5us for each bit transferred; nintendo puts a ~40 cycles there). But it looks like it's unnecessary in this case, everything works without them. That's naive, but I'd like to believe the reason for that is, as these legacy RTC registers are emulated, there are no real hardware behind it, thus delays aren't needed (on 3ds). The removal of these delays might be important, because some games (not this one, except for music) are hypersensitive to delays in their VBlank IRQ handlers.
- The problem with the sound distortions that I've mentioned somewhere around here has been finally solved (again). This time I rely on Arm11's RTCom autorelease feature (if I understand it correctly) to asynchronously initialize all the stuff and dynamically patch TwlBg. I think it used to take 20ms which was too much for Arm7 to swallow and so the distortions could pop up. Now Arm7 just sends one command to Arm11 to do all the work and doesn't wait for the answer (that frame).
Update 2023-01-18
I've created patches for several additional games.
Half of the patches are rather dumb and only use the CPad to control the direction of the main character, not their speed. Also, the cheats are mostly untested, I've only checked a few places here and there
- Metroid Prime: Hunters (New 3DS/New 2DS only) - the CPad controls Samus' movement (in both the morph ball form and the "normal" FPS form). The nub stick controls the camera's left/right and up/down movement. ZR opens/closes the Scan Visor. There is also a gyroscope support for controlling the camera, albeit super awkward. Pressing ZL + Down toggles the gyroscope, but it needs to be calibrated first. To do that, place the console on a flat surface (or just hold it still) and press ZL + Up. Pressing ZL + Left toggles between the gyro axis responsible for the camera's horizontal rotation (Y or Z). Essentially it depends on how you hold the console, probably the right way would be to interpolate between them based on the accelerometer data, but that's too much for a hack. Overall, just a dumb gimmick.
- Rayman DS - generally meaningless since the 3DS already has a native port that doesn't run in 16 fps (the DSi mode makes things just a little bit better). However, as a 3D platformer, it may be the best use case for such mods
- The Legend of Zelda: Spirit Tracks - the CPad also controls the rotation of the camera around the train. Additionally, CPad is unmapped from the dpad keys (because by default they open the menu, map, etc). But if you're going to play with the DPad mods (one and two), you'll need to put it back. For that, press the "L+R+Down" combination, it will map or unmap the dpad
- The Legend of Zelda: Phantom Hourglass - same, but for the ship
- Grand Theft Auto: Chinatown Wars
- Dragon Quest IX
- LEGO Star Wars: The Complete Saga
- Mini Ninjas
- Okamiden
- Animal Crossing: Wild World
Update 2023-01-25
- There was a problem when 3DS could just crash when starting a game (with 3-5% chance). I've fixed it and updated all patches (it's solved by flushing the data cache and invalidating instruction cache after patching the TwlBg at runtime). UPDATED: it's a lie. The crashes still happen.
- In Metroid, the camera could start moving in the opposite direction if you pushed the nub stick too hard. That also is supposed to be fixed now
Update 2023-02-19
-
3DS-NDS Key Remapper is a patch generator that allows you to map/remap any 3DS key to one or a combination of NDS keys. Furthermore, it's possible to map the CPad and CStick with ZL & ZR (for the New 3DS family); essentially, the sticks can behave as four separate keys (like CPad usually does when emulating the DPad). And, most importantly, it should theoretically work with any NDS game.
- To use just visit
the page, click some checkboxes to setup mappings, copy the resulting cheatcode, and insert it into your game in R4CCE. Normally, this cheat should get activated after about 20 seconds (to avoid conflicts with my other patches). Due to this "late" initialization, there may be sound distortions (you'll know when you hear them). If this happens, just open and close nds-boostrap's in-game menu several times and the sound should eventually shift back. Or change the sound mode in a game's settings to something other than "Surround" or "Headphones" (if that's possible). Or change the start delay on the generation page to something like 10 if you're not using any CPad patches. Actually, there is another thing where it can interfere with the CPad patches. For simplicity's sake some patches (notably Metroid, Zeldas and Star Fox) unmap the CPad from the DPad (because the DPad isn't responsible for movement in those games and does something else (or it was just easier for me)). This remapper, when enabled, will override those settings.
- The Key Remapper works exactly like my other patches (uploading code to arm11, patching TwlBg at runtime, inserting a hook, etc), except here I don't pass any data to Arm7, but simply use Arm11's
LGY_HIDEMU_MASK register to override native NDS keys (normally used to map CPad to DPad). The interesting thing here is that a cheatcode can be executed directly from nds-boostrap's cheat engine. It's useful in this case, because I'm patching TwlBg (that doesn't differ from game to game) rather than a specific game, so I don't need to know its layout. Also not sure about any performance implications. Won't be surprised if there are some timing delays, etc, because each key is funneled through that register.
- This thing requires the latest version of nds-bootstrap (currently v70). Older versions had
a bug that didn't allow the C2 instruction to be used (it lets us execute arbitrary ARM code directly from a cheatcode, without uploading it into the game's memory).
Plus some lazy CPad patches:
- Chibi-Robo! Park Patrol
- Final Fantasy III
- Final Fantasy IV
- Kingdom Hearts: 358-2 Days
- Kingdom Hearts: Re-coded
- Magician's Quest: Mysterious Times
- Nostalgia
- Rune Factory 3: A Fantasy Harvest Moon
- Solatorobo: Red the Hunter
- Star Fox Command - A to boost, B to brake. This one is essentially a dpad patch by Cracker, except that I modified it to use the CPad.
xdelta (static) version of the patches for SM64DS by @DeadSkullzJr
Action Replay cheatcodes or usrcheat.dat are not required