This article is more than 1 year old

It's 2021 and someone's written a new Windows 3.x mouse driver. Why now?

For those of you who virtualise Microsoft’s finest and struggle with the pointer, this developer has an answer

Two thousand and twenty-one might not seem the obvious year – or century – to give the world a new mouse driver for Windows 3.1, but a developer named Calvin Buckley has written one nonetheless. His motivation apparently is to ensure rapid and reliable rodent operations when Microsoft's venerable OS runs as a virtual machine.

Buckley's day job is developing software for IBM's i platform. A bio states he once ported the .NET framework Mono to help IBM i developers run .NET programs on i.

Nice.

Buckley also codes as GitHub's NattyNarwhal, and in that capacity seems to have spent the Thanksgiving holiday posting a project titled "vmwmouse" that offers a VMware mouse driver for Windows 3.x.

"Running Windows 3.1 in VMware …. but annoyed by having to grab and ungrab the cursor manually?" Buckley asks in the project's README. "Wish you could just move the cursor in and out like a modern OS (one with USB tablet support or VMware Tools drivers), with no Ctrl+Alt dancing? Or want to control your cursor at all under the ESXi web UI?"

His answer to those questions is: "With this driver, now you can." The video below displays the driver in action.

Youtube Video

The driver does its magic by using VMware tools – a collection of utilities Virtzilla offers to help vAdmins, and by replacing the existing PS/2 mouse driver.

Buckley explains that writing a mouse driver poses considerable challenges.

"Normally, mice work by sending a delta of their movements. You'd have to trap the mouse inside of the guest for this to work; any tracking difference would result in a very hard to control cursor. Being able to send the absolute coordinates would be great, because you can know the exact point when the cursor hits the edge."

But Buckley observes there was no way to send those coordinates until USB came along, and Windows 3.x comes from a time before USB.

Buckley's post goes into considerable detail about the fine art of plotting mouse positions, how Windows 3.x and VMware handle mouse input, the vagaries of Intel's '286 and '386 processors, and the Microsoft Macro Assembler (MASM).

He rated the project "surprisingly easy, considering I didn't know x86 assembly before".

"I only implemented this in a day – with lots of struggling against MASM and typos."

Those of us who spent the weekend overeating salute you, Mr Buckley. ®

More about

TIP US OFF

Send us news


Other stories you might like