Romhacking.net

Romhacking => ROM Hacking Discussion => Topic started by: sharksnack on February 21, 2019, 01:02:26 am

Title: Creating a Patch for a Dreamcast Game (GDI format)
Post by: sharksnack on February 21, 2019, 01:02:26 am
I'm currently working on an English translation for the Dreamcast version of Asuka Kenzan, but I noticed that the file size for track 3 was significantly larger after rebuilding with GDIBuilder when preparing the files for a patch using xdelta. (see: https://i.imgur.com/aGz23pI.png)

Is it normal for rebuilt games to have that large of a difference? And if not (I assume it's not), could someone point me in the right direction for preparing Dreamcast files for a patch / how that process goes?

GDIBuilder page for some additional context, if it helps: https://projects.sappharad.com/tools/gdibuilder.html
Title: Re: Creating a Patch for a Dreamcast Game (GDI format)
Post by: FAST6191 on February 21, 2019, 04:25:39 am
If the xdelta patch is that much larger it usually means you want to increase the look ahead window -- by default it will only scan ahead a certain distance to see if it finds where the data landed instead, if it is not far enough it will instead assume it is a change and make a patch accordingly, with said distance easily being achieved with the average optical media system. It will make patch making a fair bit longer (more to search after all) but should get that size down.
I don't know what the modern xdelta command line switches will be offhand but it should be there in the help/usage.

Alternatively if it is really a problem then you can bundle a tool to pull individual files/tracks, patch those by themselves and then reinsert the files/tracks or otherwise rebuild the iso.
Title: Re: Creating a Patch for a Dreamcast Game (GDI format)
Post by: sharksnack on February 21, 2019, 11:29:40 am
Thanks for the reply.

That's good to know regarding xdelta and I'll definitely keep that in mind, though right now the main concern I have is that the size of the game files grows by 722MB after rebuilding using GDIBuilder (before any patching is done). That doesn't seem normal when I've only edited text in two files, and I'd like to avoid having people download + take up that much extra space, so I was hoping to get the file size down when rebuilding prior to patching.
Title: Re: Creating a Patch for a Dreamcast Game (GDI format)
Post by: FAST6191 on February 21, 2019, 12:54:58 pm
I am less familiar with the specifics of the GDI format here. That much size increase I would expect to see only when the iso rebuilder decides to pad out a section or the iso, assuming said files are not likely to boost that much in size (no adding a 5 hour cutscene when it started out as 2 minutes sort of thing) and there are no compression or encryption worries.
If it is simple padding then I would have expected the compression xdelta does to sort that, if it is random padding then that might be a different matter.