FYI.. math is what kills our speed, for sure. Floating point type ops in the ST really chug us down :/ Unpacking and vector math are the two main slowdown culprits, but also disk loading and unpoacking. ie: Dungeon Master.. its not cracker-packed, but its packed in their own way..so DM takes for freakin' ever to load, due to it reading a sector, unpacking it, reading another, etc.
As to mouse.. the emu core sort of knows the mouse location, but its the ST OS which knows it most.
ie: We tell the core "here we are!". So we have our idea of where the mouse is, and when the d-pad changes, we adjust that coord pair. Then we feed ti to the core, which compares it to its idea of the mouse, and figures out a diff. ie: If we say its at 200,y, and the core things its at 199,y, it knows to send a +1x to the ST when asked. The ST does whatever it wants with that info.. we have no idea in RAM where that is, since its allocated at boot time and coudl be anywhere. (Thoguh I bet its always the same memory addres,s os I just need ot find it!)
So the ST knows where it truly is.
Fine and dandy, we all 3 know where it is... until soemthign *moves* it :/
Try changing to medium res; the ST resets the mouse to center, but we don't know that. So suddenly we think its at 200, when really its at 320, say.. oops! Problem. Hence moving off the right and holding will stop at the edge (the ST won't let it go too far), but it'll reset our concept of the mouse.
Sure, we can check for reoslution reset and reset our idea to 320x100....
But games move the mouse around, and no way for us to know :/
I'm working on it.
jeff