Line 54:
Line 54:
<source lang="python">
<source lang="python">
import Wii
import Wii
−
sysmenu = Wii.NUS.download(0x000000010000002)
+
sysmenu = Wii.NUS.download(0x000000010000002, 289)
sysmenu[0] = open("patch.bin", "rb").read()
sysmenu[0] = open("patch.bin", "rb").read()
sysmenu.tmd.setTitleID(0x0000000100000003)
sysmenu.tmd.setTitleID(0x0000000100000003)
sysmenu.tik.setTitleID(0x0000000100000003)
sysmenu.tik.setTitleID(0x0000000100000003)
sysmenu.dumpFile("patched.wad")
sysmenu.dumpFile("patched.wad")
+
</source>
+
+
Unpacks the first command line argument U8 archive to the folder "unpacked":
+
<source lang="python">
+
import Wii, sys
+
u8archive = U8.loadFile(sys.argv[1])
+
u8archive.dumpDir("unpacked")
+
</source>
+
+
Converts the png as the first argument to a TPL saved in "out.tpl":
+
<source lang="python">
+
import Wii, sys
+
TPL(sys.argv[1]).toTPL("out.tpl")
</source>
</source>