In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
14 bytes added ,  00:29, 28 June 2008
m
Removed level 1 headers. Level 2 headers should be used.
Line 1: Line 1: −
=Code Snippets=
+
==Code Snippets==
==Video Auto-Detect Routine==
+
===Video Auto-Detect Routine===
 
The libogc included in DevkitPPC r15 does this for you with one function call.
 
The libogc included in DevkitPPC r15 does this for you with one function call.
 
Here is the video detect code from the DevKitPro Wii example.
 
Here is the video detect code from the DevKitPro Wii example.
Line 9: Line 9:  
[http://forum.wiibrew.org/viewtopic.php?t=230 Forum thread]
 
[http://forum.wiibrew.org/viewtopic.php?t=230 Forum thread]
   −
==Exit to Loader==
+
===Exit to Loader===
 
It's a good idea to add some way to return to the loader, otherwise you have to reboot you Wii to exit.
 
It's a good idea to add some way to return to the loader, otherwise you have to reboot you Wii to exit.
   Line 17: Line 17:  
     exit(0);
 
     exit(0);
   −
==How to use the Wiimote==
+
===How to use the Wiimote===
 
A separate article is available: [[How to use the Wiimote]].
 
A separate article is available: [[How to use the Wiimote]].
   −
==Reboot Wii==
+
===Reboot Wii===
 
Use:
 
Use:
 
  SYS_ResetSystem(SYS_RESTART,0,0);
 
  SYS_ResetSystem(SYS_RESTART,0,0);
Line 26: Line 26:  
Or use SYS_RETURNTOMENU for a "soft" return to the system menu, SYS_POWEROFF to shut down the wii (automatically to the appropriate Idle or Standby mode, depending on the WC24 setting), or SYS_POWEROFF_STANDBY or _IDLE to specify the mode and override the system setting.
 
Or use SYS_RETURNTOMENU for a "soft" return to the system menu, SYS_POWEROFF to shut down the wii (automatically to the appropriate Idle or Standby mode, depending on the WC24 setting), or SYS_POWEROFF_STANDBY or _IDLE to specify the mode and override the system setting.
   −
=Debugging Tip=
+
==Debugging Tip==
 
When faced with a crash in your Homebrew, often you'll see a code dump with an address and some machine code.  Here's my trick to track that back to a line of C++ code.
 
When faced with a crash in your Homebrew, often you'll see a code dump with an address and some machine code.  Here's my trick to track that back to a line of C++ code.
   Line 73: Line 73:  
For more info on the assembler output see the manual here:  http://sourceware.org/binutils/docs-2.18/as/index.html
 
For more info on the assembler output see the manual here:  http://sourceware.org/binutils/docs-2.18/as/index.html
   −
=General Programming Tips=
+
==General Programming Tips==
 
*Keep your code commented throughout; it helps others help you.
 
*Keep your code commented throughout; it helps others help you.
 
*Any unused code should be deleted out of the program, unless it is a program for teaching people.
 
*Any unused code should be deleted out of the program, unless it is a program for teaching people.
 
*If someone does the same thing in a more efficient way (i.e. faster and/or in less code), accept it and learn from it.
 
*If someone does the same thing in a more efficient way (i.e. faster and/or in less code), accept it and learn from it.
2,375

edits

Navigation menu