[Coco] ML Question: MMU Block Switching
Robert Gault
robert.gault at att.net
Tue Feb 17 17:02:13 EST 2015
William Mikrut wrote:
> I guess what I need to do is go back to the Super Extended Basic unravelled
> and spend a little more time examining the code.
>
> While I understand mmu pages and the basic function of ff9d-ff9e... I am
> still missing a piece.
>
> For example... I can set ff9d-ff9e to point videoram to start at 6c0000 ...
> or really any block.
>
> How to store data in that location to display on the page is what I am
> missing.
>
> I know its an old subject and I have read Lamont's and Bardens books on
> assembly language.
>
> Are there any other guides besides those two that would help me through
> learning these intricate details?
The Unravelled series is the best place to start but you also want to find the
Service manual for the Coco3. It is also on the Web so if you can't find it let
us know.
You seem to think that $FF9E must be 0 but that is not the case. While it make
not be practical, you can pick any address to start the video screen. For
example, if you would start at $6CA00 then $6CA00/8=$D940 so $FF9D=$D9 and $FF9E=$40
The above will work and while not very useful for setting screens, it could be
part of a vertical scroll procedure. However, scrolling should include use of $FF9C.
Now storing data into memory is simple. You can put it directly anywhere in the
64k RAM; directly addressable by the CPU. To reach the rest of the Coco3 memory,
you need to map that memory into the CPU addressable memory using the MMU registers.
Since the MMU registers grab $2000 bytes at a time, it make sense to use the
edge of such a block as your screen edge and set $FF9D-$FF9E accordingly. You
can use any $2000 byte memory block in the 64k region as long as it does not
displace code or data needed by your program. It should not include any of the
Basic code if you intend to make use of it. But in theory, you could also use
memory from $8000-$FF00 as long as you are in all RAM mode.
Robert
More information about the Coco
mailing list