Super Mario World under BSNES, Memory Map accurate?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Super Mario World under BSNES, Memory Map accurate?
by on (#116439)
Now, I am using an old version of BSNES, I compiled it myself for my Macintosh for the debugger.
Putting that aside, I am on BSNES 064.06 and I was emulating Super Mario World, 4Mbit LoRom game. 16Kbit SRAM. Now, I have a couple SMW cartridges. One of them uses an LS139 address decoder, and I once documented how it works. In short, it strictly goes by A22,A21,A20 (70:0000). In BSNES, I noticed that the SRAM was mirrored in $20-3f:6000. I do have another SMW cart that uses the MAD-1, however I know next to nothing about the MAD-1. Is it possible that MAD-1 decodes SRAM to $20-3f:6000 and that Byuu supported that mapper rather than the stricter ls139 mapping? Or could it be that Byuu has some more universal emulator tricks to help support all the various memory models out there, and that makes his maps more loose?
Re: Super Mario World under BSNES, Memory Map accurate?
by on (#116440)
byuu's mappers are from the carts that he personally collected. In cases like this, where there are multiple boards with the same game, the mapper in the database is just the one that he happened to have, not necessarily the "best" one. So your board may not match the mapper he specified, but the one in his database will still work for that game (unless there happens to be a game that received a code update along with the board change that does anti-piracy checks based on the new board mapping, but I'm fairly certain that never happened).
Re: Super Mario World under BSNES, Memory Map accurate?
by on (#116441)
Is LoRom SRAM popularly mapped to those areas?
Re: Super Mario World under BSNES, Memory Map accurate?
by on (#116637)
Quote:
Or could it be that Byuu has some more universal emulator tricks to help support all the various memory models out there, and that makes his maps more loose?


That was exactly what I was doing in v064. As of v092+, the maps are exact to real hardware when there's a match in my database (which is the case for at least one revision of every US game.)

The Super Mario World board that I dumped used PCB type "SHVC-1A1B-06", which is defined as:

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


There could well be more board types with the same game, and slightly different layouts. I go with the first one I dump. I figure it matches *a* real cartridge, so that's good enough. Stick to the above map and you'll be fine.