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.

Coding > GBAMP - reboot without black screen?

#60954 - Dwedit - Wed Nov 16, 2005 8:41 am

How do I properly reboot a GBAMP? All I get a black screen right now.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#60970 - chishm - Wed Nov 16, 2005 11:06 am

Unlock the card first. Use this code at the start of your program, so that you don't lock it while reading:
Code:
unsigned char unlock[] = {
   0xAC, 0x32, 0xE4, 0x68, 0xC0, 0xFE, 0xA8, 0xE2,
   0x42, 0xF0, 0xAA, 0x9E, 0x12, 0xBC, 0xDC, 0x92,
   0xDA, 0xAA, 0x70, 0xF4, 0x8E, 0x3E, 0xF0, 0x00,
   0x0E, 0x18, 0x8A, 0xF2, 0x9A, 0x2C, 0x1A, 0xAC,
   0x58, 0xD8, 0xC8, 0xD2, 0x8A, 0x8E, 0xF6, 0x6A,
   0x9E, 0x7A, 0x16, 0x9C, 0x26, 0xAA, 0x72, 0x0C,
   0x90, 0xA2, 0x7A, 0x48, 0xE2, 0xAC, 0x3E, 0xAE,
   0x16, 0x20, 0x76, 0xE8, 0xD6, 0x6E, 0xE4, 0x7C,
   0xBE, 0x08, 0xB2, 0x2C, 0x24, 0xB4, 0x18, 0x5A,
   0x32, 0x00, 0x06, 0x4E, 0x60, 0xF2, 0x9C, 0x02,
   0xC4, 0x2A, 0x96, 0xDE, 0xD8, 0x20, 0x90, 0x9A,
   0xD2, 0xE0, 0xFA, 0x88, 0x40, 0x7A, 0x58, 0x10,
   0x22, 0xA6, 0x98, 0x3E, 0x12, 0xEA, 0x2E, 0x18,
   0xFC, 0xFA, 0x52, 0xB8,
};

// Unlock
int i;
u32 temp32;
for (i = 0; i < sizeof(unlock) / sizeof(unlock[0]); i++)
{
   temp32 = *((vu32*)(0x08000000 + (unlock[i] << 1)));
}

Unlock sequence originally worked out by DarkFader.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com