mouse control not working as expected

All aspects of programming on the Commander X16.
Post Reply
jimbo
Posts: 12
Joined: Mon Oct 09, 2023 11:23 am

mouse control not working as expected

Post by jimbo »

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?
the_seb
Posts: 19
Joined: Mon Feb 14, 2022 3:25 pm

Re: mouse control not working as expected

Post by the_seb »

it"s an emulator issue

if you don't want to recalibrate manualy by going far up, down ,right ,left

you can start the emulator with -capture parameter or use ctrl M to toggle it (the cursor will not exit the emulator"s windows)
Last edited by the_seb on Sun Jan 07, 2024 10:36 am, edited 1 time in total.
mortarm
Posts: 281
Joined: Tue May 16, 2023 6:21 pm

Re: mouse control not working as expected

Post by mortarm »

the_seb wrote: Sat Jan 06, 2024 12:31 pm if you don't want du...
"Du"?
DragWx
Posts: 327
Joined: Tue Mar 07, 2023 9:07 pm

Re: mouse control not working as expected

Post by DragWx »

mortarm wrote: Sun Jan 07, 2024 6:16 am
the_seb wrote: Sat Jan 06, 2024 12:31 pm if you don't want du...
"Du"?
Du hast.

(sorry, I couldn't resist :P )

That's something that bothers me about the emulator too, that the mouse needs to be calibrated before it'll work the way you'd expect, but I'm not sure what a good way to fix it would be, other than just capturing the mouse when you need to.
the_seb
Posts: 19
Joined: Mon Feb 14, 2022 3:25 pm

Re: mouse control not working as expected

Post by the_seb »

mortarm wrote: Sun Jan 07, 2024 6:16 am
the_seb wrote: Sat Jan 06, 2024 12:31 pm if you don't want du...
"Du"?
TO

sorry a french word inserted by mistake
mortarm
Posts: 281
Joined: Tue May 16, 2023 6:21 pm

Re: mouse control not working as expected

Post by mortarm »

the_seb wrote: Sun Jan 07, 2024 10:40 am To. Sorry a French word inserted by mistake.
Aucun problème. ;)
Post Reply