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 > dumb question: running gba code in ds mode?

#36134 - Dwedit - Tue Feb 15, 2005 6:55 am

What would happen if you stalled the ARM9 in an endless loop and ran GBA code on the ARM7?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#36136 - DekuTree64 - Tue Feb 15, 2005 7:01 am

A fantastic waste of CPU power :)
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku

#36140 - tepples - Tue Feb 15, 2005 8:10 am

A lot of games would probably not run, as they assume the mirroring of IWRAM at 32 KiB intervals, especially for the BIOS interrupt-related locations at 0x03007FF8-0x03007FFF, which some libraries treat as 0x03FFFFF8-0x03FFFFFF. But for a GBA game that's consistent in its BIOS access, would it allow access to the extra 16 pixels of width and 32 pixels of height on even one screen?

Besides, it wouldn't necessarily waste power, given that the ARM9 CPU would probably be in a halt state.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#36150 - Lupin - Tue Feb 15, 2005 10:26 am

Are the GBA registers available while the DS is in DS mode? You may be able to run ARM7 code, but maybe not real GBA code
_________________
Team Pokeme
My blog and PM ASM tutorials

#36161 - Abscissa - Tue Feb 15, 2005 2:58 pm

Lupin wrote:
Are the GBA registers available while the DS is in DS mode?

I can't imagine why they wouldn't be. I'm sure the DS-mode 2D stuff is just the GBA stuff with extra registers added. Otherwise, there would probably be a lot of redundant silicon.

#36178 - dagamer34 - Tue Feb 15, 2005 6:53 pm

But I thought you had no direct access to the ARM7 while in DS mode. Isn't any graphics code you execute using the DS going to use the ARM9 core?
_________________
Little kids and Playstation 2's don't mix. :(

#36181 - Dwedit - Tue Feb 15, 2005 7:29 pm

Judging by the fact that the passthrough works by setting the ARM7 PC to the GBA cartridge space, I believe you have full access to the ARM7 core. Probably don't even need to put a Nintendo logo in the GBA cartridge.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#36215 - tepples - Wed Feb 16, 2005 4:46 am

dagamer34 wrote:
But I thought you had no direct access to the ARM7 while in DS mode.

This is true only of official Nintendo DS games. One theory is that they don't have any direct access to the ARM7 because of radio frequency regulation. The other is that they don't have any direct access to the ARM7 yet. Analogy to early PS1 games, which didn't have direct access to the GPU and GTE; games were expected to go through the API in the BIOS until Sony opened up the hardware a year or two into the system's life cycle.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#36218 - netdroid9 - Wed Feb 16, 2005 4:50 am

I wouldn't bet on that.
If there is a need for the logo though, swhy not program a passthrough bios rom (Currently the only bios is the modified header data) that inserts it automatically :)