[comp.sys.amiga.hardware] Graphics tablet Driver

neil@celia.UUCP (Neil Richmond) (03/14/91)

I could use some help. I have been writing a graphics tablet driver to
use with an old tablet I have. The tablet is connected to the serial port.
My goal is to replace the mouse and use it with any program. At this point
in time I have it partially working, but the results I am getting are not
consistant. Most of my problems stem from interfacing to Intuition. Often
if I open several layers of windows I loose the mouse pointer. Sometimes, I
can hit on my original window the program is in and get control of the mouse
again. Whenever I move the pen away from the tablet, I give control of
the pointer back to the mouse. Once, when I was running DPaint III, the tablet
worked. Usually, the pointer sprite goes to the lower right and stays there.
Has anyone had any experience in this area that can help me? Are there any
references that I can use? Currently, I am relying totally on the Reference
Manuals. I have an A2000 with 1.3 installed. I am using an older version of
Lattice C-Compiler 3.2. Are there any problems here? Thanks in advance.


neil





-- 
Only 3215 shopping days left till the next millenium! 
Neil F. Richmond         INTERNET: celia!neil@usc.edu
Rhythm & Hues Inc.       UUCP: ...{ames,hplabs}!lll-tis!celia!neil)

neil@celia.UUCP (Neil Richmond) (03/15/91)

Someone who might be able to help me is anyone who has written a serial mouse
driver. Is there some source for me to use as reference regarding this driver.
I already have the ROM KERNEL Manuals.

neil

-- 
Only 3214 shopping days left till the next millenium! 
Neil F. Richmond         INTERNET: celia!neil@usc.edu
Rhythm & Hues Inc.       UUCP: ...{ames,hplabs}!lll-tis!celia!neil)

peter@cbmvax.commodore.com (Peter Cherna) (03/16/91)

In article <941@celia.UUCP> celia!neil@usc.edu (Neil Richmond) writes:
>Someone who might be able to help me is anyone who has written a serial mouse
>driver. Is there some source for me to use as reference regarding this driver.
>I already have the ROM KERNEL Manuals.

To send mouse movements, send IO to the input.device with DoIO().  Prepare
an InputEvent, and use the device command IND_WRITEEVENT.  For mouse movement,
use IECLASS_RAWMOUSE (or IECLASS_POINTERPOS).  To do button-down transitions,
use IECLASS_RAWMOUSE and set IECODE_LBUTTON or _RBUTTON.  Button-up transitions
are similar, but you also use IECODE_UP_PREFIX.

Remember that your InputEvent has to be re-initialized each time.

>neil

     Peter
--
Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc.
{uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
My opinions do not necessarily represent the opinions of my employer.
"If all you have is a hammer, everything looks like a nail."

neil@celia.UUCP (Neil Richmond) (03/19/91)

In article <19918@cbmvax.commodore.com> peter@cbmvax.commodore.com (Peter Cherna) writes:


>To send mouse movements, send IO to the input.device with DoIO().  Prepare
>an InputEvent, and use the device command IND_WRITEEVENT.  For mouse movement,
>use IECLASS_RAWMOUSE (or IECLASS_POINTERPOS).  To do button-down transitions,
>use IECLASS_RAWMOUSE and set IECODE_LBUTTON or _RBUTTON.  Button-up transitions
>are similar, but you also use IECODE_UP_PREFIX.

I am doing all these things. The problem I am having is that the mouse is not
behaving consitently with each window I open. WHen I open a new window, the
mouse travels to the lower right corner. I have to move my pen away from the
tablet giving control back to the mouse. Then after I do a mouse operation,
I sometimes get control back to pen. I thought it might have to do with layers,
but I am not sure, now. After I do a mouse event, I close the message port 
and reopen it for the next event.

>Remember that your InputEvent has to be re-initialized each time.

>Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc.
>{uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com

I think I am doing this when I close the message port and reopen it for the 
next mouse event. Thanks.

neil


-- 
Only 3211 shopping days left till the next millenium! 
Neil F. Richmond         INTERNET: celia!neil@usc.edu
Rhythm & Hues Inc.       UUCP: ...{ames,hplabs}!lll-tis!celia!neil)