Help implementing serial mouse support.

45 views
Skip to first unread message

Robert Pengelly

unread,
Nov 9, 2023, 9:42:59 AM11/9/23
to MikeOS
Does anyone know how to get a serial mouse working in a 16-bit operating system?  I have PS/2 working (see attached file) but PCEM has (serial) after the device name for quite a fewer ROMs and the int 15h fails no matter what order I put them in.
mouse.asm

Michael Saunders

unread,
Nov 10, 2023, 2:12:21 AM11/10/23
to Robert Pengelly, MikeOS
Hi Robert,

It's been a long time since I did some mouse stuff in MikeOS (probably
13 years ago). Is your mouse.asm the complete support for PS/2 mice? I
implemented PS/2 at one point but my code was much longer (and
messier) so I removed it. If yours works, maybe it's something we can
add to the next major release – looks nice and clean...

Cheers,
Mike

On Thu, 9 Nov 2023 at 15:43, Robert Pengelly <roberta...@gmail.com> wrote:
>
> Does anyone know how to get a serial mouse working in a 16-bit operating system? I have PS/2 working (see attached file) but PCEM has (serial) after the device name for quite a fewer ROMs and the int 15h fails no matter what order I put them in.
>
> --
> You received this message because you are subscribed to the Google Groups "MikeOS" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mikeos+un...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/mikeos/80146cf8-2e0b-4f36-9298-a6677e0dceb8n%40googlegroups.com.

Robert Pengelly

unread,
Nov 10, 2023, 4:15:41 AM11/10/23
to MikeOS
I've only done minimal testing at the moment but it seems to work so far (see attached screenshot).  There may be some other stuff to do but I'm not sure at the moment.  In qemu I have no problems so far (I haven't tried using the coordinates yet though) but it doesn't work in pcem or 86box as they have serial after the device name so I'm assuming that they are using serial mouse emulation but I don't know how to interface with it as most of the stuff I find is usually for 32-bit OS's.
Screenshot from 2023-11-10 09-09-29.png

Robert Pengelly

unread,
Nov 11, 2023, 1:08:42 PM11/11/23
to MikeOS
Hey all,

Just a little update I finally got both PS/2 and serial mice working (at a basic level) so I've attached two files to this message.  Each one has what type of mouse the code works with in it's name so feel free to include the code in any projects (with modifications to make them useful).
mouse_ps2.asm
mouse_serial.asm
Reply all
Reply to author
Forward
0 new messages