compiling svn

Subforum for discussion and help with ScummVM's Nintendo Wii port

Moderator: ScummVM Team

Post Reply
obcd
Posts: 19
Joined: Tue Nov 09, 2010 10:09 am

compiling svn

Post by obcd »

I am new here. Please don't shoot me right away.
I am having trouble to get some humogonous games running in scummvm-wii. They run fine on the windows version of the program. The problem is that the in game arrow isn't visible. It happens in several Freddi Fish games.
There has been some talking about it in this forum, but there was no solution. So, I decided to take a look at the code myself to see if I could find the issue and learn more about Wii programming at the same time. I looked at the tutorial in the wiki, but it seems a bit outdated. So, here are a few of my questions.

1. The compiler tools seem to have changed from powerpc-gekko- to powerpc-eabi- . Can I compile the sources with the powerpc-eabi- tools? Most makefiles still refer to the older toolchain.

2. The older sources had a makefile in the backend\platform\wii. That one made make in a command window work. The newer svn sources only contain .mk files, and assume you run a ./configure --host=wii to set up the build environment. I tried this under Msys, but it simply doesn't work.

3. The wiki describes the use of a different fork of the libogc and the libfat library. If you click the link, you come on a site which has several versions of this fork. It's totally unclear what version you need for the scummvm project. The libogc differs seriously in size from the version that comes with devkitpro.

So I took the makefile from one of the older projects, and added it to the wii folder. I adjusted the o files in it to those in the folder (the cpp files). I changed all references to powerpc-gekko in powerpc-eabi. I created a new scummvm lib folder under devkitpro and referenced the makefile to use that lib folder. I compiled the libogc, libfat and libgxflux fork and placed the resulting lib's in the new libscumm folder. I also had to modify the backend\fs\wii makefile as it didn't add the platform specific fs file to the compilation. The compilation run's fine, but the linking gives some errors of unresolved externals on the ps-guMtxIdentity, the ps-guMtxTrans, ps-guMtxConcat and guOrtho function. I googled for those, but can't find out in which library I should find them. The unresolved externals are all in the libgxflux library. I tried linking to the normal libogc, but the errors remain. (I recompiled the libgxflux to that library as well.) I also noticed that the special fork of libogc came without header files. I used those of the devkitpro libogc.

4. Where am I suposed to find those missing functions?

Sorry for the long post. I hope it might be usefull for others trying to compile under windows as well. If I succeed, I might prepare a package with all the correct lib's and modified makefiles to ease things for others trying to get it compiled in a windows environment.

Thanks in advance for anyone helping me out of the twilight zone.
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Re: compiling svn

Post by fingolfin »

Hi there. I am not involved much with the Wii port. Note that you may want to email the author of the wii port, Andre Heider alias dhewg directly (pointing him to this thread, maybe), as I am not sure whether he reads here regularly or not.
obcd wrote:1. The compiler tools seem to have changed from powerpc-gekko- to powerpc-eabi- . Can I compile the sources with the powerpc-eabi- tools? Most makefiles still refer to the older toolchain.
That wiki page really should specify which devkitPPC version it refers to!
The compiler page states that we use devkitPPC r16 -- this is not the latest, but it's difficult to keep track of the devkitPro folks, they keep out releasing new stuff that breaks backward compatibility; so if we update to a newer version, then *everybody* needs to upgrade to that, too.

Anyway, just download r16, that should work fine (it definitely does on our buildbot).
obcd wrote:2. The older sources had a makefile in the backend\platform\wii. That one made make in a command window work. The newer svn sources only contain .mk files, and assume you run a ./configure --host=wii to set up the build environment. I tried this under Msys, but it simply doesn't work.
Custom Makefiles for ports are deprecated, using configure is usually the way to go, yeah.

The wii host mode assumes a powerpc-gekko-* compiler chain. Maybe that's the problem you had? If not, please give us some more details, i.e., in which way does it not work?
obcd wrote:3. The wiki describes the use of a different fork of the libogc and the libfat library. If you click the link, you come on a site which has several versions of this fork. It's totally unclear what version you need for the scummvm project. The libogc differs seriously in size from the version that comes with devkitpro.
Hm, no idea about that :(. Yeah, the instructions should be clearer. All I can do is tell you that the libogc.a we use to make the daily builds is 2292128 bytes and has MD5 3ca381640fa5621eff0ea033412e2572. And libfat.a is 233878 bytes and has MD5 3ea66a7f0e3ccc29f6d57c819252a188. Maybe that'll help you identify the right version.
obcd wrote:4. Where am I suposed to find those missing functions?
In our buildbot setup, guMtxIdentity is declared in libogc/include/ogc/gu.h and there are references to it in libogc/lib/wii/libgxflux.a and in libogc/lib/wii/libogc.a


Hope that helps a little bit at least.
User avatar
Red_Breast
Posts: 773
Joined: Tue Sep 30, 2008 10:33 pm
Location: The Bar Of Gold, Upper Swandam Lane.

Post by Red_Breast »

I compile my own Linux builds (and have compiled for Windows) but as I use ScummVM for Wii sometimes as well I've tried building ScummVM for Wii but always got into a mess. That was before the buildbot and now that's set up I've never had any reason to try again.
You probably have more chance talking to dhewg on irc. I can't remember the name but it's the one that most of Team Twiizers use.
Are you the obcd from XBox-Scene forums? That obcd helped me a lot a few years ago.
obcd
Posts: 19
Joined: Tue Nov 09, 2010 10:09 am

Post by obcd »

Thanks for the answers guys.
@Red_Breast yep, it's the same obcd. My daughter likes the wii more than the xbox, so I have to follow.
I am aware of the different devkit versions and the problems that arise when you compile with a newer version. The ds tools suffer from the same problem.
I appreciate the work they put in to get the libs mature, but it's fustrating if you try to compile some existing code to learn how things work.
I think my problem with the missing functions is due to the fact that the gu.h isn't in the gfx.c code from the libgxflux source.
The functions are defined in that header file.
Some define seems to allows you to choose between the ps_guMtx.. and the c_guMtx..
I just don't get why this gu.h file isn't in. I will try further when I find a little more time and will post my results asap.
I guess buying an usb gecko will be the next on my todo list if I can find one somewhere. The site www.usbgecko.com still exists, but it still looks a little like a fake to me. Anyone has done buisiness with them recently?
User avatar
Red_Breast
Posts: 773
Joined: Tue Sep 30, 2008 10:33 pm
Location: The Bar Of Gold, Upper Swandam Lane.

Post by Red_Breast »

Hi there. I can well understand your daughter likes the Wii along with Humongous games. A number of people here play them with their kids. As the last Xbox build was 0.11 (although hopefully that will change) it won't be able to play the games that have been added since anyway and I imagine that kids prefer the Wiimote as well.
I never got a USBgecko myself. They're mainly used for debugging right? Or adding cheats.
Dhewg is really the person you need to track down. He doesn't totally ignore this forum though and he'll probably see this post eventually.
I wish I could help you more but I don't really understand any of it. I basically compile my own for Linux because the operating system is so easy to compile on. I just update my source trunk folder and enter a few commands - there's hardly any difference to it and downloading a build.
User avatar
Axel
Posts: 41
Joined: Fri Jul 24, 2009 6:17 pm

Post by Axel »

Send a PM to dhewg, I have done so in the past. He's comes to this forum regularly, but does not always have the time to read all posts.

I am sure he will reply to your PM. He's a really nice guy and is very supportive on this kind of stuff.

Best regards.
obcd
Posts: 19
Joined: Tue Nov 09, 2010 10:09 am

Post by obcd »

I finally managed to compile the svn for wii under windows thanks to the help of Wintermute.
I made a small document with all the steps that need to be taken.
I am just waiting for his approvement to publish it, as he did all the hard work after all.
It compiles with all the most recent versions of the used libraries and with the most recent devkitppc.
I never would have succeeded without his help, and hope to be able to help others trying to do the same.

I also would like to thank Axel and Red_Breast for taking their time to help me out.
User avatar
Red_Breast
Posts: 773
Joined: Tue Sep 30, 2008 10:33 pm
Location: The Bar Of Gold, Upper Swandam Lane.

Post by Red_Breast »

I'd like a copy of your version when ready.

I'm not faulting the wiki version but as I've said already I get into a mess whenever I've tried compiling. I don't know if that's because of something in the wiki or not.

One thing I do find generally with compiling guides online is that they seem to be made for people familiar with compiling already. I didn't even know what configure and make were the first time I tried it.
I came across a great 'compiling for dummies' guide somewhere once but didn't bookmark it and now I can't find it. It would be a great page to point to for all these guides that start by assuming you know the basics.
Post Reply