Need urgent help!!!!

Everything else that doesn't fall into one of the other PB categories.
kawasaki
Enthusiast
Enthusiast
Posts: 182
Joined: Thu Oct 16, 2003 8:09 pm

Need urgent help!!!!

Post 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
kawasaki
Enthusiast
Enthusiast
Posts: 182
Joined: Thu Oct 16, 2003 8:09 pm

Post by kawasaki »

BTW, when i say data, i mean either there being a negative charge of 5 volts (can be changed) for every beat.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Normal users can make a post sticky? Hmm, that's odd. I don't think this needs to be sticky ---- admins?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
freak
PureBasic Team
PureBasic Team
Posts: 5946
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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
quidquid Latine dictum sit altum videtur
Road Runner
User
User
Posts: 48
Joined: Tue Oct 07, 2003 3:10 pm

Post 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.
Last edited by Road Runner on Fri Oct 17, 2003 12:55 am, edited 1 time in total.
vanleth
User
User
Posts: 79
Joined: Sat Jun 28, 2003 4:39 am
Location: Denmark - Valby

Post by vanleth »

Kawasaki did you use the ExamineJoystick() command?
kawasaki
Enthusiast
Enthusiast
Posts: 182
Joined: Thu Oct 16, 2003 8:09 pm

Post 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.
Post Reply