Jump to content
IGNORED

Lightgun homebrew


Primordial Ooze

  

34 members have voted

  1. 1. Would you like to see an xe lightgun homebrew made?

    • Yes
      30
    • No
      0
    • Unsure
      2
    • Don't Care
      2

  • Please sign in to vote in this poll.

Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Wikipedia explains it probably better than me: http://en.wikipedia.org/wiki/Light_gun#Cathode_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.com/forums/topic/169128-what-is-the-atari-2600-screen-resolution/

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...