Alcaro / Flips

Floating IPS is a patcher for IPS and BPS files.
Other
334 stars 46 forks source link

BPS patches ignore data removed from the beginning of the file #3

Closed qwertymodo closed 7 years ago

qwertymodo commented 7 years ago

Steps to reproduce:

Expected results

Actual results

Tested on v1.12 and v1.31, with identical results

qwertymodo commented 7 years ago

Nevermind, it looks like this is just the SNES header heuristics, and the --exact flag seems to do what I need.

Alcaro commented 7 years ago
yes | head -n2048 > y.bin
yes n | head -n8192 > n.bin
cat y.bin n.bin > yn.bin
flips -c yn.bin n.bin --bps-delta yn-n.bps
flips -a yn-n.bps yn.bin n2.bin
md5sum *.bin

The patch was created, but the input ROM is larger than the output ROM. Double check whether you've gotten them backwards.
The patch was applied successfully!
40ca901c80bcb69d4dbfe8146412f8b1  n.bin
40ca901c80bcb69d4dbfe8146412f8b1  n2.bin
f8e69f0ed0bd8f4a751225fd6895f03b  y.bin
58391f4897c67c352fdfd127d363a5fc  yn.bin

byuu says all SNES BPS files should be unheadered->unheadered, so Flips does that. Can't stop you if you want to contradict that, but I wouldn't recommend it, it'll make Flips throw a warning when applying.

Guess it could help if someone else nearby is using beat, though... don't know how much trouble that one has caused. Hypocrite doesn't follow his own recommendations.

qwertymodo commented 7 years ago

Makes sense, and I agree patches should be unheadered->unheadered, the only reason I'm doing it in this one case is for BS Zelda, where the only "good" dump floating around is headered, so I wanted to base the patch on that particular file. The --exact flag give me what I need, so this is officially a PEBKAC error.