Homebrew So, WHY can't GBA dumps run on slot 1 cards?

Rubedo

Aikawa is OLEV
OP
Member
Joined
Jul 29, 2008
Messages
801
Trophies
0
Website
Visit site
XP
500
Country
United States
I know that they can't (at least, not without additional hardware) and I understand and accept it, but I still don't understand WHY it's completely impossible to run a GBA dump on DS.

Shouldn't the DS already have the necessary parts to run a GBA game?
Wouldn't it be possible to create an emulator for slot 2? If not, why?
Why is it that there's NO other alternative than to buy a special slot 2 card?

I'm not complaining or anything, but I just wonder why...
 

Law

rip ninjacat that zarcon made me
Member
Joined
Aug 14, 2007
Messages
4,128
Trophies
0
Age
32
Location
‭jerkland
Website
www.twitch.tv
XP
334
Country
I don't think it's impossible, but I doubt anybody wants to spend the time to try to get it working.

Especially when the DS can already play GBA games through Slot-2.
 

Another World

Emulate the Planet!
Former Staff
Joined
Jan 3, 2008
Messages
10,579
Trophies
2
Age
48
Location
From Where???
Website
wiki.gbatemp.net
XP
5,535
Country
Colombia
slot1 does not have access to the gba hardware, such as the 32megs of ram. running a gba rom in slot1 on the nds hardware would require a hypervisor to send the instructions to the nds hardware. it's a theory, and would probably never work. you would have to constantly page info in and out of the 4 megs of ds slot 1 ram. not to mention a vast amount of other issues.

if you want to play gba buy a gba, use emulation or get a slot2 flash linker for your nds.

-another world
 

DanTheManMS

aka Ricochet Otter
Member
Joined
Jun 2, 2007
Messages
4,453
Trophies
1
Age
34
Location
Georgia
XP
751
Country
United States
Another World said:
slot1 does not have access to the gba hardware, such as the 32megs of ram. running a gba rom in slot1 on the nds hardware would require a hypervisor to send the instructions to the nds hardware. it's a theory, and would probably never work. you would have to constantly page info in and out of the 4 megs of ds slot 1 ram. not to mention a vast amount of other issues.

if you want to play gba buy a gba, use emulation or get a slot2 flash linker for your nds.

-another world

Quick correction: the GBA only has 256 KB of RAM. Many slot-2 devices contain 32 MB of RAM simply because the GBA expects really really fast response rates from the game cartridge (or whatever you're using in place of an actual cartridge), and RAM is fast enough while CF and SD cards are not. That's why traditional flash carts used NOR flash, which is very slow to write to but very fast to read from, fast enough to meet the GBA's requirements.

On a related note, GBA games can be directly addressed because they are executed directly from the cartridge. DS games are block devices, and they copy chunks of data into RAM before execution. Slot-1 cannot be directly addressed, which is another setback to running GBA games from slot-1.

Add the fact that the ARM7 functions entirely differently in DS mode than it does in GBA mode and you come to the conclusion that you'd HAVE to run GBA games in GBA mode. When in GBA mode, you don't have access to any hardware the GBA didn't originally have, including slot-1 and the DS's RAM, so you've got no place to store the game file itself unless you buy a slot-2 device to hold it.
 

TornZero

Well-Known Member
Member
Joined
Mar 15, 2009
Messages
197
Trophies
0
Age
30
XP
123
Country
United States
Has anyone thought of making a VBA-type ROM that'll run on a DS that allows you to run GBA ROMs? Then wouldn't the ROMs work like S/NES ROMs (Not being ROMs on their own but working within a secondary emulator)?
 

Another World

Emulate the Planet!
Former Staff
Joined
Jan 3, 2008
Messages
10,579
Trophies
2
Age
48
Location
From Where???
Website
wiki.gbatemp.net
XP
5,535
Country
Colombia
dan, so the gba carts are read directly into the hardware. the gba has access to whats on the cart at any point during any given time? what is that little bit of 256kb of ram used for? i could have sworn i read that the gba had 32megs of ram and it stored the actual contents of the cart while running. but i've never once claimed to be an expert on the hardware =)

-another world
 

cephalopoid

Active Member
Newcomer
Joined
Sep 20, 2008
Messages
32
Trophies
0
XP
201
Country
United States
Granted, GBA on a DS is NOT an issue.

However, GBA on a DSi IS an issue. I know that Nintendo will probably be releasing GBA games as downloads for the DSi . . . so theoretically, it SHOULD be possible to run a GBA emulator on a DSi . . .
 

DarkPacMan77

Active Member
Newcomer
Joined
Oct 1, 2007
Messages
36
Trophies
0
Location
Pacland
Website
Visit site
XP
85
Country
United States
GBA emulated through slot 1 is entirely possible. The hardware needed is there. It's hard to code for the GBA though. On the PSP it took a long time before it got ironed out to about 99% compatibility/ speed.

Now, I'm a PSP guy, so I know I may sound a little bit off here, but what HAS to happen in order for the GBA to be emulated through slot 1 is that the NDS has to have a "custom firmware" of sorts so that it can be allowed to use the other hardware that the NDS offers. Since it would be entirely too hard to optimize a GBA emulator THAT WELL with such strict limitations, that's why it hasn't happened before.

-DarkPacMan77-
 

Curley5959

CCC Member!
Member
Joined
Feb 2, 2008
Messages
2,571
Trophies
0
Age
30
Location
Australia
Website
www.holidaygamerz.zoomshare.com
XP
163
Country
So basically, Its possible to run GBA games through slot 1 but its hard to create the necessary files to run it..
smile.gif
So in other words, Just get a slot 2 device..
smile.gif



Nah, Im sure that when GBA games on DSi become available, someone will figure out the key point to make it run on slot 1 for Lite.. Until then, we wait..
biggrin.gif
 

DarkPacMan77

Active Member
Newcomer
Joined
Oct 1, 2007
Messages
36
Trophies
0
Location
Pacland
Website
Visit site
XP
85
Country
United States
Curley5959 said:
So basically, Its possible to run GBA games through slot 1 but its hard to create the necessary files to run it..
smile.gif
So in other words, Just get a slot 2 device..
smile.gif



Nah, Im sure that when GBA games on DSi become available, someone will figure out the key point to make it run on slot 1 for Lite.. Until then, we wait..
biggrin.gif

Yes, you're very correct. The DSi is one part of the puzzle, however, it might not make it to the Lite so soon. It will be fairly easy, mark my words, to make GBA work on the DSi once it's possible to exploit. But the motherboards are different from generation to generation and a breakthrough from the DSi won't necessarily yield positive results for that phat and Lite models.

A type of modified firmware will be needed for GBA to be possible through slot one on older models, I'm almost positive. Certain files need to be tweaked to redirect where the resources are coming from to power the emulation. Until that is done, it doesn't seem like we'll be getting GBA on slot one phat and Lite models unless the DSi shows otherwise.

-DarkPacMan77-
 

DanTheManMS

aka Ricochet Otter
Member
Joined
Jun 2, 2007
Messages
4,453
Trophies
1
Age
34
Location
Georgia
XP
751
Country
United States
Another World said:
dan, so the gba carts are read directly into the hardware. the gba has access to whats on the cart at any point during any given time? what is that little bit of 256kb of ram used for? i could have sworn i read that the gba had 32megs of ram and it stored the actual contents of the cart while running. but i've never once claimed to be an expert on the hardware =)

-another world

Right, the game can call up address 0x8003B9A (for example) which will end up being some instruction in the rom somewhere (which starts at 0x8000000). The 256 KB of RAM is used for, well, RAM-type stuff. Holding variables, performing recursion, holding the stack, queuing a sound effect, etc. But the GBA does not load any part of the game file itself into RAM before execution, as that's done directly from the cartridge.

Many slot-2 devices contain 32 MB of RAM that the game gets copied to before running, but again, that's simply to simulate the fast-access ROM cartridge which CF and SD cards are too slow to do.

QUOTE(T0rnZer0 @ May 6 2009, 09:34 PM) Has anyone thought of making a VBA-type ROM that'll run on a DS that allows you to run GBA ROMs? Then wouldn't the ROMs work like S/NES ROMs (Not being ROMs on their own but working within a secondary emulator)?

That would be called "emulation". And we've already discussed in detail how the DS isn't powerful enough to handle flat-out emulation at any decent speed. Sure, there's absolutely nothing stopping some dedicated coder from porting VBA to the DS so it can run GBA games. But do you really want to play a game at 1 fps, if that?

DarkPacMan77, you're assuming that once the DSi gets cracked, it will have enough power to emulate the GBA entirely in software, which is optimistic at best and misleading at worst. The DSi isn't that much of a hardware upgrade, so while it makes emulation slightly more feasible, it would still be relatively unplayable if it was ever made. A custom firmware won't help GBA code run in DSi mode natively.

I still maintain that the *only* way to get GBA games running at an acceptable speed on the DSi is if two conditions are met:
1. The DSi gets cracked and we can run our own code, modify the firmware, etc.
2. GBA mode still exists on the DSi (for Nintendo to sell downloads via the DSi store, for example). If GBA mode cannot be accessed from the DSi in any way, then this idea goes out the window.

If these two things happen, then perhaps we can find a way to do exactly what we've been doing this whole time - get a GBA stored in fast slot-2 RAM for execution in native GBA mode. The only difference is that this time the RAM is on-board. But again, this is all theoretical.
 

koji2009

Well-Known Member
Member
Joined
Mar 13, 2009
Messages
1,193
Trophies
0
XP
197
Country
United States
The amount of wrong information in this thread is absolutely baffling... Let me try and sort this out for you guys...

The DS does have the processing power necessary to "emulate" the GBA in a way (since the hardware is pretty much identical, it's more a matter of mapping matching commands) the problem has never been about the processor, the problem has been with the media (IE, where the rom is stored) and RAM.

A quick explaination of what RAM does... RAM is used to store variables, or things that change as you play. RAM also has another use though, and it's this second use that truly divides GBA from DS... and that is, it can be used to store data for quick access, if the media is expected to take to long to load it.

Now when the GBA was first released... RAM was still relatively pricey for extremely portable electronics so nintendo went with 256k which is miniscule... Programmers really can't do much with that tiny amount of ram, so nintendo, to compensate, had GBA carts manufactured. These carts (like NES/SNES carts before them) had (relatively) fast access times to data, especially random (non-sequential) data. So while the ram on the GBA was incredibly limited, much of the GBA data could quickly and easily be run straight form the cartridge, leaving more of it for the variables necessary for games. The problem with these game cartridges though is that they can be fairly pricey (between 10-20 depending on size with little hope of prices dropping over time) and that meant both nintendo and developers made less money for each game sold.

In comes the DS. Several years later now, RAM prices have dropped considerably and the DS stepped up to 4MB of ram (16x as much as a GBA). This frees up a lot more room for game data to be stored in the RAM so nintendo could thereby skimp on the cartridges. Enter the DS Slot-1 card. These game cards, while able to store more data, also used much slower memory (this is why some DS games have loading screens on occasion, while zero GBA games to my knowledge did) and were much cheaper to make (around 5-10 USD per cart, though that price probably has since dropped as well) so both Nintendo and developers made more money for each game sold making them all much more profitable.

So with that knowledge laid out, let's go back to the original problem of why the DS can't play GBA games from SLOT-1. GBA games are programmed with the belief that if they call data from where the game is stored, it will be executed pretty much instantly. SLOT-1 Devices do not have this ability, they do not have the access speed (especially non-sequentially) that the games require and will thus instantly crash the game.

"But SNES games can be emulated and they are based on cartridges!" Good point! Why do SNES games work but not GBA then? The difference is that SNES games are small, the vast majority under 4MB in size... Exactly the size of the DS's ram. The games work because the entire game is stored in the super fast ram and thus can pull that data as quickly as the game needs. Your typical GBA game, however, is 8-16MB with the largest at 32MB and therefore has no chance of fitting in 4MB.

"But there are SNES games larger than 4MB!" Also true, the author of the emulator uses a couple nifty tricks to handle this... The first and preferred method is if there is a SLOT-2 device with ram, it will use that. The RAM in SLOT-2 is fast enough to handle them. The second, much less preferred way is to freeze the game when it calls for data out of ram. The emulator then clears out a portion of ram and puts that data into play. This has the effect of greatly slowing the game down in certain situations. Now imagine this problem several dozen times worse as GBA games are much larger and would be pulling data not in RAM far more often... yeah... not pretty.

So where does that leave us in general? Well the DSi does have 16MB of RAM, which would mean that there shouldn't be a problem (in theory) of playing the smaller GBA games without any slow down when DSi mode is cracked... but the larger games would still have a problem no doubt.

As for GBA slot-1 on a regular DS... you're not going to get it. No emulator author is going to spend their time on such a project because they know what I've told you all right now, that the RAM constraints (or the data from slot-1 restraints, whichever way you want to look at this problem) are such that there is no software workaround and even if there was one, it would be pointless since you can easily buy a cheap peice of hardware that would make weeks/months worth of work obsolete and run better.

-inhales- Okay... I think that should cover every misconception in this thread... my only fear is that I made it too big and no one will pay attention. If anyone is interested in discussing anything else on this topic, or if anyone would like me to go more in-depth or reexplain something let me know.


(edit) Just a quick amendum, DanthemanMS did have this understanding, I kind of skimmed over a couple of posts when it didn't seem like anyone got it, I still didn't want to delete all of this though as it did take a good portion of my time and it's a bit more explainative and hopefully in simple enough language to follow.
 

helmon1

Member
Newcomer
Joined
May 7, 2009
Messages
12
Trophies
0
XP
9
Country
koji2009 said:
-inhales- Okay... I think that should cover every misconception in this thread... my only fear is that I made it too big and no one will pay attention. If anyone is interested in discussing anything else on this topic, or if anyone would like me to go more in-depth or reexplain something let me know.

Great explanation. I read it. Let's hope the DSi gets hacked soon.
 

koji2009

Well-Known Member
Member
Joined
Mar 13, 2009
Messages
1,193
Trophies
0
XP
197
Country
United States
Depends on your definition of hack... If you mean can we get unsigned code to run on the DSi period, than yes. If you mean can we get unsigned code to run in DSi mode (IE, has access to the faster processor, more RAM, the SD card slot, and the cameras) no we have not.
 

Sohakes

Member
Newcomer
Joined
May 31, 2009
Messages
14
Trophies
0
XP
135
Country
Brazil
koji2009, I read and understood what you said! Thanks
moogle.gif


But... if the problem is the fast gba ram, we can't play gba games on slot-1 flashcarts using the ram of a gba game?
Like... I put a game on slot-2 device, run the game from slot-1, but use the slot-2 ram?
 

koji2009

Well-Known Member
Member
Joined
Mar 13, 2009
Messages
1,193
Trophies
0
XP
197
Country
United States
Because GBA games aren't RAM (random access memory) they are ROM (read only memory) which means data can not be written to them, only be read from.

Certain GBA flash carts CAN be used to play GBA games and loaded from SLOT-1 (that's what the flash 3-in-1 is)
 

Alexrose

Untitled
Member
Joined
Jan 20, 2009
Messages
783
Trophies
0
Age
32
Location
England
XP
374
Country
Curley5959 said:
Im sure that when GBA games on DSi become available, someone will figure out the key point to make it run on slot 1 for Lite..

Yeah, just like making N64 roms work on wii like in virtual console!

Oh wait.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: @Xdqwerty :creep: +1