Welcome! Log In Create A New Profile

Advanced

Porting SDL software to the Wii when you have the source code

Posted by BlackKnight 
Porting SDL software to the Wii when you have the source code
August 16, 2012 01:30AM
I am learning how to program, and I thought for my first project would be a simple port of Exult (Ultima VII engine) to the Wii. I have the source code, and I have the SDL libraries from WiiBrew...but I am lost. All I see is a mess of folders and files.

Which is the file to edit to deal with controls
How do I compile the files to work on a wii?
Can I set up controls to use both the Wiimote and the Classic Controller at the same time, like use the Wiimote as a mouse and the controller as something as strange as a controller?
Re: Porting SDL software to the Wii when you have the source code
August 16, 2012 11:23PM
This is kind of vague, so I am only guessing what you mean.

Quote
BlackKnight
How do I compile the files to work on a wii?

If there are no makefiles supplied for the Wii, you have to create them yourself and compile them using the devkitpro toolchain.

Quote
BlackKnight
Which is the file to edit to deal with controls

You have to read the source code to see how/where controls are being dealt with.

Quote
BlackKnight
Can I set up controls to use both the Wiimote and the Classic Controller at the same time, like use the Wiimote as a mouse and the controller as something as strange as a controller?

SDL Wii supports Wiimote and Classic Controller so this should be possible. Don't take my word for it, I haven't used SDL myself.
Re: Porting SDL software to the Wii when you have the source code
August 19, 2012 03:31AM
I think you'd need some basic programming skills first. Ultima VII engine sounds like something 'not so simple' so I doubt it would execute out of the box if you could get it compiling on WII. So if you currently don't have any coding knowledge, start on something else!

Perhaps a good approach to port stuff is to start with a small, working program as base for your port. Perhaps a working SDL WII example (with Makefile that works with DEVKIT PRO) in your case. Then find the main function in the game code and start moving stuff to your working example's main function. You could stub some of the game's functions so you can 'inject' small pieces of game code and then run the app again to see if it performs as expected. If you introduced an issue you'll find it quickly since you just added that code.

Also you need to create a good environment to debug your stuff or allows you to trace the code as you can't really debug remote. Basically this is the first reason why your case isn't really suited for learning to program as there is so much other crap to cope with.

Really If I was you I'd try to compile and get it to run on its native platform first, find the places where the code refers to video, sound and input APIs (ok, perhaps less trivial with SDL), learn how it works, make the code traceable and THEN start thinking about a Wii port.
Re: Porting SDL software to the Wii when you have the source code
August 23, 2012 08:16PM
You can start looking at this program I ported to Wii

[wiibrew.org]

This is the code:

[code.google.com]

You can use the same MAKEFILE with some small adaptations:

[code.google.com]

You should also read this page:

[wiibrew.org]

and you should also read how to use SDL here:

[www.libsdl.org]

There is also an HTML manual provided with the SDL source code.
Sorry, only registered users may post in this forum.

Click here to login