Introduction
This page includes basic details on how to get your BennuGD games up and running in your Wii.
Details
Things you'll need:
- A Wii.
- The homebrew Channel installed in your Wii (instructions).
- Wiiload (You'll want a version that can accept extra arguments).
- A working BennuGD game.
Things you'll want to know:
- The Wii only has 88MB of RAM. that's less than 1/10th of the memory that a recent version of Windows takes to boot. You must be very careful with the resources you use, and be sure to unload resources as soon as you don't need them anymore.
- The Wii supports a variety of 480p resolutions, depending on the system your TV uses and on whether your TV is 4:3 or 16:9. In practice, you can set the resolution at 640x480 and things should be fine.
- Sound is still not working as expected. Your music might play faster or slower than it should. This is a known SDL_Mixer limitation in the Wii. You should recode your music @ 48KHz and music will play fine.
- Right now, you must compile your games directly on the Wii. You cannot use a dcb generated by the official Bennu version and use it on your console.
- Bennu will report 8 connected joysticks no matter how many of them are really available. This is an SDL limitation and should be fixed soon.
- The Wiimote can be used as a mouse (with the coordinates the user is pointing at being mouse.x & mouse.y) and as a joystick at the same time. The joystick button mappings are described here.
If the user is not pointing with the primary Wiimote at the screen, "A" and "B" button presses will not be mapped to mouse clicks. You can still read such events by treating the Wiimote as a joystick and getting button presses with joy_getbutton.
- The Wiimote pad is mapped as a hat. You can get the direction the user has selected with joy_gethat.
- You can only use one hat per Wiimote. This means that if you plug in your Nunchuk to the Wiimote, the Wiimote pad will be disconnected and the Wiimote pad will be mapped, instead. This seems to be a software limitation either in SDL or in wiiuse. (This point must be reviewed).
- You'll need a relatively recent version of the Homebrew Channel. Older versions are known to cause trouble.
- Your games will look better if your Wii screen is configured @ 50Hz.
Once you've made sure that your game is working with the official BennuGD version and doesn't use any of the modules not yet integrated, you can start working on the Wii version for your game.
If you've taken the points above into consideration, things will work more or less flawlessly.
To compile:
- Copy your game folder -with sources- to a folder named "APPS" at the root of your SD Card.
- Insert your SD Card into the Wii.
- Enter the homebrew channel and ensure it's connected to your local network.
- Set the WIILOAD environment variable as explained in the Wiiload wiki page.
- Send bgdc.elf to the Wii console with the arguments being the full path to you game main source code file. If using wiiload from a console, this'd be:
wiiload bgdc.elf /APPS/mygame/main.prg
- If everything is OK, Bennu will create a file named /APPS/mygame/main.dcb.
To run your game. You can either:
- Run it from your computer using wiiload by executing:
wiiload bgdi.elf /APPS/mygame/main.dcb
- Copy the file bgdi.elf to your game folder in the SD card and rename it into boot.elf (in the above example, the full path would be /APPS/mygame/boot.elf) and then rename the dcb file to "boot". You should now be able to run the game directly from the Homebrew Channel menu. To know more about how to make your app look nicer in the Homebrew Channel (have the HBC display your own icon and description) please read this.