Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: How do I build... Pong?  (Read 2937 times)

0 Members and 1 Guest are viewing this topic.

Procyon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 75
  • Last login:October 29, 2024, 11:40:34 pm
  • MAME FTW
How do I build... Pong?
« on: March 23, 2004, 10:57:41 pm »
As an extension of my curiosity about building MAME machines, I've become interested in the very origin of this hobby, which ultimately leads to Nolan Bushnel's creation of the Pong arcade (I know Ralph Baer made the concept first, I'm just looking at it from an arcade perspective.)  Unfortunately, I'm a programmer, and therefore suffer from the "I have no idea how it works, I just write code for it" syndrome.

I've been to http://www.pong-story.com and thought I had found what I was looking for when I came across his scanned magazine articles from various electronics hobby magazines in the 70s.  But after the first couple of paragraphs in each article, which describe the concept of a game like Pong as if you were a two year old, they always launch in to a description of the circuit diagrams that seem to me as if they were intended for a masters level electrical engineer.

So I'm wondering if any of you out there have any idea where I might be able to find information that would be comparable to "Pong for dummies."  Something that would explain how the different parts of the circuits work, like the H and V sync generators, or the left, right, and ball position circuits, etc.  I realize that nothing can do that job without some familiarity with how circuits work, or how a TV signal is generated, but I haven't been able to Google up anything useful.

Much appreciation and thank yous in advance to anyone who can provide me with a useful link or book.  I'm just trying to scratch a curiosity itch.

paigeoliver

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10994
  • Last login:July 06, 2024, 08:43:49 pm
  • Awesome face!
Re:How do I build... Pong?
« Reply #1 on: March 24, 2004, 03:26:00 pm »
Most later Pong stuff used a chip called the "TVgames" chip.

Your BEST bet is to buy a build your own Pong kit. I think they are around $20. Or buy an old Pong console and rip it apart.
Acceptance of Zen philosophy is marred slightly by the nagging thought that if all things are interconnected, then all things must be in some way involved with Pauly Shore.

bigmoe

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 184
  • Last login:July 16, 2004, 04:17:54 pm
  • I forgot my mantra!
Re:How do I build... Pong?
« Reply #2 on: March 25, 2004, 06:51:54 pm »
OT (sorry Procyon), but I thought some out there might appreciate this Pong link:

http://www.joeacevedo.com/docs/customzone/customcon/customcon7/d2ketracelwhite.htm


b
What was that again?

DrewKaree

  • - AHOTW - Pompous revolving door windbag *YOINKER*
  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9740
  • Last login:May 15, 2021, 05:31:18 pm
  • HAH! Nice one!
    • A lifelong project
Re:How do I build... Pong?
« Reply #3 on: March 25, 2004, 10:26:52 pm »
-->Here<--

It's on backorder, but that's what paige is talking about.  The rest you've gotta figure out.  I have no idea how it works, either.  I usually rely on a programmer (;D) to make it work the minute I plug it in.  Then I blame the programmer when I forgot to plug in the power cord and the thing doesn't work!  LOL
« Last Edit: March 26, 2004, 12:19:26 am by drewkaree »
You’re always in control of your behavior. Sometimes you just control yourself
in ways that you later wish you hadn’t

Stingray

  • Official Slacker - I promise to try a lot less
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10463
  • Last login:April 08, 2021, 03:43:54 pm
Re:How do I build... Pong?
« Reply #4 on: March 26, 2004, 09:30:45 am »
Quote
In Stock? No, awaiting updated due date

Drat! I was just about to order one despite the fact that I have no use for it. It's just cool.  8)

-S
Stingray you magnificent bastard!
This place is dead lately.  Stingray scare everyone off?

DrewKaree

  • - AHOTW - Pompous revolving door windbag *YOINKER*
  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9740
  • Last login:May 15, 2021, 05:31:18 pm
  • HAH! Nice one!
    • A lifelong project
Re:How do I build... Pong?
« Reply #5 on: March 26, 2004, 10:27:38 am »
Yeah, I was paging through their catalog and happened across it...was thinking of "Coffee Table Mame" set up with one of these.  Strange how some things STILL hold your interest, although you just have no idea WHY!
You’re always in control of your behavior. Sometimes you just control yourself
in ways that you later wish you hadn’t

Procyon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 75
  • Last login:October 29, 2024, 11:40:34 pm
  • MAME FTW
Re:How do I build... Pong?
« Reply #6 on: March 26, 2004, 11:02:15 am »
Thanks for your responses guys, but unfortunately, that's not quite was I was looking for.  I guess what I'm really more interested in is how people like Ralph and Nolan figured out how to wire up the circuitry to make a Pong game.  What knowledge of discrete logic was used to create the game.  The chips came about as a result of advancing technology, but only after the general concept had been designed.  So I'm really curious about the origin of the development of Pong, not so much the refinements that came later.  How did they know how to make an H and V sync generator?  How did they know how to wire up a circuit that controlled the balls movement?  How did they detect collisions between the ball and the paddle?  Those kinds of things.  Anyone know a good place to find that sort of information?

Stingray

  • Official Slacker - I promise to try a lot less
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10463
  • Last login:April 08, 2021, 03:43:54 pm
Re:How do I build... Pong?
« Reply #7 on: March 26, 2004, 11:18:34 am »
I always assumed it was some kind of magic. Perhaps voodoo.

-S
Stingray you magnificent bastard!
This place is dead lately.  Stingray scare everyone off?

Witchboard

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2002
  • Last login:January 05, 2022, 09:09:24 pm
    • Oklahoma Coin-Operated Collectors
Re:How do I build... Pong?
« Reply #8 on: March 26, 2004, 11:47:18 am »
My father has an old Pong console somewhere with the two paddle spinners.  I wonder what happened to that thing?  Probably in the attic with the Atari 400.

DrewKaree

  • - AHOTW - Pompous revolving door windbag *YOINKER*
  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9740
  • Last login:May 15, 2021, 05:31:18 pm
  • HAH! Nice one!
    • A lifelong project
Re:How do I build... Pong?
« Reply #9 on: March 26, 2004, 12:18:11 pm »
Voodoo?  I thought they just made top-notch high-end gaming rigs!?!  You mean to tell me they created Pong TOO!?!  Man, those guys are PHAT! ;)

OK, back on topic.  I think your search for this type of info is actually gonna go better if you DON'T focus on the Pong guys, but on general brainstorming tech-type stuff related to this, such as Googling "How to's" regarding similar stuff.  

The reason I say that is because you'll find stuff written down as to the thought process used, errors made, revisions done.

Specifying those guys and the game itself will narrow your scope, but I think working like those guys did (sorry to assume I know how they worked, but it's just for illustration, I don't play a Pong inventor on T.V.! ;D) and starting with an idea and refining it through processing the info available will get you a better result.

I know that's not really answering/helping you find the SPECIFICS you're looking for, but mebbe it's something to chew on.  Spit it back @ me if necessary.
You’re always in control of your behavior. Sometimes you just control yourself
in ways that you later wish you hadn’t

Stingray

  • Official Slacker - I promise to try a lot less
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10463
  • Last login:April 08, 2021, 03:43:54 pm
Re:How do I build... Pong?
« Reply #10 on: March 26, 2004, 01:20:27 pm »
If you are in some way insinuating that Pong is not a "top-notch high-end gaming rig", then I'm going to have to ask you to step outside!  ;)

-S
Stingray you magnificent bastard!
This place is dead lately.  Stingray scare everyone off?

Dav

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 220
  • Last login:March 29, 2016, 05:39:35 am
Re:How do I build... Pong?
« Reply #11 on: March 26, 2004, 04:46:17 pm »
Thanks for your responses guys, but unfortunately, that's not quite was I was looking for.  I guess what I'm really more interested in is how people like Ralph and Nolan figured out how to wire up the circuitry to make a Pong game.  What knowledge of discrete logic was used to create the game.  The chips came about as a result of advancing technology, but only after the general concept had been designed.  So I'm really curious about the origin of the development of Pong, not so much the refinements that came later.  How did they know how to make an H and V sync generator?  How did they know how to wire up a circuit that controlled the balls movement?  How did they detect collisions between the ball and the paddle?  Those kinds of things.  Anyone know a good place to find that sort of information?

The manuals for the early boards were very detailed back then. Covering theory and everything.    There's an extremely detailed manual for tank by Kush N' Stuff Amusment Electronics if you look for it.

Dave


paigeoliver

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10994
  • Last login:July 06, 2024, 08:43:49 pm
  • Awesome face!
Re:How do I build... Pong?
« Reply #12 on: March 26, 2004, 06:08:31 pm »
Yes, I agree, get the manual to just about ANY pre "Tv Games chip" Pong game. Preferably an Atari/Kee one. Those things are like 100 pages and explain the functioning of EVERYTHING.

My Shark Jaws, Sprint, and Stunt Cycle manuals were so detailed that they basically included enough information to both bootleg the game with off the shelf hardware, AND to change things around as well.

I suggest looking for a manual to Pong Doubles, Quadrapong, or Elimination, as they are old enough to not have the TV games chip, but are new enough that they should have the uber-detailed manuals.
Acceptance of Zen philosophy is marred slightly by the nagging thought that if all things are interconnected, then all things must be in some way involved with Pauly Shore.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:How do I build... Pong?
« Reply #13 on: March 27, 2004, 12:41:49 pm »
Since I'm awake early on a Saturday morning and I would like to know myself as well, I'll now open those scanned pong magazine pages in another window and see if I can translate.   Given that it's a magazine article and not just a schematic, it may be an easier task to find out how it works. RIght now I have no idea...

First, a trip to the coffee maker...

ok on to the article...

Alright, so far I've read part 1 and part 2.  This section speaks of two ramp generators, Line and Field.  Basically they are using a lot of technical terms like "Emitter Follower" and "High/Low Impedance input/output"  and "the leading edge of the pulse is differentiated by this resistor and capacitor"  etc.

Here's generally what's going on.  They are hacking into a television, literally....I think it's like some sort of coupling technique (I didn't pay close attention to the TV parts, I am only interested in the logic theory).  This is really old school stuff!  Today you can just build a circuit to take a video signal from  Coax or composite or whatever and you can figure out when the fields and lines are occurring etc, but I guess back in the day you had to do it "manually".

So without also knowing or caring too much about television theory, let's say a Field is one vertical scan period of a tv picture (I think two fields make a solid picture frame, one field interlaces another so 2 successsive fields make a frame).  And a Line is clearly one line on the tube.

They are hacking the TV to steal pulses that show when a single line of the tube has been just drawn (or beginning?) and another signal tapped in to show when an entire screen field has just been drawn (or beginning).  So you several hundred pulses of the Line signal as each line is drawn on screen, then you eventually get a Field pulse when the whole thing's been drawn.

They talk about a monostable circuit next. This is a manual pulse generator which requires some sort of input trigger (a switch, or a stolen TV line or field pulse indicator) and it will generate a fresh (safe isolated) digital pulse for each manual input received....*(vs an Astable circuit which will just keep auto-generating pulses on its own (oscillator)*).

Ok I'll try to keep the next part simple, but it may not come out simple.  At this point the theory is the same on the Line and the Field signals, just that the line occurs faster and more often than the field.  What they are doing with the freshly generated and isolated pulse...is....they are using it to make a sort of timer, in non technical terms...they are going to start a timer at the beginning of a TV line draw, and based on how much time has passed, they'll know proportionally where they are positioned along the tv line.  Say the timer lasts 10mS, well they know that if 5mS have passed, they are half way across the screen along the current line.  I haven't read far enough ahead yet but I'm guessing that there's going to be ultimately some sort of TV drawing circuit that just simply is an on/off pixel control, and this game circuit is going to tell the pixel controller when to go on or off, and as these timers are running to tell you where you are along the line, and along the vertical field, you have complete control of the X-Y tv grid and you can generate a screen of game info pixel by pixel just by knowing when to fire the final TV generator.

So that's why all the circuits shown end up just going to a logic gate and feed on to some other part of the circuit, all you need to know is when to turn something on or off, so it all comes down to one gate in the end of it all.  If you need pixels turned on to draw a box in the corner, you'll just have a bunch of these timers to know when you're in the proper vertical and horizontal region, and when you are, the single output gate is going to be high or low or whatever to indicate this, and the tv generator will just fire and not fire blindly based on your timing.  The TV has its own constantly running horizontal and vertical drive circuits that will be running all the time, it's just up to you to tell it when to start making the image or not, so you're hacking into the line and field TV pulses to know where the TV is at, and then you're hoping you can time it properly in your circuti and tell the generator to go NOW and make a pixel...

Ok.  Back to the more technical aspect of these timers.  So they talk about line and field RAMP generators.  THis is the timer....a ramp is a straight line showing the increase of voltage as time goes on.  When you sense the end of a line, the ramp generator is reset so you have 0volts or whatever it is, and this resistor/capacitor circuit begins to charge.  Voltage increases as time goes on, so you get this voltage ramp rising.  Thus you know that when you have a certain voltage level, that a certain amount of time has passed since you last reset, or reached the end of a TV line.  This is how the timer is done.  

So you've stolen the TV line and field signals, scaled them down to safe levels and re-generated digital versions, used that to charge up a capacitor which generates a voltage ramp, and based on the voltage level, you know the position across the screen (or down the screen).  Again they get into technical terms like the emitter followers and high/low impedance this and that.  They are saying that you can't just hook something else now up to that ramp generator or else you'll load it down, interfere with it, drain the level of the ramp, so they put a buffer there with high input impedance.  High impedance input means a very high resistance on the circuit you're adding to tap into the ramp, so it doesn't drain the capacitor's achieved voltage level. Well maybe in a few days it would but the time constant of that new added resistance combined with the timing capacitor..may be a long long time required to discharge that capacitor...vs the other resistor used to do the timing on the ramp, so it virtually has no impact when you add your next stage with the buffer separating it.  

The next stage happens to be the part where it all comes together to generate this digital final pulse that indicates where along the screen you want a TV generator to draw something.   You have an isolated ramp now that is going to sit there rising in voltage from (say) 0volts up to 5volts, then drop back to 0volts and rise up to 5v again, over and over, as each line is drawn.  So what you do now is make use of this to tell the TV gen. when to fire along the line. This is where the joystick comes in.

Moving a little forward, this ramp signal and the joystick interaction is going to feed to a logic gate (they mention schmitt trigger, this just means that the crossover point between logic high and logic low on the gate, is not a single point such as 2.5volts where if you're less than 2.5 it's low, more than 2.5 it's high, schmitt trigger will change that trigger point, say you are low, and you rise up to 3volts, finally the gate senses logic high, the schmitt trigger input will then make the new setpoint say 1volt, so if you drop below 3v, you don't go low again, you have to go WAY down to 1volt before a low is registered, it creates a wide window rather than just a single voltage level for high/low distinction. This is for noise immunity, if you had a noisy signal, then you reach 2.5v and you're going to flicker from 2v to 3v and keep triggering highs and lows when really you're only trying to get one transition...so schmitt will change the set point and help prevent false triggers).

As I was saying, now that schmitt trigger is talked about, they take the joystick and ramp parts and use them to trigger a gate high and low, which ultimately tells the tv Gen when to fire/not fire.   Let's forget the schmitt thing and go back to 2.5v as the switch point between logic high and low.  Anything more than 2.5 is high, less than 2.5 is low.  You have that ramp hookedup to the gate input, so it's running from 0v to 5v and starting over. When it reaches 2.5v it will set the gate high (I don't know what the circuit actually is, just using theory now), and when the ramp starts over at 0v the gate is again low until the ramp gets up to 2.5v.  So you'd have this TV Gen going on and off as the lines are drawn on the TV.  By adding that joystick part to the circuit, which is a pot and transistor, they are using the pot to control how much a transistor is turned on or off, which ultimately varies the voltage where this circuit merges with the ramp generator....so you have a sort of mixer effect.  If the ramp is at 3 volts, the gate should be high, but if you use that joystick and set the transistor so that it's manipulating the voltage level down to only 1volt, then the gate really is still low.  That means at this joystick position, you would need the ramp to almost reach the full 5volts before the final voltage appearing at the gate input actually hits the 2.5volt trip level and goes high....so you move the joystick to the right, which causes a voltage manipulation and the ramp has to reach 5volts (extreme end of a line drawn on screen) before the gate tells the TV Gen. to finally fire.

Likewise if you turn the joystick far left so you're adding more voltage to this mess, the ramp is only at 1volt but you're imposing 3volts with the transistor, you really have 4volts now and the gate is on, TV gen starts drawing on screen, and yet the ramp has only just started up at the beginning of the line on screen.

So by using these ramps, then manipulating their levels and using this as a means to turn a gate on/off at any point in time that you decide with a joystick....you control the pixels being drawn.  Same with the Field ramp, you turn the ultimate single TV Gen on when you are at the proper X-Y region on the screen, it's all based on timing in the broken down circuit theory, all the stolen pulses from the TV, generating new pulses based on time delays from the original pulses, and telling the gun when to fire.

Ok so now we know how to blindly draw on the screen at the proper locations, hopefully.  I'll post this much and go refill the coffee maker and keep reading.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:How do I build... Pong?
« Reply #14 on: March 27, 2004, 02:04:08 pm »
Hey!  Wow.  In order to detect collisions of game characters, it's very easy when you make note of the theory presented in my last post on how to use the ramps and timing to feed into that final schmitt trigger gate, which will give an output change when the desired positions are met.

If you consider just horizontal motion, suppose you have a ball flying around, and a character that has a fixed horizontal position (the pong paddle moves up and down and stays in the same horizontal location)...this paddle is being drawn on the screen at a fixed point in the ramp timer that tells it to start drawing along the lines of TV space, so this means that somewhere in the hardware there is a gate that is going high for as long as the tv is currently drawing pixels at this paddle location.  

Likewise there is another gate going high for as long as a ball is being drawn at some other location on the screen..

Say the paddle is along the left of the TV going vertical up and down, presently located in the top left of the screen.  A ball is flying towards the paddle, and is presently located in the center of the screen.  When the TV starts drawing the next picture frame, while the TV is drawing line 1 at the top, there is going to be a "Line" gate and a "Field" gate for the paddle that will have high outputs for the duration that the tv is drawing those sections of the top corner of the screen.  The ball is supposed to show up later on down the screen so those ball Line and Field gates are still low, nothing is drawn.   Then the TV is working on the middle area of the screen, the paddle has already been drawn so its Line and Field gates are low, no paddle pixels are instructed to fire.  But when the TV gets to the ball location, its Line and Field gates will go high as necessary to fire pixel generation as the Tv scans past the middle of the screen.  While the ball isn't being drawn, the gates go low again.

So you have 4 gates to work with, field and line ball, field and line Paddle.  If you run those signals through another AND gate, the output will go high when the coordinates for paddle and ball match.  Then you know you have a collision.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:How do I build... Pong?
« Reply #15 on: March 27, 2004, 02:24:39 pm »
So to summarize, I read the first article about Football and other games, in that pong link.  I don't know how the television interface itself works to generate tv stuff but I figured out how they make the control logic for fixed and movable characters on the screen.  

Think of the tv as drawing frames (complete pictures) from left to right, top to bottom, over and over, a gun scanning left to right along the top of the screen for line 1, move down and scan across the next line left to right, until it gets to the bottom, then zoom back to the top left and start over.

If you can do whatever it takes to control that gun to fire on and off while it's scanning like that, you generate the picture, pixel by pixel.  Suppose the gun has a simple input control for you to interface with, on/off.  When it's on, it lights up, off, it is dark.  If you turn the gun on and leave it on, you'll just have a solid light screen as the gun moves. If you turn it on and then off you get a pixel.  

The game hardware will generate the final output pulses that toggle this gun when it's in the right positions.

For generating fixed characters, the hardware is set up so that the timers for line position and field/frame position (X-Y screen coordinates) will turn on the gun during those times, otherwise off.

For movable characters it's the same timer setup as fixed ones, setting a gun control to fire when coordinates are met, except you get to manually change those coordinate setpoints by interfering with the timing parameters and moving the X-Y set points.

If two characters happen to be drawn at the same spot, there is no conflict, the gun is being fired already for character 1 so it simply fires no matter how many sources tell it to.

Since you have those logic gun firing signals, you know when each character is being drawn at any point in time, based on which gates are high.  If you run those through other gates, you can generate new control signals that are generated when more then 1 character show up in that coordinate (collision) or when some character reaches a certain boundary on the screen, etc.

Even though I understand what I'm writing, I still get a little lost in what Im' writing.  To me it's like writting assembler vs high level code...instead of just writing the rules of the game and creating character icons to move around, you have to go into the registers and push and pop stuff before you ever get to think about what it actually ends up meaning.

Hopefully it makes sense to someone