GBA Flash carts
GBA Flash carts
I recently bought a SuperCard MiniSD for use with my GBA systems (I got an EZ-Flash 3in1 for my DS) and was a bit disappointed with the fact that I have to patch ROMs in order for them to work on that device (IIRC, the EZ-Flash doesn't need any patching - I haven't used it in a while). Being used to high quality products like bunnyboy's PowerPaks or Krikzz's Everdrives, which keep things as authentic as possible, this bothers me a lot.
My goal is not just to "play games on the go", if it was I'd be satisfied with the GBA emulator in my Android phone, which runs perfectly fine. I want things to remain authentic, specially if I decide to run homebrew software on my Flash carts, so I was wondering if anyone here knows what kind of modifications the SuperCard or similar products make to the ROMs, and how they affect the software. Can they break the ROMs in any way? Introduce glitches not present in the original ROMs? Thanks.
My goal is not just to "play games on the go", if it was I'd be satisfied with the GBA emulator in my Android phone, which runs perfectly fine. I want things to remain authentic, specially if I decide to run homebrew software on my Flash carts, so I was wondering if anyone here knows what kind of modifications the SuperCard or similar products make to the ROMs, and how they affect the software. Can they break the ROMs in any way? Introduce glitches not present in the original ROMs? Thanks.
Re: GBA Flash carts
I own a SuperCard CF version, and haven't noticed any issues. IIRC, the patching is done at least in part to allow things like realtime saving, which I assume that it does by installing its own interrupt handler that does whatever it needs to do and then calls the original handler. Last time I used the PC tool, I think it would look up the ROMs in some kind of database to know how to patch the them. If no match was found - e.g. if I added my own techdemos - it would say something like "Patching failed" and supposedly not modify the ROM.
Re: GBA Flash carts
The GBA has its own counterpart to Super NES fast and slow ROM, the WAITCNT register. The system boots in slow ROM mode; most games switch to fast ROM early on. (There's also a super-fast mode that some advanced flash adapters support to diminish slowdown in some games; my memtestARM app for DS tests stability in this mode.) But the SuperCard's RAM controller isn't fast enough for fast ROM. Patching does four things: it disables fast ROM, it enables instruction prefetch (which sort of makes up for it), it mapper-hacks the save code to use SRAM instead of Bandai-style EEPROM or parallel flash, and it adds a keypress code to return to the adapter's menu (like a PowerPak long reset, except the GBA has no reset button). Most homebrew games and multiboot games will run fine without patching because they don't enable fast ROM and if they do save, it's to SRAM.
Re: GBA Flash carts
There was a game I tried (Altered Beast, I think) with different patching options, and at least once the game booted up with corrupt graphics. I can't remember if it always booted up that way though.mic_ wrote:I own a SuperCard CF version, and haven't noticed any issues.
I tried disabling everything, but the ROMs were still modified in some way, because they don't work without going through the patching tool first. What I'm trying to find out is what the minimum required patching does, and how it can affect the game.IIRC, the patching is done at least in part to allow things like realtime saving, which I assume that it does by installing its own interrupt handler that does whatever it needs to do and then calls the original handler.
Have you tried copying the ROM directly? It doesn't work, does it?If no match was found - e.g. if I added my own techdemos - it would say something like "Patching failed" and supposedly not modify the ROM.
Sounds bad... I mean, even if GBA games don't make use of timed code like NES games do, messing up the timings doesn't sound exactly harmless.tepples wrote:But the SuperCard's RAM controller isn't fast enough for fast ROM. Patching does four things: it disables fast ROM, it enables instruction prefetch (which sort of makes up for it)
How does it know what kind of save each game uses? Database? Does it leave games that already use SRAM alone?it mapper-hacks the save code to use SRAM instead of Bandai-style EEPROM or parallel flash
I have nothing against powering off and back on, I can totally live without this feature if that means screwing less with the games.and it adds a keypress code to return to the adapter's menu (like a PowerPak long reset, except the GBA has no reset button).
I see... So, if someday I decide to program my own GBA software it should run unmodified as long as I don't use fast ROM or saving methods other than SRAM.Most homebrew games and multiboot games will run fine without patching because they don't enable fast ROM and if they do save, it's to SRAM.
Re: GBA Flash carts
Everything seen on my GBA homebrew page will probably work unmodified.tokumaru wrote:Have you tried copying the ROM directly? It doesn't work, does it?
GBA games are written mostly in C, and they should be somewhat resilient to what amount to CPU speed changes.even if GBA games don't make use of timed code like NES games do, messing up the timings doesn't sound exactly harmless.
When I was in the GBA scene, it depended on identifier strings compiled into the official flash and EEPROM save libraries. I don't know whether it has since become more database driven. It might use the SRAM identifier to add SD writeback at various points ("real-time save").How does it know what kind of save each game uses?
Correct. Don't touch WAITCNT and your program will work fine on a SuperCard. For inner loops, you can always copy code to the built-in ultra-fast IWRAM. You will have to quick power cycle to save though.So, if someday I decide to program my own GBA software it should run unmodified as long as I don't use fast ROM or saving methods other than SRAM.
Re: GBA Flash carts
The SuperCard is a let down for GBA. I owned one before. As you noticed, basically all games must be patched due to the Slow RAM (or Memory Controller) in the product not being able to keep up with *normal* ROM speeds. The pre-fetch does not make up for this. Games that normally don't suffer slowdown will. Some games suffer terrible slowdowns. The SuperCard is more useful for playing NDS games. I recommend if you can find one, one of the M3 Adapters. While any GBA device requires patching the ROMs if they use something other than SRAM it's not a bit deal. SuperCard's the one that *really* requires patching not just for saving but for not crashing when the RAM can't keep up.
I'd highly recommend trying to find another product.
I'd highly recommend trying to find another product.
Re: GBA Flash carts
Crap. Wish I knew this sooner. Thanks MottZilla.
Re: GBA Flash carts
I have the Flash2Advance 256M (32MB), and it has hardware simulation of several different save types.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
- mikejmoffitt
- Posts: 1353
- Joined: Sun May 27, 2012 8:43 pm
Re: GBA Flash carts
Did my old 128Mbit EZ-Flash 2 do this sort of thing? It was a small NAND flash deal, I don't believe it copied the game to its own RAM in order to run like some newer devices did.
Re: GBA Flash carts
A NAND device would still have to copy the game to RAM to run it. It just acts as if it were a raw NAND needing a software controller, like a SmartMedia or xD-Picture card as opposed to CF or SD. Only NOR flash is word-addressed in the way that allows for the sort of execute-in-place operation needed to run programs without copying them to RAM first. Most cards that are 512 Mbit or smaller are NOR based.
- mikejmoffitt
- Posts: 1353
- Joined: Sun May 27, 2012 8:43 pm
Re: GBA Flash carts
I indeed had those mixed up - I believe it was an NOR cart.tepples wrote:A NAND device would still have to copy the game to RAM to run it. It just acts as if it were a raw NAND needing a software controller, like a SmartMedia or xD-Picture card as opposed to CF or SD. Only NOR flash is word-addressed in the way that allows for the sort of execute-in-place operation needed to run programs without copying them to RAM first. Most cards that are 512 Mbit or smaller are NOR based.