[Coco] How register $FF9B works

Robert Gault robert.gault at worldnet.att.net
Fri Mar 5 17:58:20 EST 2004


Paul T. Barton wrote:
> I'm trying to fix my last 64/32mb board
> and have found some problems.
> 
> If I write a BASIC program to exercise
> register $FF9B (bits 0..1) what should
> I see on the screen?
> 
> So far I get a non-cleared snowy/garbage
> video and border color change during
> execution of:
That is not what you want to see but it may be correct. A stock Coco 
does not use $FF9B so that loop will do nothing. All that will happen in 
RGB mode is CLS3 (blue) CLS2 (yellow) CLS1 (green) CLS0 (green); with 
the CLS(1/0/null) all giving the same results.
> 
> 10 RGB
> 25 WIDTH 40
> 20 R=&HFF9B
> 30 FOR I=3 TO 0 STTEP -1
> 40 POKE R,I
> 45 CLS(I)
> 50 FOR T=1 TO 500
> 55 NEXT T 'PAUSE SO I CAN SEE IT
> 60 NEXT I
> 
> Paul T Barton
> 

With extended memory and $FF9B toggling the memory/video extra bits, the 
video/memory will not point where it should (ie. where Basic thinks it 
should be) and as a result CLS will not clear the memory to which the 
video lines are pointing. Either video will point correctly but memory 
is swapped or both memory and video will be wrong. It depends on which 
Barton extended memory board is in use.

I don't remember exactly how the latest board works regards $FF9B but 
you want a program that will exercise $FF9B while ensuring that CLS 
clears memory to which the video lines point. So if $FF9B changes the 
video lines, you must also make sure that the correct block of memory is 
used by CLS. That is a function of Super Extended Basis and the MMU 
block numbers are hard coded at $E0E1-$E0F0.

In short, you will probably have to coordinate POKEs to $FF9B with POKEs 
to the default MMU block numbers.




More information about the Coco mailing list