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 > ARM7 and ARM9 Initialization

#142857 - racerxdl - Sun Oct 14, 2007 5:59 pm

I was wondering, I see in some codes the initialization routines for each processor of Nintendo DS, can I initialize ARM9 only?

Why I asking this:

If I can initialize arm9 for one screen, I can make a program who get the binary data from a GBA Rom and put at ARM7 in. Only making a interface for loading the rom files or something else. It is possible?

#142858 - Lick - Sun Oct 14, 2007 6:06 pm

Yes, just make the ARM7 spin using a volatile memory pointer to a variable that the ARM9 changes when the data is loaded.

// ARM7 waits
while (*(volatile int *)0x2400000 != 0xFFFF3210);

// ARM9 loads and gives the message
load_binary();
*(volatile int *)0x24000000 = 0xFFFF3210;
_________________
http://licklick.wordpress.com

#142881 - racerxdl - Sun Oct 14, 2007 8:37 pm

How to change where ARM7 execute? if I have the code starting on 0xFFF000 (example) how do I take ARM7 to start from that address??

#142906 - Lick - Sun Oct 14, 2007 11:20 pm

On the ARM7
Code:
//=================================
void reboot() {
//=================================
    irqDisable(IRQ_ALL);
    *(vu32*)0x27FFE34 = 0x????????;
    swiSoftReset();
}


0x27FFE34 is the ARM7 binary address.
_________________
http://licklick.wordpress.com