Hello to the community. I did a search through the virtualization board, and didn't see any posts about this. So, probably this means I'm doing something wrong.
With Previous 4.1 (and whatever version I had before, installed around Nov. 2025), I've found mouse control to feel very odd as I move the mouse a little faster. Very slow movements track precisely, but the faster I move the more the cursor feels like its on ice, or skipping, almost teleporting, by a short distance. It makes for a jerky, hard to visually track mouse cursor.
I assume this has something to do with the "motion speed adjustment" but I have no idea what those numbers mean in relation to mouse movement. I could use advice on setting those values.
I tried many times to improve mouse movement but it is still not perfect. I can't fix this without detailed information on mouse data on real hardware.
If slow movement is OK and acceleration is too aggressive you can try setting the exponential adjustment to some value below 1. I use 0.9.
Hi, Chris! Welcome to NeXTcommunity! I'm a big fan of Stone Tools. Awesome to see you here. :)
The problem is not purely a matter of emulation. Probably the single best help for fixing NeXT mouse acceleration under emulation is GKMouseScaler, which you can get from here (http://archive.nextcommunity.net/peak/apps/preferences/). It adds a control panel that you can use to redefine the operating system's mouse acceleration curve. The default ROC is an ascending line; I find a flatter line works better:
(https://i.imgur.com/7yxiu9q.png)
A flat horizontal line is also pretty effective. This even improves mouse behavior when emulating white hardware, allowing whatever mouse behavior the host OS is using to shine through without any modification; in VirtualBox I actually use a totally flat line for best results.
FWIW the web version of Previous at infinitemac.org completely overrides the mouse coordinates with host system input values. This is probably
very hacky and most likely only works if the addresses used by the OS to store this information are hardcoded in advance, but it's such a huge QoL improvement that
@andreas_g should definitely consider implementing it (and the requisite guest OS version sniffing) as an experimental option anyway, even if just for fully-patched NS3.3 and OS4.2. ;)
@andreas_g Yes, I saw in the release notes over the years that "improved mouse" was a recurring theme. I do appreciate your efforts toward that end and I'll give your recommendation a shot. Slow is fine with me. Well, you know, within reason. ;D
@Rhetorica A fan of Stone Tools in the wild?! I'm humbled, thank you. That control panel looks like a great addition, thanks for the tip. A flat line sounds like the curve, or lack thereof, that I'd hope for, personally. I'll get that installed, pronto!
Quote from: Rhetorica on Mar 19, 2026, 09:07 PMFWIW the web version of Previous at infinitemac.org completely overrides the mouse coordinates with host system input values. This is probably very hacky and most likely only works if the addresses used by the OS to store this information are hardcoded in advance, but it's such a huge QoL improvement that @andreas_g should definitely consider implementing it (and the requisite guest OS version sniffing) as an experimental option anyway, even if just for fully-patched NS3.3 and OS4.2. ;)
This sounds very interesting! Can you point me to the code that handles this?
Quote from: andreas_g on Mar 20, 2026, 05:15 AMThis sounds very interesting! Can you point me to the code that handles this?
The Previous tree for infinitemac.org is here: https://github.com/mihaip/previous/tree/829b8627316985762556720cb0996a4a573cecb7
I'm afraid I don't know the codebase nearly well enough to identify where it is, and my remarks about how it works are purely speculative! Maybe if you do a mass diff against a revision from the same era? Seems like it's from the softfloat branch around a year before you started work on SDL3.
I checked the code and it seems to use the original mouse handling. There is no code to input absolute mouse coordinates.
Hmm. OK, alternate theory: perhaps mouse input on Windows + SDL3 is actually not very performant and I was so accustomed to it that seeing SDL2 Previous running on WebAssembly was like black magic to me. :)
Still, maybe there's a way to do this without disassembling half the operating system. From what I can tell the kernel never actually handles absolute mouse coordinates; that part is left up to some other part of the OS, presumably DPS.
If you were to clone the mouse acceleration function in the emulator, it would be possible to guess how the guest OS believes the cursor has moved, compare it to where the host expects it to be, and to send corrections the next time the mouse device is polled for updates, a bit like how latency compensation code (https://www.ra.is/unlagged/intro.html) code works in multiplayer games. (Though notably the corrections themselves would have to be adjusted for acceleration—basically we'd need an inverse version of the acceleration function, too.)
Of course, it would ideally be a GPL-friendly clean-room (https://en.wikipedia.org/wiki/Clean-room_design) re-implementation of the acceleration function, rewritten from a specification of how it works. The Darwin-0.1 tree on GitHub contains the mouse acceleration code, and I could definitely write up such a spec if you think this seems doable and worth doing.