Skip to content

[libc] Rewrite mouse and debug console output to work together#2228

Merged
ghaerr merged 1 commit intomasterfrom
mouse
Feb 16, 2025
Merged

[libc] Rewrite mouse and debug console output to work together#2228
ghaerr merged 1 commit intomasterfrom
mouse

Conversation

@ghaerr
Copy link
Copy Markdown
Owner

@ghaerr ghaerr commented Feb 16, 2025

Both Nano-X and ELKS' mouse programs/driver have been simplified to just work by setting "export MOUSE_PORT=/dev/ttyS0" (or /dev/ttyS1), depending on which serial device the mouse is on. The default line in /bootopts has been updated for COM1 and should work by just uncommenting it.

These changes were made because of the problems discussed by @toncho11 in #2226 (comment). Now, only a single mouse port open is attempted, and the debug console routine was changed to work with the mouse port setting.

@toncho11, this should now work for you. Setting "export MOUSE_PORT=/dev/ttyS0" at the shell prompt, or uncommenting the line in /bootopts should work with 86Box. It seems that 86Box only supports mouse on COM1 and there were also problems in the ELKS debug console code that did not work well with the mouse. The mouse may still work without MOUSE_PORT= being set on your emulator, but definitely will with it set.

Here's a prebuilt image:
fd2880.img.zip

@ghaerr ghaerr merged commit 6343600 into master Feb 16, 2025
@ghaerr ghaerr deleted the mouse branch February 16, 2025 02:37
@toncho11
Copy link
Copy Markdown
Contributor

Thanks. I will try later.
Please note that I am unable to boot 2880 images. I just do not know how to set a virtual floppy to 2880kb in 86Box. Please put HDD images if possible next time.

@toncho11
Copy link
Copy Markdown
Contributor

Yes, now it works without modifying anything and COM1 selected in the emulator. Thanks.
It works well on a 486 emulation.
I noticed that clicking on the X in the Start panel does not exit nicely as with CTRL+A. Maybe it was not designed to. Now it closes but it does not give a usable prompt.

@toncho11
Copy link
Copy Markdown
Contributor

I just tried with COM2 and export MOUSE_PORT=/dev/ttyS1 and it also worked.

@ghaerr
Copy link
Copy Markdown
Owner Author

ghaerr commented Feb 16, 2025

I noticed that clicking on the X in the Start panel does not exit nicely as with CTRL+A. Maybe it was not designed to. Now it closes but it does not give a usable prompt.

Thanks! This took a while to figure out: it's not really a hang after exit, but the shell is in a funny terminal mode since it was reading the same keyboard that was set in RAW mode by nano-X. A ^C will exit to a prompt, but PR ghaerr/microwindows#108 fixes the problem of exiting using the close box if no other windows are open, for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants