profi200 / open_agb_firm

open_agb_firm is a bare metal app for running GBA homebrew/games using the 3DS builtin GBA hardware.
GNU General Public License v3.0
849 stars 42 forks source link

Refactor IPS patching #163

Closed Nemris closed 4 months ago

Nemris commented 4 months ago

This PR is intended as a partial refactoring.

Specifically, I normalized the indentation so that it's consistent with the 4-space tabs used elsewhere in the project. Additionally, I reduced the nesting depth within patchIPS(), and I tested that the changes didn't break IPS patching with a spare "Torneko's Great Adventure" ROM and translation patch I had on hand.

profi200 commented 4 months ago

Do you happen to have a few more games/patches to test? Just wanna make sure this doesn't break anything.

Nemris commented 4 months ago

I should have some more time in the coming days, so I'll hunt down more games and patches - and let you know how it goes.

Nemris commented 4 months ago

I tested the refactored IPS patching with three more ROMs alongside Torneko, namely Classic NES Series' Zelda 1 and Super Mario Bros., and Golden Sun: The Lost Age. The SHA-1 hashes of the soft-patched ROMs are the same between debug builds of both your master branch and my PR.

Additionally, just to rule out the indentation normalization commit having side-effects, I compared the SHA-256 hashes of FIRMs from both your master branch and that commit, and confirmed that they match.

profi200 commented 4 months ago

Sounds good. Gonna merge this now. Thanks.