Dosemu and Joysticks
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.
Two questions:
1) In Dosemu, I have no clue what's wrong, but at least one of my DOS games can't figure out there's a joystick. I have this set in .dosemurc. Relevant lines:
$_joy_device = "/dev/input/js0" # 1st and 2nd joystick device
$_joy_dos_min = (1) # range for joystick axis readings, must be > 0
$_joy_dos_max = (150) # avoid setting this to > 250
$_joy_granularity = (1) # the higher, the less sensitive - useful if
you have a wobbly joystick
$_ joy_latency = (1) # delay between nonblocking linux joystick
reads
2) Is there a recommended joystick tester for dos? I found "joytest.exe" somewhere a few weeks ago, but can't remember where. It seems to indicate I have correctly set up js0 on my box, and it's carrying over to DOS.
Thanks in advance,
JD
Quoted 2 lines · JD Fenech
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/js0and 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
Signature · 6 lines
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!Quoted 2 lines · JD Fenech
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/js0and 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
Signature · 6 lines
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!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
Signature · 6 lines
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!