Hacking DS Cartridges and GBA cartridges

carterman

Well-Known Member
OP
Member
Joined
Mar 22, 2007
Messages
226
Trophies
0
Age
37
Location
Lubbock, TX
XP
150
Country
United States
OK, I'm honestly confused about the ways that DS cartridges and GBA cartridges work, particularly in the way that flash devices work for them.

I know that GBA devices need to load from some sort of very fast memory (i.e. faster than SD cards), like fast enough RAM or NOR Flash memory - but it seems as if DS flash devices either are able to read directly from removable storage, so with my lack of information on DS cartridge access times and read speeds, I'm guessing that the DS and its games are designed to read from slower media (likely to keep costs down on cartridges) instead of requiring very fast media like what the GBA has?

I need people to correct me if I'm wrong, because I have no way of telling if I'm wrong or right...at least not without digging through hundreds of google results to try and find an answer buried somewhere...

EDIT: Some relevant info seems to be able to be found here, but I can't make heads or tails of it: http://nocash.emubase.de/gbatek.htm#dsmemorytimings
 

Foxle

Well-Known Member
Member
Joined
Feb 11, 2008
Messages
194
Trophies
0
XP
90
Country
United States
While media speeds can effect gameplay (Just ask anyone with a knock off SD card), the main reason for requiring both Slot-1 and Slot-2 devices is that Slot-1 devices cannot access the hardware on a DS responsible for playing GBA games. It's not that Slot-1 devices aren't fast enough to play GBA games, it's that they cannot get to the hardware needed to make them run.

At least, that's my understanding of it.
 

carterman

Well-Known Member
OP
Member
Joined
Mar 22, 2007
Messages
226
Trophies
0
Age
37
Location
Lubbock, TX
XP
150
Country
United States
That's not really what I'm talking about, I'm aware that slot-1 devices can't access GBA functions.
smile.gif


But based on your comment on slot-1 speeds...my guess is that the GBA slot just has slower access times than the DS slot? *shrugs*
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
It gets far more complex but as far as DS can not access GBA hardware. It is partially correct; the GBA has different waitstates at different memory section (you may have seen the GBA has the cart mapped to 08000000-09FFFFFF hex in the memory, it also has them at more delayed access times at 0a000000-0bFFFFFF and 0c000000-0dFFFFFF while the DS only has the one starting with 08).
Several of the SWI calls (used a lot in some games have changed in function and design or are simply not there). http://nocash.emubase.de/gbatek.htm#biosdi...andndsfunctions
When GBA slot carts launch games they reboot into GBA mode to do it, an emulator would have to emulate the missing stuff. In reality though any emulator that could happen would have to be a hypervisor translating the calls that will work into the required calls and emulating (which would probably not be that bad as the "missing" stuff is not known for speed). As you might imagine this is lot of effort when cheap GBA supporting cards that do their job exceptionally well and the process behind them is very well understood exist.

Back on topic GBA carts are a maximum* of 32 megabytes (6 hex digits =16 megs, times 2 for the two areas), even when the GBA was made 32 megs of fast read only memory was not that expensive (much to my dismay everything comes down to expense in the modern engineering world, of course people doing this gives me my job so I do not mind overly much) which appears again when you remember that the ARM7 the GBA will crash if it runs out of instructions to do.
Trying to repeat the same for DS carts which frequently sport far larger amounts of memory.... so this pitfall was avoided in design.

*NOR era flash carts used bankswitching to increase size (why you could have 1024 Mbit NOR carts when 256 is the effective limit) and it is rumoured that GBA video "Shrek" used the same concept. That cart is undumped though (most dumping tools blindly copy the "08000000-09FFFFFF" section (or less if you tell it to) which the shrek video does not have, blind speculation says the GPIO is used http://nocash.emubase.de/gbatek.htm#gbacartioportgpio )

re "knock off SD card",
flash carts work by translating calls to the given slot to calls for a given area of memory on the "SD" card or similar: the DS calls for an area of the rom, the card reads the FAT on the "SD" and sends the required data, the DS sends some save data to what it thinks is the save section and the cart acts accordingly although different methods used by different carts (the early EZ5 loaders actually turned their FPGA into the save section as it would be on a real game (which is why it needed a savelist and why it was one of the most compatible carts, most current ones simply write it to the "SD" while others use another memory section and write on reboot).

In essence flash carts emulate a game card to varying degrees (stuff like the passme/nopass of flashme can redirect things where they were not intended).
Hangups in different places (or a fragmented card necessitating multiple calls) slow down cause those issues. Cheapo SD cards are usually not the fastest of things essentially making it one of those "a chain is only as strong as weakest link" situations.
On the DS the speed need not be as high by design so there is no need for a ram section or a fast section.
 

dajavax

Well-Known Member
Member
Joined
Oct 29, 2008
Messages
278
Trophies
0
Age
32
Location
Monterrey
Website
www.dajavax.tk
XP
194
Country
Mexico
well gba cartridges store their saves info in a flash chip similar to RAM's... when there's no power they get deleted, that's why they have a battery inside... the game itself is in a read only section... the NDS cartridges have flash memory as in USB's or SD's... they don't get deleted, making them also smaller as there's no need for a battery... this happened because of thing becoming cheaper... as for every other aspect... FAST6191 made a great explanation
smile.gif
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    ButterScott101 @ ButterScott101: +1