[comp.sys.cbm] Mouse driver for the C-128 in 80 columns

if18@vlsi.polymtl.ca (11/23/90)

Some time ago, I programmed a text mouse driver for the C-128...
The idea is simple... Everytime the mouse moves, I redefine four
characters in the VDC (in 80 columns, of course!) and print them on
the screen where the mouse should be.

The result is a mouse indicator that works very much like the one
found in programs like the Pocket series (Writer, Planner,...).

Most of the time, the indicator on the screen moves around smoothly.
However, from time to time, the indicator flashes as it's moving.
It seems to be happening whenever the raster beam passes over it (I can
actually keep it flashing if I follow the raster beam at constant speed).

My question is:

Is there any way to avoid the unpleasant flashing ?

In 40 columns, this problem could be solved by generating a interrupt
with the raster beam (when it's outside the screen). All I'd have to
do is wait for the interrupt and then redefine the character
set. Can the same register be used for the 80 column screen ?? (I don't
think so, but anyone knows for sure ?)

If it can't be used, is there another register for the 80 column ?
Can I used bit 6 of address $d600 (in read mode) to know if the raster
beam is outside the screen , or is there an internal VDC register that
could be used ??

I know it can be done because Pocket Writer and the likes don't have
this problem.

Any help would be greatly appreciated.
Thank you.


   Miguel Pedro

cs4344af@evax.arl.utexas.edu (Fuzzy Fox) (11/26/90)

In article <1990Nov23.043410.12818@vlsi.polymtl.ca> if18@vlsi.polymtl.ca writes:
>In 40 columns, this problem could be solved by generating a interrupt
>with the raster beam (when it's outside the screen). 

This is a neat idea, and would seem to work, since the 40 and 80 column
video are both refreshed at 60 Hz.  However, I don't think the beams are
synchronized (that is, they don't start their vertical refreshes at the
same time), so if you refreshed at line 0 of the 40 column screen, it
might constantly refresh at line 97 on the 80 column screen, and so on.

>Can I used bit 6 of address $d600 (in read mode) to know if the raster
>beam is outside the screen , or is there an internal VDC register that
>could be used ??

You should use $D600, bit 6 to determine if the video is being
refreshed, and when it is, then do your changes to the character info.
Not the most efficient way to use CPU time, but it works.