First post, by superfury
So I know that the polling rate (in Hz) affects the amount of movements (from A to B on each axis) being reported each second.
Now, how does this affect the movement itself? Does it simply means how many time per second it accumulates movement since last report and report that (what UniPCemu's mouse emulation does (with serial mice as well))? Or does it affect other things as well?
So the mouse simply keeps accumulating any movement it sees into an internal relative x/y register, then once the interrupt fires(the packet is to be sent using the PS/2 cable) it sends the accumulated data over? What if it's out-of-range
(overflow)? Although UniPCemu can't really overflow it's massive relative movement stored (32-bit integer storing mm(PS/2) or mickeys(serial)). Right now it just accumulates the total movement and on each packet tick sends a packet with up to max movement and substracts it from it's accumulated movement for next packets, stopping to send packets once both x/y movement reaches 0 and buttons don't change. Any movement or button activity will start packets at the next timer tick again.
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io