I recall from another discussion that the NES has its own formats, which depends on the mapper as well.
NES Mappers have so much variety that you can't really add "nes support", you'd have to support individual mappers (though there's a lot of overlap between different mappers). Supporting the ~8 most common mappers will get you coverage of like ~80% of the NES library, but there are a TON (read: over a hundred) of weird/obscure mappers that were only used in like one or two games. But again -- if you're just doing address translations, there's a lot of overlap.
It's also worth noting that converting file offset to CPU address is MUCH simpler than vice versa, since it's a many-to-one relationship.
The easiest NES mappers (like #2, #7) have only one swapping mode and only one swappable region. Mapper 7, for instance, puts a single 32K block in the $8000-FFFF region. So converting offset to CPU address is as simple as masking out the low 15 bits and ORing with $8000:
cpu_addr = ((offset-0x10) & 0x7FFF) | 0x8000; // minus 0x10 for the header
Mapper #2 is also pretty easy, with the very last 16K block of PRG-ROM being fixed at $C000-FFFF, and every other bank being swapped into $8000-BFFF region:
if( offset_is_in_last_16K_of_ROM )
cpu_addr = ((offset-0x10) & 0x3FFF) | 0xC000;
cpu_addr = ((offset-0x10) & 0x3FFF) | 0x8000;
... other mappers, though....
Mapper #1 is more complicated. While it only has one swappable region, it has multiple swapping MODES. Meaning MOST of the time it operates like mapper #2. But sometimes it operates like mapper #7. But it also might do things a weird 3rd way (which honestly I've never seen a game use it's 3rd mode so maybe you don't have to worry about it so much unless you're a perfectionist).
And technically, which mode it uses can change at runtime, but in practice no game would ever do that. Reliably figuring out WHICH mode any game uses is probably going to be extremely difficult, and I can't think of a good way to do it.
.... and that's not the worst of it. The most common mapper, #4, not only has multiple swapping modes, but also has multiple swapping regions. So even if you know
what mode the game uses, you have to figure out which page of PRG is going to be swapped into which region. The first 8K in the ROM might map to the $8000-9FFF range... OR
it might map to the $A000-BFFF range -- and there isn't really any way to know.
So... yeah. Doing this on the NES is going to be a nightmare. SNES and FDS are much easier.
Also ... I recall converting FDS addresses to be easy.
Yeah FDS is pretty straight forward. FDS disks actually have a file system, and each file it contains has a header indicating its size and where it memory it is to be loaded. So all you really have to do is find/read that header.