Can you patch ds roms to fool them into thinking you have the GBA cart they want inserted?

Zaphod77

Well-Known Member
OP
Member
Joined
Aug 25, 2015
Messages
665
Trophies
0
Age
48
XP
604
Country
United States
With emulators, you can attach both a gba and a ds rom and the emulated DS will detect the emulated gba game.

For obvious reasons, you cannot replicate this with a gba flashcart and ds flashcart on real hardware. The GBA flashcart has to boot to be seen as the real game, and the DS game will just see the menu.

So is there a way to fool the DS rom into thinking the cart is there and unlocking the special content? Wither a patch or a cheat code?

I know this won't help with pokemon imports, but for other purposes it should be possible.
 

catlover007

Developer
Developer
Joined
Oct 23, 2015
Messages
715
Trophies
1
XP
3,864
Country
Germany
atleast in theory it's definitely possible and not even that hard if you know what you're doing. You could probably use an emulator find all places where the game interacts with the gba rom.
 
  • Like
Reactions: pinbi7

pinbi7

Well-Known Member
Member
Joined
Apr 4, 2004
Messages
611
Trophies
2
XP
2,086
Country
Canada
i've only used the gba cart slot to store and load DS games
but i'm pretty sure you should be able to make a 1:1 copy of a GBA game on a flash cart that should be able to act the exact same way as an original
i know my F2A was able to do it
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,311
Country
United Kingdom
Other than pokemon and megaman, and I guess some of the music things but that is a separate concept, is there anything that is not easier to just grab a save, load up in suitable PC emulator, get unlocks and go back from there?
https://nintendo.fandom.com/wiki/List_of_Nintendo_DS_games_with_GBA_connectivity

Anyway I have pondered it before, indeed it was for megaman, but as I own a great many flash carts then... I just use those. You don't even need the whole ROM as everything I tested (which was not everything but a lot) merely needed a suitable header of the ROM.

For the topic at hand though.
DS can read GBA slot (obviously) but it is more limited than the native GBA/GBA mode methods. This is good for you as it means anything reading the 0800000 through 09FFFFFF (though again only the header so it will be in the low 08000000 region) is likely to be what you want to look at - http://problemkaputt.de/gbatek.htm#dscartridgegbaslot
Chances are the check will be a read (don't know if it will be DMA or a CPU memory read command), compare to known value and if good then proceed, if not matching then carry on with life (similar to how save hashes and antipiracy checks might work). You would then presumably change the branch if not equal or whatever it happens to be using for an instruction to always take the GBA cart present path. Alternatively if the serial matches thing sets a flag in memory then you could do that with a cheat.
In the case of megaman (which has multiple possibilities, as does Advance Wars depending upon the region -- there is 1, 2 and the Japanese bundle of 1 and 2 which does something for some regions) what I would hope would happen is each individual serial trips a flag in a IF this set IF this set IF this set flag... type manner but in normal operation only one is set as there can only be one GBA cart present. Many checks one after the other like that is considered bad programming form but for what is otherwise done the once per boot in a menu or something then it could be forgiven and thus I would expect it. Alternatively if it hard exits the loop after the first match you might have to get it to do a few other things but changing things here should be in place program flow options rather than having to crowbar new code in.

I don't know when the check will happen -- during boot/menu or when/shortly before loading the relevant bonus (see earlier link on how to get them) being the two main guesses. You should be able to set a breakpoint (it is a memory address/range after all), and you might even get lucky with a search of a disassembly (other than the DS browser and RAM based homebrew, and a proof of concept ROM hack I did once, nothing other than this should be touching the 08?????? range).

This will necessarily involve fiddling with assembly, which is a bit jumping in at the deep end but this is within reason, though I am not going to rule out being able to find a flag with an emulator (desmume having the GBA faking option, make a savestate some menus before the bonus, select suitable GBA ROM if you have not already, see what changes between launching into that screen and the next, load back savestate and lose the GBA game/replace with a non working one, repeat looking to see what differs between things, might have to repeat that a few times and also do things to eliminate background changes). You also have the other option of replicating whatever inventory item, bonus or the like is given via normal cheats.
 
  • Like
Reactions: SAIYAN48

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,450
Country
Canada
The GBA flashcart has to boot to be seen as the real game
Nope! It depends on the flashcart. I remember using an EZFlash 3-in-1 for this back in the day; it was necessary only to load the game into PS RAM instead of NOR RAM. (It is much slower to write to PS RAM than it is to NOR RAM, but games written to PS RAM are persistent.) Not sure what the situation is with modern flashcart options. (Writing to PS RAM was also necessary to circumvent copy protection checks in some cases, like with Super Mario Advance 3.)

So is there a way to fool the DS rom into thinking the cart is there and unlocking the special content?
That depends entirely on the specific game. There's a patch for Mega Man ZX, for instance (which is the one a lot of people ask about).
 
Last edited by Kwyjor,

Zaphod77

Well-Known Member
OP
Member
Joined
Aug 25, 2015
Messages
665
Trophies
0
Age
48
XP
604
Country
United States
well yeah if you have a single game only flashcart that will work. but most i know of have a menu to pick the GBA game.

someone else asked "can a rom detect another rom" and gave the example of wanting to provide a gba rom to the R4 flashcart to get the exclusive content for the game, without naming what the game was.

yeah it's pretty much "i wanna get the all the exclusive link content for all my DS roms while playing on my real 3DS".

I was curious if someone had a program that would auto-patch them, or a list of cheats. or some other trick to reliably and simply "put in the cart without really putting in the cart"
 

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,450
Country
Canada
I was curious if someone had a program that would auto-patch them, or a list of cheats.
Any such program or list of cheats would inevitably have to be customized for each of the games. So, why not start with the particular games you are interested in instead?
 

DanTheManMS

aka Ricochet Otter
Member
Joined
Jun 2, 2007
Messages
4,453
Trophies
1
Age
34
Location
Georgia
XP
751
Country
United States
Nope! It depends on the flashcart. I remember using an EZFlash 3-in-1 for this back in the day; it was necessary only to load the game into PS RAM instead of NOR RAM. (It is much slower to write to PS RAM than it is to NOR RAM, but games written to PS RAM are persistent.) Not sure what the situation is with modern flashcart options. (Writing to PS RAM was also necessary to circumvent copy protection checks in some cases, like with Super Mario Advance 3.)

That depends entirely on the specific game. There's a patch for Mega Man ZX, for instance (which is the one a lot of people ask about).

I think you have this reversed. NOR flash is the type that is super slow to write to, but acts exactly like an original cartridge and can boot standalone. The other way to load GBA games was to load them into the RAM, had to load it up upon each bootup of the system.

Here's a couple old PH Wiki pages I vaguely remember:

https://web.archive.org/web/2012090...aven.com/ph/wiki/index.php?title=NAND_and_NOR

https://web.archive.org/web/2012090...aven.com/ph/wiki/index.php?title=Block_device
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Real Jdbye @ The Real Jdbye:
    the vram is one advantage when it comes to AI but ends up being slower even with that and really AI is the only use case that needs more than 12gb vram right now
  • Psionic Roshambo @ Psionic Roshambo:
    Interesting lol
  • Psionic Roshambo @ Psionic Roshambo:
    I think I watched a video where two games at 4K where eating just over 16GB of RAM and it's the one case where the 7900XT and XTX pulled ahead (minus RTX of course)
  • Psionic Roshambo @ Psionic Roshambo:
    So my opinion is that they could age a bit better in the future, and maybe AMD will continue improving them via drivers like they tend to do. No guarantee there but they have done it in the past. Just a feeling I have.
  • The Real Jdbye @ The Real Jdbye:
    cyberpunk at 4k without DLSS/fidelityfx *might* exceed 12gb
    +1
  • The Real Jdbye @ The Real Jdbye:
    but that game barely runs at native 4k
  • Psionic Roshambo @ Psionic Roshambo:
    I think it was some newer games and probably poorly optimized PS4 or PS5 ports
  • The Real Jdbye @ The Real Jdbye:
    they definitely will age better but i feel dlss might outweigh that since it looks about as good as native resolution and much less demanding
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    When I played Cyberpunk on my old 2080 Ti it sucked lol
  • The Real Jdbye @ The Real Jdbye:
    AMD could introduce something comparable to DLSS but nvidia's got a lot more experience with that
  • The Real Jdbye @ The Real Jdbye:
    least amd 7xxx has tensor cores which the previous generations didn't so there is the potential for AI upscaling
  • Psionic Roshambo @ Psionic Roshambo:
    They have FSR or whatever it's called and yeah it's still not great
  • The Real Jdbye @ The Real Jdbye:
    so AMD seem to finally be starting to take AI seriously
  • Psionic Roshambo @ Psionic Roshambo:
    Oh yeah those new 8000 CPUs have AI cores built in that's interesting
  • Psionic Roshambo @ Psionic Roshambo:
    Maybe they plan on offloading to the CPU?
  • Psionic Roshambo @ Psionic Roshambo:
    Would be kinda cool to have the CPU and GPU working in random more
  • Psionic Roshambo @ Psionic Roshambo:
    Tandem even
  • The Real Jdbye @ The Real Jdbye:
    i think i heard of that, it's a good idea, shouldn't need a dedicated GPU just to run a LLM or video upscaling
  • The Real Jdbye @ The Real Jdbye:
    even the nvidia shield tv has AI video upscaling
  • The Real Jdbye @ The Real Jdbye:
    LLMs can be run on cpu anyway but it's quite slow
  • BakerMan @ BakerMan:
    Have you ever been beaten by a wet spaghetti noodle by your girlfriend because she has a twin sister, and you got confused and fucked her dad?
  • Psionic Roshambo @ Psionic Roshambo:
    I had a girlfriend who had a twin sister and they would mess with me constantly.... Until one chipped a tooth then finally I could tell them apart.... Lol
  • Psionic Roshambo @ Psionic Roshambo:
    They would have the same hair style the same clothes everything... Really messed with my head lol
  • Psionic Roshambo @ Psionic Roshambo:
    @The Real Jdbye, I could see AMD trying to pull off the CPU GPU tandem thing, would be a way to maybe close the gap a bit with Nvidia. Plus it would kinda put Nvidia at a future disadvantage since Nvidia can't make X86/64 CPUs? Intel and AMD licensing issues... I wonder how much that has held back innovation.
    Psionic Roshambo @ Psionic Roshambo: @The Real Jdbye, I could see AMD trying to pull off the CPU GPU tandem thing, would be a way to...