marcrobledo / RomPatcher.js

An IPS/UPS/APS/BPS/RUP/PPF/xdelta ROM patcher made in HTML5.
https://www.marcrobledo.com/RomPatcher.js/
Other
653 stars 133 forks source link

Only Allow Patching Valid CRC32, Only Download Custom Patches On Apply Click #35

Closed flagrama closed 2 years ago

flagrama commented 2 years ago

This isn't a feature request but more a quick discussion on if one or both parts of the title would be features the patcher would be better off with. I've written both for my own purposes and was wondering if they would be appreciated in a PR before I clean it up to do so.

The changes are as follows:

Only the Apply button being disabled with an invalid CRC affects the normal patcher, and both features would be pretty easy to implement independently if one of them isn't desired.

Is there a reason to apply to a ROM that doesn't match the CRC32? It seems kind of silly to apply a patch in this case as it is usually just more likely to break the ROM. However, if there is a valid reason to do so I can understand.

I think regardless of the above question it would be nice if the custom patches were only downloaded on demand when the user actually wants to use it instead of downloading each on the select box being changed to save on server bandwidth. Is there any reason you wouldn't want this?

marcrobledo commented 2 years ago

Yes, it is intended. In some cases patches that require a valid checksum may work with ROMs that do not validate. People sometimes may have slightly different ROMs (different header, small bits changed here and there, etc) that can still be compatible with those patches. So I decided to just let warn the user the ROM is not valid, but still be able to patch.

As for the custom patcher... There are also reasons on why patches are downloaded as soon as user selects them:

flagrama commented 2 years ago

Okay, sounds like there are some valid reasons to do both the current way, and if the person hosting the custom patcher wants to make these changes for whatever reason they can just do so since it isn't too difficult.