[comp.sys.ibm.pc.hardware] Game Controller programming

rdw2030@venus.tamu.edu (01/27/91)

Does anyone have any information or know of a source for programming game
controllers?  I have a CH Gamecard III-Automatic.  I would like to include
joystick capability in some programs.

While on the subject, is there any generally available documentation on 
using mice?

Many thanks...

Mark C. "Bro!" Lowe - KB5III

acook@athena.mit.edu (Andrew R Cook) (01/28/91)

In article <11536@helios.TAMU.EDU>, rdw2030@venus.tamu.edu writes:
|> Does anyone have any information or know of a source for programming game
|> controllers?  I have a CH Gamecard III-Automatic.  I would like to include
|> joystick capability in some programs.
|> 
|> While on the subject, is there any generally available documentation on 
|> using mice?
|> 
|> Many thanks...
|> 
|> Mark C. "Bro!" Lowe - KB5III

As far as mice go, they are relatively easy . . .  I suggest you go to the
local bookstore, and pick up a copy of Microsoft Press' Programmer's Reference
Guide for the Mouse(title may not be right - don't have the book in front of
me).  This book describes how to use the mouse driver so that a four year old
could do it.  If you use MS C, i would suggest that you rather not use the
library functions that comes with the book, but just use int86 calls.  Its
faster that way.  If you are an experienced programmer, a better reference is
a little book from Microsoft press called MSDOS Extensions (for mouse, 
expanded memory, & CD ROM).  It describes briefly INT 33 (mouse driver) and
all of its sub-functions.  No examples, but an experienced programmer will
have no problems.  There are problems with using the driver, but for most things
it is OK.

As far as gamecard programming, I have never tried that.  You may find that
you will have to contact the manufacturor and get specific hardware info from
them, and write a driver using inp & outp, or even better, go to machine
language.  In this case I don't envy you.  You may also find the the manufacturor 
can just point you to a pre-written driver that you can get for free, or a modest 
charge.  Just call the manufacturor.

If you find you need programming samples for the mouse driver, let me know, I can
post one, or mail you some.

Good Luck !

Andy Cook
acook@athena.mit.edu

cur022%cluster@ukc.ac.uk (Bob Eager) (01/29/91)

In article <11536@helios.TAMU.EDU>, rdw2030@venus.tamu.edu writes:
> Does anyone have any information or know of a source for programming game
> controllers?  I have a CH Gamecard III-Automatic.  I would like to include
> joystick capability in some programs.

There isn't a lot available as far as I know. The IBM PC or XT Technical
Reference shows the BIOS code for handling the game controller. This makes
a good starting point - it's quite short.

The CH Gamecard III Automatic has an extra bit to program - the speed setting.
I think this is on port 202 - 200 and 201 are the normal ones I believe.
-------------------------+-------------------------------------------------
Bob Eager                | University of Kent at Canterbury
                         | +44 227 764000 ext 7589
-------------------------+-------------------------------------------------

fargo@iear.arts.rpi.edu (Irwin M. Fargo) (01/30/91)

In article <21699.27a535d9@cluster@ukc.ac.uk> cur022%cluster@ukc.ac.uk (Bob Eager) writes:
>In article <11536@helios.TAMU.EDU>, rdw2030@venus.tamu.edu writes:
>> Does anyone have any information or know of a source for programming game
>> controllers?  I have a CH Gamecard III-Automatic.  I would like to include
>> joystick capability in some programs.
>
>There isn't a lot available as far as I know. The IBM PC or XT Technical
>Reference shows the BIOS code for handling the game controller. This makes
>a good starting point - it's quite short.
>
>The CH Gamecard III Automatic has an extra bit to program - the speed setting.
>I think this is on port 202 - 200 and 201 are the normal ones I believe.

If you have FTP access, look in the <PD.MSDOS.INFO:GAMEPORT.INF> file on
simtel20.  It gives a very good, although technical, explanation of how to
program the game port.

If you don't have FTP access, send me some e-mail and I can get it to you.

-- 
Thank you and happy hunting!		Actually: Ethan M. Young
"If Linus looked like Worf, would you	Internet: fargo@iear.arts.rpi.edu
 try to take his blanket away?"		Bitnet (??): usergac0@rpitsmts.bitnet
	- dorsai@pawl.rpi.edu		Disclaimer: Who said what?