A project log for Light pen support for RetroPie

Can a Raspberry Pi with CRT display support 8-bit era light pen?

maciej-witkowiakMaciej Witkowiak 06/07/2020 at 17:110 Comments

If you had a look at the code attached to the previous log entry you will see that the way I try to determine the length of one frame is quite convoluted.

This is all because there is no easy access to VSYNC interrupt on the Raspberry Pi under Linux.

All I found was an exchange that the support is there in the firmware:

and someone was able to use it when running bare metal software, not Linux:

But I don't know how to hook and timestamp this IRQ in Linux kernel.

If I could do it, I would simply take the difference between timestamp of light trigger IRQ and VSYNC IRQ and calculate beam position out of that.

If someone knows how to do it, please let me know.

Time for plan B.