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

Discussion in 'NDS - Emulation and Homebrew' started by Rubedo, May 6, 2009.

May 6, 2009
  1. Rubedo
    OP

    Member Rubedo Aikawa is OLEV

    Joined:
    Jul 29, 2008
    Messages:
    741
    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...
     


  2. Law

    Member Law rip ninjacat that zarcon made me

    Joined:
    Aug 14, 2007
    Messages:
    4,132
    Location:
    ‭jerkland
    Country:
    United Kingdom
    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.
     
  3. Another World

    Former Staff Another World Emulate the Planet!

    Joined:
    Jan 3, 2008
    Messages:
    10,476
    Location:
    From Where???
    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
     
  4. DanTheManMS

    Member DanTheManMS aka Ricochet Otter

    Joined:
    Jun 2, 2007
    Messages:
    4,325
    Location:
    Georgia
    Country:
    United States
    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.
     
  5. TornZero

    Member TornZero GBAtemp Regular

    Joined:
    Mar 15, 2009
    Messages:
    197
    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)?
     
  6. Another World

    Former Staff Another World Emulate the Planet!

    Joined:
    Jan 3, 2008
    Messages:
    10,476
    Location:
    From Where???
    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
     
  7. cephalopoid

    Newcomer cephalopoid Member

    Joined:
    Sep 20, 2008
    Messages:
    31
    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 . . .
     
  8. DarkPacMan77

    Newcomer DarkPacMan77 Member

    Joined:
    Oct 1, 2007
    Messages:
    36
    Location:
    Pacland
    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-
     
  9. Curley5959

    Member Curley5959 CCC Member!

    Joined:
    Feb 2, 2008
    Messages:
    2,572
    Location:
    Australia
    Country:
    Australia
    So basically, Its possible to run GBA games through slot 1 but its hard to create the necessary files to run it.. [​IMG] So in other words, Just get a slot 2 device.. [​IMG]


    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.. [​IMG]
     
  10. DarkPacMan77

    Newcomer DarkPacMan77 Member

    Joined:
    Oct 1, 2007
    Messages:
    36
    Location:
    Pacland
    Country:
    United States
    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-
     
  11. DanTheManMS

    Member DanTheManMS aka Ricochet Otter

    Joined:
    Jun 2, 2007
    Messages:
    4,325
    Location:
    Georgia
    Country:
    United States
    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.
     
  12. koji2009

    Member koji2009 GBAtemp Maniac

    Joined:
    Mar 13, 2009
    Messages:
    1,193
    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.
     
  13. helmon1

    Newcomer helmon1 Member

    Joined:
    May 7, 2009
    Messages:
    12
    Country:
    United Kingdom
    Great explanation. I read it. Let's hope the DSi gets hacked soon.
     
  14. Tac 21

    Member Tac 21 GBAtemp Advanced Fan

    Joined:
    Feb 2, 2008
    Messages:
    517
    Country:
    Canada
    hmm... hasn't the DSi been hacked already?
     
  15. koji2009

    Member koji2009 GBAtemp Maniac

    Joined:
    Mar 13, 2009
    Messages:
    1,193
    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.
     
  16. Sohakes

    Newcomer Sohakes Member

    Joined:
    May 31, 2009
    Messages:
    14
    Country:
    Brazil
    koji2009, I read and understood what you said! Thanks [​IMG]

    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?
     
  17. koji2009

    Member koji2009 GBAtemp Maniac

    Joined:
    Mar 13, 2009
    Messages:
    1,193
    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)
     
  18. Alexrose

    Member Alexrose Untitled

    Joined:
    Jan 20, 2009
    Messages:
    783
    Location:
    England
    Country:
    United Kingdom
    Yeah, just like making N64 roms work on wii like in virtual console!

    Oh wait.
     
  19. lord0fshred

    Member lord0fshred GBAtemp Regular

    Joined:
    Jan 10, 2009
    Messages:
    108
    Location:
    My House
    Country:
    United States
    You can play GBA games on the DSi just fine.

    [​IMG]
     
  20. EliteKill

    Member EliteKill GBAtemp Regular

    Joined:
    Feb 22, 2009
    Messages:
    210
    Country:
    United States
    You got pwned!
     

Share This Page