Open main menu

Difference between revisions of "Compiling ScummVM/Wii"

182 bytes added ,  23:50, 23 December 2008
m
no edit summary
(wii build instructions)
 
m
Line 11: Line 11:
= Mandatory tools and libraries =
= Mandatory tools and libraries =


* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation to set it up
* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation how to set it up
* libogc and libfat
* libogc and libfat


Line 20: Line 20:
* libogc's <tt>malloc()</tt> has been [http://git.hackmii.com/git.php?tag=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&p=libogc.git&a=commitdiff&h=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&hb=28e632dab2820a98ea3399e3090761581f034df7&tm=1366734 modfied] to utilize [http://wiibrew.org/wiki/Memory_Map MEM2]. Without this patch, a single binary with all game engines won't be able to run all games (like COMI) due to memory limits
* libogc's <tt>malloc()</tt> has been [http://git.hackmii.com/git.php?tag=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&p=libogc.git&a=commitdiff&h=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&hb=28e632dab2820a98ea3399e3090761581f034df7&tm=1366734 modfied] to utilize [http://wiibrew.org/wiki/Memory_Map MEM2]. Without this patch, a single binary with all game engines won't be able to run all games (like COMI) due to memory limits
* libfat gained a read-ahead cache, without it video sequences will stutter
* libfat gained a read-ahead cache, without it video sequences will stutter
If you're going to use the git repository, use my branches (''origin/dhewg'') for now, that's what i'm using.


Nevertheless, ScummVM should build just fine with either versions.
Nevertheless, ScummVM should build just fine with either versions.
Line 37: Line 39:
== Precompiled binaries ==
== Precompiled binaries ==


Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like <tt>$DEVKITPRO/3rd/wii/include</tt>, <tt>$DEVKITPRO/3rd/wii/lib</tt> and so on.
Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like
<tt>$DEVKITPRO/3rd/wii/include</tt>
<tt>$DEVKITPRO/3rd/wii/lib</tt>
and so on. The binaries will work on Wii and Gamecube.


== Build the libraries yourself ==
== Build the libraries yourself ==
Line 63: Line 68:
  echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"
  echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"


Save it to a file (like <tt>gekkoenv.sh</tt> and run
Save it to a file (like <tt>gekkoenv.sh</tt>) and run


  . ./gekkoenv.sh
  . ./gekkoenv.sh
Line 157: Line 162:
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:


* There is no support for dynamic libraries on the Wii, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line
* There is no support for dynamic libraries on the Wii or Gamecube, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line
* Vanilla scalers do not work, the code is i386 only
* Vanilla scalers do not work, the code is i386 only
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc
* MPEG2 support has been dropped from the Wii port, if you want supports for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]
* MPEG2 support has been dropped from the Wii port, if you want support for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]


When you're done with the <tt>Makefile</tt>, save it and run <tt>GNU make</tt>. That's it, the build system is now building an ''.elf'' and a ''.dol''.
When you're done with the <tt>Makefile</tt>, save it and run <tt>make</tt> (GNU version). That's it, the build system is now building an ''.elf'' and a ''.dol''.


Test the ''.dol'' by uploading it using ''wiiload'' via:
Test the ''.dol'' by uploading it using ''wiiload'' via:
24

edits