Jump to content
IGNORED

Well, all right. My Atari 5200 project is...


CV Gus

Recommended Posts

I guess nobody will offer to program a test cartridge without knowing what it is.

 

I've already mentioned that one part can be tested on a CV, but not the other.

 

Essentially, the other part is a combination of parallel resistors and a rewired set-up, so it is now a photodarlington transistor. The Missile Command test consisted of seeing if the cursor would move up if the transistor was exposed to a light source, such as a city being blown up by a missile. It happened, so so far, the thing works. It does not happen unless it is focused directly at the light source.

 

A crude test, to be sure, but it told me what I needed to know so far.

 

By now you've probably guessed that I've built a working Atari 5200 Light Gun. ;)

Edited by CV Gus
Link to comment
Share on other sites

Why not just hack an existing light gun and code an app.?

 

I used an NES zapper as the basis. Remember, I do not have enough money to do these things from scratch.

 

But you can't just simply adapt the wires to different 5200 wires. I literally had to ruin the gun, isolating the key components, and then rewiring them in an entirely different way (such as the photodarlington transistor arrangement).

 

What's more, to get it so ONLY by fully pulling the trigger will it activate, well, that required adding a component from a 1970's VCR.

 

The result is a lightgun that is much more sensitive to light than it was before.

 

What it is now is really similar to the lightguns of the 1970's pre-programmable systems, like the Unisonic and Telstar Marksman. In fact, that's what it was all along- I just redesigned it.

 

If you've never played Duck Hunt or Skeet Shoot on the NES, let me tell you that it is identical to those primitive "shoot-the-white-block-on-a-black-screen" games of the early 1970s. Really!

When you pull the trigger, try hitting the "pause" button. If you get it right, you'll notice that the whole fancy display screen is gone, and the only thing is a white block where the duck or disc was. As far as I can tell, first, for a split-second, the screen goes all black. Then, the white block appears.

 

In the gun is a phototransistor. If light hits it, it allows current to go through (less resistance). The game picks up on this. Thus, it compares the black screen (no light, no current) to the white block screen (possible current). If there is a difference between the two screens, the game assumes that you were pointing the gun at the target, and records a hit.

 

In the case of two targets, after the first block is shown, if there is no hit recorded, the block is replaced by a second block, where the second target was. The two are NEVER shown together with such a set-up.

 

It had always struck me as strange that, except for the Coleco Telstar Arcade- which sold very poorly- practically none of the first, second, or third generation systems ever had light gun games.

 

I hope that this thing will pass the final test- with a test cartridge- because if it does, then 5200 owners will have a whole new genre of games as a possibility (the rest is up to the homebrewers!). There were a number of such games around, such as Witch Hunt.

Edited by CV Gus
Link to comment
Share on other sites

Now you can see why I'm having such trouble figuring out a CV version- a typical light gun works by noting differences in resistance, just like a game with paddle or 5200 controllers. If the CV does not have this in the unit, then this is going to be a serious problem! :?

Link to comment
Share on other sites

Now you can see why I'm having such trouble figuring out a CV version- a typical light gun works by noting differences in resistance, just like a game with paddle or 5200 controllers. If the CV does not have this in the unit, then this is going to be a serious problem! :?

Okay, now I see. I wasn't at all understanding why a light gun was presenting a problem for you on a digital-only input device. After all, it's "hit or miss".

 

First off, I have never personally studied any off-the-shelf light gun so I'm operating on assumptions and generalities to a large degree:

I understand the technology using a photoresistor or phototransistor to detect the light possibly resulting in an analog signal in the first stage, but the console itself shouldn't necessarily have to interpret an analog value as a hit or miss. If there is a particular threshold value which indicates detection, the analog value could easily be converted to a digital "hit/miss" level.

 

Given certain conditions, such analog to digital conversion might even be done by a single buffer or other simple logic gate.

 

I think it would be possible to use such a digital signal on a 5200 if you're trying to create a relatively universal device.

Link to comment
Share on other sites

It's not quite that easy, I'm afraid.

 

With a 5200, it was not too difficult, since the whole 5200 control scheme is based on analog- that is, differences in resistance. Lower resistance, object moves left or up (which is why, when you unplug a controller, the cursor in Missile Command goes down and right- infinite resistance).

 

So for a 5200 light gun, you could just compare two resistances: the black screen (no light/high resistance) to the one with the block- if you are pointing the gun at the block, some light will hit the photocell, and there'll be less resistance- something the 5200 can compare (if you are NOT pointing the gun at the block, then it'll be the same as the black screen). It would be the same as if you moved the joystick a bit up or to the left.

 

In other words, it's something like this:

 

1) You pull trigger. Sequence begins.

 

2) Whole screen goes black for an instant- maybe just 1/30th of a second (typical television frame rate). No light can be hitting photocell in gun.

 

3) Next, where target was- duck, clay disc, witch, whatever- a white block appears for another split second.

From here, one of two things will happen: either you are NOT pointing the gun at the block, in which case you are pointing at black screen- the resistance will be identical. Game assumes you missed.

If you ARE pointing at the block, then light will hit the photocell, resistance will be lower, thus more current- the signal will be different than 1). Game assumes you hit.

 

4) If there is more than one target, and you miss the first, the first block vanishes, and is replaced by a second. It then works the same way.

 

First off, I have never personally studied any off-the-shelf light gun so I'm operating on assumptions and generalities to a large degree:

I understand the technology using a photoresistor or phototransistor to detect the light possibly resulting in an analog signal in the first stage, but the console itself shouldn't necessarily have to interpret an analog value as a hit or miss. If there is a particular threshold value which indicates detection, the analog value could easily be converted to a digital "hit/miss" level.

 

It's not so much the analog itself, as the difference in the two analog signals. THIS is how the game assumes you hit or miss.

 

To do it the way you suggest- digital- would probably have to be done in the gun itself. And that's going to be a problem, since the amount of light- and thus, the difference in resistance- is small. I know of no chip or gate that is so sensitive and precise that it would stay "off" with black screen, but would go "on" when light hits the photocell. It might quite literally require a mini-5200 control set-up in the gun, one that can compare the differences and then switch on or stay off.

 

I have the pin-diagram for the CV, and I also have it for the Commodore-64. Both are 9-pin, but when it comes to the ones involving analog (paddle controllers) on the C-64, you can see a difference between it and the CV. The "paddles" for a CV would actually be a pulse; which is digital (it is similar to the Indy 500 controllers for the 2600). Building a similar light gun for the C-64 would not be too difficult.

 

The only "easy" way might- just might- be a parallel resistor set-up. If I could establish the near-exact resistance-threshold to a CV controller circuit (which would take a multi-tester much better than the ancient beat-up one I have), then using such a set-up might do it. I'll try a crude set-up tonight.

 

It sure ain't going to be easy. Score one for the 5200 here.

Edited by CV Gus
Link to comment
Share on other sites

Wikipedia has an interesting article on Light Guns that explain how they work.

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

 

The method you describe (using the NES Zapper) is a bit different than more "modern" style of light-gun. Incidentally, since the 800/5200 sported several Light Pen designs, would it be possible to modify a light pen to function instead as a light gun?

Link to comment
Share on other sites

Either I'm way off base on how these things work or I completely failed to get my point across. I can't see why the gun would need an analog output. Since one level is associated with black and another level is associated with white, the gun is effectively only putting out 2 different states.

 

Converting that to a digital signal prior to the console input seems on the surface to be a fairly simple thing to do. Now, you might have to have a second output line that confirms that what's on the first output line is valid to be read by the console ("I, the light gun, have finished the task you asked me to do and the result is now ready on that other I/O line.")

 

I'm of the opinion that a gun with a digital output would be the more universal as it could work with the purely digital consoles mentioned and could also be interfaced to the 5200 analog input. It would be simpler than interfacing a digital joystick to the 5200 since there doesn't need to be a "neutral" state created to represent "center".

 

Anyway, I'll be interested to follow your progress and hope to see you make a go of it. If there's anything you think I might be able to help you figure out, PM me.

 

Off to read the article on light guns now...

Link to comment
Share on other sites

Okay, I read the article. I don't have an LCD TV, but does anyone here have experience with trying to use the NES light gun with an LCD? It sounds to me like it conceivably could. By the description, it doesn't sound like it would be dependent on scan line information, but I see references on the 'net saying it won't work.

 

On the other hand, if it did work, you should be able to just point the gun at a white light source and have it register a hit...

Edited by BigO
Link to comment
Share on other sites

Okay, I read the article. I don't have an LCD TV, but does anyone here have experience with trying to use the NES light gun with an LCD?

It doesn't work. It doesn't work on plasmas or DLP either. These phototransistor type of light guns need the electron beam scanning trace to be present the way they are expecting - i.e. a plain old CRT AFAIK. They don't work on HD or progessive scan CRTs either.

Edited by remowilliams
Link to comment
Share on other sites

Either I'm way off base on how these things work or I completely failed to get my point across. I can't see why the gun would need an analog output. Since one level is associated with black and another level is associated with white, the gun is effectively only putting out 2 different states.

 

Converting that to a digital signal prior to the console input seems on the surface to be a fairly simple thing to do. Now, you might have to have a second output line that confirms that what's on the first output line is valid to be read by the console ("I, the light gun, have finished the task you asked me to do and the result is now ready on that other I/O line.")

 

I'm of the opinion that a gun with a digital output would be the more universal as it could work with the purely digital consoles mentioned and could also be interfaced to the 5200 analog input. It would be simpler than interfacing a digital joystick to the 5200 since there doesn't need to be a "neutral" state created to represent "center".

 

Anyway, I'll be interested to follow your progress and hope to see you make a go of it. If there's anything you think I might be able to help you figure out, PM me.

 

Off to read the article on light guns now...

 

 

The problem is how the gun actually detects the difference, and how the console uses it. It's the difference that matters; finding the "neutral" position doesn't matter. My design has the cursor in Missile Command above the middle (it uses the vertical control). When there is an explosion on the screen, and you are pointing the gun right at it, the cursor moves up slightly. To the 5200, that means "the resistance in the vertical circuit has gone down a bit, so move the cursor up a bit."

 

The sort of light gun I'm building, like many others, uses either a photoresistor, or a phototransistor. Light from the television screen hits the phototransistor (usually focused through a lens), and this causes the resistance to go down- more current can flow. Slightly.

 

Any console with analog detection- be it a Vic-20, Commodore-64, Atari 2600/5200/7800- is not too difficult to deal with.

 

Here's what I think you're missing, BigO- with the 5200, all one has to do is tell the game that if there is ANY difference between the black screen and black screen/white block, then it can assume that you "hit" the target. You can even adjust that difference, if need be. It can be anywhere from 1 Ohm to, well, whatever.

 

That's how the thing works. When the screen is black, no light can be hitting that phototransistor. When the screen is black and has that white block, then one of two things can happen: either you are pointing the gun at a black area of the screen (no difference: MISS), or you are pointing the gun at the block (slight difference: HIT).

 

What makes it worse is that the further you are away from the screen, the less light can hit the gun. It's not linear; it's exponential. Put the gun right on the screen, and measure how much light hits the cell. Move it back one foot, and notice how much less hits it. Move it back another foot, and the drop is much greater than the first time.

 

As a result, the difference in resistance is going to be pretty minor. VERY VERY minor, in fact. This is not too big a problem with the 5200, which after all is all about analog and can detect even the slightest difference, but a CV?

 

A CV is all digital. This means all or nothing. This means that you cannot tell the CV to assume you "hit" something if there is a "slight difference in current/resistance;" which is how light guns usually work.

 

To get a CV light gun to work, you must figure out how to switch a current (be it from the fire control, keypad button, or directional control) from on to off or off to on just by that ever-so-slight difference in resistance. And that, believe me, is not easy. Especially if you want to be say, seven feet from the screen.

 

So far, I'm getting somewhat closer. It's going to take a circuit that really is that sensitive, and even so, I'll probably have to add control knob so you can adjust the sensitivity. You'd have to get it riiiiigghhhhhhttt on the borderline between off and on, so that ANY decrease in resistance (via a series resistor set-up, most likely) will do it. An operational-amplifier, which can act "digital" by a slight difference in resistance or voltage (which can be done with a certain kind of two-resistor set-up) most likely. Since my guide book is from 1983, I assume that something more effective now exists.

 

Again, score one for the 5200. Likewise, if you want to build a paddle controller for the CV- it wasn't too hard for the 5200.

Edited by CV Gus
Link to comment
Share on other sites

Okay, I read the article. I don't have an LCD TV, but does anyone here have experience with trying to use the NES light gun with an LCD? It sounds to me like it conceivably could. By the description, it doesn't sound like it would be dependent on scan line information, but I see references on the 'net saying it won't work.

 

On the other hand, if it did work, you should be able to just point the gun at a white light source and have it register a hit...

 

An "old-fashioned" television works sort of like a film- pictures being "flashed" (or in the case of a tv, "drawn,") quickly. I believe 30 times/second with the tv. Since the human eye can, at best, not detect any change happening any faster than 12 times/second, you see what appears to be a continuous movement, rather than a choppy one.

 

I think an NES bases that dark screen-and-then-dark screen with white block sequence on that particular mode of operation. If you try it on a screen that does it some other way, it'll be thrown off, and not work. Sort of like the way images in Tower Toppler on the 7800 works, but only when you play it on the sort of televisions the 7800 was meant to be used with. Oddly enough, a simpler light gun game might still work where a more sophisticated one won't.

 

Would the resolution of the tv matter? I'd imagine that if you could play regular NES games on the tv, then it wouldn't.

Edited by CV Gus
Link to comment
Share on other sites

The way I'm understanding your operational description, you're making the console+software to do an analog to digital conversion and I've attempted to say that I think you could more readily achieve your "universal" solution by doing that A/D conversion in the peripheral and I suggested a general methodology that I would look into if I were trying to accomplish that.

 

I don't think I'm completely missing what you're saying, but I do think that you aren't understanding what I'm trying to say so I'll get out of your way and let you get on with your work. Best of luck.

 

</sidetrack>

Link to comment
Share on other sites

The way I'm understanding your operational description, you're making the console+software to do an analog to digital conversion and I've attempted to say that I think you could more readily achieve your "universal" solution by doing that A/D conversion in the peripheral and I suggested a general methodology that I would look into if I were trying to accomplish that.

 

I don't think I'm completely missing what you're saying, but I do think that you aren't understanding what I'm trying to say so I'll get out of your way and let you get on with your work. Best of luck.

 

</sidetrack>

 

 

Actually, there is no analog-to-digital conversion needed with the 5200. When you point the light gun directly at a light source, it is exactly as if you are moving the joystick up just a teeny bit. The game program is told to react to that as a "hit." I wouldn't want to do an analog-to-digital conversion with any console or computer capable of doing that; it would be needless bother, and you can build an adjustment knob into the circuit so you could be more- or less- accurate.

 

The simple fact is, anything capable of reading analog is going to be much easier to build a paddle or light gun for. For a paddle, a decent potentiometer will do. But for the CV, what you'll need is the spinner in the SAC in miniature. And with MANY out-of-sync contacts on the "wheel." Yes, it can be done, but man, just try to BUILD it. A real delicate, miniature nightmare.

 

 

Once I found the 9-pin diagram for the CV and was able to compare it to those of the Vic-20 and Commodore-64, I knew that any answer to the CV light gun problem would have to be in the gun itself. There is an operational comparator which, even in 1983, can be set up to react to a very small difference in voltage (ON or OFF; digital), and there are other ways, too. Currently, I am trying out a few of them. But the problem is that tiny amount of light that you have to work with.

 

Is there anyone here who'd program a simple test cartridge for me for the 5200 gun? I cannot do that part myself, I'm afraid.

Link to comment
Share on other sites

Actually, there is no analog-to-digital conversion needed with the 5200. When you point the light gun directly at a light source, it is exactly as if you are moving the joystick up just a teeny bit. The game program is told to react to that as a "hit." I wouldn't want to do an analog-to-digital conversion with any console or computer capable of doing that; it would be needless bother, and you can build an adjustment knob into the circuit so you could be more- or less- accurate.

 

The simple fact is, anything capable of reading analog is going to be much easier to build a paddle or light gun for. For a paddle, a decent potentiometer will do. But for the CV, what you'll need is the spinner in the SAC in miniature. And with MANY out-of-sync contacts on the "wheel." Yes, it can be done, but man, just try to BUILD it. A real delicate, miniature nightmare.

 

 

Once I found the 9-pin diagram for the CV and was able to compare it to those of the Vic-20 and Commodore-64, I knew that any answer to the CV light gun problem would have to be in the gun itself. There is an operational comparator which, even in 1983, can be set up to react to a very small difference in voltage (ON or OFF; digital), and there are other ways, too. Currently, I am trying out a few of them. But the problem is that tiny amount of light that you have to work with.

 

Is there anyone here who'd program a simple test cartridge for me for the 5200 gun? I cannot do that part myself, I'm afraid.

 

I didn't say A/D conversion was *necessary* to use a light gun with a 5200. A 5200 has digital inputs as well as analog inputs whether you choose to take advantage of them or not. You *are* doing an A to D conversion, as I wrote before. You're taking a continuously variable analog signal and converting it to a two-state "hit or miss" detection using the console hardware and a software application. What I said was that if you did the conversion in hardware in the peripheral you'd be much closer to your goal of a "universally" applicable gun.

 

Somewhere along the line, I wound up with the impression that you were trying to build a gun that could work with more than one consoleThat's apparently not the case, and is probably why what I'm saying isn't tracking with you. Probably, I was just projecting what I'd try to do (i.e. overcomplicate the thing).

 

Myself, I don't think it's a huge effort to do the conversion in external hardware especially if you're willing to a sensitivity adjustment in it. The cheapest of cheap op-amps has a significant amount of gain which could easily accomplish the conversion of a tiny analog signal variance to a digital "1/0" type of output. A comparator would be an appropriate implementation using such a device. I suspect, as I alluded to earlier, that a simple transistor amplifier circuit controlled by the variable resistance from your sensor and fed into a digital buffer would come very near meeting the requirements of what I thought you were trying to build.

 

If I were to try to implement the "spinner" that you mentioned, I'd be looking first at off-the-shelf optical encoders, but they tend to lean toward the expensive side. From a lower cost perspective, there are about a zillion old opto-mechanical mice around that contain components that could be used to implement such a thing. Might get lucky and pick up NOS of a bunch of identical ones to use for a limited run.

 

Again, I apparently got off track on what you're trying to accomplish. Sorry if I derailed your thread. Carry on.

Edited by BigO
Link to comment
Share on other sites

In theory, you're right about the op-amp- but you have to keep in mind that the tricky part is range. With a 5200 gun, ANY measurable difference will do, whether you are right on top of the screen or 6 feet away.

 

But there comes a point where the light is so diffused by distance, that it won't work.

 

I'm closer to getting it, much more so (even in 1983 op-amps might react to a difference of less than 1/100 of a volt (which can be done via 2 resistors)). But I want it to be easy to use, so I'm going to tinker around with several ideas.

 

As for paddle controllers- I'm trying to make one that does not require outside power sources. The design is simple enough, but man, just try to build it!

 

Funny thing- in theory, the older 5200s could have paddle games for EIGHT players! Since each controller has 2 potentiometers, that's 2X4; so even the 2-port 5200s can handle a 4-player version of Warlords. On the CV, however, this would prove tricky indeed.

 

So while the CV pounds the 5200 on controllers overall, in other specific homebrew areas, the 5200 has the edge. If someone programmed Arkanoid for the 5200, I already have my paddle controller for it. For the CV, you'd have to use the SAC spinner (not very practical), the Turbo module (would lack the feel of the arcade version), or the Roller Controller- same problem, though it would work.

 

To build a CV controller for such a game, however, you'd likely use the same circuit design as the spinners. No problem, but how to activate it? Smooth motion would need maybe up to 250 pixel-moves (consider paddle size). This means that the spinner, with its 2 magnets, must be spun 125 times. Not overly fun.

 

Therefore, in order to do it like a 5200 paddle controller, you'd have to have the dial spinning a larger wheel, with many out-of-sync contacts (like a 2600 Indy 500 controller, but with more). There are several ways of doing this, but none as easy as simply wiring a potentiometer with a series resistor.

 

 

But for now, I'm going to focus on the 5200 Light Gun. It just needs that test cartridge, and I can fine-tune it.

 

Then, since of course I will publish the design here, 5200 owners can have light gun games :P . Hopefully, CV owners will follow! :D :D

Edited by CV Gus
Link to comment
Share on other sites

For the 5200, can't an adapter be made easily to use an XE gun? Just tie the guns output to the one trigger line (the one that is read with the trigger register), connect the trigger to the other fire button input (the one that is read with keyboard or like break key). The hardware (ANTIC) then handles the gun for you just like on the computers? Or is the goal to make a cross platform light gun, or one that will work with non-crt tvs?

Edited by kenfused
Link to comment
Share on other sites

Well, since I've never seen an XE lightgun, I couldn't tell you that. But in theory, any light gun that simply detects and sends a difference between dark and light should work.

 

Since NES light guns are still fairly common, that's the design I prefer. Keep in mind that I did heavily modify it for the 5200.

 

The beauty of an analog set-up is that all you have to do is compare two resistances/currents- regardless of what they are. 1,000,000 Ohms to 999,500 Ohms or 1,000 to 500, it doesn't matter.

 

But for a CV light gun, it's all or nothing. Therefore, the comparison has to be in the hardware (the gun or related part) itself. In this case, between a set value (as opposed to a 5200, which can be nearly any value), and a certain change. It's a good deal trickier, really. But it can be done, although a sensitivity dial is very important.

 

In effect, you'd have to have a set-up that will allow a current through (say, the left fire button) completely when the chip is exposed to a little light, or not allow ANY current through when not exposed to that light. Op-Amps can do this, but man, why couldn't it be like a 5200?

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...