Archive for August, 2008

Tutorial 4: Cursors

Sunday, August 31st, 2008

In this fourth Wii programming tutorial, I will cover displaying a cursor by drawing a small square, movement of the cursor and then using the Wii IR to move the cursor. Before reading this tutorial I’m assuming you have picked up a few things and therefore I won’t be re-explaining the common code in the zip file or initial steps in detail. You can grab the PDF of this tutorial here: codemii-tutorial-4

Firstly download this tutorial4-blank which will contain the required files to get us started. Extract this zip file in C:\devkitPro\examples\gamecube. Open up tutorial4.pnproj and then click on main.c to show the source code.

From tutorial 3, we know how to incorporate the controller in our source code, so now all we need to use a cursor in our application, is to draw one. The source code below is our drawing functions. I’m not sure whose code it but thanks to the person whom made it.
(more…)

HBB Updated Applications

Thursday, August 28th, 2008

The following applications have been added/updated:

  • Genesis Plus updated to v2008.08.26
  • MadQuiz updated to v0.02b
  • SMSPlus updated to v2008.08.26
  • Wiiship updated to v0.6.1
  • Uno updated to v12
  • WiiPhysics updated to v2.1
  • Wii Shooting Gallery updated to v1.4
  • Wii Solitaire updated to v0.4

Progress on HBB v0.2.2

Wednesday, August 27th, 2008

I haven’t really had much time to work on updating the Homebrew Browser, but am hoping to perform the following changes to it:

1. When deleting applications, delete all files in the directory being deleted: Right now only the files that are downloaded are deleted which sometimes leads to some applications been unable to be deleted. This is because some applications have a configuration file or a save file. In this version of the HBB, the HBB will do a directory listing on the folders and remove each file listed. [Completed]

2. Fix or change the way the IR cursor works. I believe that there is some code from Wil’s Solitare game that should be able to help me to fix the IR correction issue. If that code doesn’t help then I’ll put the IR correction option elsewhere. [Completed]

3. The D-pad left and right will control the categories. [Completed]

4. Put some information about this website and the Wii message notifications that you can sign up for. [Completed]

5. Make loading HBB even faster by downloading images in real time. This means at the start you will still see the black screen, but only until it downloads the homebrew list. It will then load the graphical interface and proceed to download the first 6 images. If you decide to change categories or change pages, it will download the new 6 images which will be displayed. Images will still be cached as usual. [Completed]

There is a bug in v0.2.1b which either gives you a code dump or corrupted images when loading HBB for the very first time. I haven’t been able to find the reason of this bug, but it does seem to happen when you download a certain number of images. This bug is currently present in this v0.2.2 development version and only will occur if you view all the games, emulators and media categories and then try to view the utilities category it kicks you back to the HBC.

Tutorial 3: Controller input

Sunday, August 24th, 2008

Welcome to the third Wii programming tutorial that will cover the gamecube/Wii controller interaction and using gcube. I’m going to assume that you’ve read the previous 2 tutorials. You can grab the PDF of this tutorial here: codemii-tutorial-3

Firstly download this tutorial3-blank zip file which will contain some standard source code, the makefile and the programmer’s notepad project file. Extract this zip file in C:\devkitPro\examples\gamecube. Open up tutorial3.pnproj which is the programmer’s notepad project file, expand the source directory and then click on main.c to show the source code.
(more…)

HBB Updated Applications

Sunday, August 24th, 2008

The following applications have been added/updated:

  • DVDx Installer v1.0
  • Jewel Quest updated to v1.0.3
  • MadQuiz v0.02
  • MahJongg Wii updated to v0.3
  • MPlayer rev27458
  • Quake updated to v0.03
  • WiiDoom v0.1.1
  • Wii Shooting Gallery v1.1

Edit: Added DVDx Installer and MPlayer

HBB Updated Applications

Friday, August 22nd, 2008

The following applications have been added/updated:

  • Mii Extractor v1
  • Mii Installer v1
  • Save Extractor v2
  • Save Installer v2
  • Uno updated to v11
  • WiiMPC v0.1
  • Wiiship v0.5
  • Wiitube v0.01

HBB Updated Applications

Sunday, August 17th, 2008

The following applications have been added/updated:

  • DragonMedia Player updated to v0.16 Alpha
  • Freecell updated to v0.2
  • ftpii updated to v0.0.13
  • MPlayerWii updated to v0.05
  • Uno updated to v10
  • Wii Web Server updated to v0.82 Alpha

Tutorial 2: Makefiles, basics of C, compiling source code and dealing with errors

Saturday, August 16th, 2008

This second tutorial will cover makefiles, a very basic run down of the C programming language, compiling source code using the template examples found in DevKitPro and dealing with compiling errors. This tutorial came out way longer than I expected and I’m hoping to keep other tutorials shorter than this one. You can grab the PDF of this tutorial here: codemii-tutorial-2.

When you’re compiling source code, the program that does the compiling needs to know what to compile, which libraries to include, compiling options, optimisations, etc and this is what a makefile is used for.

(more…)

HBB Updated Applications

Thursday, August 14th, 2008

The following applications have been added/updated:

  • DragonMedia Player updated to v0.15 Alpha
  • Freecell v0.1
  • Guitar Fun updated to v3.0
  • ScummVM updated to Rev 33789
  • txt-read v1.0

Tutorial 1: Setting up the environment

Sunday, August 10th, 2008

This is the first tutorial of programming for the Wii and it will cover setting up our environment. These tutorials will be as detailed as I can make them and will try to cover different programming subjects. You can grab the PDF of this tutorial here: codemii-tutorial-1.

Our first step in order to code for the Wii is to set up the programming environment and for this we are required to download DevKitPro. DevKitPro is a compilation of compilers, useful applications and example source code which will all be set up for us at a click of a button. For those wondering what a compiler is, a compiler is an application which can convert our code into a machine executable format.

So let’s go to www.devkitpro.org, select Downloads then select Windows Installer. This will take you to the sourceforge devkitpro page where you should click on the .exe file to download it. At the time of writing this tutorial it is devkitProUpdater-1.4.7.exe. Save the file somewhere on your computer and then run it.

Once in the installer, say yes to downloading and installing files and yes to keeping the files we download. When it gets to the screen where it’s asking you which components you want to install, you only need to check the minimal system box, devkitPPC box and Programmer’s notepad box. PPC (PowerPC) is the computer hardware which our compiler will compile our source code to. Leave the installation directory as c:\devkitpro.

So now we’ve set up the programming environment which was pretty simple wasn’t it?

I will give you a run down of the things included in DevKitPro that will be useful for us.

Firstly we have Programmers Notepad (devkitpro/Programmers Notepad) which is where we will be writing our code in. Programmers notepad makes things a whole lot easier for us by using syntax highlighting, showing line numbers, grouping files into a project, etc.

The next application we have is called gcube (devkitpro/emulators/gcube) which is a gamecube emulator. This application is quite handy as you can test most of the code that you develop on it. I find it much easier when writing code to test things out on gcube instead of having to turn on the Wii and test it that way. I used gcube to test out the two homebrew games that I made, which were Simon and Matching Cards.

The last thing that is handy is the gamecube and Wii example source code (devkitpro/examples). The source code gives us a template which we can start our applications on. Example source code for the gamecube includes how to access the dvd, memory card, network, etc.

In the next tutorial I’ll cover Makefiles, compiling your first source using the template example, dealing with errors and a very basic run down on the C programming language.