When you’re using patch files and editors to edit your working copy of a romhack, major corruption to the data will eventually happen. Even when keeping careful backups, sometimes it’s important to fix these corrupted areas in the working copy. This is one technique I’ve discovered.
So you make 2 .ips files with LunarIPS; make them against the original rom of the game.
The concept is to compare a “known good” hack to a “known glitched” hack. Looking at the 2 patches side by side will help you see which areas of the glitched rom need to be repaired
IPS Peek will show a list of every area of bytes in a rom changed by an .ips patch file.

Running 2 copies of IPS Peek side by side is the technique shown above. Carefully check all the areas changed between the “good” and “glitched” roms, and you’ll eventually find an area that is only changed in the glitched copy.

This image shows some extremely sus areas changed. The large numbers of bytes in a row (3rd column) are an indicator of accidental changes— these will cause glitches in either graphics or gameplay.
The 1st column shows where the changed area of bytes starts, and the 2nd column shows the byte of the final change (up to AND including).
To fix the first corruption shown here, I’ll want to copy bytes from the original rom starting at offset $0BD787 and ending with the final byte of $0CD785.