Help me understand these SNES mappings? 
Author Message

Joined: 2017-08-24 21:16
Posts: 2
 Help me understand these SNES mappings?
I'm trying to disassemble part of a star fox SNES rom, and I happen to have a variant that is not in the database. I noticed two things:

1. The manifest stored in the database is quite different to the one generated by Higan's heuristic.
The database one looks like:
Code:
  :  superfx
  :    map address=00-3f,80-bf:3000-34ff
  :    rom name=program.rom size=0x100000
  :      map address=00-1f,80-9f:8000-ffff mask=0x8000
  :    ram name=save.ram size=0x8000
  :      map address=60-7d,e0-ff:0000-ffff

whereas the heuristic looks like:
Code:
superfx
    map address=00-3f,80-bf:3000-34ff
    rom name=program.rom size=0x100000
      map address=00-3f,80-bf:8000-ffff mask=0x8000
      map address=40-5f,c0-df:0000-ffff
    ram name=save.ram size=0x20000
      map address=00-3f,80-bf:6000-7fff size=0x2000
      map address=70-71,f0-f1:0000-ffff

I know it's just a heuristic, but can anyone explain why they are so different?


2. What's with the difference in the rom's bank ranges between the superfx mapping and the regular "lo-rom" mapping? I don't really know much about the superfx...
Code:
rom name=program.rom size=0x100000
  map address=00-3f,80-bf:8000-ffff
  map address=40-7f,c0-ff:0000-ffff


2017-08-24 21:35
User avatar

Joined: 2014-10-29 21:24
Posts: 1814
Location: People's Republic of America
 Re: Help me understand these SNES mappings?
The maximum allowed size of a Super FX ROM is 2 MiB, exactly half that of the typical size of later games that used the SA-1 or didn't use any coprocessors.

Star Fox, however, is only 1 MiB. Star Fox's database entry reflects this, and its map allocates exactly the right amount. When byuu made the database, he took great care to make sure that all parts of the memory map match the cartridge exactly, so I can confidently say that trying to access the ROM at
20-3f:8000-ffff
would return open bus. I don't know why the cartridge was designed that way (allowing
20-3f:8000-ffff
to be a mirror of
00-1f:8000-ffff
would have saved a little on cartridge manufacturing, I think), but that's just the way it is.

Super Mario World 2: Yoshi's Island, however, is 2 MiB, so Star Fox's manifest won't work for that game because it would effectively cut the ROM in half. The heuristic you got for your uncatalogued Star Fox version has more in common with Yoshi's Island's manifest than Star Fox's manifest.

icarus does this because it needs to make sure all 100% of commercial releases will work, even if their memory maps have inaccuracies in parts not used by the game's code. Star Fox never uses
20-3f:8000-ffff
or
40-5f:0000-ffff
, but there's no harm in allowing those parts of the memory map to act as mirrors, even though they aren't in the actual cartridge.

_________________
bsnes-mcfly: A port of the Qt GUI from v073 to v106.
nSide: A higan fork w/NES boards and peripherals and Sonic & Knuckles Lock-On.
Dragon Quest I & II RPGOne Beran Inn bugfix


2017-08-24 21:49

Joined: 2017-08-24 21:16
Posts: 2
 Re: Help me understand these SNES mappings?
Fantastic, thanks :)


2017-08-25 20:13