#113526 - SukkoPera - Thu Dec 28, 2006 4:05 pm
I wanted to use libcartreset for a small project. The project is ARM9-only (well, I have been a DS programmer for less than 24 hours so far), so I added the following code:
Code: |
u32 deviceType = DEVICE_TYPE_SCSD;
if (cartSetMenuMode (deviceType)) // Prepare the Slot2 device for reset
passmeloopEnter (); // Enter PassMe loop.
|
I'm using libcartreset_nolibfat 0.72, and Chishm's new fatlib. ATM I only want the reset function working on my SCLite, that's why I'm hardcoding the deviceType.
Anyway, the program just hangs, it does not reset. Any hints? Maybe I *must* also program the ARM7 for the reset thing to work? Or DEVICE_TYPE_SCSD is not suitable for the SCLite? It seems that v 0.72 supports it, but I couldn't find a more proper defined type in the headers for libcartreset.
BTW: LoveLite's resetting works on my SCLite.
Thanks in advance.
_________________
Nintendo DS Lite (White) + Supercard Lite + R4 + Sandisk 1 GB MicroSD
Sony PSP + Firmware 3.03 OE-A2
#113527 - Lick - Thu Dec 28, 2006 4:07 pm
Hey SukkoPera! Sorry to disappoint you but, yes, you have to use the ARM7 as well. Otherwise, the whole 'PassMe Loop' can't be done.
_________________
http://licklick.wordpress.com
#113528 - SukkoPera - Thu Dec 28, 2006 4:13 pm
Thanks for the instant reply!
OK then, I'll try that. I just don't understand if libnds has an integrated IPC mechanism or if I should implement my own. And also, what exactly can be done only on the ARM7 and what only on the ARM9.
Anyway, do you confirm that DEVICE_TYPE_SCSD is OK for SCLite?
_________________
Nintendo DS Lite (White) + Supercard Lite + R4 + Sandisk 1 GB MicroSD
Sony PSP + Firmware 3.03 OE-A2
#113536 - Lick - Thu Dec 28, 2006 5:01 pm
I can confirm that it works with SCLite.
As for the ARM7, just build upon the template.c. The template code will handle all the stuff it should.
_________________
http://licklick.wordpress.com
#113538 - SukkoPera - Thu Dec 28, 2006 5:44 pm
Thanks, everything works great now. Thanks for your help!
Oh, and now I can confirm it works with SCLite, too :).
_________________
Nintendo DS Lite (White) + Supercard Lite + R4 + Sandisk 1 GB MicroSD
Sony PSP + Firmware 3.03 OE-A2
#115056 - SukkoPera - Fri Jan 12, 2007 4:08 pm
One more question: any chance of getting this to work on GBA?
_________________
Nintendo DS Lite (White) + Supercard Lite + R4 + Sandisk 1 GB MicroSD
Sony PSP + Firmware 3.03 OE-A2
#115085 - dantheman - Fri Jan 12, 2007 10:31 pm
I don't know if there's a "standard" cart reset library for the GBA or not, although having the users patch the homebrew game with Boot-O-Matic Advance will usually work. A+B+Start+Select reboots the game, L+R+Start+Select reboots the entire system, bringing the user back to their flash cart menu.
#115096 - Lick - Sat Jan 13, 2007 12:15 am
GBA should follow the same principal:
1) Reset the media device to bootmenu-mode.
2) Jump processor to 0x080000C0.
On the GBA it's even easier, as you don't have to do the PassMe loop that involves the ARM9.
_________________
http://licklick.wordpress.com
#115105 - tepples - Sat Jan 13, 2007 12:49 am
Jumping to 0x08000000 or 0x080000C0 does not reset the stack pointer. A proper GBA reset has three steps, which should be done in code running in IWRAM or EWRAM: - Reset the media device
- RegisterRamReset(0xFC) to erase all registers
- Set entry point to ROM and SoftReset()
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#115111 - Lick - Sat Jan 13, 2007 1:18 am
Yup, that's something I need to put in libcartreset next version. Hehe.
_________________
http://licklick.wordpress.com
#115120 - SukkoPera - Sat Jan 13, 2007 3:16 am
OK, please let me know when you release that!
_________________
Nintendo DS Lite (White) + Supercard Lite + R4 + Sandisk 1 GB MicroSD
Sony PSP + Firmware 3.03 OE-A2