Lightgun and CRT beam

For anything related to IO (joypad, serial, XE...)

Moderator: BigEvilCorporation

Post Reply
KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Lightgun and CRT beam

Post by KanedaFr » Fri Jul 01, 2016 9:58 pm

Hi,

I'm trying to understand how exactly work each light gun.
Ok about the INT2, TH and HVCounter stuff (thanks Eke)

My question is "how the gun see the CRT Beam ?" and so change TH to raise the int2
or, if you prefer, is the white flash really needed ?
I recently understood (yes, sorry!) that the white flash was in fact to create some white/very bright light beam that the light gun will see.

From what I learnt recently, not all guns are equals on this :
Virtua Gun, need to investigate
Menacer and SuperScope don't seem to require it, but you should use light color, nor dark one (thanks Sik) and avoid red (thanks SNEScentral)
The Justifier...I'm not sure, I read the 2 ways
The GameGun, need to investigate a MacDog McCree binary
The phaser needs it (thanks SMSPower) because it needs 8 lines to really detect it
(I won't talk about the zapper which needs up to 25 lines, so a big square, to react)

So, does the lens / beam detector is more accurate on the newer guns which, in this case, don't really need a full white screen but some light colors ?
in this case, which one could be use like a mouse (without blinking the screen every frame!) ?

secondly, does every gun always "see" the white on a LCD screen ? I don't talk about seeing the correct line, to raise the HVCounter latch, we know it's impossible
i really talk about seeing the (full white) screen which will, at least, could help to detect the gun is pointing somewhere on the screen, not outside.

thanks for reading ;)

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: Lightgun and CRT beam

Post by TmEE co.(TM) » Sat Jul 02, 2016 12:55 am

On NES you don't get an int when gun sees something nor you have a HV counter available so you got to poll in a CPU loop, and that's why you do a flash with holes and poll the gun during such a frame to determine if gun is pointing at the hole or white part.

SMS cannot create interrupts either from controller port but it has HV counter so you can actually determine what gun sees exactly without major polling. Flash is not necessary if the screen is bright enough.

MD is easy, you get int and HV counter and you can have all polling one in the int handler. You will get many ints per frame, depending on gun distance. You get a round area and can deotermine the center and figure out where gun is on the screen. You can use SMS gun with MD, there's nothing stopping you. Flash isn't needed but may be necessary if screen isn't bright enough.

The dot CRT draws is VERY bright, our shitty human eyes cannot see it hahah.

Now as far as LCDs go, NES method works on them but most LCDs have input lag which throws everything off but you can compensate for it to some extent. Only problem is that guns have demodulators in them which makes the gun react only to TV scan rate flickering light (~15KHz) so the gun simply won't see non strobed LCD light. Cheap chinese clone guns lack the demodulators, which is why pointing at lightbulb trick works with them with some games :P
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Re: Lightgun and CRT beam

Post by KanedaFr » Sat Jul 02, 2016 6:57 pm

Ok, so you confirm "white" isn't needed.
It in fact helps you to be sure beam isn't missed whatever pal color you need.

Thanks for the demodulator info, i never read it..

I also found details about the virtua gun / stunner on sega saturn tech bulletin #41, to complete what we already know.

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Re: Lightgun and CRT beam

Post by KanedaFr » Mon Jul 18, 2016 10:55 am

To compare, I found funnny how the G Con did it
http://problemkaputt.de/psx-spx.htm#con ... slightguns

it is its own HVCounter ?!
Using this way, and knowing the X/Y point gun is aimed at (yes, it's THE stuff but doable), we could almost latch at the right "moment"

Post Reply