Page 1 of 1

Mouseover = light pen X-Y?

Posted: Mon Aug 02, 2021 6:07 pm
by Victim_RLSH
Does VICE or any other Vic emulator translate the mouse position over the emulated screen to light pen X,Y?

Re: Mouseover = light pen X-Y?

Posted: Tue Aug 03, 2021 1:51 am
by Mike
Indeed VICE supports light pen emulation with the mouse. You find it in the "Settings ..." menu.

Here you find a example application, MINISKETCH.

Note the physical resolution of the lightpen (registers) has a 4-pixel granularity in X and a 2-pixel granularity in Y direction. It also needs some quite involved code to check whether the lightpen is it at the screen at all (I use a simulated lightpen event at a Y position outside the visible screen for this).

Finally, the lightpen needs a bright background to work properly - using a black background is no good idea. ;)