Game Port Hardware Information |
|
axsoft
版主 發表:681 回覆:1056 積分:969 註冊:2002-03-13 發送簡訊給我 |
Game Port Hardware Information
============================================================
資料來源: http://www.repairfaq.org/filipg/LINK/PORTS/F_gameport.html 1. Gameport for the PC from Rich Furman *1-5V to X1
5V to X2-9*
*2-Return from 1B1
Return from 1B2-10*
*3-Return from X1
Return from X2-11*
*4-GND to 1B1
GND to 1B2 and 2B2-12*
*5-GND to 2B1
Return from Y2-13*
*6-Return from Y1
Return from 2B2-14*
*7-Return from 2B1
5V to Y2-15*
*8-5V to Y1 Key:
X1 -- Joystick 1, X Axis
Y1 -- Joystick 1, Y Axis
1B1 -- 1st Button, Joystick 1
2B1 -- 2nd Button, Joystick 1
X2 -- Joystick 2, X Axis
Y2 -- Joystick 2, Y Axis
1B2 -- 1st Button, Joystick 2
2B2 -- 2nd Button, Joystick 2 -------------------------------------------------------------------------------- 2. Gameport for the PC from Christian Blum 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. 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 -------------------------------------------------------------------------------- 2.1) Search for latest Intterupt List
By the way: it's a good idea to download the newest release of this list... best source of information anywhere! You can find the best locations using: http://www.shareware.com and search for "Comprehensive listing of interrupt calls" under "DOS" OS... you will get a bunch of listings. 網路志工聯盟----Visita網站http://www.vista.org.tw
---[ 發問前請先找找舊文章 ]---
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |