OS/2, eCS & ArcaOS - Technical > Games
DOS VDM - USB and Game port Gamepad support
Mark Szkolnicki:
--- Quote from: Dave Yeo on November 16, 2021, 06:05:43 am ---Seems to me that adding joystick support to SDL would be relatively easy, at least compared to writing device drivers. I'd assume that it would also give joystick support to DosBox. I'm not really a programmer so haven't looked into it.
--- End quote ---
HI Dave!
Probably wouldn't do much good in SDL, as I've seen few games with complex input requireemnts (maybe gamepad support?)
Interestingly I did some further reading in the DosBox Wiki on Wikipedia and found some interesting facts:
https://en.wikipedia.org/wiki/DOSBox#Hardware_emulation
DOSBox uses the Simple DirectMedia Layer external library to not only build new versions of DOSBox from source, but also handle graphics, audio, and input devices.
It can simulate the PC joystick port, with limited options being to emulate one joystick with four axes and four buttons; one gamepad with two axes and six buttons; two joysticks each with two axes and two buttons; a Thrustmaster Flight Control System joystick that has three axes, four buttons, and a hat switch; and a CH Flightstick with four axes, six buttons that can be pressed only one at a time, and a hat switch. Newer joysticks and gamepads will need to use one of these configurations to function.
So actually a very sophisticated piece of software, building on the original Simple DirectMedia layer external library.
As we have an ArcaOS version of DosBox which works well already (I have over 60 games running under DosBox). it seems the problem may be simplified to how to get USB input devices to address ArcaOS, and how to get the OS to address DosBox, as the architecture already exists within the emulator, as DosBox is really the standard go to now for all platforms, for people who want to run most DOS games at least. Don't know about any other legacy DOS programs.
But it is really Games and Input devices were talking here, so it may be very applicable.
I'm not a programmer as well, so I don't know how much it would simplify or complicate matters. I know Joystick drivers were written in the past to address gameport devices under OS/2. Perhaps they could be a framework to start the process.
Best as always!
M
Roderick Klein:
--- Quote from: Martin Iturbide on October 02, 2021, 05:24:47 pm ---Thanks.
I guess the idea will be something like this graphic, to have some gamepad/joystick support for ArcaOS with an USB gamepad.
The red squares are the things that do not exist.
Regards
--- End quote ---
If you want the DOS VDM and the VDD communicate with the USB joystick you will need to have the knowlegde of the SDL library in a driver. That can be a PDD or a VDD. That is tricky part of supporting the VDM. And the VDD has to have code to "trap" I/O instructions so they are routed to the USB device.
Roderick
Roderick Klein:
--- Quote from: Mark Szkolnicki on November 16, 2021, 02:56:24 pm ---
--- Quote from: Dave Yeo on November 16, 2021, 06:05:43 am ---Seems to me that adding joystick support to SDL would be relatively easy, at least compared to writing device drivers. I'd assume that it would also give joystick support to DosBox. I'm not really a programmer so haven't looked into it.
--- End quote ---
HI Dave!
Probably wouldn't do much good in SDL, as I've seen few games with complex input requireemnts (maybe gamepad support?)
Interestingly I did some further reading in the DosBox Wiki on Wikipedia and found some interesting facts:
https://en.wikipedia.org/wiki/DOSBox#Hardware_emulation
DOSBox uses the Simple DirectMedia Layer external library to not only build new versions of DOSBox from source, but also handle graphics, audio, and input devices.
It can simulate the PC joystick port, with limited options being to emulate one joystick with four axes and four buttons; one gamepad with two axes and six buttons; two joysticks each with two axes and two buttons; a Thrustmaster Flight Control System joystick that has three axes, four buttons, and a hat switch; and a CH Flightstick with four axes, six buttons that can be pressed only one at a time, and a hat switch. Newer joysticks and gamepads will need to use one of these configurations to function.
So actually a very sophisticated piece of software, building on the original Simple DirectMedia layer external library.
As we have an ArcaOS version of DosBox which works well already (I have over 60 games running under DosBox). it seems the problem may be simplified to how to get USB input devices to address ArcaOS, and how to get the OS to address DosBox, as the architecture already exists within the emulator, as DosBox is really the standard go to now for all platforms, for people who want to run most DOS games at least. Don't know about any other legacy DOS programs.
But it is really Games and Input devices were talking here, so it may be very applicable.
I'm not a programmer as well, so I don't know how much it would simplify or complicate matters. I know Joystick drivers were written in the past to address gameport devices under OS/2. Perhaps they could be a framework to start the process.
Best as always!
M
--- End quote ---
I really wonder how good a DLL is going to work timing wise and then the commands from the USB gamepad or joystick have to end up with the game.
This is extremely timing sensitive. I doubt Dosbox with a ring 3 DLL and usbresmgr.sys can be responsive enough and that the communication becomes to slow.
When you hit the firebutton the game should receive and process this command ASAP.
The DOS VDM I think has better performance then DOSbox.
Roderick
Mark Szkolnicki:
Hi Roderick!
As to your comments I can't really say, not being able to try input devices on ArcaOS DosBox at the moment. You are far more familiar with the architecture involved based on your involvement with the entire OS/2 based line of OS's in the past, but that has peeked my interest.
I think it would be interesting to set up DosBox on one of my other Windows partitions (Windows XP or 7), and try running a game that uses the Thrustmaster Control System as I have Joystick and Throttle, and see just how fast it responds. It is probably the most complex input array DosBox is programmed to handle.
As the equipment I have is set up for gameport, it would also allow me to test how it responds through the Logilink USB adapter box I have.
Best!
Mark
Mark Szkolnicki:
--- Quote from: Dave Yeo on November 16, 2021, 06:05:43 am ---Seems to me that adding joystick support to SDL would be relatively easy, at least compared to writing device drivers. I'd assume that it would also give joystick support to DosBox. I'm not really a programmer so haven't looked into it.
--- End quote ---
Hi Dave!
It shows that I'm a Luudite when it comes to software technobabble.
(The reason I'm a hardware geek)
Of course SDL = Simple DirectMedia Layer - and from reading the Wikipedia Wiki, it seems DosBox is running the SDL libraries and is essentially an SDL program. Duh!
I reached out to Jochen Schäfer, whose porting DosBox to ask two questions:
1) In his ports, is the OS/2 DosBox code related to Input Devices still present? I noted in the .conf file for the ArcaOs inplementation a section exists under "Joysticks", but I'm sure would not work if we have no frontend USB Input driver under ArcaOS. Addressing your comment, if it is already there, NFAR, which is why I suggested this may be a solution to the problem presented, related to DOS.
2) I also wanted to know if he had some idea of how well Input Devices worked when captured by DosBox (timing, response, implementation), under other OS's, if he had some knowledge in the matter? I agree with Roderick, that would be a key factor as to whether DosBox or a native VBM would be an option.
2Roderick: I also had a follow-up question - for the frontend native USB driver, would there be any different programming required in the ArcaOS input driver to address either a VDM or DosBox? If not, the worst that could happen, if code exists in the current ArcaOS DosBox, is that it works poorly on capture of the Input device, and then a VDM could be developed, as a follow-on.
Perhaps the focus should be on getting a native USB Input Driver first, if that's possible, in whatever manner necessary?
As mentioned, just asking dumb questions, Guys and Gals, because I'm not aware of how labour intensive development of either (native USB driver / Dos VDM) would be. And being a consultant for 28 years, I know how the devil is in the details ......... and the personnel time and cost involved.
Best as always!
M
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version