[Coco] Hi! I'm new here!

Robert Gault robert.gault at att.net
Sun Mar 1 23:12:20 EST 2015


Hugo Dufort wrote:
> I want to enable the hi-res modes in Basic using only pokes. I'm pretty sure
> I've done that in the past.
>
> I tried the following naive sequence:
> poke &hFF98,192(bit7=1 for graphics, bit6=1 for mmu)

$FF98 does not control the MMU registers. That is done at $FF90 which bit6 turns on.

> poke &hFF99,30 (select 320x200x16 using bit mask)
> poke &hFF90,0 (b7=0 for high-res)
>
> Is it necessary to tell the MMU where to map the graphics array?
>
> Since I don't have all bit mask defs, I'm pretty sure I'm breaking things in
> memory.
>
> Hugo

If you want the above to "work" it must be within a program.
ex
10 POKE&HFF98,128:POKE&HFF99,30:POKE&HFF90,0
20 GOTO20

However, the above will not display the graphics screen as video is still 
pointed elsewhere. Also, the value sent to $FF90 will turn off the MMU and disk 
activity. A "better" value would be the default for Coco3 modes of $4C.

The default location of the hi-res graphics screen is at $60000. Assuming you 
started in the 32-column low-res text mode, you must clear the Vscroll register 
at $FF9C and set the Voffset for $6000 with $FF9D-$FF9E=$60000/8=$C000.
So at a minimum you would need:
10 POKE&HFF98,128:POKE&HFF99,30:POKE&HFF90,$4C
20 POKE&&HFF9C,0:POKE&HFF9D,&HC0:POKE&HFF9E,0
30 GOTO30
However, the above will likely show a pattern on the screen because it was not 
cleared. That will get much more complicated as you will need to map the screen 
into your 64K cpu space and send data to it.
You must find a $2000 byte block of free memory, point the required MMU register 
to $60000, write to it, increase the MMU value, write to the next block, and 
continue until the entire screen has been sent data.

Robert


More information about the Coco mailing list