Jump to content

Photo

Lightgun homebrew


41 replies to this topic

Poll: Lightgun homebrew (27 member(s) have cast votes)

Would you like to see an xe lightgun homebrew made?

  1. Yes (23 votes [85.19%])

    Percentage of vote: 85.19%

  2. No (0 votes [0.00%])

    Percentage of vote: 0.00%

  3. Unsure (2 votes [7.41%])

    Percentage of vote: 7.41%

  4. Don't Care (2 votes [7.41%])

    Percentage of vote: 7.41%

Vote Guests cannot vote

#1 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Aug 30, 2011 12:31 PM

Does anyone think i should create an atari 2600 homebrew for the atari xe lightgun. I have my doubts seeing that the xe lightgun is extremely rare and very fragine. Please let me know what you think and give ideas of possible lightgun games.

Thanks,

Primordial Ooze

Edited by Primordial Ooze, Tue Aug 30, 2011 12:33 PM.


#2 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash

  • 18,935 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Tue Aug 30, 2011 12:37 PM

Maybe there are more common alternatives for the XE lightgun?

#3 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Aug 30, 2011 12:42 PM

Maybe there are more common alternatives for the XE lightgun?

What would be a common alternitive to the atari xe lightgun, cause frankly this is the first time i'm hearing this. The closest "alternitive" i've found is the "better then the xe lightgun" lightgun, which i'm not allowed to post because it's an ebay thing which isn't allowed.

Sincerely,

Primordial Ooze

#4 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash

  • 18,935 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Tue Aug 30, 2011 12:50 PM

The Commodore light gun works too (with slight modifications).

#5 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Aug 30, 2011 1:16 PM

The Commodore light gun works too (with slight modifications).

2 Questions:

1. Which light gun are we talking about, cause there were 2 light guns for the commodore 64. here and
here

2. What modifications are required exactly?

I prefer a plug n' play approach instead of having to butcher stuff together to get it to work and i would imagine the community would prefer the same.

Sincerely,

Primordial Ooze

Edited by Primordial Ooze, Tue Aug 30, 2011 1:23 PM.


#6 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash

  • 18,935 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Tue Aug 30, 2011 1:28 PM

The pins are not identical, you have to swap some. Maybe this can be overcome by offering different binaries (like I did with my Missile Command TrakBall hack).

But the biggest problem you are facing is: old lightguns do not work with LCDs, Plasmas and 100Hz CRTs.

#7 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Aug 30, 2011 1:36 PM

The pins are not identical, you have to swap some. Maybe this can be overcome by offering different binaries (like I did with my Missile Command TrakBall hack).

But the biggest problem you are facing is: old lightguns do not work with LCDs, Plasmas and 100Hz CRTs.

How will i know if my television will/won't work with the lightgun? I'm not sure if it's a vacuum television, but i do know its quite big and therefore not one of the newer TVs.

Edited by Primordial Ooze, Tue Aug 30, 2011 1:39 PM.


#8 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash

  • 18,935 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Tue Aug 30, 2011 1:40 PM

Check for the model number (probably somewhere at the back) and then search the web. If the TV is pretty thick and heavy, it is a CRT.

#9 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Aug 30, 2011 1:44 PM

Check for the model number (probably somewhere at the back) and then search the web. If the TV is pretty thick and heavy, it is a CRT.

And CRT will work with the atari xe lightgun or not? I've used the Nes lightzapper successfully with the TV, if that helps. Also what are 100hz CRT's?

Sincerely,

Primordial Ooze

Edited by Primordial Ooze, Tue Aug 30, 2011 1:47 PM.


#10 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash

  • 18,935 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Tue Aug 30, 2011 1:56 PM

50Hz CRTs will work. 100HZ CRTs double the frame rate which results into less visible flicker.

#11 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Aug 30, 2011 1:59 PM

50Hz CRTs will work. 100HZ CRTs double the frame rate which results into less visible flicker.

So basically there's no way of knowing without giving a model? Cause like i said i have used a nes lightzapper successfully on it.

Sincerely,

Primordial Ooze

#12 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash

  • 18,935 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Tue Aug 30, 2011 2:02 PM

I am no lightgun expert, but I most likely your TV is 50Hz and the old Atari lightgun should work.

#13 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Aug 30, 2011 3:08 PM

Ok, I've managed to take a look at the back of my television and sound this:

Brand: Daewoo
Model# DTQ-27S4FC

This should help with identifying what type of television it is. Please let me know what your finding are at your earliest convenience.

Sincerely,

Primordial Ooze

#14 roland p OFFLINE  

roland p

    Stargunner

  • 1,918 posts
  • $23
  • Location:The Netherlands

Posted Tue Aug 30, 2011 3:21 PM

Maybe it could work on LCD tv's or plasma tv's if you use sequential targets.

The first detection method, used by the Zapper, involves drawing each target sequentially in white light after the screen blacks out. The computer knows that if the diode detects light as it is drawing a square (or after the screen refreshes) then, that is the target at which the gun is pointed.

http://en.wikipedia.org/wiki/Light_gun

#15 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Aug 30, 2011 3:31 PM

Maybe it could work on LCD tv's or plasma tv's if you use sequential targets.

The first detection method, used by the Zapper, involves drawing each target sequentially in white light after the screen blacks out. The computer knows that if the diode detects light as it is drawing a square (or after the screen refreshes) then, that is the target at which the gun is pointed.

http://en.wikipedia.org/wiki/Light_gun

You mean setting COLUBK to black and COLUP0, COLUP1 and COLUPF to white when the trigger is pressed and then resetting it to normal afterwards?

Sincerely,

Primordial Ooze

Edited by Primordial Ooze, Tue Aug 30, 2011 4:15 PM.


#16 roland p OFFLINE  

roland p

    Stargunner

  • 1,918 posts
  • $23
  • Location:The Netherlands

Posted Wed Aug 31, 2011 1:42 AM


Maybe it could work on LCD tv's or plasma tv's if you use sequential targets.

The first detection method, used by the Zapper, involves drawing each target sequentially in white light after the screen blacks out. The computer knows that if the diode detects light as it is drawing a square (or after the screen refreshes) then, that is the target at which the gun is pointed.

http://en.wikipedia.org/wiki/Light_gun

You mean setting COLUBK to black and COLUP0, COLUP1 and COLUPF to white when the trigger is pressed and then resetting it to normal afterwards?

Sincerely,

Primordial Ooze


Yes, like the following sequence (I don't have real life experience with this, so maybe I'm completely off):
-User presses trigger
-create black screen
-COLUP0 to white, GRP0 to #$FF where the original object was, so you create a white square.

Now you have to check if the diode in the lightgun sees the white. This is the hard part. If the output of the diode remains active for a while when it sees white, you just check for it the next frame. Or just check for it each scanline. If you have an LCD or PLASMA you might have to change timings.

Edited by roland p, Wed Aug 31, 2011 1:44 AM.


#17 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Wed Aug 31, 2011 10:19 PM

Now you have to check if the diode in the lightgun sees the white. This is the hard part. If the output of the diode remains active for a while when it sees white, you just check for it the next frame. Or just check for it each scanline. If you have an LCD or PLASMA you might have to change timings.

Are there any reference documents showing what bits change when the trigger is pulled and when the diode sees white? The Stella Programmers Manual makes no reference to the xe lightgun controllers, and i can't see to find any reference documents pertaining to them.

Sincerely,

Primordial Ooze

#18 Allpaul OFFLINE  

Allpaul

    Chopper Commander

  • 164 posts
  • Location:Nashville,TN

Posted Wed Sep 7, 2011 3:22 PM

Wouldn't the Best Electronics light gun work? I bought one for my 7800, and it's awesome...

#19 alex_79 OFFLINE  

alex_79

    Moonsweeper

  • 393 posts
  • Location:Italy

Posted Thu Sep 8, 2011 4:14 PM


Now you have to check if the diode in the lightgun sees the white. This is the hard part. If the output of the diode remains active for a while when it sees white, you just check for it the next frame. Or just check for it each scanline. If you have an LCD or PLASMA you might have to change timings.

Are there any reference documents showing what bits change when the trigger is pulled and when the diode sees white? The Stella Programmers Manual makes no reference to the xe lightgun controllers, and i can't see to find any reference documents pertaining to them.

Sincerely,

Primordial Ooze

You can deduce the atari lightgun pinout combinig the sega light phaser pinout with the schematic for the SMS gun to 7800 adapter. It should be like this:

1 trigger (active high)
2 -
3 -
4 -
5 -
6 light sensor (active low)
7 +5V
8 GND
9 -


So if the lightgun is connected in the left controller port you have:

bit 4 of SWCHA = 1 if the trigger is pressed, 0 otherwise.
bit 7 of INPT4 = 0 if the sensor sees light, 1 otherwise.


If in the right controller port:

bit 0 of SWCHA
= 1 if the trigger is pressed, 0 otherwise.
bit 7 of INPT5 = 0 if the sensor sees light, 1 otherwise.



I think that the method used in 2600 "Sentinel" is to display a solid light color screen when the trigger is pressed and poll the sensor (INPT5) while keeping track of the vertical and horizontal position of the electron beam on the TV screen. When the sensor detects the light, the program knows where the gun is pointing on the screen. This only works with standard CRT TVs.

Edited by alex_79, Thu Sep 8, 2011 4:35 PM.


#20 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Dec 6, 2011 2:42 PM

I think that the method used in 2600 "Sentinel" is to display a solid light color screen when the trigger is pressed and poll the sensor (INPT5) while keeping track of the vertical and horizontal position of the electron beam on the TV screen. When the sensor detects the light, the program knows where the gun is pointing on the screen. This only works with standard CRT TVs.

Could you please explain this a little better, i don't quite understand what you mean.

Sincerely,

Primordial Ooze

#21 31336haxx0r OFFLINE  

31336haxx0r

    Dragonstomper

  • 515 posts
  • Location:Germany

Posted Tue Dec 6, 2011 3:11 PM

It takes quite a time for the electron beam to travel left to right, up and down in the TV's cathode ray tube. Well IF it's a a CRT device and none of that LCD crap. It is possible to estimate the position of the electron beam and therefore the position the light gun is pointed at by measuring the time from the electron beam starting it's travel to when it hits the light gun's detector.

#22 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Dec 6, 2011 3:31 PM

It takes quite a time for the electron beam to travel left to right, up and down in the TV's cathode ray tube. Well IF it's a a CRT device and none of that LCD crap. It is possible to estimate the position of the electron beam and therefore the position the light gun is pointed at by measuring the time from the electron beam starting it's travel to when it hits the light gun's detector.

Say what????? So what i would need to do is create 2 variables. One would hold the x position of the electron beam. The other one would replace the y register for the y position of the electron beam. Is this correct or am i totally off? Also how many x and y positions are there in a CRT television screen?

Sincerely,

Primordial Ooze

#23 31336haxx0r OFFLINE  

31336haxx0r

    Dragonstomper

  • 515 posts
  • Location:Germany

Posted Tue Dec 6, 2011 3:52 PM

Wikipedia explains it probably better than me: http://en.wikipedia....hode_ray_timing

The thing is, PAL and NTSC use different timings and have different resolutions. Also there is a difference in how many lines are physically possible and how many lines the computer can actually display. Look here for resolution stuff: http://www.atariage....een-resolution/

#24 DemonoidTentacle OFFLINE  

DemonoidTentacle

    Moonsweeper

  • 450 posts
  • Location:Melbourne, Australia

Posted Wed Dec 7, 2011 7:02 AM

I have an XEGS, but I don;t have a light gun. But I'd still be keen to see a lightgun homebrew on a cart!

#25 yell0w_lantern OFFLINE  

yell0w_lantern

    Dragonstomper

  • 552 posts
  • We miss Miki.

Posted Wed Dec 7, 2011 12:12 PM

http://133fsb.wordpr...i-xg-1-adapter/ I built one of these last weekend but have not had a chance to test it on either an Atari or C64.

This site has information on the Commodore 64 conversion of the Sega Light Phaser. Perhaps it will help with figuring out how a C64 light gun might have to be modified for an Atari? http://www.64hdd.com.../c64-proj3.html


[EDIT]
This article http://www.kludgesoft.com/comfever.txt indicates that one of the major differences between Atari and C64 lightguns is the switch type (Normally Closed versus Normally Open) so the C64 has the same switch as the SMS Light Phaser. Therefore a C64 light gun would require some way to invert the signal (such as the transistor setup used in my first link). I have been unable to locate pinouts for the 2 C64 light guns listed above to ascertain whether they use Pin 1 or Pin 5.

The inference is that the switch (unlike the SMS and Atari guns which i believe are Ground) is wired to 5V inside the gun casing and Pin 5 would be TL rather than Pin 1.

Edited by yell0w_lantern, Wed Dec 7, 2011 3:11 PM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users