-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Support of Microsoft Serial Mouse on /dev/ttyS1 #1260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
v86 emulates a PS2 mouse, which seems to be supported by elks. I wouldn't mind supporting serial mouse too, but it's probably not very widely used. |
No. This documentation is completely outdated. |
And why in https://copy.sh/v86/?profile=elks it does say |
Do you mean that ELKS supports PS/2 protocol via serial port?
Yes, it reacts to PS/2 mouse initialization. Lines 2233 to 2237 in 2996c08
|
Yes, PS/2 protocol via serial port (not through the BIOS INT 33h). |
I wouldn't mind supporting this, but it's not a high priority. |
Hi @copy and @SuperMaxusa,
Yes. When ELKS is setup for PS/2 mouse, it executes the following code when reading from a serial port:
In other words, it parses each byte of the 3-byte PS/2 mouse message read from serial. It could easily be upgraded to the 4-byte version for mice with scroll wheels or five buttons. It doesn't write anything to the mouse.
That would be fantastic, thank you! Let me know if need any help from my end. I recently ported Microwindows to ELKS, and everything is now running, multiple applications drawing in multiple windows, all running 16-bits, see the screenshot below. @toncho11 has tested this with copy/v86 and all is also running except the mouse. At this time, the ELKS kernel doesn't know anything about mice and implementing a hardware PS/2 mouse requires trapping IRQ 12 which isn't allowed for application programs... the Microwindows server performs all the mouse reading/decoding, all from serial on ELKS (and Linux). I would like to add hardware PS/2 mouse support to the ELKS kernel but its a bit complicated and requires more changes that it should. QEMU and 86Box allow serial mouse emulation but we really like how easily copy/v86 boots and runs an OS right from the web. 16-bit ELKS running Nano-X on QEMU Thank you! |
Hello @ghaerr, nice to see you! Awesome work, looks really cool!
I have experimented with ELKS and the serial port and I have a question: is it possible to change a default mouse port for ELKS ( I tried to In copy.sh/v86, COM0 is used by the terminal by default, so it would be better to use a different COM port. Thanks! |
Hello @SuperMaxusa, Thanks, it's been fun getting Nano-X back running 16-bit. Yes, it's possible to change /bin/nano-X and /bin/mouse to use the second serial port as you mention using
Great, I prefer it that way myself, as in that configuration debug or informative messages will be displayed on /dev/ttyS0 which is routed to the host terminal session, while the mouse operates on /dev/ttyS1. With QEMU, there is otherwise no way to get debug messages to the terminal if the mouse is on /dev/ttyS0. Internally, there is an ELKS hack that sets QEMU=1 at boot (for qemu only) when it is programmatically found that QEMU is running, and then the mouse port is set to /dev/ttyS1 automatically (unless overridden by MOUSE_PORT=). This aids in getting users running without having to otherwise separately specify MOUSE_PORT=/dev/ttyS1. For copy/v86, we'd just upload an image that has MOUSE_PORT= set and everything should run. I've done that on the attached HD32 image. Thank you! |
Hi,
Is it possible to add Microsoft Serial Mouse on /dev/ttyS1 ?
I am trying to use mouse in ELKS.
The text was updated successfully, but these errors were encountered: