home *** CD-ROM | disk | FTP | other *** search
-
- Amiga PowerGlove Hi-Res Hack
-
-
- For all you Amiga users interested in the PowerGlove hi-res mode, here is
- my hack. It uses the parallel port, with my own configuration (neither the
- BYTE hack nor the ST hack). For everyone who has asked why I didn't use
- either of these "standards" or the AC Tech joystick hack, I have several
- reasons: I don't have the AC Tech article so I don't know its pinouts, plus
- my RKM Hardware guide says enough nasty stuff about the timing of the
- joystick lines that I decided to avoid it. As for not using pin 13 of the
- BYTE hack, the main reasons are that the DB-25 connector I had lying around
- already had most of the leads connected, with pin 13 not among them. Plus,
- I already knew how to read pin 4 in software, but wasn't sure how to read
- pin 13. That's what you get for only a few hours of software hacking.
-
- See "glove.c" for the hardware connections. I make no guarantees that you
- won't fry your Amiga or your glove with this hack. I am not responsible for
- any typos in any of the files in this archive. Double check everything
- before you hook it up to your Amiga.
-
- The "glovehack" directory contains a more-or-less straight port
- of the original ST hack. The "a0" framing byte shows up in a different
- place in my data packet than where the original docs says it should. Other
- glove-list people reported a similar situation. My code searches for the
- "a0" byte, so it shouldn't matter where it shows up.
-
- The "fingers" directory contains some simple gesture recognition code that
- somebody made available recently. This program includes "pwrglove.c" and
- "pwrglove.h" presenting a "standard" interface to the glove that somebody
- on the glove-list proposed. You should be able to adapt this fairly easily
- for other uses.
-
- I am releasing this code early so that others can get a chance to try it
- out. It doesn't work in all situations, so read the following before you
- complain to me that it doesn't work with your setup...
-
- This code works with both Workbench 1.3 and 2.0. It uses CIAB Timer B in an
- operating system friendly manner. IT BYPASSES THE OPERATING SYSTEM TO USE
- THE PARALLEL PORT HARDWARE DIRECTLY. Someday I will do the appropriate
- resource allocation for the parallel port, but for now I make no guarantees.
- If you have any background tasks doing things with the printer port, you
- should probably get rid of them.
-
- Timing is done with busy-waits, although the CIA timer is used in an attempt
- to make the waits independent of CPU speed. I'll get rid of the busy waits
- in a couple of weeks. The code works on an A500 and an A2000, but does not
- work on my A3000. I should soon have time to work out the timing problems
- so that it will eventually work on all Amigas.
-
- When you run either of the programs, sometimes the glove doesn't seem to
- get reset properly. The glove will beep once when the program starts.
- If it doesn't beep, press ^C and run it again.
-
- I've never seen the rotation value give any meaningful data. The x,y,z
- coordinates are pretty bad in my setup, but someone else using this hack
- says his x,y,z works very well. Buttons and finger movement works well.
-
- See ya in cyberspace...
-
- Alan Bland 10/19/91
- mab@druwy.att.com
- Boulder Amiga Users Group BBS (303)939-9923
-
-