Hallo Herr Paul Dufresne via Freedos-devel,

am Donnerstag, 20. März 2025 um 06:58 schrieben Sie:

> Not much people responding!

> Maybe I was rude a bit, by not giving a link to specific Ralf Brown interrup 
> list function:
> https://www.ctyme.com/intr/rb-1514.htm

you were rude to me by not providing the output of the joystick responses in 
DOSBox/VirtualBox/QEMU/real machine.

good luck fighting this alone.


> The original function:
> static bool joystick_detected()
> {
>     struct joystick joystick;
>     joystick_read(&joystick);
>     return joystick.axis[0] != 0 || joystick.axis[1] != 0;
> }
> works correctly under dosbox, but always detect Joystick in QEMU and 
> VirtualBox...

> my function:
> static bool joystick_detected()
> {
>     struct joystick joystick;
>     joystick_read(&joystick);
>     return (joystick.axis[0] & 0xff00) != 0x8600;
> }
> works correctly under QEMU and VirtualBox, but always detect joystick in 
> dosbox...

> so when there is no joystick, and it is detected, the program hang in 
> calibrate joystick function.

> How I test in dosbox?

> The default dosbox.conf file is:
> # Suggested DOSBox configuration for DOS Defender
> #   Usage: dosbox -conf dosbox.conf dosdef.com

> [sdl]
> output=opengl
> windowresolution=1280x800

> [cpu]
> core=dynamic
> cycles=max

> and as seen in it, can be tested with 
> dosbox -conf dosbox.conf dosdef.com

> but as I don't have a joystick, I added joystick emulation to dosbox.conf:
> [joystick]
> joysticktype=2axis
> timed=false
> autofire=false
> swap34=false
> buttonwrap=false

> After that I do:
> dosbox -conf dosbox.conf
> Ctrl-F1
> then I add key bindings (wish I could add mouse bindings):
> to X- 
> to X+
> to 1
> to 2
> then save

> after that I:
> dosbox -conf dosbox.conf dosdef.com
> and then I am able to calibrate, with the keys I defined ... then play a bit.

> So my version is still usable in dosbox (dosbox always think there is a 
> joystick present0...
> But also works in QEMU and VirtualBOX (giving an error and exiting when there 
> is no joystck).

> For this reason I believe my version is better for FreeDOS than the original 
> one (which is better for DosBox).

> Probably DosBox should be fixed to return AH=86h when no joystick is present.



> _______________________________________________
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel





Mit freundlichen Grüßen / with kind regards
Tom Ehlert
+49-15151898538



_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to