Okay, here's my take on things.
Essentially, the PCB code has all we need to map games. It tells you where all ROM and SRAM data go, what special chips are used, etc. That alone should suffice for mapping of
known games.
For mapping future cart layouts, we would want to allow for some sort of flexible custom definition, eg:
Code: Select all
map(MapShadow, 0x00, 0x3f, 0x8000, 0xffff, memory::cartrom, 0x400000);
map(MapLinear, 0x40, 0x7f, 0x0000, 0xffff, memory::cartrom, 0x400000);
map(MapShadow, 0x80, 0xbf, 0x8000, 0xffff, memory::cartrom, 0x000000);
map(MapLinear, 0xc0, 0xff, 0x0000, 0xffff, memory::cartrom, 0x000000);
Only in a more text-friendly format. Definitely not binary.
The exact mapping for specific PCBs could easily be supported internally by emulators. They are unchanging, and we can limit it to only to commercially mass produced PCB IDs. Eg SHVC-BJ0N-10 can be hard-coded into the emulator. So for a game to use that layout, it would only have to specify that ID to use it, you wouldn't need to describe it.
But we could make custom definitions for them, too, if you want to simplify. And emulators can just use that data if they don't support internal definitions for them. My problem is if there were changes to these files, users wouldn't really know.
Either way, how to let the emulator know about these PCB codes ... I would suggest storing both .sfc and .pcb files inside a zip archive. The .pcb file would have the first line be the PCB ID itself. This would be something like "Custom" if you wanted to make your own. After that, you could describe the mapping of everything on the cart, similar to above. You'd have access to map everything, including special chips.
For mapping of games we don't have PCB data for, or games that the user doesn't have a PCB ID for, we can use the header-based auto-detection and "one size fits all" mappers we have now.
Lastly, and this would be up to individual emulators, we could have some central authority to release a pcb.id file. This file could be a straight-up list of md5sum = PCB ID [, PCB ID 2, PCB ID 3, ...] for all verified dumps.
An emulator could use that when a .pcb file doesn't exist, or if they're opposed to databases as Nach is, they can omit the database.
I do not like XML at all. I think it's a fad trend, and an over-complicated way of storing the same data you already could in plain-text, and it makes it harder, not easier, to edit by hand. It also makes parsing the format much harder without using pre-packaged libraries. But if my other goals were met, I would compromise and agree to XML.
When the time comes, if i understood correctly Zsnes will support the new format from day 1, if Bsnes joins in it could be a couple of weeks before everyone has upgraded to the new format.
You're kidding, right? If it were up to me, the only ROM extension for SNES games would be .SFC for plain carts, .BSC for slotted carts, .BSX for flash carts, .ST for Sufami Turbo carts, and there would be no ROM headers, period.
I can't do that, because I'd have a userbase of zero without the backing of the major players.
It is the SNES96/7/X and ZSNES devs who allowed the current setup of 40 extensions, 10 interleave formats, copier headers and ROM header parsing. Which is most probably because they were competing
against each other back then, so being able to do something their competitor wasn't was seen as an advantage.
I would have never supported any of that had I the popularity to do so, and honestly if enough of the core supporters of bsnes here feel I should, I will strip all of that crap anyway. I have in fact removed half of the ROM header extensions thus far.
The reason I have it now is because it's such a de-facto standard. Not doing so means no users. No users means no testing to find new bugs. No new bugs means nothing for me to investigate and improve. Not improving means there's no point in existing.
From what I do know, Nach is adamantly opposed to databases. He also declined to store PCB IDs of games dumped. He's also results-focused rather than theory-focused as myself and neviksti are. That's not wrong, it's different -- nothing more. I also deduce from his efforts with ROM header parsing and NSRT that he's quite happy with the current setup. I think it will be much harder to make such a radical change in ZSNES, which will be required for such a change to catch on and become a new standard. However, I will implement such a change anyway, so long as we can get at least ~90% of games properly cataloged.