[Coco] Mouse

Gene Heskett gene.heskett at verizon.net
Thu Mar 26 10:20:13 EDT 2009


On Thursday 26 March 2009, Rogelio Perea wrote:
>No amount of internal rewiring will allow a serial mouse to be used with a
>CoCo.
>
>The CoCo mouse & joystick are analog devices that merely return a variable
>voltage back to the CoCo through the joystick ports, the A/D converter in
>the CoCo then reads the voltage and translates it to a 6 bit binary value
>(range from 0 to 63 decimal).
>
>The serial mouse outputs 'events' derived from electronics inside the mouse
>that read the mouse movement from the encoder wheels - this mechanical basic
>design later went to be emulated using an iR sensor on the mouse - the
>principle of sending binary data from the mouse to the computer port remains
>more or less unchanged.
>
>There was a serial mouse driver written for OS9 to allow the CoCo to use a
>serial mouse, but you'd need the RS232 pak to use it.
>
>Diecom produced The Rat graphics design package and along with it an adapter
>box to allow it to use a serial mouse - I don't have any more details than
>that, never used it - maybe someone else has some insight on that mouse
>adapter.

The above, if my intuition is correct, would mean that it should work with 
both rsbasic and os9ish systems.  If Diecom were to see fit to release that 
bit of hardware's schematics, that would be the ideal situation.  Is anybody 
from Diecom present on this list now?
======================
The below applies to existing installs of nitros9-3.2.8 only.

The existing 3.2.8 version of joydrv_6551L.asm, located at

<http://gene.homelinux.net:85/gene/nitros9/level2/modules/joydrv_6551L.asm>

Has been re-written to make use of either an M$ or Logitek(DeXxa) serial 
mouse.  However to do that I had to add some more defs to l51.defs also, so 
get <http://gene.homelinux.net:85/gene/nitros9/defs/l51.defs> while you are  
getting the above driver src.

Because of the way these mice act on powerup, it is required that the mouses 
initial output when powered up, which occurs on the proper config being 
applied to the 6551, there are a few bytes that are eaten and thrown away by 
this driver.  That is another way of saying it will not get past sysgo on 
bootup if the mouse is not present.  Its waiting on data that never comes in.  
And there is not a non-blocking call I could use to read that AFAIK.

It now defaults to treating a serial mouse as an M$ mouse of 2 or 3 buttons 
until such time as it sees the logitek only 4th byte with data which indicates 
a middle mouse button event.  At that point, and up till then, both mice are 
identical, but it switches modes to logitek mode until the next reboot if that 
occurs.  This only occurs with 3 button mice, AFAIK, the 2 button mice are 
identical across those 2 brand names.  But don't warm up the boiling oil if it 
doesn't. :)

This also assumes the 6551 being used for mouse reception is addressed at 
$FF6C, or 1, 4 byte block of I/O above the default rs-232 Deluxe packs normal 
address of $FF68.  That of course is changeable in the joydrv_6551L.asm src 
you will get from the first link above.

So, with the above code fetched above, and knowledge of the address where the 
6551 lives in your system, this code should build (use namou) and run with 
either style of these now old and precious serial mice.  This also assumes the 
serial mouse is plugged into a db9 style connector that is fully wired for the 
"7 wire protocol".  The mouse is actually powered by the other 'ready' signals 
present on this port when the 6551 is properly reset and init'ed.

I do not know if this code is present in today's download of nitros9.  I do 
know that someone seems to be keeping a fairly close eyeball on it, I see the 
accesses in the weblog from time to time.  I run in such a local config here, 
that I cannot gain access to the cvs commit, or it would have been committed 
last summer.

Have at it. :)
>
>-=[ Rogelio ]=-
>
>On Thu, Mar 26, 2009 at 9:03 AM, Bill <cwgordon at carolina.rr.com> wrote:
>> Has anyone used a PC serial mouse and rewired it to work on the Coco? I
>> have
>> 2 original Coco joysticks that are too damaged to work, but the plug and
>> the
>> wires are still in great shape. Can it be spliced onto the PC mouse and
>> made
>> to work?

No.  There is no analog info in a serial mouses output, its all digital, in 
almost rs-232 format.  For some reason unk to me, the mouse outputs 8n1 data, 
but actually uses only 6n3, only d0-d5 actually contain real data.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
The human race is a race of cowards; and I am not only marching in that
procession but carrying a banner.
		-- Mark Twain




More information about the Coco mailing list