#52968 - chishm - Mon Sep 05, 2005 3:43 am
I was messing around trying to get the ARM9 back into a PassMe startup loop using this code:
However, that didn't work. The ARM9 would return to the loop (I think) but I couldn't break it back out by changing the jump address. Out of frustration I though I would just reset the whole thing, calling:
I thought this would reset the NDS. The weird thing is, it only reset the ARM9, which entered a FlashMe loop. This is just what I wanted.
For interest, this is the exact code:
Code: |
// Return to loop
*((vu32*)0x027FFE04) = (u32)0xE59FF018; // ldr pc, 0x027FFE24 *((vu32*)0x027FFE24) = (u32)0x027FFE04; // Set ARM9 Loop address asm volatile("bx %0" : : "r" (0x027FF000) ); |
However, that didn't work. The ARM9 would return to the loop (I think) but I couldn't break it back out by changing the jump address. Out of frustration I though I would just reset the whole thing, calling:
Code: |
asm volatile(".thumb\n swi 0x00\n"); // Soft reset |
I thought this would reset the NDS. The weird thing is, it only reset the ARM9, which entered a FlashMe loop. This is just what I wanted.
For interest, this is the exact code:
Code: |
// Return to loop
*((vu32*)0x027FFE04) = (u32)0xE59FF018; // ldr pc, 0x027FFE24 *((vu32*)0x027FFE24) = (u32)0x027FFE04; // Set ARM9 Loop address asm volatile(".thumb\n swi 0x00\n"); // Soft reset |