From WiiBrew
Jump to navigation Jump to search


could someone try porting FoF? it is written in python Calthephenom 19:35, 19 August 2009 (UTC)

Uh...see WiiPy, this is just a library for PC programs. Xuzz 21:04, 19 August 2009 (UTC)


Some tutorial for the basic stuff is needed like how to read the titleid of a wad and stuff like that

I need help please :(

I am trying to play about with some stuff, but I'm having some difficulty. Basically what I want to be able to do is-

  1. Unpack WADs
  2. Extract U8 archives
  3. Pack WADs

I am trying to use pywii\ to unpack a WAD, but its not working. I get this error:

C:\Documents and Settings\Inspiron 6000\My Documents\Homebrew\Wii\Tools\\icefire-Wi>
Usage: python <input> <output> ...

C:\Documents and Settings\Inspiron 6000\My Documents\Homebrew\Wii\Tools\\icefire-Wi> staticbase.wad staticbase
Traceback (most recent call last):
  File "C:\Documents and Settings\Inspiron 6000\My Documents\Homebrew\Wii\Tools\\ic\", line 10, in <module>
AttributeError: 'Title' object has no attribute 'unpack'

I already moved the script so its in the same directory as the script I have Python, PIL, PyCrypto and wxPython all installed. What's wrong, and can I fix it? Thanks. --SifJar 19:00, 17 October 2010 (CEST)

Just playing with this a bit since you mentioned it... first get the latest version from git with 'git clone' then I think the thing is these are source codes that are meant to be incorporated into python code of your own. I was able to use the to convert a bns file to wav with 'python -d sound.bin out.wav'. But I had no quick luck unpacking a U8 archive, the example doesn't work, I get an error where U8 is not defined. Dashxdr 23:08, 17 October 2010 (CEST)
ETA: Fixed the U8 unpack example at least... Dashxdr 23:11, 17 October 2010 (CEST)
ETA: Added example of unpacking a WAD file. Dashxdr 23:18, 17 October 2010 (CEST)
Thanks, they're working well. I'll try and work out WAD packing, and add it if I can work it out :p. BTW, I feel its perhaps better to have "sys.argv[2]" as the second argument, so that the user can choose the folder to unpack to. But I guess that's down to personal preference, and a programmer should be able to modify it accordingly. Thanks again. --SifJar 21:12, 18 October 2010 (CEST)
I tried WAD packing, but I can't get it to work. Here's what I got so far:
import Wii, sys

if(len(sys.argv) < 3):
	print "Usage: python <input> <output> ..."

wadf = Wii.WAD.loadDir(sys.argv[1])
I had a look at your code, and I couldn't really see where the "loadFile" function came from? I dunno, perhaps I should learn Python a little before attempting this :p --SifJar 21:23, 18 October 2010 (CEST)
I'm out of town on a work project, so can't offer much help except advice. I'm not an expert at python at all, just messed with the code a bit to get it working. I did notice that those tools fail on some files. I've got some unpacking of WAD files working with 'c' tools I'm putting together, and my unpacked files match the SHA1 sums perfectly, but I'm not sure if's do. As an example, I've unpacked a Wad with and then tried to unpack a U8 file, and errored out. But the U8 unpack worked fine on my unpack of the same wad. So my take is WAD support is iffy, but the U8 support seemed better. Dashxdr 02:38, 19 October 2010 (CEST)