Announcement

Collapse
No announcement yet.

Important: Creating Patches [Please Read before releasing something]

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Important: Creating Patches [Please Read before releasing something]

    As you all know, currently we allow for people to post their mods for console demos and prototypes in their full form. However, this will soon change. We want everyone to switch to using a patch format in the future. Not only will this help save space for your releases, but it will also enable us to avoid any potential trouble from fire breathing legal attorneys and such. Because of the decreased size, we might also be able to set up a storage/archival solution here on THIA too.



    The patching format we'd like everyone to start using is not PPF, but it's something called "xdelta"

    xdelta is a highly flexible and compressed patching format that is rapidly becoming the standard for CD based hacking projects and releases, as it's capable of handling files with large differences between one another and produce relatively small patches that can easily be shared.


    To use xdelta, you will need an xdelta patching utility, the original unedited ISO you are making a patch for and a your modified/hacked ISO.


    You can download xdelta from the official homepage: here
    It is mainly command line driven, so windows users might want to grab KaioShin's UI version: here


    It is important that you make sure you use a good/clean extract of the disc your patch is supposed to work with, and that you provide a CRC/MD5 checksum for the original file you've used. [At least until we've built a proper database here of what the CRC/MD5 should be for most versions of the games, so you may make sure you are using a proper version. It is worth noting that all entries listed here will be from a BIN/CUE rip, extracted via IMGBURN or similarly capable applications.]

    To check a file's CRC/MD5, you must first get a tool capable of generating a CRC/MD5 sum. We suggest you use QuickSFV, which can be downloaded here.
    After installing QuickSFV, right click on the original ISO image and select "Create .SFV file" and then pick .SFV and generate file (or .MD5 for MD5).
    Now open the generated file in notepad and check the data listed after the filename, it will look something like these two samples:

    INPUTFILE.BIN A0EBB70B
    or
    INPUTFILE.BIN 41ACF140394BF0E0254294039607E260



    Most people would probably only need the UI version of xdelta, as their hacks probably don't rely on a completely altered file layout (only individual files being swapped with edited ones) or rely on the use of advanced features in xdelta.

    For those who would want to use the command line version of xdelta:

    In order to patch a file, type the following:
    xdelta -d -s InputFile.bin PatchFile.xdelta OutputFile.bin

    In order to create a patch, type the following:
    xdelta -s InputFile.bin EditedFile.bin OutputPatch.xdelta

    Note, if you get an error about files not being found, try to capsule the filenames within ""s with full paths, like:
    xdelta -s "CTemp\InputFile.bin" "CTemp\EditedFile.bin" "OutputPatch.xdelta"

    If the patch turns out to be surprisingly large, try to increase the buffer size. To increase the buffer add the -B command with a high byte value (default is 64mb) A sample of this would be:
    xdelta -B 268435456 -s "CTemp\InputFile.bin" "CTemp\EditedFile.bin" "OutputPatch.xdelta"
    The above sample increases the buffer to 256mb, allowing for data to have moved up to 128mb between the original and edited.


    Using pickyeater's "Prerelease" hack as a basis for a test sample (in combination with the Xdelta UI and no advanced settings) we get the following:


    Original ISO:
    SLPS_00999.BIN (318*792*432 byte)

    Edited ISO:
    BH2_PRERELEASED_v7.bin (318*792*432 byte)

    Patch:
    BH2_PRERELEASED_v7.xdelta (1*745*111 byte)

    Slight size difference, don't you think? Pretty much roughly 1.75% of the original compressed size for the release.

    NOTE: It can perfectly fine handle size differences too. So no need for the original and edited to be the same size or anything.
    Last edited by Carnivol; 12-03-2009, 11:56 PM.

  • #2
    Suggestion, gotta save them bytes

    there's another program that does the same thing but better, the name escapes atm
    Last edited by kevstah2004; 03-12-2010, 10:23 PM.
    If he had a brain, he'd be dangerous.

    sigpic

    Comment


    • #3
      That's not of much use around here, though. At least not as far as the type of sharing we allow around here goes. It's at least worth pointing out that BIN -> ECM -> BIN doesn't break compatibility with xdelta patches, as the input->output->output should loop and become identical to the input, so people should by all means use it for personal archival... but it's not exactly practical or useful for anything but storage. Don't think any emulators or recording apps supports live playback of it or anything.

      Spoiler:


      This reminds me, though, I need to get around to checking if I can add .xdelta to the allowed file-types that can be attached to forum posts in this sub-forum (+figure out a good file size for them.)

      Comment


      • #4
        Before I delve into this, would it be possible for me to make an ad lib patch for Outbreak with this?

        Comment


        • #5
          How can I create PPF patches ? hard ..!
          Last edited by Mrox2; 06-10-2013, 08:07 AM.
          Darkness : Tactical reload wasn't even in deadly silence LMAO
          ^ Lol ...

          Comment


          • #6
            Originally posted by Mrox2 View Post
            How can I create PPF patches ? hard ..!
            PPF is a very limited format. xdelta is very flexible.

            If you've ever done any extensive modifications to something, you'd know the limitations of PPF (even in its latest version)

            Comment


            • #7
              Originally posted by Carnivol View Post
              PPF is a very limited format. xdelta is very flexible.

              If you've ever done any extensive modifications to something, you'd know the limitations of PPF (even in its latest version)
              ah I see, thats why once it has worked fine for adding or modifying a few bytes, although as you said its limited when doing something pretty much over the limit.
              Darkness : Tactical reload wasn't even in deadly silence LMAO
              ^ Lol ...

              Comment


              • #8
                Sorry if I sounded a bit blunt; just spent my lunchbreak cleaning up drama :/

                Anyway, if you wanna see the capabilities of xdelta vs PPF, you can look at a patch I did a few years ago called "Making history" (a version changer for Front Mission 2), which is basically just a differance comparison between Front Mission 2 and the Front Mission 2 reprint from the "History" trilogy pack (and later also featured in the Ultimate Hits re-release).

                Between these releases, Square-Enix added a set of features to the main exe (not a whole lot of code, but "some" that basically adds a few features that speeds up gameplay; main feature being the option to turn off battle animations, speeding up combat), another change was that they optimized the game's disc layout for loading/seek time reasons (game's file layout is atrocious and poorly optimized), so the entire main databank got moved to the outer edge of the disc (same archive, less seek time), whilst the FMV streams were all moved to the inner portion of the disc.

                The entire restructure there with a PPF would basically be impossible to do in any size friendly or convenient manner, but with xdelta, you can tell the patch creator to basically look back 'n' forth for identical reference data (referred to as a "window"), resulting in the "Making History" patch basically only containing a few kb of altered game data + the 2 MB Square-Enix logo screen (original was a SquareSoft logo splash). So, yeah, this is kinda why I "push" xdelta (+we have support for xdelta attachments on the boards ;D). It's also pretty much the standard patch format in the translation scene these days.
                Last edited by Carnivol; 06-10-2013, 09:31 AM.

                Comment

                Working...
                X