User:BoringPerson/Rebuilding a patch-friendly PS2 ISO
(work in progress, mess lol)
Intro
So yeah, you can rebuild a Gitaroo Man (PS2) ISO from its files using a program like ImgBurn, and it will boot on a real PS2 (via OpenPS2Loader or from a burned disc via swap trick/ZoneLoader) if you choose ISO 9660 + UDF 1.2.
If all you want to do is rebuild a working ISO for yourself, you don't need the rest of this page.
patch-friendliness
But let's say you want to give your modded ISO to someone. Uploading the whole ISO is not an option, it's huge and also not particularly legal. So you can use a program like xdelta3
to create a patch you can send instead. It'll be much smaller and only contain the changes you made.
But what if you make an xdelta3 patch and it's goddamn huge, way bigger than it should be given what you changed? Well, chances are it's because your rebuilt ISO has files in a different order than in the original game. You have a few options:
- When you run xdelta, increase the various window sizes (via the command line switches). I don't know what they all do, but at least one of them should tell it to look everywhere in the source ISO if you make it big enough. Note that this may use a lot more memory and time during patch creation.
- Honestly maybe this is all you need, which makes the rest of this page kinda pointless lol.
- Futz around with ImgBurn (or whatever software you're using) to put files in an order matching the original. Unfortunately, ImgBurn is a pain in the ass for this, afaik you can only add a folder all at once, which sorts by alphabetical (i.e. not original) file order.
- Use
genisoimage
, a free open source command-line tool. It has an option to accept a "sort file", a text file with each file and its weight— a number that determines its relative position in the ISO. With this, you can create an ISO with file contents in the same position as the original game.
Using genisoimage to rebuild an ISO
tl;dr
- Get a list of file LBAs from IsoBuster (there is probably a better way)
- Paste them into a text file, change all the file paths to whatever genisoimage will accept, and change all the LBAs to negative values (because lower LBA = earlier file, but higher genisoimage sort weight = earlier file)
- Run genisoimage to rebuild the ISO image from source files and using the sort file for sorting.
I'm not gonna detail the process right now but suffice to say I got it working. If you need me to elaborate before I get around to finish this page, go on the Gitaroo Pals Discord server (linked on the Main Page) and bother @boringhexi.