RSS icon Email icon Home icon
  • Frisbee eating fun

    Posted on February 28th, 2004 Derrick Sobodash No comments

    It’s finally done! I’ve devoted the last two and a half days to non-stop programming of it, and it’s done. Thank god …

    I wrote a new series of patching formats designed to be a bit more powerful/flexible than IPS and PPF, and with a mind for them to be able to continually expand as systems and file sizes grow. The format will support 2040-bit addressing, which means a file 2^2040 bytes long. Why do I write in exponents you ask? Because that longer than a googolplex^600 — in other words, I should be an old man with gray hair before this format ever hits the wall with addressing.

    Realistically, it can only currently handle whatever the language it’s written in can. My sample implementation is in PHP (with a Win32 EXE for everyone who doesn’t have PHP installed), which only supports 32bit integers–hence this implementation maxes at 4GB.

    But if someone implemented the format in C, they could use int64 and support 120GB. Or if they used some inline assembler, you could possibly get that up to 80bit. I’ll leave the math for that up to you, but I do believe that’s far larger than the world’s largest hard disk. The only limitation is the limitation of the language it’s implemented in.

    On top of that, it handles identification, header removal and de-interleaving (where applicable) for Super Nintendo, Sega Megadrive and Nintendo Game Boy systems. So if you make a NINJA patch off your SNES ROM, it will work with any format of that SNES ROM regardless of if the end user’s ROM is interleaved, has headers, etc. It also stores the CRC32, MD5sum and SHA1 of the good, source file used to make the patch, so it can’t be applied to an incorrect file (these are made of course, off a cleaned file with no header and de-interleaved, and the end user’s file is prepared for the same format).

    I will be distributing all my work in this format from now on, because I’m tired of emails from people who can’t figure out how to remove or add a header to their ROM and bitch about the patch not working. For the super curious, here are NINJA v1.0′s benchmarks:

    Tests done on 1.0GHz Celeron w/ 256MB RAM
    running Windows XP.
    
    PATCH CREATION
    -----------------------
      Textual Mode:
       2MB file - 0.75sec
       80MB file - 9.08sec
      Binary Mode:
        2MB file - 0.76sec
       80MB file - 8.02sec
    
    PATCH APPLICATION
    -----------------------
      Textual Mode:
        2MB file - 0.23sec
       80MB file - 7.99sec
      Binary Mode:
        2MB file - 0.18sec
       80MB file - 6.43sec
      IPS Mode:
        2MB file - 0.21sec
       80MB file - In IPS? Are you kidding?
      IPS with RLE:
        2MB file - 2.62sec
       80MB file - In IPS? Are you kidding?

    Leave a reply