mouse control not working as expected
Posted: Sat Jan 06, 2024 12:16 pm
I use the kernal calls to (i) turn on the mouse (mouse_config, $FF68) and (ii) get the location of the mouse (mouse_get, $FF6B) to control the location of a few different sprites .. but things aren't working as I would've expected. As a simplified example of the issue I am having:
- I start the emulator with my laptop mouse at the far left of the computer screen (ie the laptop mouse is far to the left of where the emulator window will open up)
- I type MOUSE 1 in basic and the mouse pointer shows up in the center of the screen
- I move the mouse slowly to the right until it enters the emulator window and it takes over the X16 mouse pointer .. but starts moving it right from the middle of the screen. ie I cannot move the X16 mouse pointer to the left half of X16 emulator screen
- only remedy I have found is to move the mouse far off to the right of the right-hand side of the emulator and then move back left and the mouse x,y seems to pick up properly
Is this "normal" behavior on the emulator? ie the user will simply have to play around with moving the mouse around until it picks up in the right place? What happens on the real machine where you cannot move the mouse off of the X16 window?
- I start the emulator with my laptop mouse at the far left of the computer screen (ie the laptop mouse is far to the left of where the emulator window will open up)
- I type MOUSE 1 in basic and the mouse pointer shows up in the center of the screen
- I move the mouse slowly to the right until it enters the emulator window and it takes over the X16 mouse pointer .. but starts moving it right from the middle of the screen. ie I cannot move the X16 mouse pointer to the left half of X16 emulator screen
- only remedy I have found is to move the mouse far off to the right of the right-hand side of the emulator and then move back left and the mouse x,y seems to pick up properly
Is this "normal" behavior on the emulator? ie the user will simply have to play around with moving the mouse around until it picks up in the right place? What happens on the real machine where you cannot move the mouse off of the X16 window?