Create and apply patches for IPS and BPS files. More information: https://github.com/Alcaro/Flips.
flips
flips --apply patch.bps rom.smc hack.smc
flips --create rom.smc hack.smc patch.bps