* Re: Dosemu and Joysticks
2008-04-29 6:25 Dosemu and Joysticks JD Fenech
@ 2008-04-29 7:06 ` Mike McCarty
2008-04-29 7:20 ` Mike McCarty
2008-04-29 8:07 ` Mike McCarty
2 siblings, 0 replies; 4+ messages in thread
From: Mike McCarty @ 2008-04-29 7:06 UTC (permalink / raw)
To: JD Fenech; +Cc: linux-msdos
JD Fenech wrote:
> Background:
> I have a PS1 controller connected to my PC via USB. I know it works,
> because I'm able to read data from /dev/input/js0 and actually use this
> in several native linux games.
The joystick ports are 0200H and 0201H, IIRC. Using debug, you can
read 0201H (- i 201) and see whether pressing and releasing buttons
changes the bits read. IIRC, reading 0200H "triggers" the timers on the
joystick port. You can't type the commands fast enough to do an input
on the port and see this, but you can write a little program which
does that, then watches port 0200H and prints counts of how long it
took the first bit to change, the second, and so on.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Dosemu and Joysticks
2008-04-29 6:25 Dosemu and Joysticks JD Fenech
2008-04-29 7:06 ` Mike McCarty
@ 2008-04-29 7:20 ` Mike McCarty
2008-04-29 8:07 ` Mike McCarty
2 siblings, 0 replies; 4+ messages in thread
From: Mike McCarty @ 2008-04-29 7:20 UTC (permalink / raw)
To: JD Fenech; +Cc: linux-msdos
JD Fenech wrote:
> Background:
> I have a PS1 controller connected to my PC via USB. I know it works,
> because I'm able to read data from /dev/input/js0 and actually use this
> in several native linux games.
I went and fired up my MSDOS machine, and looked around, and found
an old program I wrote several years ago. I can provide BORLANDC
source, or executable, or both if you like. I misremembered.
One puts out a 00H to 0201H and then reads back from 0201H.
It's not two consecutive port addresses. There is also a BIOS
interrupt to control that port, but I forget how to use it.
It's just been too long. Anyway, the program only reads one of
the joystick bits.
Also, there is a generic hardware test program which you may find
a copy of which can test joystick ports.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Dosemu and Joysticks
2008-04-29 6:25 Dosemu and Joysticks JD Fenech
2008-04-29 7:06 ` Mike McCarty
2008-04-29 7:20 ` Mike McCarty
@ 2008-04-29 8:07 ` Mike McCarty
2 siblings, 0 replies; 4+ messages in thread
From: Mike McCarty @ 2008-04-29 8:07 UTC (permalink / raw)
To: JD Fenech; +Cc: linux-msdos
JD Fenech wrote:
[he needs help]
I also found this, which accords with my (admittedly somewhat vague)
memory.
http://www.epanorama.net/documents/joystick/pc_joystick.html
The emulator should be emulating these bits and the BIOS call.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!
^ permalink raw reply [flat|nested] 4+ messages in thread