gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Is GBA possible through DS MODE???

#48661 - lambi1982 - Thu Jul 21, 2005 3:44 pm

Now that the DS can access DS MODE throught the GBA port, is it possible to access the GBA mode through DS port?

I do understand that the DS is designed to use the GBA slot as a Expansion port, but Could you playGBA roms through the DS port
( if we had a DS flashcart) and I dont mean that neoflash crap....
_________________
Who, Me?

#48664 - Dwedit - Thu Jul 21, 2005 4:22 pm

No. When switching to GBA mode, it reboots the system, so it needs to find code on a cartridge. Can't run GBA multiboot roms from the DS cartridge slot, even if the encryption was cracked.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#48665 - lambi1982 - Thu Jul 21, 2005 4:38 pm

Thank you, thats makes alot of sense... I never thought of it that way :)


GBA MODE ( no DS FEATURES ( including DS SLOT) )

Thank you MR. EDIT... MR. DWEDIT

But wait, theres more... wouldnt there be a way to add the DS slot for GBA code in the Firmware... as was done with the GBA port for DS mode???
_________________
Who, Me?

#48679 - tepples - Thu Jul 21, 2005 6:52 pm

There's a hardware lock against reading or writing any DS registers in GBA mode. There is exactly one bit of difference between the GBA's GBA mode and the DS's GBA mode, and it relates to the result of BIOSChecksum().
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#48709 - ethoscapade - Thu Jul 21, 2005 9:24 pm

so does this mean remapping GBA B and A to DS Y and B / adding wireless link support to GBA games in DS mode exactly the way nintendo neglected to do is ultimately impossible?

#48714 - Dwedit - Thu Jul 21, 2005 10:13 pm

What the heck are "GBA games in DS mode"? If you mean "GBA games running on a DS in GBA mode", then it is impossible to access any of the extra features on a DS.
"GBA games in DS mode" don't exist.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#48727 - tepples - Thu Jul 21, 2005 11:21 pm

Given source code for a homebrew GBA ROM, would it be possible to "just recompile" a GBA game to run in DS mode on the ARM7 CPU? How much abstraction over the hardware would be needed just to get the same functionality going in native DS mode that was going on the GBA?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#48732 - Lynx - Thu Jul 21, 2005 11:33 pm

Hmm.. Just thinking.. Would it be possible to write an NDS loader that runs a .gba and tells it to take control of the ARM7?

#48735 - chishm - Thu Jul 21, 2005 11:47 pm

Tepples:
The problem is that the ARM7 can't access the video hardware, so you would need to run the graphics code on the ARM9. However the ARM9 can't do sound. So you need to run the sound code on the ARM7. This means splitting up the code and setting up a way for the two processors to communicate, and by then you might as well just rewrite your code for proper DS compatibility.
Lynx:
Isn't that how the Passme works. The .nds.gba file takes control of the ARM7 and runs all the startup code from it.

#48738 - tepples - Fri Jul 22, 2005 12:17 am

chishm wrote:
The problem is that the ARM7 can't access the video hardware

Ever? Isn't it possible to make one 128 KB bank available to the ARM7?

Quote:
Lynx:
Isn't that how the Passme works. The .nds.gba file takes control of the ARM7 and runs all the startup code from it.

Lynx might have been thinking of a program that can load .nds files but can also load .gba files (bankswitch the F2A cart and then switch to GBA mode) or load .nds.gba files containing an appended file system (bankswitch the F2A cart and then load the .nds).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#48763 - TJ - Fri Jul 22, 2005 3:30 am

This is only vaguely related to the topic at hand, but I have been wondering about it for awhile, so I'll ask.

Do we know if it is possible for a "DS Option Pak" to contain executable DS code?

Or more to the point, can the DS recognize that the device is not a GBA game, and allow it to run software in DS mode, instead of the normal GBA mode.

Or is it not even possible to select an "Option Pak" for booting in the DS menu?

#48765 - Lynx - Fri Jul 22, 2005 4:06 am

Well, we all know that some GBA flash carts have shown up in the boot menu as "Option packs".. But, the question of the posibility for a special header in the GBA slot being able to execute DS code is still unknown (I think). Of course we know it can (with a little help from a PassMe) for sure, and I don't see there being any reason a commercial company couldn't provide you with a DS cart that has it's code on it, and then it load/execute code from a GBA cart/device. Though, I don't know if there would ever be a reason to do it that way. Until someone releases an option pack that doesn't require a DS cart, I don't think we will ever know for sure.

Anyway, What I was "thinking".. Is create a DS program and then append a GBA program to the end, like the current emulators are doing. Then, have the DS program load the GBA program into ram and run on the ARM7. But, it was just an idea. Kinda like using the ARM7 as a makeshift emulator since the GBA code is written for the ARM7. Dunno if it's possible, just popped into my head.

#48768 - NEiM0D - Fri Jul 22, 2005 4:47 am

If you want the GBA game to have all the DS features, you will have to create a software GBA emulator for DS, and bypass the hardware GBA emulator.

In this way, it would be possible to use wifi for GBA SIO communication if the speed is fast enough, it would be possible to remap X/Y buttons etc.

#48789 - sonic-nkt - Fri Jul 22, 2005 2:08 pm

yes you could write a gba emu which could use the arm7 so you dont have to emulate that, perhaps also the other hardware, since in dsmode you have access to every single hardware.
So its not really a emu, more a wrapper, only thing you emulate is in the end perhaps the multiplayer part of the gba over wifi.

#48790 - pixxel - Fri Jul 22, 2005 2:18 pm

i agree about the multiplayer over wifi...but also there could also be a few other options...

overclocking wouldnt be hard (since the arm7 is used at half speed in gba mode...)
button remapping (using l+r in any sf2 game seems silly)
you could also have CF streaming support (play gba games bigger than gba/ds ram from CF) - i guess this wouldnt be uber quick, but theres many ways to optimise it.
state saving (dump the entire gba ram to cf)

you could also do some fancy things thatd be a bit harder...
like 2x gba emulation at same time (using both screens)
touch screen game pad...

its a weird project to do tho...its not just a case of porting an existing emu, coz to make use of the hardware itd have to be more like cxbx (the xbox 'emulator') and wine than a normal emu... a very interesting project tho...

a few nice options tho...

u get a whole spare screen for debug info
and once wifi is wporking, deving gba stuff could be done using this gba emulator with wifi upload and instant code restart

#48813 - IxthusTiger - Fri Jul 22, 2005 7:20 pm

I don't think GBA emulation is viable on the DS... :(

However, I am interested in how the GBAMP allows one DS file to boot, but if you skip to the DS Menu, you can select GBA Game and the GBAMP will run normally (in GBA Mode.) I would like to be able to have DS and GBA on one cart in this fashion. However, there is probably some special circumstance with the GBAMP that will not allow this to work on an F2A for example.

#48842 - chishm - Sat Jul 23, 2005 12:23 am

Its because the custom GBAMP firmware has been purposely written for both GBA and NDS modes. When the DS starts with flashme it automatically boots the cart in NDS mode. Selecting the cart from the menu boots it as it always has, in GBA mode.

#48843 - lambi1982 - Sat Jul 23, 2005 12:37 am

All I wanted to know was if it was possible to play GBA games from a DS flash cart ( when they actuallycome out )

I dont mean playing GBA games with DS features, TWO screens, WiFi.....
None of the DS features other than just running off of the Card Slot....

So for everyone who is thinking I was talking about GBA Emulation in DS mode, or anything that has to do with the DS features itself ( I WAS NOT ) Other than GBA GAMES IN GBA MODE RUNNING THROUGH THE DS CARD SLOT........


A big ?????--------------> What Runs the DS card slot ???????
_________________
Who, Me?

#48845 - Dwedit - Sat Jul 23, 2005 12:55 am

You will not be able to run GBA games from the DS slot, unless someone writes an emulator.
But someone could easily make a program that allows both GBA and DS games on a GBA flashcart.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#48850 - IxthusTiger - Sat Jul 23, 2005 3:06 am

That would be sweet!

#48871 - pixxel - Sat Jul 23, 2005 2:36 pm

"But someone could easily make a program that allows both GBA and DS games on a GBA flashcart."

isnt that what nds.gba files are for?

#48874 - Sausage Boy - Sat Jul 23, 2005 3:39 pm

How about a gba slot passme that redirects execution to an eventual DS flash cart? :P
_________________
"no offense, but this is the gayest game ever"

#48923 - lambi1982 - Sun Jul 24, 2005 5:30 am

i just dont understand why the ds is capable of running ds code through the gba slot and not the other way around. it seems to me that the ds slot has alot more access to ds hardware than the gba slot......
_________________
Who, Me?

#48926 - tepples - Sun Jul 24, 2005 5:40 am

lambi1982 wrote:
i just dont understand why the ds is capable of running ds code through the gba slot and not the other way around.

Because Nintendo didn't design the system to be pirate-friendly.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#48934 - IxthusTiger - Sun Jul 24, 2005 10:40 am

Hey... Pogobridge allowed you to boot GBC roms through the GB Bridge... a rom type with a different voltage and everything... Could Pogobridge be modified to have Pogoshell (with GBA games) and NDS games on one cart?

#48967 - lambi1982 - Sun Jul 24, 2005 10:11 pm

tepples wrote:
Because Nintendo didn't design the system to be pirate-friendly

That doesnt make sence when it is able to play DS roms From a ( widely available ) GBA flash cart....


I dont think they ever want it to be pirate friendly, but the systems get Hacked, more and more ( passme, and all othe ME's, Firmware) and when these changes are made the systems ARE pirate friendly.....

piracy isnt something I support, but using hardware to its out most potential is..

It just doesnt seem true that it can do it one way and not the other ;)
_________________
Who, Me?

#48971 - TJ - Sun Jul 24, 2005 10:51 pm

Quote:
That doesnt make sence when it is able to play DS roms From a ( widely available ) GBA flash cart....


You still aren't booting the game from the GBA cart, the game is run from the DS side either by PassMe/WiFiMe or the DS firmware itself.

#48974 - tepples - Sun Jul 24, 2005 11:14 pm

lambi1982 wrote:
It just doesnt seem true that it can do it one way and not the other ;)

The hole opened by PassMe and WiFiMe exploited a bug in the firmware, namely insufficient validation of the header, allowing a program to contain a "run address" within GBA ROM space rather than within EWRAM. Therefore it was unintentional.

Making GBA games run from a DS cart, on the other hand, would have to be intentional for these reasons: GBA games expect to be run from a 4 MiB to 32 MiB ROM in 0x08000000 and have access to 0.25 MiB of EWRAM at 0x02000000. The Nintendo DS has 4 MiB of EWRAM at 0x02000000 and nothing at 0x08000000 (unless a GBA cart is inserted). Programs would have to be re-linked to run from 0x02000000 rather than 0x08000000, and there would have to be another 0.25 MiB of EWRAM.

If you're wondering why you can't load a .mb program into EWRAM in DS mode, go to GBA mode, and execute it, that's because the DS jumps to the start of the GBA BIOS, which clears EWRAM (using RegisterRamReset()).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.