The GamePort of the IBM PC ========================== First, the pinout: 1 XY1 (+5v) 2 Switch 1 3 X1 4 Switch 1 (GND) 5 Switch 2 (GND) 6 Y1 7 Switch 2 8 N.C. 9 XY2 (+5v) 10 Switch 4 11 X2 12 Switch 3&4 (GND) 13 Y2 14 Switch 3 15 N.C. You can call BIOS interrupt 15h, subfunction 84h to obtain the button setting and the joystick position. I've cut these lines from Ralf Brown's interrupt list release 31. --------8<--------8<--------8<--------8<--------8<--------8<--------8<-------- INT 15 - BIOS - JOYSTICK SUPPORT (XT after 11/8/82,AT,XT286,PS) AH = 84h DX = subfunction 0000h read joystick switches Return: AL bits 7-4 = switch settings 0001h read positions of joysticks Return: AX = X position of joystick A BX = Y position of joystick A CX = X position of joystick B DX = Y position of joystick B Return: CF set on error AH = status 80h invalid command (PC,PCjr) 86h function not supported (other) CF clear if successful Notes: if no game port is installed, subfunction 0000h returns AL=00h (all switches open) and subfunction 0001h returns AX=BX=CX=DX=0000h a 250kOhm joystick typically returns 0000h-01A0h -------->8-------->8-------->8-------->8-------->8-------->8-------->8-------- By the way: it's a good idea to download the newest release of this list... best source of information anywhere! Here's an archie report... --------8<--------8<--------8<--------8<--------8<--------8<--------8<-------- Host m.ehd.hwc.ca (142.4.8.13) Last updated 18:58 26 Dec 1992 Location: /pub/msdos/system FILE rw-r--r-- 331544 Sep 13 17:48 inter32a.zip FILE rw-r--r-- 307988 Sep 13 17:50 inter32b.zip FILE rw-r--r-- 165049 Sep 13 17:37 inter32c.zip Host nic.funet.fi (128.214.6.100) Last updated 08:24 30 Dec 1992 Location: /pub/msdos/SIMTEL20-mirror/info FILE rw-r--r-- 331544 Sep 15 06:55 inter32a.zip FILE rw-r--r-- 307988 Sep 15 06:56 inter32b.zip FILE rw-r--r-- 165049 Sep 15 06:56 inter32c.zip Location: /pub/msdos/databases/info FILE rw-r--r-- 331544 Sep 15 06:55 inter32a.zip FILE rw-r--r-- 307988 Sep 15 06:56 inter32b.zip FILE rw-r--r-- 165049 Sep 15 06:56 inter32c.zip Host pinus.slu.se (130.238.98.11) Last updated 07:38 27 Sep 1992 Location: /wuarchive.wustl.edu/archive/mirrors/msdos/info FILE rw-r--r-- 331544 Sep 14 00:00 inter32a.zip FILE rw-r--r-- 307988 Sep 14 00:00 inter32b.zip FILE rw-r--r-- 165049 Sep 14 00:00 inter32c.zip Location: /wuarchive.wustl.edu/archive/mirrors4/garbo.uwasa.fi/programming FILE r--r--r-- 331814 Sep 13 12:48 inter32a.zip FILE r--r--r-- 308258 Sep 13 12:50 inter32b.zip FILE r--r--r-- 165319 Sep 13 12:37 inter32c.zip -------->8-------->8-------->8-------->8-------->8-------->8-------->8-------- Chris -- Beware of programmers who carry screwdrivers!