What shmokes said, but there are two projects,
the sonic one and
a crt one.
FYI, the arcade gun had most of the location computing hardware in the cabinet, and the gun itself sends a very "raw signal" that doesn't include screen location (without more info and
fairly very time critical computing). Even if mame could emulate the location hardware (which it doesn't), the location would not be accurate enough due to the PC & OS "in the way" messing up the timing. For rough display on the timing precision needed, if frame @ 60 hz, and 640x480 res, that's 1 sec / 60 fps / 480 lines per frame / 640 pixels per line = 1/18432000 of a sec for pixel precision, or 0.000000054253472 of a second.