Lemmings with two mice
- pgimeno
- Top Contributor
- Posts: 709
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Lemmings with two mice
This may be a long shot, but thing is, I was always fascinated that the Amiga version of Lemmings could be played by two players simultaneously, each with a separate mouse. Sadly, plugging two USB mice and booting Minimig does not do what I hoped, because both mice move the same pointer.
Is there a chance that each mouse controls one different joystick port?
Is there a chance that each mouse controls one different joystick port?
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
-
- Posts: 90
- Joined: Sun May 24, 2020 8:39 pm
- Has thanked: 32 times
- Been thanked: 32 times
Re: Lemmings with two mice
At the moment, no, as the MiSTer framework merges all USB mouse inputs to one.
Maybe it’ll change some day, but Sorgelig does not consider it an issue/priority, since so few games support it. At least not when I made an issue on github some months ago.
Hopefully that will change if people keep requesting/bringing it up (it does come up every once in a while). Especially since MiST implemented it last year and the minimig supports it there, so a roadmap for doing that exists.
Implementing non-standard mouse inputs would only benefit a handful of amiga/SNES games. And a few PC games supported a second mouse connected via serial, if that could be supported on MiSTer.
I wanted dual mice to play Lemmings and The Settlers on the minimig and Settlers 2 on the ao486 core. I managed to play 2-player Settlers on the ao486 core using analog stick input to control player 2. It’s not perfect, but it works alright, and certainly better than my childhood memories of playing it with a joystick, which I recall as being downright unplayable.
Unfortunately, I don’t think lemmings or settlers on the amiga supports other inputs for player 2 besides a second mouse.
Maybe it’ll change some day, but Sorgelig does not consider it an issue/priority, since so few games support it. At least not when I made an issue on github some months ago.
Hopefully that will change if people keep requesting/bringing it up (it does come up every once in a while). Especially since MiST implemented it last year and the minimig supports it there, so a roadmap for doing that exists.
Implementing non-standard mouse inputs would only benefit a handful of amiga/SNES games. And a few PC games supported a second mouse connected via serial, if that could be supported on MiSTer.
I wanted dual mice to play Lemmings and The Settlers on the minimig and Settlers 2 on the ao486 core. I managed to play 2-player Settlers on the ao486 core using analog stick input to control player 2. It’s not perfect, but it works alright, and certainly better than my childhood memories of playing it with a joystick, which I recall as being downright unplayable.
Unfortunately, I don’t think lemmings or settlers on the amiga supports other inputs for player 2 besides a second mouse.
- Caldor
- Top Contributor
- Posts: 930
- Joined: Sat Jul 25, 2020 11:20 am
- Has thanked: 112 times
- Been thanked: 111 times
Re: Lemmings with two mice
Oh, this reminds me I think I saw and update that might have fixed this but I forgot about it again and did not test it.
I do not remember what the update said, but I was pretty sure it meant it should be possible to use two mice. I think what it did was making it possible to add serial devices... but it might also have been the AO486 core and not the Amiga core this feature was added to.
On DOS machines, the Settlers game got around having two mouse at the same by by using two different connections, one being... PS/2 usually, and the other being serial. Which is why I think that update should work.
Reading through Toothbrushes reply, you got it to work on AO486? Using Analog input for one controller is how it was done on DOS machines, so I do think that is how it has to work with the AO486 core.
I do not remember what the update said, but I was pretty sure it meant it should be possible to use two mice. I think what it did was making it possible to add serial devices... but it might also have been the AO486 core and not the Amiga core this feature was added to.
On DOS machines, the Settlers game got around having two mouse at the same by by using two different connections, one being... PS/2 usually, and the other being serial. Which is why I think that update should work.
Reading through Toothbrushes reply, you got it to work on AO486? Using Analog input for one controller is how it was done on DOS machines, so I do think that is how it has to work with the AO486 core.
- bazza_12
- Top Contributor
- Posts: 443
- Joined: Sun May 24, 2020 7:49 pm
- Location: Yorkshire, UK
- Has thanked: 263 times
- Been thanked: 121 times
Re: Lemmings with two mice
i didnt even know lemmings had a split screen 2 player mode that used 2 mice.. i hope this feature gets added at some point.. looking at the game on youtube, it looks great with 2players, 2 mice..
The music is reversible but time is not. Turn back. Turn back
-
- Top Contributor
- Posts: 531
- Joined: Tue May 26, 2020 5:06 am
- Has thanked: 87 times
- Been thanked: 211 times
Re: Lemmings with two mice
It may with a FT232 USB serial converter and a serial mouse.
You would need to select Uart:Modem, Link:Serial, Baud 9600.
I have not tested this idea - can't find a serial mouse (only PS2) and I guess I lost all my little converters...
You would need to select Uart:Modem, Link:Serial, Baud 9600.
I have not tested this idea - can't find a serial mouse (only PS2) and I guess I lost all my little converters...
-
- Posts: 90
- Joined: Sun May 24, 2020 8:39 pm
- Has thanked: 32 times
- Been thanked: 32 times
Re: Lemmings with two mice
Settlers 1 did both in DOS: If it detected a serial mouse on COM1 it would use that for player two. If it didn’t detect one, it would use the joystick input and prompt you to calibrate the stick when starting a two-player game.Caldor wrote: ↑Mon Jun 21, 2021 7:41 am Oh, this reminds me I think I saw and update that might have fixed this but I forgot about it again and did not test it.
I do not remember what the update said, but I was pretty sure it meant it should be possible to use two mice. I think what it did was making it possible to add serial devices... but it might also have been the AO486 core and not the Amiga core this feature was added to.
On DOS machines, the Settlers game got around having two mouse at the same by by using two different connections, one being... PS/2 usually, and the other being serial. Which is why I think that update should work.
Reading through Toothbrushes reply, you got it to work on AO486? Using Analog input for one controller is how it was done on DOS machines, so I do think that is how it has to work with the AO486 core.
On MiSTer you have to switch in and out of mouse mode to calibrate it, and you have to map different buttons for mouse clicks and joystick buttons, but other than that it’s it works without any quirks. And after some practice player 2 with analog is only slightly handicapped vs. player 1 on joystick mouse mode, and wireless controls is really addictive
Unfortunately, I think Settlers 2 only supported serial mouse for player 2, but not joystick.
Re: Lemmings with two mice
Could it work by any chance with the multiplexed SNAC implementation of Antonio Villena ? You could ask him in the sellers area ?
Hmm, too bad I only had one mouse back in the days
Hmm, too bad I only had one mouse back in the days
- bazza_12
- Top Contributor
- Posts: 443
- Joined: Sun May 24, 2020 7:49 pm
- Location: Yorkshire, UK
- Has thanked: 263 times
- Been thanked: 121 times
Re: Lemmings with two mice
yeah i was thinking that. i never even selected two players cos.. er... i've got no friends..
The music is reversible but time is not. Turn back. Turn back
- Caldor
- Top Contributor
- Posts: 930
- Joined: Sat Jul 25, 2020 11:20 am
- Has thanked: 112 times
- Been thanked: 111 times
Re: Lemmings with two mice
Wow... had no idea Settlers 1 supported a joystick for the other player. But was that even worth it?ToothbrushThreepwood wrote: ↑Mon Jun 21, 2021 6:12 pmSettlers 1 did both in DOS: If it detected a serial mouse on COM1 it would use that for player two. If it didn’t detect one, it would use the joystick input and prompt you to calibrate the stick when starting a two-player game.Caldor wrote: ↑Mon Jun 21, 2021 7:41 am Oh, this reminds me I think I saw and update that might have fixed this but I forgot about it again and did not test it.
I do not remember what the update said, but I was pretty sure it meant it should be possible to use two mice. I think what it did was making it possible to add serial devices... but it might also have been the AO486 core and not the Amiga core this feature was added to.
On DOS machines, the Settlers game got around having two mouse at the same by by using two different connections, one being... PS/2 usually, and the other being serial. Which is why I think that update should work.
Reading through Toothbrushes reply, you got it to work on AO486? Using Analog input for one controller is how it was done on DOS machines, so I do think that is how it has to work with the AO486 core.
On MiSTer you have to switch in and out of mouse mode to calibrate it, and you have to map different buttons for mouse clicks and joystick buttons, but other than that it’s it works without any quirks. And after some practice player 2 with analog is only slightly handicapped vs. player 1 on joystick mouse mode, and wireless controls is really addictive
Unfortunately, I think Settlers 2 only supported serial mouse for player 2, but not joystick.
-
- Posts: 90
- Joined: Sun May 24, 2020 8:39 pm
- Has thanked: 32 times
- Been thanked: 32 times
Re: Lemmings with two mice
Yes and no. Mouse is best, mouse emu with sniper mode is a close second, and joystick depends on the precision of the analog stick.Caldor wrote: ↑Tue Jun 22, 2021 1:40 pmWow... had no idea Settlers 1 supported a joystick for the other player. But was that even worth it?ToothbrushThreepwood wrote: ↑Mon Jun 21, 2021 6:12 pmSettlers 1 did both in DOS: If it detected a serial mouse on COM1 it would use that for player two. If it didn’t detect one, it would use the joystick input and prompt you to calibrate the stick when starting a two-player game.Caldor wrote: ↑Mon Jun 21, 2021 7:41 am Oh, this reminds me I think I saw and update that might have fixed this but I forgot about it again and did not test it.
I do not remember what the update said, but I was pretty sure it meant it should be possible to use two mice. I think what it did was making it possible to add serial devices... but it might also have been the AO486 core and not the Amiga core this feature was added to.
On DOS machines, the Settlers game got around having two mouse at the same by by using two different connections, one being... PS/2 usually, and the other being serial. Which is why I think that update should work.
Reading through Toothbrushes reply, you got it to work on AO486? Using Analog input for one controller is how it was done on DOS machines, so I do think that is how it has to work with the AO486 core.
On MiSTer you have to switch in and out of mouse mode to calibrate it, and you have to map different buttons for mouse clicks and joystick buttons, but other than that it’s it works without any quirks. And after some practice player 2 with analog is only slightly handicapped vs. player 1 on joystick mouse mode, and wireless controls is really addictive
Unfortunately, I think Settlers 2 only supported serial mouse for player 2, but not joystick.
It’s a hard compromise in terms of sensitivity, since there’s no sniper mode like there is for the MiSTers mouse emu mode.
The joystick sensitivity is too low to allow you to quickly move the cursor across the screen, and still too high to allow easy precise movements. With a precise analog stick on a modern joystick, it’s possible to make fine-grain movements with only a little overshooting back and forth at times (my experience with a 8bitdo SN30 Pro after some practice), and since it’s not exactly a high-paced game, you can still manage.
I do remember trying to use a flightstick as a kid in the mid-90s, and that was absolutely unplayable and impossibly frustrating trying to make fine movements - constantly overshooting the target by a quarter of a screen-width just as the cursor finally got within a few pixels of the target.
- pgimeno
- Top Contributor
- Posts: 709
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Lemmings with two mice
I guess that the first obstacle is getting the MiSTer's Linux to handle both mice independently, so that Main can pass that segregated data to the core. If there's a way to do that, it's probably through raw access to the USB input or something like that. In my MiSTer, for example, one mouse is /dev/hidraw2 and the other is /dev/hidraw5; I'm sure there's a way to identify which /dev/hidraw* devices are mice, the problem is that Main then also has to act as a mouse driver that converts HID raw data to mouse data, bypassing the kernel.
Edit: After more research, it seems that it can be done without bypassing the kernel, through /dev/input/*. Main is already doing that, see https://github.com/MiSTer-DB9/Main_MiST ... .cpp#L2570, so it would be a question of distinguishing each mouse separately and providing something like a mouse ID to the cores. Then of course, the Minimig core would need to be changed to interpret the ID as the joystick port number or something alike.
In other words, it's far less difficult than I anticipated. The main difficulty would be to deal with plugging/unplugging mice from the USB port.
Edit: After more research, it seems that it can be done without bypassing the kernel, through /dev/input/*. Main is already doing that, see https://github.com/MiSTer-DB9/Main_MiST ... .cpp#L2570, so it would be a question of distinguishing each mouse separately and providing something like a mouse ID to the cores. Then of course, the Minimig core would need to be changed to interpret the ID as the joystick port number or something alike.
In other words, it's far less difficult than I anticipated. The main difficulty would be to deal with plugging/unplugging mice from the USB port.
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
-
- Posts: 90
- Joined: Sun May 24, 2020 8:39 pm
- Has thanked: 32 times
- Been thanked: 32 times
Re: Lemmings with two mice
If you understand C, you can check out the MiST firmware commit to see how it manages it:pgimeno wrote: ↑Wed Jun 23, 2021 10:11 pm I guess that the first obstacle is getting the MiSTer's Linux to handle both mice independently, so that Main can pass that segregated data to the core. If there's a way to do that, it's probably through raw access to the USB input or something like that. In my MiSTer, for example, one mouse is /dev/hidraw2 and the other is /dev/hidraw5; I'm sure there's a way to identify which /dev/hidraw* devices are mice, the problem is that Main then also has to act as a mouse driver that converts HID raw data to mouse data, bypassing the kernel.
Edit: After more research, it seems that it can be done without bypassing the kernel, through /dev/input/*. Main is already doing that, see https://github.com/MiSTer-DB9/Main_MiST ... .cpp#L2570, so it would be a question of distinguishing each mouse separately and providing something like a mouse ID to the cores. Then of course, the Minimig core would need to be changed to interpret the ID as the joystick port number or something alike.
In other words, it's far less difficult than I anticipated. The main difficulty would be to deal with plugging/unplugging mice from the USB port.
https://github.com/mist-devel/mist-firm ... 9861e87eda
On MiST the firmware checks the if number of USB mice inputs exceeds 1, and forwards the separate inputs to the minimig core if that’s the case.
I think the biggest issue on MiSTer is how to deal with potentially multiple mice and joysticks and toggling mouse emu mode on/off. Not that it’s impossible, just that the MiSTer framework is more refined than MiST in terms of USB inputs.
- pgimeno
- Top Contributor
- Posts: 709
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Lemmings with two mice
My understanding is that once each mouse event's source mouse is identified, you just need to send to the core an additional source ID, or a sequential mouse number, that identifies which mouse the current event comes from. Current behaviour is equivalent to ignoring that number and sending all mouse events to the Amiga joystick port 0 regardless of mouse ID; desired behaviour is to use it to select the Amiga joystick port to assign the event to.ToothbrushThreepwood wrote: ↑Thu Jun 24, 2021 5:36 pm On MiST the firmware checks the if number of USB mice inputs exceeds 1, and forwards the separate inputs to the minimig core if that’s the case.
I think the biggest issue on MiSTer is how to deal with potentially multiple mice and joysticks and toggling mouse emu mode on/off. Not that it’s impossible, just that the MiSTer framework is more refined than MiST in terms of USB inputs.
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
Re: Lemmings with two mice
I'd like to add three very good reasons for two player mice/trackballs support in MiSTer:
- Marble Madness Arcade
- Marble Madness (Tengen, Japan only) for Mega Drive
- Marble Madness for Amiga
All three had perfect 2 player trackball support back in the days and I miss it badly.
I hope it will be added soon, I got my MiSTer mainly for this game.
Bern