[Coco] CoCo 3 RAM mapping question.
Dave Philipsen
dave at davebiz.com
Sun Apr 26 11:57:40 EDT 2020
From the Lomont Color Computer 1/2/3 Hardware Programming document:
MMU_RAMROM_Mode
A memory page is an 8K block in the GIME address space. A 128K system
has 128/8=16 blocks, numbered hex $30-$3F. A 512K system has 64 blocks,
numbered hex $00-$3F. To place a page in CPU memory for access, write
the page number inthe appropriate memory select register. In RAM/ROM
mode, the ROM pages ($3C-$3F) can bewritten to any of the eight
available MMU slots.
Dave
On 4/26/2020 10:03 AM, Phill Harvey-Smith wrote:
> On 26/04/2020 15:15, Walter Zambotti wrote:
>> So the memory map is type RomMap
>> 32K RAM 0000-7FFF
>> 16K Internal ROM 8000-BFFF
>> 16K External (ROM C000-DFFF RAM E000-FFFF)
>> You are iterating each 8K ram page into slot 3 of the MMU at 4000-5FFF.
>
> Yes all correct
>
>> And you get the page you request until page 3C where you end up getting
>> the ECB ROM.
>
> Yes.
>
>> That doesn't seem to make sense.
>
> That's what I thought :(
>
>> Are you writing the required page to both MMU register banks or at least
>> ensuring the task no is not changing?
>
> The task *shouldn't* be changing, as I said no code should have be
> beeing run from the CoCo3's internal ROM. And interrupts are disabled.
>
>> Or could the ECB ROM already have been copied to ram page 3C by that
>> stage?
> It shouldn't have been, but even if it had the RAM would still be
> writable my test code does the following :
>
> ; Test the RAM
> QPassLoop
> ldb ,x ; get current value in b
> sta ,x ; store test value in RAM
> cmpa ,x ; is it the same?
> bne QPassErr ; nope....exit
>
> QPassContinue stb ,x+ ; replace old contetnts
> cmpx TestEnd ; reached last yet?
> bne QPassLoop ; loop again if more
>
> So I fetch the old value write the test value, check the write and
> then put the value back afterwards so it's non destructive. Obviously
> ROM will fail the cmpa ,x because you can't write to ROM :) :)
>
> Cheers.
>
> Phill.
>
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the Coco
mailing list