Quote:
Maybe byuu or nocash would like to elaborate on this?
That's the basic idea, yes. But the reality is things get a lot more elaborate.
Some games have completely valid and normal looking headers in one spot, and a corrupted looking one in another. The corrupted one is the real one. Anti-copier tricks? Incompetence? Who knows, but we have to deal with it.
So by far the most pivotal test of any modern SNES emulator is to look at the first instruction pointed to by the reset vector at $7ffc, $fffc and $40fffc. If it's sei, clc or xce, then we almost definitely have the correct mapping mode. If it's brk (00) or adc $ffffff,x (ff), it's most definitely not the correct mapping mode.
Once we know the basic mode, we apply a few other hacks. Like we determine whether to mirror SRAM into the low-half of the $7x banks based on the size of the ROM. That's not part of any official rules, it just so happens to work for Ys 3 and Fire Emblem: Thracia 776.
> Um, in trying to decode this, it does not seem to have an idea of what to map from where.
bsnes' manual mapping layout looks like this (example is LoROM):
Code:
board type=1A1B revision=04,05,06
rom name={rom.name} size={rom.size}
ram name={ram.name} size={ram.size}
map id=rom address=00-1f,80-9f:8000-ffff mask=0x8000
map id=ram address=70-7d,f0-ff:0000-ffff
I don't really expect any homebrew to use this, unless they're doing something that no other emulator can support through heuristics. It's mostly used to get perfect mapping for commercial games (I make the maps myself), or for new homebrew like d4s' Super Road Blaster (a 600MB game) or the Campus Challenge / Powerfest boards.