News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: SNES ROM expansion and patch file size  (Read 3494 times)

zombero

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
SNES ROM expansion and patch file size
« on: January 27, 2014, 09:10:24 am »
When expanding a SNES ROM, patches that convert the unexpanded ROM into the expanded form tend to be almost as large as the file itself.  Is there a patching utility or technique that can patch between an unexpanded and expanded ROM without having a large patch file size?
« Last Edit: January 27, 2014, 09:19:04 am by zombero »

Gemini

  • Hero Member
  • *****
  • Posts: 2007
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: SNES ROM expansion and patch file size
« Reply #1 on: January 27, 2014, 09:18:26 am »
xdelta or something else using a delta algorithm is the way to do this correctly.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

zombero

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: SNES ROM expansion and patch file size
« Reply #2 on: January 27, 2014, 09:32:12 am »
Thanks, looks like it does the job perfectly.  Though it would be a shame to have to use something other than the more common/popular .IPS patch format, little things like that can be enough to dissuade some new players from trying a hack.   :-\

puzzledude

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
Re: SNES ROM expansion and patch file size
« Reply #3 on: January 27, 2014, 09:44:50 am »
Not really. It is quite the opposite. The IPS patching system has no safety. You can basically patch any rom using the given ips file, resulting in a bugged rom. At least 60 percent of all players, who have patched the games using my ips files, were patching it wrong on their first try.

The far better patch (than IPS) type to use is UPS. Similar system, but it has a crc checksum and will reject the original rom, if the crc doesn't match. Because of the header and various versions of the original roms (US, EU, J), this kind of checksum is mandatory.

Regarding the expansion. The only thing here is the Xdelta or anything which is using this system. You can also try the Doki patch creator, which I uploaded on this site a while back. It is using the xdelta system and makes a batch file which autoexecutes the patching, if the correct original rom is present. This should be suitable for beginners. Because of the crc check, which can not be ignored here, the resulting (patched) rom can never be bugged. Nor can you bug it with accidental double patching.

zombero

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: SNES ROM expansion and patch file size
« Reply #4 on: January 27, 2014, 09:50:09 am »
I didn't mean to imply that .IPS is *better*, just more popular.  Which can sometimes be more important, heh.  The batch file is an interesting beginner solution, though.

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: SNES ROM expansion and patch file size
« Reply #5 on: January 27, 2014, 05:17:56 pm »
Out of curiosity, would you go the same way for a GBA ROM extension? (Some posts on this forum seem to suggest it, but none says if you can just increase the size of the ROM or if there is not headers and other things to be modified for this?)

EDIT: Another forum source indicates that just increasing the file size works.
Sorry for cluttering this otherwise very nice topic.
« Last Edit: January 29, 2014, 02:56:55 pm by BlackDog61 »

Gideon Zhi

  • IRC Staff
  • Hero Member
  • *****
  • Posts: 3491
    • View Profile
    • Aeon Genesis
Re: SNES ROM expansion and patch file size
« Reply #6 on: January 27, 2014, 07:01:35 pm »
When expanding a SNES ROM, patches that convert the unexpanded ROM into the expanded form tend to be almost as large as the file itself.

This should only happen if they're creating the patch incorrectly. An IPS file that expands an SNES ROM should at _most_ contain as much information as is in the expanded region, plus whatever changes have been made to the base ROM. When you factor in the IPS standard's built-in compression, any blank space in the expanded region (and there's usually a fair bit) gets packed down significantly. If someone expands a 12mbit ROM to 16mbit and comes up with a patch close to two megabytes, they've almost certainly inserted or removed data (as opposed to just replacing it) early in the ROM file, and this is not something that happens with SNES games unless someone's built header addition/removal into the patch. And that's bad. Don't do that.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6843
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: SNES ROM expansion and patch file size
« Reply #7 on: January 28, 2014, 03:41:05 pm »
When you factor in the IPS standard's built-in compression,
From what I read, RLE compression is not OFFICIAL, but in some implementations (like LunarIPS).
"My watch says 30 chickens" Google, 2018

Gideon Zhi

  • IRC Staff
  • Hero Member
  • *****
  • Posts: 3491
    • View Profile
    • Aeon Genesis
Re: SNES ROM expansion and patch file size
« Reply #8 on: January 28, 2014, 04:19:05 pm »
From what I read, RLE compression is not OFFICIAL, but in some implementations (like LunarIPS).

I don't think file expansion is in the official standard either :) But either way. Even if RLE isn't official, you still shouldn't be seeing a 2 MB patch for a ROM that was expanded from 1.5->2MB. At most maybe 600-700K, accounting for the expanded region and changes to the base ROM.

Gemini

  • Hero Member
  • *****
  • Posts: 2007
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: SNES ROM expansion and patch file size
« Reply #9 on: January 28, 2014, 04:30:43 pm »
Thanks, looks like it does the job perfectly.  Though it would be a shame to have to use something other than the more common/popular .IPS patch format, little things like that can be enough to dissuade some new players from trying a hack.   :-\
Commonness isn't really an issue, as long as you provide clear instructions and a user friendly patching program. Most of my translation patches come in the form of a custom patcher+data; so far nobody ever had a problem, meaning you can live without the old and obsolete IPS. ;) Actually, it'd be about time people stopped using such an ancient format.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.