#172500 - padnoter - Wed Feb 10, 2010 12:34 am
Hi,
Is there a way to reset or reboot the DS via some code (devkitpro and/or palib etc)?
I can turn it off with;
Code: |
powerOn(PM_SYSTEM_PWR); |
but is there a similar command to restart it?
Noticed mention of a rebootlib/libcartreset libraries by "Lick" but all the links seem to be dead :-(
Any ideas?
Cheers
pn
p.s. I'm using R4 & R4i cards
#172501 - Ruben - Wed Feb 10, 2010 6:00 am
As in a hard reset or a soft reset? If soft reset, I think you can just return from main and it will start again... but I'm not sure as I don't use libnds.
#172506 - padnoter - Wed Feb 10, 2010 10:04 am
reset back to the bootup cartridge (in this case an R4 or R4i), so i guess that would be a hard reset
#172508 - Ruben - Wed Feb 10, 2010 10:43 am
Hm, I'm not sure that's really possible unless you know what to call from your card.
#172519 - elhobbs - Wed Feb 10, 2010 5:18 pm
doesn't the power button already do this for you? ;)
#172532 - padnoter - Thu Feb 11, 2010 10:56 am
lol.... that's what i'm trying to save... on/off on/off on/off
#172545 - SteveH - Thu Feb 11, 2010 8:31 pm
A hard reset is where you boot the ststem from scratch.
A soft reset is where you return to a boot menu.
Returning from the main of a homebrew will not return you to the boot menu as the boot menu its no longer running in the ram once it loads your nds file.
Some cards have the option to return to the boot menu upon pressing a set of keys, but this is part of the cart's build and not part of the actual libnds implementation.
AFAIK there's no way to reboot into the boot menu, unless you include the specific bits from the homebrew menu in your NDS file, but then it's a case of what to run...
#172547 - Exophase - Thu Feb 11, 2010 9:15 pm
You can call swi 0 to perform a system reset on the CPU calling it, but it doesn't affect the other CPU. So you might have to rig it so both CPUs call it.
#172551 - Miked0801 - Fri Feb 12, 2010 7:20 pm
#172552 - padnoter - Fri Feb 12, 2010 9:14 pm
Exophase & Miked0801 - thanks but I'm afraid I don't understand either - how do I call swi 0?? & not even sure if Mike's is a wind-up ??
(confused)
#172553 - Miked0801 - Sat Feb 13, 2010 12:25 am
Sorry, ignore mine. I was trying to be funny and failed...