Hacking Feature request for WIT (a tool of the WWT package)

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
What is WIT?

wit (Wiimm ISO Tool) is part of the package WWT.

Features:
  • wit (and the whole WWT package) is available for Linux, Windows and Mac. Current sources are always in a SVN repository.
  • It can handle ISO images in the 4 file formats PLAIN ISO, WDF, CISO and WBFS. Splitted files are used transparently.
  • It can convert from each of the 4 formats into all other formats.
  • Scrubbig and splitting on the fly.
  • Renaming ID and title in the ISO header.
  • Comparing ISO in raw and scrubbed mode.
  • Renaming ISO files using WiiTDB titles.
  • Dump the data structure inside ISO images.
What are my plans?

My plans are in this order:[*] wit should extract all or only selected files from ISO images to a destination directory. It should support output formats that other tools (like SNEEK) need.[*] wit should built ISO images from a file structure.[*] wit should merge an ISO image with extracted (and modified files) to a new ISO image.[*] wit should compare ISO images on file level and, if wanted, generate a (binary) patch file.[*] wit should patch ISO images with the previous generated patch file.Already realized
  • wit can list all files of WII ISO files.
  • wit can extract the files all or only selected files from ISO images to a destination directory. It support the sneek file layout.
  • wit accept rules to filter files for all commands above.
  • wit can compose an trucha signed ISO image from a file structure.
  • wit can compare ISO images on file level.
  • wit can decrypt and encrypt ISO images on the fly while copying.
  • wit can verify ISO images (find bad dumps). It do it by calculating all check sums and comparing them with the stored hash values (H0..H4).
Brain storming and feature request!


And now I asked you for ideas? Inspire me!

I need also references about file system layouts (e.g. for sneek). I know that there are some archives (collection of much small files). I need technical info about this too.
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
does the ID changing affect the ticket? currently the only way to change the ID in the ticket, and thus the folder the game will use for a gamesave, is with wiiscrubber & the partition.bin editor. if youre just looking for features to add, it would be nice to be able to change the save spot for a game with 1 little command rather than to have to extract the partition.bin, change the stuff, and put it back in the ISO.

for the sneek layout, here's the basic layout...
each partition of a ISO is put in its own folder. in that folder is the ticket, TMD, cert, and 2 more folders.
one of those 2 more folders is called sys and it has the main.dol, apploader, fst, boot.bin, and bi2. the other folder is called files and it contains everything described in the fst. look at the spoiler in post 136 http://gbatemp.net/index.php?showtopic=217092&st=135
 

Blue-K

No right of appeal.
Member
Joined
Jun 21, 2008
Messages
2,572
Trophies
0
Location
Helvetica
XP
209
Country
Swaziland
Well, I can't think of anything more I would like...sounds awesome
smile.gif
.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
giantpune said:
does the ID changing affect the ticket? currently the only way to change the ID in the ticket, and thus the folder the game will use for a gamesave, is with wiiscrubber & the partition.bin editor. if youre just looking for features to add, it would be nice to be able to change the save spot for a game with 1 little command rather than to have to extract the partition.bin, change the stuff, and put it back in the ISO.This is a nice idea.

QUOTE(giantpune @ Apr 17 2010, 01:14 PM) for the sneek layout, here's the basic layout......
Where can i find you disc dumper?
It would nice to have it to compare the wit output against yours.
 

xander150

Well-Known Member
Member
Joined
Oct 12, 2009
Messages
112
Trophies
0
Website
Visit site
XP
162
Country
Gambia, The
nicksasa said:
extracting into right file structure is easy, my app already does that, 1 look @ the page on sneek wiki
Yes, it is easy, many apps do it, you are not the first/only one
tongue.gif
And Wiimm knows how to extract files, the question was just which folders are needed to get it compatible with sneek.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
xander150 said:
nicksasa said:
extracting into right file structure is easy, my app already does that, 1 look @ the page on sneek wiki
Yes, it is easy, many apps do it, you are not the first/only one
tongue.gif
And Wiimm knows how to extract files, the question was just which folders are needed to get it compatible with sneek.
I'm searching an other extract application to confirm my work.
 

nicksasa

Well-Known Member
Member
Joined
Oct 25, 2008
Messages
1,410
Trophies
0
XP
79
Country
Belgium
use YSO ? then you can compare the files. idk any other apps that do it (because i don't use it i guess)
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
@nicksasa
Is it so difficult to send me a executable of your tool?
Comparing the identical results of 2 or more tools is the easiest verification for that tools.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
nicksasa said:
xander150 said:
There is just a Windoze exe available in his post: http://myfail.net/download.php?id=YSO.zip&...&force=true
Such a tool is just fail if it's not open source as only windows noobs can use it (without wine and such things)
Nobody asked for the source so ...
... it's time for me to ask, because in the moment i don't know how to extract all the files in sys/.

@xander150:
Thanx for the link.
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
boot.bin is a constant 0x440 bytes at the start of the partition.

bi2.bin is 0x2000 bytes right after the boot.bin

the apploader.img follows directly behind that. read the apploader header to get the size. ( http://code.google.com/p/usbloader-gui/sou...der/apploader.c line 366 )

you get the fst.bin size and offset and the main.dol offset from reading the last 0x20 bytes of boot.bin. shift the offsets max)
ÂÂÂÂÂÂÂÂÂÂÂÂmax = offset + size;
ÂÂÂÂ}

ÂÂÂÂ// iterate through the 11 data segments
ÂÂÂÂfor (i = 0; i < 11; ++i) {
ÂÂÂÂÂÂÂÂoffset = be32 (&header[0x1c + i * 4]);
ÂÂÂÂÂÂÂÂsize = be32 (&header[0xac + i * 4]);
ÂÂÂÂÂÂÂÂif (offset + size > max)
ÂÂÂÂÂÂÂÂÂÂÂÂmax = offset + size;
ÂÂÂÂ}

ÂÂÂÂreturn (max);
}[/spoiler]
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
wit EXTRACT is now ready. I have compared the output with "yso" and "wii-scrubber" and all seems ok.
wii-scrupper only creates the additionally file "banner.tpl". What's that?

@giantpune
giantpune said:
then calculate the main.dol size by reading the first 0x100 bytes and checking the size of each section. heres the code from wiiscrubber. its not the prettiest, but it works.
Indeed, it is not the prettiest code. For example there is no need for 2 loops. This is my code:
CODEÂÂ// iterate through the 7 code + 11 data segments
ÂÂfor ( i = 0; i < 7+11; i++ )
ÂÂ{
ÂÂÂÂconst u32 size = be32(buf+i*4) + be32(buf+0x90+i*4);
ÂÂÂÂif ( dol_size < size )
ÂÂÂÂÂÂÂÂ dol_size = size;
ÂÂ}
The code example helped my to save time. Thanx again.

@nicksasa
Do you know that "yso" have a problem when extracting "ALL PARTITIONS"?
All partitions are extracted to the same directory and some files of prior partitions are overwritten.
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
my guess about banner.tpl is that it is only for gamecube games. there is a certain chunk of the opening.bnr for GC games that you can read and slop a header on and it will be a tpl.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • The Real Jdbye @ The Real Jdbye:
    i like that idea
    +1
  • Veho @ Veho:
    What's the same thing?
    +1
  • The Real Jdbye @ The Real Jdbye:
    before or after a hit
    +1
  • Veho @ Veho:
    Nah, a hit gives them mad meth powers, but makes them more difficult to control.
    +1
  • Veho @ Veho:
    Before a hit they're like zombies, persistent but slow.
    +1
  • Veho @ Veho:
    It's a tradeoff.
    +1
  • The Real Jdbye @ The Real Jdbye:
    no i mean, before a hit is after the previous hit
    +1
  • The Real Jdbye @ The Real Jdbye:
    if you keep them well enough fed, it's the same thing
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    By the power of Florida Man, I have the power!!! *Lifts up meth pipe* Meth Man!!! lol
  • BakerMan @ BakerMan:
    Guys, I just learned my little brother is in the hospital because he had a seizure last night.
  • cearp @ cearp:
    Sorry to hear that BakerMan
    +2
  • BakerMan @ BakerMan:
    Just found out he's doing alright, doing a lot of complaining too, rightfully so. Who wouldn't complain after having a seizure and being hospitalized?
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Glad he is OK and complaining is cool :)
    +1
  • K3Nv2 @ K3Nv2:
    Yeah been there had that no fun
    +1
  • K3Nv2 @ K3Nv2:
    They'll give him sleep studies eegs and possibly one week hospital stay
    +1
  • BakerMan @ BakerMan:
    I hope it's not a week.
  • K3Nv2 @ K3Nv2:
    It's standard so doctors can get a idea about what's going on
  • BakerMan @ BakerMan:
    understood
  • BakerMan @ BakerMan:
    well, i'm glad he seems to be doing fine, and ig i'm going to start spewing goofy shit again
  • BakerMan @ BakerMan:
    Update: Turns out he's epileptic
  • K3Nv2 @ K3Nv2:
    Get a 2nd opinion run mris etc they told me that also
  • Psionic Roshambo @ Psionic Roshambo:
    Also a food allergy study would be a good idea
  • K3Nv2 @ K3Nv2:
    Turns out you can't sprinkle methamphetamine on McDonald's French fries
    K3Nv2 @ K3Nv2: Turns out you can't sprinkle methamphetamine on McDonald's French fries