Jump to: navigation, search

Devkitppc setup (Windows)

2,468 bytes added, 23 February
Updated emulator information
devkitPPC is the toolchain provided by [[DevkitPro]] for Wii and Gamecube development. This guide describes setting up such a system under Windows. A guide for Mac OS X 10.5.x users can be found [[Getting started with DevkitPPC on Mac OS X|here]] and a guide for Linux [[Getting started with DevkitPPC on Linux|here]]
== Introduction ==
This tutorial aims to:
* Show you how to setup the devkitppc development enviroment environment on a Windows computer* Run a hello world example on the include included Gcube emulator* Run a hello world example on the Wii using [[wiiload]]* Set you on the road to creating your own homebrew software to be loaded with the [[Twilight Hack]] or [[Homebrew Channel]]
== Installing devkitpro devkitPPC ==* Goto Go to [[http]devkitpro/files/Automated%20Installer/ this page] and download the latest Windows installer.
* Let it install to the C:\devkitPro\ to make it easier to follow the tutorial for now.
* When installing it, you can deselect devkitarm devkitARM and devkitpspdevkitPSP
* Click next until it finishes installing
* Under no circumstances should you place projects within the devkitPro folder. The windows updater can and will overwrite/delete your files.
* Create a new folder outside the devkitPro folder, c:\projects\wii for example. This path should not contain spaces.
* Copy the folder C:\devkitPro\examples\wii\template\ to this new directory and rename it to "helloworld" so that the full path is c:\projects\wii\helloworld\
== Compile the Hello World Example ==
* Click on Tools->make or use the ALT+1 key combination
* The output window at the bottom will show the build progress
Note: If you are having trouble compiling some programs under Windows Vista (eg. libogc cvs), try unsetting PLATFORM variable. (in msys shell, "unset PLATFORM")
== Run the Hello World Example on the emulator ==
* Now, browse to the helloworld folder. There should be a helloworld.dol file here now.
* Open this fileRun the helloworld.dol in an emulator. As of 23-Feb-2019, emulators for the Wii are mostly compatible and when windows asks what program to usefeature complete. [[Dolphin]] can successfully boot all GameCube games, tell it to use C:\devkitpro\emulators\gcube\gcubemost Wii games and most homebrew. See the [[Dolphin]] page for more information. Another emulator is [[Gcube]]. Gcube does not run homebrew compiled in Wii mode, but can run homebrew if compiled for the GameCube mode. See the [[Gcube]] page for more information.exe
The resulting dol == Run the Hello World Example on the Wii using wiiload ==* For this to work, you need to have the [[Homebrew Channel]] installed on your Wii and a way to access the Wii via TCP.* Get wiiload.exe from the [ Homebrew Channel archive] (should be compatible in wiiload\win32) and copy it to C:\devkitPro\msys\bin.* Set the environment variable WIILOAD to something like "tcp:" (replace the IP with your Wii's IP). This can be done via Control Panel -> System -> Advanced -> Environment Variables. Then restart windows.* Start the Homebrew Channel on your Wii.* Click on Tools -> run or use the Twilight HackALT+R key combination. Unfortunately dols compiled with CVS libogc * The output window at the bottom will show the upload progress (so does the Homebrew Channel) and future stable releases the example will not be compatible with gcubestarted on your Wii when it's done.
== Some Code snippets Edit the msys etc/profile file ==The etc/profile file loads some settings at each launch of the msys shell. It can be used to set some environement variable for the compiler/linker <source lang="bash">export CC=powerpc-eabi-gccexport CXX=powerpc-eabi-g++export DEVKITPRO=/c/usr/devkitproexport DEVKITPPC=$DEVKITPRO/devkitPPCexport SDL_CONFIG=$DEVKITPRO/libogc/bin/sdl-config export WIILOAD="tcp:"export PATH="$DEVKITPPC/bin:$DEVKITPPC/powerpc-eabi/bin:$DEVKITPPC\libexec\gcc\powerpc-eabi\4.4.3:$PATH"export LDFLAGS="-L$DEVKITPRO/libogc/lib/wii"</source>
libogc provides a jump back Set the $DEVKITPRO variable to the loader through devkitpro directory and the standard libc exit function. exit(0) will immediately return, all other values will display a console screen WIILOAD with the exit codeWii IP.
* Add this in your main while loop, under "VIDEO_WaitVSync()"CC:C Compiler to use
''PAD_ScanPadsCXX: C++ compiler to use (note: CPP stand for C preprocessor);''
''int buttonsDown = PAD_ButtonsHeld(0);''DEVKITPRO: Needed by the Devkitpro Makefiles
''if( (buttonsDown & PAD_TRIGGER_Z) && (buttonsDown & PAD_BUTTON_START)) {''WIILOAD: Needed by the wiiload program
''exit(0);''PATH: Search in bin and libexec in order to perform a gcc or g++ command without a makefile, followed by your Windows existing variables.
== Some Code snippets ==:''}See also: [[Developer Tips]]''libogc provides a jump back to the loader through the standard libc exit function. exit(0) will immediately return, all other values will display a console screen with the exit code.
== Links ==* [ devkitPro's 'Getting Started' Wiki]* [[User:RotoDevkitppc setup (Mac OS X)|RotoGetting started with DevkitPPC on Mac OS X]] 17:25, 24 March 2008 * [[Devkitppc setup (PDTLinux)|Getting started with DevkitPPC on Linux]]
==Links==[http[Category:// devkitPro's 'Getting Started' WikiDevelopment]]

Navigation menu