[Coco] CoCo 3 RAM mapping question.
William Astle
lost at l-w.ca
Sun Apr 26 12:01:57 EDT 2020
On 2020-04-26 7:09 a.m., Phill Harvey-Smith wrote:
> The tests are currently operating in 32K RAM, 16K internal rom, 16K
> external ROM (though the external is actually 8K ROM, 8K RAM but my card
> handles that). The Init1 register contans $C4, so CoCo 1/2 compatible
> mode, MMU enabled and standard SCS.
The MMU does, indeed, remap the ROMs, though not quite the way you would
expect. When ROM mode is enabled, blocks 3C to 3F refer to the ROM part
of the memory map. However, it doesn't matter which of those four blocks
is mapped in a particular MMU register. You'll always get the same area
of the ROM regardless of which one is mapped at any given location. It
basically works as follows:
0000-1FFF: lower 8K of ROM area
2000-3FFF: second 8K of ROM area
4000-5FFF: third 8K of ROM area
6000-7FFF: upper 8K of ROM area
8000-9FFF: lower 8K of ROM area
A000-BFFF: second 8K of ROM area
C000-DFFF: third 8K of ROM area
E000-FEFF: upper 8K or ROM area
FF00-FFFF are the special always mapped I/O area.
Note that the above means it's not possible to map the ECB ROM area
(8000-9FFF, first 8K of ROM) at 4000. If you have the 16K
internal/external split, you should be getting the first 8K of the
external ROM when you map any ROM block at 4000.
The only way you can access the RAM in blocks 3C to 3F is if the machine
is in all RAM mode. You could probably get around that by mapping your
RAM testing routine into FFxx using SLENB when you need it, though.
More information about the Coco
mailing list