Romhacking => ROM Hacking Discussion => Topic started by: opoonaproject on October 07, 2017, 10:11:36 pm

Title: Wii patch format question
Post by: opoonaproject on October 07, 2017, 10:11:36 pm
I have just finished up a text re-localization hack for Opoona, a wii RPG that was excellent but had a terrible localization (grammar, continuity, vagueness of in-game clues, etc.).  As of now I have the fixed up .bin file (extracted from the .iso) which can be patched in using the game disc, a wii, and riivolution, but I wanted to make sure this is a legal way of distributing the patch, as I would rather not be sued. 
Title: Re: Wii patch format question
Post by: SleepyFist on October 08, 2017, 03:15:01 am
Congrats, and thanks for fixing the game, I wanted to try it out but was put off by rumors of how bad the localization was, hopefully someone can clarify whether it's okay to upload that here.
Title: Re: Wii patch format question
Post by: FAST6191 on October 08, 2017, 03:02:35 pm
With the billion different container formats used on the wii and fully encrypted discs being a good base standard (iso converts to whatever, wbfs back to iso is more tricky) most people just used wii scrubber to pull files from the iso and patch the decrypted files before doing whatever.

Hardly ideal but an accepted way of doing it.
Title: Re: Wii patch format question
Post by: bailli on October 08, 2017, 03:15:23 pm
You should take a look at Wiimm's commandline tool set "wit". It has an option for almost every possible scenario - including patching files in Wii disc immages:

EDIT: Hm "patching" might not be want you need... It might be necessary to extract and rebuild the image...
I remember windows/bash scripts involving wit to build images of the Newer Super Mario Bros. riivolution hacks. Maybe you can search for these?
Title: Re: Wii patch format question
Post by: opoonaproject on October 09, 2017, 01:32:07 am
Maybe I should give some more information.

The file I modified was one I extracted using wiiscrubber. I have basically no knowledge of programming, so I fixed each line of text without moving any starting positions (so I wouldn't have to deal with pointers and all of that). The altered file is just the original .bin file containing the text, where the first half or so of the file is unaltered (no text contained there) and the last half with no change to character number or file size, but very heavily altered.

In a general sense, I am wondering if the .bin file can be hosted or distributed legally, or whether I would have to make an .ips patch or something like that. Practically speaking, to patch the game with something like .ips would require anyone wanting to play to back-up a copy on a computer, extract the file and patch it before reinserting it, as was pointed out, compared to using riivolution to just read the altered .bin file in real time in place of the same file on the disc, which is what I have done to test the patch. If something like .ips is the only way to legally share it then I may need to enlist aid in making a patch.
Title: Re: Wii patch format question
Post by: FAST6191 on October 09, 2017, 05:47:12 am
Forgot about wit. Good stuff there.


No, sharing a file that, even if somewhat extensively altered, would be bad form. It is still the dev's/publisher's code after all.

IPS won't work either unless the file is under 16 megabytes and not changed much in terms of location, though if it is as you say and not altered in length that helps. There are plenty of formats which do work. Not sure what all the various wii ROM hacking scenes ended up using (I did not follow the wii the closest but I saw xdelta, bsdiff and ppf used by various groups).

Options then.
I agree having an external program dependency to do the changes is not nice and owing to the way encryption works it might not even be possible to patch it back in in place if you were thinking that (there was a related bit of drama from the first waninkoko CIOS releases because of something like that).
Worse still is I am not sure if wit or wii scrubber came with the common key built in or your users will have to generate that.

Were I doing it.

Have a simple patch so that anybody that knows enough to pull a file can do so. Also helps if they want to inject that into something else (a wbfs version for instance) or use with one of the on the fly patching methods.

Also have a batch file in there with a copy of wit or wii scrubber or whatever you like which takes the file out, alters it and puts it back in. I wouldn't bother with linux or mac versions as that will never end if you go down that route (you will then maybe have to do android as there is a nice working version of dolphin for it).

A second batch file in there to pull the file from the game and patch it but leave it as a file for others to feed to whatever they want.

Whether you go further and try to make things for games already in WBFS partitions is up to you. Personally I tend not to try to make the lives of people that don't keep their isos easier.

Wit commands are a pain to sort but there are GUI programs that will generate them for you.