RetroAchievements/RAEmus

GB platform memory mapping

Closed this issue · 6 comments

GB memory mapping needs to be reviewed based on this issue. It looks like main memory on supported clients is located past 0xC000, so it is possible that the reference map used by RA is wrong, and the one now used by Gambatte is actually correct.

The RA reference map is raw addresses into the system memory as noted here: http://gameboy.mongenel.com/dmg/asmmemmap.html

In fact, the paged memory at $D000-$DFFF has actually been a nuisance for some games.

It looks like main memory on supported clients is located past 0xC000, so it is possible that the reference map used by RA is wrong

Is RA not a supported client? It should be the source of truth for everything else.

That map looks fine to me. I was wondering if 0x0000~0xBFFF was not zero-page or otherwise useless space that was omitted in the Gambatte core for that reason. Thanks for checking, tracking an issue to maintain this information in the docs here.

Is there any title that is/was known to have issues due to flickering in bank-switched RAM? Maybe it would be useful to map each bank sequentially and append that to the current map.

Lufia - The Legend Returns is a game that use internal memory banks for some useful addresses like character level and stats.

Then I suggest appending each switchable bank (1~7) at the end of the map, or maybe right after the bank-switched RAM region and discarding the seemingly useless 0x2000 bytes that come afterwards if no one is using that.

Maybe this is better handled in a separate issue, but reopening this one for now.

I don't want to touch RAVBA-M right now (it's a mess), but I will send PRs to gambatte and SameBoy to concatenate banks 1-7 to the tail of the memory map.