hi, im wanting to know how to edit a .dol so when i make it a wad channel, it can restart the wii when i quit, otherwise it will jsut code dump, which makes you have to power off wii, as it is trying to return to the loader(which there isnt one when made to a channel)
i want to program the dol, to make channels so it can restart wii....
and help, would be appreciated, i dont know what tool to use or how to do it, and where to find the source and replace it...
i understand there are developers tips on wiibrew site, which gives codes, but im lost help please....
programming wii homebrew .dol restart wii??help needed
-
- Posts: 1
- Joined: Tue Sep 23, 2008 10:13 am
Re: programming wii homebrew .dol restart wii??help needed
Just use exit(0); to exit the program.
Re: programming wii homebrew .dol restart wii??help needed
exit(0) will exit to the loader but will code dump if you loaded your program from the system menu (ie, as a channel). It sounds like djdynamite123 is already using exit(0).
To restart to the system menu, do SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
If you want your channel to either exit to the loader or to the system menu, check the length of argc.
ie, if your main is "int main(int argc, char *argv[])" then argc will contain the number arguments passed. This will be 0 if loaded from the system menu. This will be 1 if loaded from a loader like HBC. Additionally, argv[0] will be a c-string listing the path of the dol file that was executed (eg: sd:/apps/program/boot.dol).
To restart to the system menu, do SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
If you want your channel to either exit to the loader or to the system menu, check the length of argc.
ie, if your main is "int main(int argc, char *argv[])" then argc will contain the number arguments passed. This will be 0 if loaded from the system menu. This will be 1 if loaded from a loader like HBC. Additionally, argv[0] will be a c-string listing the path of the dol file that was executed (eg: sd:/apps/program/boot.dol).
Who is online
Users browsing this forum: No registered users and 1 guest