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

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

I posted a message about a mouse driver for the C-128 in 80 columns (text mode)
 a while back... Here it is again:

>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.


cs4344af@evax.arl.utexas.edu (Fuzzy Fox) answered:

>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.

I agree. It's not efficient... but does anybody have another suggestion ?
Does anybody know how the mouse driver for the Pocket series does it ?

By the way, for some unknown reason to me, I registered as being 
if18@vlsi.polymtl.ca... This is NOT RIGHT !!!  Please send any mail
to if18@info.polymtl.ca


--


   Miguel Pedro
   Send mail to if18@info.polymtl.ca (NOT @vlsi.polymtl.ca !!!)

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

In article <1990Nov28.220618.23036@vlsi.polymtl.ca> if18@vlsi.polymtl.ca writes:
>>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.
>
>I agree. It's not efficient... but does anybody have another suggestion ?
>Does anybody know how the mouse driver for the Pocket series does it ?
>

Here's a silly idea.  Wait until you see $D600 show that the video
retrace is being done, then note the raster line at $D011/12 that the
VIC is currently drawing.  Since the two of them probably are both
drawing screens at exactly 60 Hz, if you set a raster interrupt on the
VIC at that line, it will probably trigger just when the VDC is doing
its video retrace, so no checking would be needed.

The above would be an initialization procedure, and once set, no need to
examine $D600 again.

					A bizarre fuzzy mind.