Now that we have looked at the horizontal component of the ball we will look at the vertical portion. The vertical is based on a slip counter just like the horizontal so we will cover the slip counter control first. The vertical motion of the ball is influenced by two things, hitting the top or bottom of the screen, or hitting one of the paddles. When the ball hits the top or bottom of the screen, it will reverse direction, but keep the same speed. When the ball hits the paddle the effect on the
The final graphic element we need to look at is the ball. Like the score this is a pretty complex, but very clever circuit.
The first part of the circuit we will look at is the horizontal counter. This circuit controls the horizontal location, motion and size of the ball. Later we will look at a similar circuit that controls the vertical.
The main part of the circuit is a 9 bit counter composed of G7 and H7, which are synchronous counters, and G6. When the co
Next we will look at where the digit inputs to the score decoder come from. As I mentioned before there are two, two digit scores displayed in Pong, one for each player. Since there is only one score decoder, there needs to be a way to select which digit is being fed to the decoder at each point on the screen. The circuit that performs this function is composed of two 4-line to 1-line data multiplexer chips:
The inputs to the multiplexers come from the score counters, wh
Here is the other proposal supercat made for the ball horizontal control circuit. This one actually appears to work exactly like the real circuit, providing 3 different ball speeds and saves at least 2 chips.
We have almost looked at the entire Pong circuit, just a few miscellaneous sections to go. This is the server timer circuit
2puck.zip
During normal play the output of F4, /RUN and STOP G will all be low which will make the output of E5 high, which will keep the SERVE output of B5 low. When the ball is missed, /MISS will go low, pin 6 of E6 will go high which resets the ball speed counter. Pin 3 of E6 will then go low which triggers the 555 timer and sets the output high, and sets the o
The first step in counting the score is to determine when one player or the other has missed the ball. This turns out to be very easy to detect because the only graphic object that can move off the visible screen is the ball. The circuit shown below ANDs the horizontal component of the video with the HBLANK signal to create the /MISS signal. Whenever there are graphics being displayed during horizontal blank, /MISS will go low indicating that the ball went off the screen. /MISS next passes throu
Looks like we have finally come to the last Pong circuit we need to cover. I just looked back at the archive for this blog and was shocked when I realized that I have been doing this Pong circuit description for almost 2 years! I know I was going through this pretty slowly but never realized I had taken that long. On to the final circuit...
This circuit is used to generate a sound whenever the ball hits the top or bottom of the screen. During normal play /SERVER is high so the flip/flo
The next portion of the score circuit we will look at is what I call the “hold-out” generator. The output of this circuit goes to the enable input of the seven segment decoder chip we discussed earlier. When the enable signal is low, all the outputs of the decoder are turned off. So the scores can only be displayed when the output of this circuit is high. The easiest way to describe how this circuit works is to show it graphically. If we take every point on the screen, feed the horizontal and ve
In the discussion of the ball horizontal control circuit, supercat proposed a simplified circuit that would perform the same function. This is the circuit I believe he is describing:
starfire.zip
It actually comes pretty close to working, and it does use less chips, but instead of generating 3 speeds it generates 4.
The VSYNC input will make sure the circuit is only enabled for the first four lines on the screen. For each count on the hit counter the MOVE signal will be enabled for
This is the final section of the score generation circuit, which I call the segment decoder. For each point on the screen, this circuit determines which of the seven digit segments should be enabled.
The segment outputs from 7448 are labeled ‘a’ through ‘g’ and go into the three input NAND gates (C4, D4, D5). Each of these outputs corresponds to a segment of the score as follows.
The other two inputs to each NAND gate will go high when the corres
I am hoping that I can get a little help figuring this section out. I am pretty good with digital analysis, but my transistor theory is a little (ok a lot) rusty. The purpose of this section is to control the game state. Here are the things that I do know about this circuit:
- When either /STOPG1 or /STOPG2 goes low, indicating that one of the score counters has reached the game ending score, the output of B3 (STOP G) will go high which stops the game. The high on STOP G will also set /ATRAC
The purpose of this circuit is to generate the Aa and Bb signals that go into the horizontal ball counter. I will describe what this circuit does first, and then go into the details of how it does it. There are three valid states for Aa,Bb:
Bb Aa
0 1 - move left
1 0 - stationary
1 1 - move right
Normally the Aa/Bb outputs will be in the stationary state, because we only want the ball to move a little bit on each frame, so for most of the horizontal lines the ball is not m
While studying the score counters I was having a hard time figuring out how the score was credited to the correct player, it seemed that misses on the left side where scoring on the left side instead of the right. Turns out that I had a mistake in an earlier section, Ball Horizontal Control (Part 1). Turns out that I had the /HIT1 and /HIT2 counters reversed, the circuit should look like this:
This is the proper description of how this circuit should work.
The flip/flop H3 is used