[Coco] CoCo 3 RAM mapping question.

Phill Harvey-Smith afra at ramoth.org.uk
Sun Apr 26 11:03:19 EDT 2020


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.

-- 
Phill Harvey-Smith, Programmer, Hardware hacker, and general eccentric !

"You can twist perceptions, but reality won't budge" -- Rush.

-- 
This email has been checked for viruses by AVG.
https://www.avg.com



More information about the Coco mailing list