Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

WiiScrubber: Difference between revisions

From GameBrew
No edit summary
No edit summary
 
Line 2: Line 2:
|title=WiiScrubber
|title=WiiScrubber
|image=wiiscrubber3.png
|image=wiiscrubber3.png
|description=A useful app that allows you to 'scrub' away the garbage data of Wii ISOs.
|description=A useful app that allows you to scrub away the garbage data of Wii ISOs.
|author=Dack
|author=Dack
|lastupdated=2009/02/14
|lastupdated=2009/02/14

Latest revision as of 13:05, 6 July 2024

WiiScrubber
Wiiscrubber3.png
General
AuthorDack
TypePC Utilities
Version1.4 with multiboot
LicenseMixed
Last Updated2009/02/14
Links
Download
Website

A useful app that allows you to "scrub" away unnecessary data from Wii disc images and replacing it with blank compressable data, so that in most cases the size of the compressed ISO is dramatically reduced.

In order to use the tool, the common key of the Wii must first be generated using the "MakeKeyBin.exe" program. The WiiScrubber only supports ISO images, not WBFS.

User guide

Companion software

  • Makewiikeybin. exe:
    • Make a key.bin file for you. Does not contain the actual key but generates it from a simple algorithm.
    • This was removed from the pack due to some twittering.
    • It is recommended to use hexd.exe. Version 1.1 also generates the Korean kkey.bin.
  • PartitionBuilder:
    • Allow you to generate a partition file that can be loaded via wiiscrubber.
    • This means you can now generate an entire partition from a directory of files.
    • So rather than changing one at a time you can extract an entire partition, change whatever files you want and then rebuild.
  • Partition.bin changer:
    • Allow you to view/modify the ticket, tmd, certs and h3.bin in one simple editing package. Allows trucha signing of ticket and tmd.
  • HBC Multiboot file:
    • Based on SoftChip, that allows you to select which partition to boot from. i.e. A multiISO loader.

How to use

What you need:

  • You will need a copy of the ubiquitous "key.bin" in the same directory.
  • For full functionality you also require the Korean "kkey.bin".
  • You should not need to install any extra runtime files.
  • A descrambled Wii ISO.
  • Plenty of disc space.
  • A fair bit of time.

How to use:

  • Copy the key.bin file to the same directory as the exe.
  • Load the software.
  • Load the ISO file by clicking on the "load iso" button.
  • What the program is doing appears in the bottom window.
  • Disc filelist appears in the top window as a standard treelist.
  • Name of game and size of the data on the disc appears in top right.

How to extract files:

  • Only one at a time at present.
  • In the treelist click on a file to select.
  • Right click the mouse button.
  • Select "Save" from the popup menu.
  • The fields on the filename shown are: name, partition, Offset into decrypted file, Filesize, file reference in FST (-ve means system file).

How to scrub the disc:

  • Click on the clean and save button.
  • Depending on the option chosen next to the clean button you will then save (a scrubbed file, a dif file or both files).
  • If the TRUCHA option is chosen then you will create several new files:
    • A dummy fst.bin.
    • A modified fst.bin containing links for the padding files.
    • Several files full of 0's that can be loaded into the modified image.
    • A modified boot.bin that is needed for the modified fst.bin to be accessed.

Options:

  • ISO - This creates a copy of the loaded ISO with the same name but (compress) appended to the name before the .ISO part (so SPM.ISO would become SPM(compress).ISO).
  • DIFF - This creates a Diff file of the differences between the loaded file and what a scrubbed one would contain. The filename used is the same as the savename but with .dif used instead of ISO.
  • BOTH - Does both ISO and DIFF, you will need a LOT of storage for this.

Compressing the scrubbed image should give you a figure close to the size of data detailed earlier. The DIFF file will not compress that well (due to it being the random data contained in the "empty" disk blocks.

Author's note

I've tried on quite a few files, checking the files that are then extracted and all seems correct. But no 100% guarantees can be made that the cleaned ISO will work.

What I tend to do is extract all the files from an uncleaned image using wiitools and then extract all the same files from a cleaned image and do a windiff on them to check for any irregularities. There is always the potential that Nintendo will start checking for these sort of changes in a firmware update. Just be aware.

FAQ

Q. What does it actually do?

It finds out where in the disc image the data is and changes the rest of the data to 0xFFs.

Q. And this does what?

It allows compression programs to then compress the image.

After you have run the software, in "classic mode", you can compress the resulting ISO and get a size similar to that indicated in the top right panel.

Q. What does the TRUCHA option do?

Well one of the other ways of overwriting the non-compressable empty space is by overwriting it with 0's.

This has the advantage of, since it is using TRUCHA, actually correcting the SHA tables.

Q. But TRUCHA won't work with IOS37 will it so it's a bit pointless?

Most likely BUT it's very much a case of wait and see. Changing the disc to boot directly instead of from the system menu would possibly still allow it to work anyways.

It was also a bit of development I was doing for multidisc. Some people haven't updated to IOS37 anyways. The downgrader also makes it worthwile.

Q5. Multidisc????

Since I know where the data is on the disc, and can add files, directories etc. It's only a small step to create an image that contains the files of several other ISO images.

I "only" need to finalise the "merge fst.bins while checking for duplicate filenames and relocating all the files in the second disc to the free space on the first disc" function.

The TRUCHA option adds 5 files to the image in the root directory and then maps their data to the free space. This is made even easier by the partition options now implemented as you could simply extract several partitions worth of data, merge the files and add on a loader/chooser.

I'll give it a week from when this software is released until a multidisc maker appears (change the main.dol names for each disc, put into seperate directories, modify the main.dols to use the new directories, have a menu on screen that allows you to choose and run the different (renamed) main.dols).

Q. How do I scrub a disc normally?

You can only do this if you have a copy of the key.bin file in the same directory as the software.

Depending on whether you want to create the DIFF file then make a selection from ISO, DIFF or BOTH A DIFF file is a copy of the data that was "scrubbed" from the ISO and allows you to unscrub at a later date if you so wish.

Depending on whether you want to maintain the header information then choose either YES or NO from the keep headers block. Given the ease of checking sha tables it's probably a bit pointless keeping them and adds 1k per cluster to the storage if you do (about an extra 150Meg over a disc image)

Depending on whether you want to do TRUCHA scrubbing or normal then chose 0xFF or TRUCHA from the scrub type box.

0xFF Mode:

  • Click on "open ISO".
  • Wait for it to be parsed. If all looks OK then click on "clean and save".
  • You will be prompted for where to save the file. Choose a path and name - it is recommended using a different drive to the source ISO.
  • Confirm your selection from the pop-up prompts.
  • Wait until it says it's finished.
  • Compress the newly created file with whatever archive software you want.

Trucha Mode:

  • Click on "open ISO".
  • Wait for it to be parsed. If all looks OK then click on "clean and save".
  • You will be asked to confirm you want to save the file.
  • Empty files and a replacement fst.bin, a fake fst.bin and a replacement boot.bin are created in the same directory as the ISO.
  • Wait until it says it's finished.
  • Follow the instructions in the final pop-up.
  • Compress the newly created file with whatever archive software you want.

Q. Why cant I create files bigger than 4Gig?

You have the destination partition formatted to FAT32 which only allows files upto 4Gig in size.

Q. How do I Save a file from an ISO?

Open the ISO and then right hand click on the file in the disc display. Then choose "extract" from the pop-up menu.

Q. How do I load a file?

Load the ISO and choose "replace" from the pop-up menu. If a file is bigger than the one originally there then the software will try and relocate it to another part of the disc image that does have enough space to accommodate it and the update the fst.bin or boot.bin accordingly.

Q. Does Load work on Gamecube discs?

No. As all the work is based around encrypted partitions.

Q. What is the point of deleting a partition?

That allows you to delete, for example, an update partition from the disc image. Effectively it then functions in a similar manner to having "brickblocked" it.

It has the added advantage of not including any Nintendo firmware image and knocks a bit more off the scrubbed ISO size.

Q. Why would I need to resize a partition?

Some ISO images have a partition size set to, say, 4Gig while having the datasize set to only a few hundred Megs.

This then means that extra files cannot be added into the disc partition OR larger files cannot be moved in either as the datasize will not allow it.

Q. Do I have to unscrub an image before burning it?

Nay, nay and thrice times nay. Just unrar/zip/7 Zip the image which should then give you a 4.5 Gig (or whatever) file and then burn it. Imageburn is the recommended application for burning.

Q. What's the best compressor to use?

The author uses winrar but other people use 7 Zip. When compressing you might as well choose the "fastest" option as there is a negligible difference in output compared to a massive decrease in compression time. It's why a compression option was never implemented.

Q. Will you write a Linux and Mac version?

No. I don't have the time at present (or the hardware in the Mac instance). I'm more than willing to help anyone who wants to though. Source code is always available (and I usually comment what I do).

Q. Why did you stop developing it?

It's use is now moving away from what was originally intended (the partition stuff and the trucha bits). It's time for new apps.

I'm also bored of developing it at the moment and it seems a good time to stop.

Q. Does getting rid of the headers use the TRUCHA bug?

No. It works as a "normal" scrub but doesn't keep the 1k of encrypted header. This means it's easier to spot in software but as the headers are incorrect in relation to the data in a scrubbed disc it would fail a simple SHA test either with or without them.

Q. I've heared that discs that have been scrubbed cannot be opened by Trucha signer. Is this true?

No. Trucha, like scrubber, has it's own set of bugs and scrubbing the disc does not trigger any of those.

Trucha cannot open some discs as standard due to some of it's limitations on file count and not handling more than 2 partitions. It's still a very nice application.

Q. What about changing the boot mode of the disc?

Depending on where you right click in the display, you'll get a different menu. Doing the right hand click over "WII DISC" allows you to change the boot mode.

In short, by setting the first byte of the disc to "0" it bypasses the system disc channel menu. The usual value is "R".

Q. What on earth is "shuffling"?

This is where the partitions on the disc have been madified in some way and there is a gap between them. Shuffling moves all the partitions upto the end of the previous partition and has the effect of moving all the intergap partitions upto the end of the disc. e.g. if you delete the update partition you can then "shuffle" the data partition down to where the update partition started.

Q. What does the "Shrink" option do?

This takes all the data in the partition and moves it all upto the start of the partition, moving all the free space to the end. This uses the Trucha bug as the H3 table gets regenerated.

Q. Why bother changing the boot mode?

Why not? It allows for the disc to be booted as an automatic instead of manual mode. This is just another feature I implemented while playing around.

Q. What do the other exe's in the Rar do?

MakeWiiKeyBin.exe alleviates the need to distribute key.bin - it makes it for you Partition builder allows you to take a directory of data and create a partition from it - that can then be put into a disc image by wiiscrubber.

To build a partition you will need:

  • A partition.bin, apploader.img, boot.bin and bi2.bin taken from an existing disc.
  • A Main.dol.
  • A boot.bin and bi2.bin taken from an existing disc.
  • Some other files that you want to put in the image - max filecount is about 0x20000.

Q. Why doesn't the extract option work sometimes?

The name probably contains spaces, while acceptable under Windows I wasn't sure the Wii actually allowed filenames like that I didn't bother fixing it.

Q. I sometimes get "i/o error" when adding partitions and/or opening an ISO - why is this?

This is due to me not fully creating a boot.bin for the new partition you create. It's a "soft error" in that things will still work. You may encounter it when importing a partition.

If the ISO is the DVD5 version of SSBB then the reason you have the error is because the channel table still shows the VC games as being present, though they have been removed. If you delete the VC partitions they'll disappear.

Q. I've heard that scrubbed discs do not work under IOS37 - is this true?

No, it does not use the Trucha bug unless you change a file. The Trucha bug is fixed under 37.

Q. How do I create a multiboot disc. These are Trucha signed because of the shrink process.

Simplest technique is to:

  1. Load an ISO, select the data partition and shrink it. Then save it out as a crypted partition.
  2. Repeat stage 1 until you have a selection of partitions.
  3. Load an ISO that you want to adapt.
  4. Delete all the partitions (right click on partition, delete partition).
  5. Repeat for all partitions.
  6. Right click on WII DISC and select IMPORT, Crypted. Choose partition to load. Select partition table to use.Wait. The partition table 0 MUST contain at least one partition but can have a maximum of 3.
  7. Repeat for all the partitions you created at stage 2.
  8. Burn disc.

Links

Screenshots

wiiscrubber3.png

Media

WiiScrubber - Extracting Files and Things (Tutorial) (SuperSandwic)

Changelog

1.4.0

  • Whats new?
    • ticket.bin is displayed under the partition.bin breakout.
    • cert.bin and tmd.bin can now be different sizes.
    • Extra button for Trimming an ISO - this makes an ISO slightly larger than the indicated data size - USES TRUCHA.
    • Confirmation window on Shrinking partition.
    • Proper Korean key support so can open and scrub/trim/extract/replace Korean ISOs.
    • Deleted the 'force Wii' option as I followed the advice of Marcan.
    • Partition support corrected due to a Wii limitation on Primary partition (you can only have three partitions in the primary. To paraphrase Star Wars "Many verbatims died to bring you this information").
    • Can save/load/import crypted partitions making replacement much quicker.
    • Full 4 partition offset support.
    • Partition titles displayed in the window.
    • In other words you can easily create a multipartition disc. AKA a multiboot.
  • Bug Fix:
    • You can actually load/replace partition.bin again - this was broken in the 1.30 to 1.31 update.
    • Shrink partition works correctly now - incorrect size was being copied down - OOOPS.
    • Can change the bootmode of unusually defined boot mode discs.
    • Partitions now start on a 0x20000 boundary as the Wii seems to like them that way.
    • Partitions in the second partition table now show correctly.

1.30

  • Can cater for discs that have non-standard disc IDs by using the 'force wii' check box e.g. iso_template.iso.bz2.
  • Can extract/replace the sub parts of partition.bin i.e. tmd.bin, cert.bin and h3.bin.
  • Added two useful links in the about box.

1.21

  • Extra options on right click menu related to partition operations (you can now delete them and resize the data area).
  • Increased speed of file replacement by blocking it (and progress bar).
  • Extra couple of links in the about box.
  • Window is now resizable (within limits).
  • Some of the text on buttons changed.
  • More accurate indication of size as headers are now included in calculation and dynamically considered when header button pressed.
  • Extra option on right click for WIIDISC as it allows for changing between system boot and normal boot.
  • Common key check possible to over-ride in case Korean key becomes available.
  • Can now replace the partition.bin file.
  • Can add data partitions/channels.
  • Can 'shuffle' up the partitions to the start of the disc for where some have been deleted - doesn't use Trucha bug.
  • Can Shrink the partition by moving the data up in the partition (meaning all the free space then appears at the end - Uses Trucha Bug.
  • Can save a decoded partition.
  • Can load/replace a decoded partition.
  • Can import a new disc partition.
  • Can resize a partition.

1.2

  • Bug fixes in the fst.bin size calculation for non-system files meant that added files were made as size / 4.
  • 32/64 bug in line:
    • /* Jump to the specified cluster and copy it to memory */
    • offset = iso->parts[partition].offset + iso->parts[partition].data_offset + (cluster * SIZE_CLUSTER); fixed to:
    • /* Jump to the specified cluster and copy it to memory */
    • offset = iso->parts[partition].offset + iso->parts[partition].data_offset + (u64)((u64)cluster * (u64)SIZE_CLUSTER);
    • So that data could be read above the 2 gig point correctly. Problem possibly exists in Waninkokos source code too as it does an int by UL calculation for the cluster * SIZE_CLUSTER.

1.1b

  • Load file now works.
  • Several more bug fixes with 32/64 issues.
  • Display changed for partition info to allow VC channels to show correctly.
  • Trucha signing of disc works automagically.
  • Can possibly load files bigger than the original.

1.0a

  • Options of creating and using the dif files.
  • MoH2 now really does show correctly ;).
  • Key checking to make sure the correct one is used.
  • code tidy up.
  • Gamecube images work.
  • TRUCHA signer padding option.
  • Option of keeping crypto headers or not.
  • settings are saved in the registry.
  • Bug fixing - thank you Juster.

1.0

  • Way of scrubbing changed slightly so that the sector crypto header is left unchanged. This makes it a bit more difficult to detect but lessens the compressability.
  • Disc Filename display corrected so titles like MoH2 show correctly.

Changes from beta test version:

  • Key file now only needs to be in the same directory as the program.
  • A progress bar with cancel option when you start scrubbing.
  • appended file name changed to (compress) to avoid confusion.
  • Clickable URL of gbatemp in about box.

Credits

Thanks to:

  • My wife for putting up with me while I twiddled with this.
  • Lots of people who did beta testing e.g sr_corsario.
  • People who suggested things or who's software I "borrowed" e.g. Wiipower and the Softchip people.

External links

Advertising: