joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.64k stars 375 forks source link

Settlers 2 - Dual mouse support #2412

Open rderooy opened 3 years ago

rderooy commented 3 years ago

Is your feature request related to a problem? Please describe. The settlers II (at least the gold edition), when you select the "Unlimited play" option from the main menu, has two players support where 2 mice are meant to be connected.

From the included README.TXT

3. Two-player Mode

A second mouse is needed to play
this game in two-player mode. It
should be noted that Player One
(the player on the left of the
screen) uses the mouse which is
supported by the mouse driver.
Typically, this mouse will be
connected to either a PS/2 port, or
COM1 or COM2. The second mouse must
be connected to a free COM port.
This must be either COM1 or COM2.
Two-player mode is only possible in
"Unlimited Play" mode (see below).

Describe the solution you'd like Not sure how you would support this on a modern system, as even if you attach more than one mouse, they normally just get multiplexed together.

Perhaps some way of emulating the second mouse with a gamepad? Based on the description above, the second mouse should not be registered with the mouse driver. So I guess the game has some kind of mouse driver built-in.

Describe alternatives you've considered Actually connecting a real serial mouse (assuming you have a serial port) and passing that through to dosbox-x may work...

Additional context This may be of interest: https://github.com/dosemu2/dosemu2/issues/974 http://ofp-faguss.com/blog/settlers-2nd-mouse/

Torinde commented 2 years ago

USB pass-through (storage, audio, webcam, scanner and other devices - like a second mouse) from host into DOSbox-X. Mostly useful for Win9x, but also can help with for dual mouse games. Here is shown an example set of USB drivers for DOS - USBUHCI, USBMOUSE, CuteMouse

rderooy commented 2 years ago

Based on the description from the readme, Settlers 2 expects the second mouse to be connected to a serial port without mouse driver loaded. So even if there would be usb pass-through, it would not help. DOSBox-X would have to translate the USB mouse to serial mouse.

joncampbell123 commented 2 years ago

@rderooy Really? Does it expect a mouse that speaks the Microsoft mouse protocol? DOSBox-X does emulate serial mice. It was originally added because Windows 1.0 does not have PS/2 mouse drivers.

rderooy commented 2 years ago

@joncampbell123 I suspect it indeed expects a Microsoft mouse compatible serial mouse, as those were the most common. The readme does not say, so the only way to confirm would be to test it, or dig through the code.

Torinde commented 2 years ago

The pass-through USB mouse (which will become disassociated from the host) can get the DOS mouse driver, then the host mouse can be presented at COM2 (without DOS mouse driver or anything) for the special Settlers use.

Also, what about presenting the host gamepad/joystick (or part of host keyboard, e.g. the second arrows set and two-three other keys) as COM2 Settlers mouse? I think the reverse is already possible via mapper (present host mouse as DOSbox Joystick)?

If that feature gets implemented - of course COM2 should be selectable among all serial ports and PS/2 (and hopefully USB if emulation for that is implemented).

Torinde commented 2 years ago

Bluetooth mouse - are those easier to decouple in the host OS, e.g. not to "merge" into single cursor with the USB mouse?

Android "remote mouse" app (using the phone touchscreen as touchpad for the PC) - sending the commands via IP to DOSbox-X (e.g. not emulating a Bluetooth mouse).

Torinde commented 2 years ago

@joncampbell123 I suspect it indeed expects a Microsoft mouse compatible serial mouse, as those were the most common. The readme does not say, so the only way to confirm would be to test it, or dig through the code.

Genius EasyMouse 3 button works as second mouse in Settlers 2 when configured: serial1 = directserial realport:com3 and using the following USB-to-COM adaptor: image

Not sure if it's using Microsoft mode or Mouse Systems mode (mouse has no physical switch).

Needless to say some kind of emulation via modern hardware is preferable.

Torinde commented 2 years ago

Multiple mouse cursors on one desktop seems related

Torinde commented 1 year ago

Can confirm that the second mouse works with Microsoft mode 1200 baud, no parity.

Now, what can be done to get that supported in DOSbox-X without extra hardware?

rderooy commented 1 year ago

DOSBox-Staging just merged support for dual mouse using something called manymouse https://github.com/dosbox-staging/dosbox-staging/pull/2000

Torinde commented 1 year ago

I understand there are reasons for forking, but I wish that wasn't the case and the developers from the few active forks joined forces to work on a common codebase...