[Coco] 256 color mode and the 210 Lines Per Field "bug"

Nick Marentes nickma at optusnet.com.au
Sat Apr 13 04:19:55 EDT 2013

And now for part 2 of my investigation of address $FF99 and the 
mysterious 210 Lines Per Field!

Type in the following short test program...

10 WIDTH 40
15 POKE &HFF99,64
20 POKE &HFF9A,32
25 GOTO 25

Line 10 sets width 40 in a non-VDG GIME mode.
Line 15 turns on the 210 Line Per Field (LPF from here on)

In this 40 column GIME mode, we can set the border color by loading a 
color value in address $HFF9A.

So, Line 20 sets the border to RED. You can change it to whatever color 
you wish.

Line 25 just keeps it locked in so that BASIC doesn't reset our POKE's.

If you remember from last time, sometimes when we turned on 210 LPF, we 
got a blank screen. Other times, we got the endless scrolling beyond the 
top and bottom borders.

Now, we can set the border to a color before turning on 210 LPF.

As usual, we still sometimes get the blank and sometimes the endless 

Note the blank screen is comprised of the border color.

This tells me that the main active field area (the inside of the border 
region) is turned off and so it is filling the screen with the border.

I assume that the circuitry in the GIME is always creating this border 
background as a solid screen of color and that the main area in the 
middle is via another part that "overlays" itself in the centre. This 
centre part changes size dependant on the resolution chosen but always 
superimposed over the "border".

So why does activating the 210 LPF sometimes turn off the main screen 
area and sometimes just roll through memory overpassing the vertical 

What is it that determines which state the 210 LPF will take?

It appears that *when* the 210 LPF is activates is important.

It would seem that if the GIME is currently generating a border region 
(outside of the active area) and 210 LPF is activated, it doesn't 
reactivate the active area and so the border (background) fills the screen.

If 210 LPF is activated during the GIME generating an active area, that 
active area stays on, hense it continues beyond the vertical boundaries 
of the screen.

210 mode is clearly turning something off that is affecting the scanline 

I wonder if this is a bug or part of an unfinished feature?

Nick Marentes

More information about the Coco mailing list