Home | Forums | What's new | Resources | |
Patching game executables |
MichiS97 - May 20, 2025 |
derek (ateam) | May 20, 2025 | |||
Cool, good luck with your future hacking endeavors! That said, firstly you should really avoid making direct changes to a BIN data track (presumably a Redump image) outside of quick testing. ECC data is still in tact (unless you manually regenerate it), and this means that more than likely, someone who would burn your disc image would have either a broken or totally non-functional patch (i.e., the original data would be restored). Some emulators and ODEs fake this data, by the way. In fact, I remember a case (I believe it was Blast Wind...) where the patch author made direct changes to the data track BIN and was baffled by them not being reflected in the game itself with a certain ODE, while other ODEs were fine. Instead, you can either use Sega Saturn Patcher to patch one or more files, or for development/testing something like cd-replace... can be used (I prefer this, to be honest). With cd-replace, via CLI you can inject modified versions of one or more files to overwrite the original(s), and all data is shifted around accordingly. It's also very fast! Now, regarding why you could find that pattern more in the BIN than in the original executable, it can be a combination of redundancy (remember that ECC I mentioned?), multiple sector copies, or overlap. The format isn't like ISO, or like a direct, raw ROM you might be used to. For instance, if a given file spans sectors, and the byte array you want to change "straddles" a sector boundary, part of (or all of) that array could appear in adjacent sectors, though partial duplication is more typically seen. I hope that helps. |