apple2gs: more accurate address map#15335
Open
arekkusu42 wants to merge 1 commit into
Open
Conversation
* revisit 2fb9b7c, restore direct r/w of expansion RAM * fix reads of unpopulated RAM/ROM banks * implement expansion RAM ghosting, per Hardware Ref
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit implements more accurate emulation of apple2gs memory banks, with and without a memory expansion card:
Previously, this was only partially implemented by bfb18d1. Most software won't attempt to use memory beyond the installed amount, so is not affected. But the edge-case behaviors are now accurately emulated, i.e. with
-ramsize 4M, writes to 50/0005 are visible at 10/0005.Testing:
Details
A new BANKMAP test visualizes the power-on memory detection results, by drawing a grid of the first byte of each bank. (On my 37-year old PCB, the bank register via the floating bus is noisy, so each byte is read 100 times to report the noise %.) The results are compared to pass/fail expectations, computed by the test according to the detected memory amount and motherboard ROM version.
BankMap_260512.zip
Before this PR, MAME 0.287 does not implement ghosting, or handle the floating bus correctly for banks > E1:

After this PR it matches hardware results (here, a ROM3 with an OctoRAM using jumpers set for 4MB but the last 1MB removed to create a "not recommended" odd memory size):

And similarly for all other supported
-ramsizeconfigurations (thanks to @jawaidbazyar2 and Kelvin Sherlock for testing ROM1 behavior.)Note: MAME currently does not emulate any apple2gs-specific memory cards, but there exist cards (one, two) with expansion ROM sockets (for booting ROMdisk debug tools). The way that I "unmap empty ROM banks" here might not work for those...