Hacking Circle Pad patches for Super Mario 64 DS and other games (in TwilightMenu with TWPatcher and RTCom)

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
there a sm64 for the dsi, if that's what you mean. I compiled it, and it worked fine through twilight menu on the n3ds. iirc, the reason they didn't port it to ds was due to the ram (might be thinking of another game though). kinda funny considering there's a dos version, which doesn't work very well. you can play that one through dosbox (at least on windows).
 

Lemmingscanfly

Member
Newcomer
Joined
Mar 1, 2018
Messages
16
Trophies
0
Age
26
Location
Mount Olympus
Website
dobugsneeddrugs.org
XP
191
Country
Canada
There's a DSi port?
The 3DS port didn't even work very well on the old 3DS until a few weeks ago when someone released an optimized version (which my smelly computer could not run the compiling software for; So I was scouring the internet for one someone had already built, when I found this thread.)
 

DaniPoo

Well-Known Member
Member
Joined
Jan 2, 2013
Messages
925
Trophies
1
Age
35
XP
2,295
Country
Pretty sure SM64DS did not get leaked, so it's not possible, unless it also gets reverse-engineered (which takes a skilled team years), or gets leaked (extremely unlikely at this point).

Hmm, you are right. but also not quite..

Yes if you need an 100% accurate DS experience then I guess you have to wait and hope for the DS game to be reverse engineered.
However the DS rom has been modded to oblivion. So it fair to assume that a lot of data has been identified, can be extracted and worked with. For instance levels and models.
(I remember seeing some modding project trying to make a Sunshine DS)

So modding the Mario64 PC port and adding some DS features and extra levels is more than possible.

I guess someone just need to be interested in doing that
 
  • Like
Reactions: Sono

shoco

Well-Known Member
OP
Member
Joined
Aug 1, 2019
Messages
123
Trophies
0
XP
529
Country
Russia
I mentioned these screeching/popping/cracking/whatever sounds before, and that they no longer happen. It turns out I was yet again wrong. They still appear unpredictably in the last patch when I exit from the sleeping mode or press Home + B buttons (these things cause the Arm11 code to be reuploaded). It looks like the sounds appear when any VBlank takes too long to complete (like more than 0.2s?). Maybe long delays can cause the audio hardware to somehow desynchronise (and sync back after several repeats). Same thing happens when I open the "nds-bootstrap" menu in the game. Other games are also susceptible to this effect (Rhythm Paradise and Castlevania Order of Ecclesiasts in "Surround" mode, to name a few). If I'm not wrong, SM64DS itself has these problems only when the sound set in "Surround" or "Headphones" modes.

Anyways, I think I've found a rather dumb solution for the music delays problem. Instead of using RTCom to communicate throughout the whole gaming session, I can use it to upload self-modifying code to Arm11. This code will overwrite some "unnecessary" instructions concerning RTC processing in the TwlBg. And instead of saving Date&Time data into those, it could save the CPad data (and some more things). Then SM64DS can simply read it anytime asynchronously, without having to wait for Arm11.

The game doesn't use the RTC at all, and even if it would, I've already overwritten most of its code. The thing that surprised me is that exiting from an NDS game (through the "nds-bootstrap" menu) actually fully resets TwlBg. That means I won't be able to break other games that do use RTC. I've only tested it with CPad, maybe there are major problems, or I'm killing RTCom itself somehow, but for now it looks good. Actually, I'm also surprised that the uploaded code can modify TwlBg. I would expect code regions to be either readable-executable or readable-writable, not both.

And it also solves the problem of those cracking sounds, because I no longer need to reupload the code and cause delays. RTCom needs to be executed only once at the initial start.
 
  • Like
Reactions: SpaceLion

epicmartin7

Well-Known Member
Member
Joined
Aug 5, 2015
Messages
428
Trophies
0
Age
24
XP
1,031
Country
United States
Might be a bit better to ask here. Has anyone tried the analog stick code in a NDS Forwarder? I've tried it and it seems like the code doesn't want to work. It only slows the game down, even with the proper TwlBG patches. 🤔
 

RetraCarteR

Active Member
Newcomer
Joined
Dec 18, 2022
Messages
25
Trophies
0
Age
25
Location
San Antonio, Texas, United States of America
XP
585
Country
United States
Might be a bit better to ask here. Has anyone tried the analog stick code in a NDS Forwarder? I've tried it and it seems like the code doesn't want to work. It only slows the game down, even with the proper TwlBG patches. 🤔
This is probably a dumb question, but did you make sure to check "Enable loading external FIRMs and modules" in the Luma config menu? I was having a similar problem getting it to work in TWiLight Menu until I found out that you have to do that for TWPatcher to work.
 

shoco

Well-Known Member
OP
Member
Joined
Aug 1, 2019
Messages
123
Trophies
0
XP
529
Country
Russia
Might be a bit better to ask here. Has anyone tried the analog stick code in a NDS Forwarder? I've tried it and it seems like the code doesn't want to work. It only slows the game down, even with the proper TwlBG patches. 🤔
Does it work directly in TwilightMenu? What about other TwlBg patches in other games (like widescreen mod). The slowdown may also happen if your console doesn't have enough time to initialize through RTCom. You may try "slow" version from the post #9 on the previous page. If that won't work, then it probably can't
 

steval_beaning

Well-Known Member
Newcomer
Joined
Feb 4, 2022
Messages
50
Trophies
0
Age
22
Location
some crap town
XP
521
Country
United Kingdom
this is an absolute joy to play, so much more precise and natural feeling! for the new version, the only times where it's crashed has been where I've been opening and closing the nds-bootstrap menu or selecting 'reset game' from that menu. I'm not sure how it works but I'd guess that users who would just select the game in twilightmenu and exit by pressing the home button (not bothering with nds-bootstrap menu) probably won't have many problems.

also I wonder if it's possible to hide the 'target' that appears on the touchscreen since it's not needed?
Post automatically merged:

though I will say the margin for error for sideflips is definitely too strict, I don't know if that could be tweaked though
 
Last edited by steval_beaning,
  • Like
Reactions: Lemmingscanfly

shoco

Well-Known Member
OP
Member
Joined
Aug 1, 2019
Messages
123
Trophies
0
XP
529
Country
Russia
this is an absolute joy to play, so much more precise and natural feeling! for the new version, the only times where it's crashed has been where I've been opening and closing the nds-bootstrap menu or selecting 'reset game' from that menu. I'm not sure how it works but I'd guess that users who would just select the game in twilightmenu and exit by pressing the home button (not bothering with nds-bootstrap menu) probably won't have many problems.

also I wonder if it's possible to hide the 'target' that appears on the touchscreen since it's not needed?
Post automatically merged:

though I will say the margin for error for sideflips is definitely too strict, I don't know if that could be tweaked though

Glad that you liked it.
I don't remember if I tested the Reset Game option back then. It may crash because this option doesn't fully "reloads" the console (and accordingly TwlBg), so the game tries to upload the code second time and fails, thanks to my bad code. As for the 'target'. By default, the act of using the touchscreen joystick and displaying the target are tied together. It is certainly possible to remove it (I don't know how though) but that would require more code to patch and more chances to fail (it's especially problematic that every game version (there are at least 6 of them) has its own set of offsets). My patch to the game itself (its "game logic"-related Arm9 part) is super trivial and tiny, it's something like 80 instructions
And the "sensitivity" is also kind of tweakable (from the code; and not by me). It's possible to increase or decrease its range (in case of a stick drift for example). I went with the default values that Nintendo(?) gives us, already clamped, mapped, normalized and whatnot into 2 bytes; it's the safest route.


I actually made a second version of the new version. That time I most certainly do not overwrite important parts of TwlBg that potentially may be used by the console at some point during this game. And it seems it doesn't crash at the Reset Game option, too.
It would be nice if someone can test it. And if it crashes, I would at least like to know your console model and how this crash looked like (is it just the game freezing or your 3ds is completely stuck and no buttons work, etc)
 

Attachments

  • action_replay_codes_v2.1.zip
    78.3 KB · Views: 73
  • Like
Reactions: Serph-DDS

steval_beaning

Well-Known Member
Newcomer
Joined
Feb 4, 2022
Messages
50
Trophies
0
Age
22
Location
some crap town
XP
521
Country
United Kingdom
I should probably say that the more I play, the more I think the control quirks I'm noticing are probably intentional changes for the remake in comparison to say playing the native 3ds port of the original.

it seems like in sm64ds, you need more of a running start to execute a sideflip, you need to allow mario to accelerate enough before it'll let you sideflip instead of turning around. might have been an intentional nerf? I mentioned before but the remake also changes how mid air kicks work, if you're holding b and pressing a you'll always kick, to dive you need to let go of b and press a. I guess with the d-pad element removed it's easier to notice these little changes, which is quite interesting.

of course I wouldn't say these are bad changes per se, morseo weird if you're used to the 1996 version such that it takes a bit of getting used to, but still fine in their own way. sm64ds was the version I grew up with so i'm excited to play through it again with proper analogue controls.

I'm 12 stars in and haven't had any crashes during normal gameplay, I'll try that new version as well probably
 

shoco

Well-Known Member
OP
Member
Joined
Aug 1, 2019
Messages
123
Trophies
0
XP
529
Country
Russia
Cool stuff. Now patch it so we can use either L or R to crouch/stomp, and you're the MVP.

Having it on R by default with no way to change it, is just stupid.

This is quite an old game. Surely someone's already done it. And if I understand you correctly, it's trivial. There is a table in the game that depending on the current controls mode decides what buttons can do what actions. As far as I can see, it won't let you unmap the Select, Start, Dpad buttons. But L,R,A,B,X,Y should be freely mapable to each other. Here is the link. Select the game version, click some checkboxes, copy the code and insert it into your cheat file as always. I also made another new version v2.2 that allows to map ZL & ZR as well.
 

Attachments

  • action_replay_codes_v2.2.zip
    79.7 KB · Views: 57
  • Like
Reactions: MrsYand

MrsYand

New Member
Newbie
Joined
Dec 22, 2022
Messages
1
Trophies
0
Age
33
XP
19
Country
United States
Hey great work on this, you just did something alot of people have wanted ever since the 3ds came out and something many people said wouldn't be possible. I've played up until unlocking Wario and as far as I can tell it's ran perfectly and had no issues.

Would the action replay codes be able to work on the few rom-hacks there are for this game?
If I could play as Waluigi with analog controls that'd be like everything I ever wanted from this game lol
 

shoco

Well-Known Member
OP
Member
Joined
Aug 1, 2019
Messages
123
Trophies
0
XP
529
Country
Russia
Would the action replay codes be able to work on the few rom-hacks there are for this game?
If I could play as Waluigi with analog controls that'd be like everything I ever wanted from this game lol

I've never tried any, but theoretically they might work. You just need to choose the appropriate AR code (for the game version those hacks are based on). It should be fine if those hacks don't use the same regions of memory that I did for code, in which I doubt because those very the most obvious places.
 

recs

Well-Known Member
Newcomer
Joined
Dec 26, 2022
Messages
46
Trophies
0
XP
423
Country
Antarctica
Played a few levels using the 2.3 patch along remap and widescreen cheats and working great! This game feels so much fitting with a good control scheme on a hanheld.

I wonder if it would be possible to make analog patches for the Zelda DS games? They already got dpad patches both, but having analog controls on top of that would be cool.
 

PkStarzone

Well-Known Member
Newcomer
Joined
May 31, 2020
Messages
55
Trophies
0
Age
25
XP
445
Country
United States
I have been playing with this and its incredible! Thank you so much for making a long-time dream come true!

I wonder tho, would it be possible to make it compatible to hacks of the game? Particular Another Super Mario 3D, a very impressive full mod to the game that changes it entirely. It would be great to be able to play it with analog controls for the first time ever.
 

shoco

Well-Known Member
OP
Member
Joined
Aug 1, 2019
Messages
123
Trophies
0
XP
529
Country
Russia
I have been playing with this and its incredible! Thank you so much for making a long-time dream come true!

I wonder tho, would it be possible to make it compatible to hacks of the game? Particular Another Super Mario 3D, a very impressive full mod to the game that changes it entirely. It would be great to be able to play it with analog controls for the first time ever.
Can't say anything about other hacks, but this one seems to work fine, though I only launched it for a couple of minutes. You just need to use the version "USA v1.0" (it's the version the hack is based on). I've also noticed that it may use the 13th button (which doesn't exist on NDS, afaik). In this patch, it's mapped to either ZL or ZR, so potentially there may be problems with the Nub, ZL&ZR version
 

Vegito2121

Member
Newcomer
Joined
Feb 10, 2020
Messages
13
Trophies
0
Age
29
XP
211
Country
United States
I tried the 2.4 version and when I gain control of Yoshi at the beginning the game starts auto pressing everything and only stops if I open the pause menu. I'm using a New3DSXL btw.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • NinStar @ NinStar:
    nes remix 1 had the bad one, nes remix 2 had the good one
  • SylverReZ @ SylverReZ:
    @genistopitauniverfrocrami, What drugs is this dude on?
    +1
  • NinStar @ NinStar:
    CRAZY HAMBURGER
  • The Real Jdbye @ The Real Jdbye:
    @NinStar both nes remix 1 and 2 had some stinkers in there
    +1
  • The Real Jdbye @ The Real Jdbye:
    but at least 2 doesn't have sports games
  • The Real Jdbye @ The Real Jdbye:
    loved nes remix, but hated having to play Baseball, Tennis and Golf in order to progress
    +1
  • The Real Jdbye @ The Real Jdbye:
    or fucking Clu Clu Land for that matter
  • Psionic Roshambo @ Psionic Roshambo:
    Not a big fan of NES kid Icarus either... I know it was popular but I didn't care for it.
  • Psionic Roshambo @ Psionic Roshambo:
    Yesterday I learned my BD Burner drive can burn CD's at 56X lol
  • cearp @ cearp:
    What stuff were you burning?
    I used to burn tons of dvds (data files) many years ago, but haven't burnt a disk in ages.
  • Psionic Roshambo @ Psionic Roshambo:
    My car actually reads MP3 CD's lol
  • Psionic Roshambo @ Psionic Roshambo:
    So mix CDs for myselt :)
  • Psionic Roshambo @ Psionic Roshambo:
    Pantera, Metallica, Hollywood Undead, Five Finger Death Punch, some others lol
  • Psionic Roshambo @ Psionic Roshambo:
    I can put like 90 songs on a CD lol
  • The Real Jdbye @ The Real Jdbye:
    if only it could read dvds then you would just need 1 disc
    +1
  • BakerMan @ BakerMan:
    i tell ya what, i could go for a fuckin gyro right about now
    +1
  • cearp @ cearp:
    I hope your brother is doing ok Mr BakerMan
    +1
  • cearp @ cearp:
    and Psi - I had a cd player / radio that played mp3 cds once, very cool
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    BakerMan yeah me too.... maybe that's gonna be dinner for me there is this place near me I have been dying to try and they have them lol
  • K3Nv2 @ K3Nv2:
    I miss usb mp3 players they were shit but at the time a go to
  • Psionic Roshambo @ Psionic Roshambo:
    @The Real Jdbye, I thought about that and I have blank DVD's and Blurays but honestly after like 90 songs I just listen to it a couple of hundred times toss it out and burn something else or have like 2-3 CD's. Florida here the heat in the car tends to ruin the CD's after like a few months even commercial pressed ones don't last too long.
  • The Real Jdbye @ The Real Jdbye:
    my music collection is just too big, i require variety
    The Real Jdbye @ The Real Jdbye: my music collection is just too big, i require variety