Mouseover = light pen X-Y?

You need an actual VIC.

Moderator: Moderators

Post Reply
Victim_RLSH
Vic 20 Drifter
Posts: 34
Joined: Thu Jul 15, 2021 10:50 pm
Location: Rapid City, SD
Occupation: Machine Shop Lackey

Mouseover = light pen X-Y?

Post by Victim_RLSH »

Does VICE or any other Vic emulator translate the mouse position over the emulated screen to light pen X,Y?
Works in Progress: Gravity Ball, a breakout variant in assembly for the unexpanded vic-20
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Mouseover = light pen X-Y?

Post 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. ;)
Post Reply