Page 1 of 1

Need urgent help!!!!

Posted: Thu Oct 16, 2003 10:10 pm
by kawasaki
Hiya, I need a solution into reading the game pad/joystick port.. Ive made a device which detects the heartbeat off of who ever is using the device, and i need to get this information into an application.. How can this be done??


------------------
Pulse Detection -- Pulse I/O -- To Computer via Game Port
------------------


My idea so far is, i use the joystick port to send in the data through the pin number 2 (button 1 of a joystick) into the application, but so far i have met the problem of reading from the game port.. If anyone knows how i can do this, please share it with me.. Im desperate!!

Could it be possible for me to make a driver like other game pads/sticks, if so, how do i do this??

Thankyou so much

Michael King

Posted: Thu Oct 16, 2003 10:11 pm
by kawasaki
BTW, when i say data, i mean either there being a negative charge of 5 volts (can be changed) for every beat.

Posted: Thu Oct 16, 2003 11:33 pm
by Karbon
Normal users can make a post sticky? Hmm, that's odd. I don't think this needs to be sticky ---- admins?

Posted: Thu Oct 16, 2003 11:46 pm
by freak
> Normal users can make a post sticky? Hmm, that's odd. I don't think this needs to be sticky ---- admins?

Here we come... (well not exactly an admin, but sort of) :D

Timo

Posted: Fri Oct 17, 2003 12:15 am
by Road Runner
use inline ASM?

Code: Select all

REM $201 is the joystick port
joy.w
mov dx,$201
in al,dx
mov joy,ax
the variable joy now contains the state of the joystick buttons.

Don't put -5V on the pin, you'll break it. It's intended to be used by shorting the pin to ground but, if you need to drive it with a logic chip, use TTL or CMOS and have +5v for not closed and drive it to 0V to indicate a pulse. Better still, use an open collector or open drain logic device.

Posted: Fri Oct 17, 2003 12:16 am
by vanleth
Kawasaki did you use the ExamineJoystick() command?

Posted: Fri Oct 17, 2003 4:27 pm
by kawasaki
Yes i did, but as no drivers are installed, initjoystick() fails... Im making this hardware to be included with a game that im making with others expected to go commercial, so i need a solution that doesnt involve having the game buyer following reams of instructions.