I promised this to a few people a while back but it wasn't in a fit state to release.
It basically performs unique branch analysis on TRACE files from MAME. It makes ROM cheats like Invincibility (and lots more) where you are looking for a branch to be taken or not to be taken an absolute breeze to make.
Trace File Analyser V1.00 (30 September 2002) aka TFAN... Enjoy
http://cheat.retrogames.com/utils/tfan100.zip