@unexpectedpandaOh, wow. This is great!
I never thought of taking this approach when I developed 1g1r-romset-generator.
I'm now working on DATROMTool, a more complete tool for handling DATs and all that (kinda like SabreTools, but a loss less complete). Its 1G1R capabilities are a bit better than 1g1r-romset-generator, but a bit better. Its file-handling capabilities are a lot better though.
I'm checking your code to see the approach you took and I can only give you kudos on both its quality and the amount of work that took.