Jump to content
  • entries
    39
  • comments
    57
  • views
    124,734

About this blog

Discussion of technical aspects of classic videogames

Entries in this blog

Ball Horizontal Control (Part 1)

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

Guest

Guest

Ball Horizontal Counter

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

Guest

Guest

Score Segment Decoder

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

Guest

Guest

Score hold out

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

Guest

Guest

Score Part 2

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

Guest

Guest

Score Part 1

The next section I am going to talk about is the score generation circuit. In Pong, each player has a two digit score that is displayed at the top of the screen on either side of the net. The circuit that generates the score display is a little complex, but I find it to be a very interesting design. I am going to start from the center of the circuit and work out.   At the heart of the score generator is as 7448 BCD to 7-segment decoder chip.     This chip is usuall

Guest

Guest

Paddles

There are two parts to the paddle generation circuit. There are two identical circuits (one for each player) that control the vertical position and height of the paddle, and a second circuit which controls the horizontal position and size.     The vertical circuit is based on the very versatile 555 timer chip (A9). In this case the 555 is configured in mono-stable mode. In this mode the OUT pin will go high when the TRIG input goes low, and will stay high for a period of tim

Guest

Guest

The net

Now that we have covered the horizontal and vertical counters we can start talking about how the graphics for the game are actually generated. We will start with the simplest part, the net.       At the start of each horizontal line, /256 is high which gets clocked through F3 to one of the inputs of G3. Since the other input of G3 is connected to 256H (which is low), the output of G3 will be high thus turning the net off. When the horizontal counter reaches 256, 256H goes high, and the

Guest

Guest

Vertical Sync

The vertical sync circuit works similar to the horizontal sync circuit. Again we have an RS flip-flop composed of two logic gates (F5), but this one is triggered by a high instead of a low. At the end of the vertical count, V RESET will go high, which will set VBLANK high which indicates the start of the vertical blank period. When the vertical counter reaches 4, the output of G5 will go low which is the vertical sync signal. When the count reaches 8, 8V goes high, the output of H5 goes low whic

Guest

Guest

Horizontal Sync

The horizontal and vertical counters are used to drive the rest of the digital logic in the circuit, but these counters cannot directly drive the synchronization of the CRT, for this horizontal and vertical sync signals are needed. Here is the circuit that generates the horizontal sync:   wishes.zip   The two H5 NAND gates form an RS flip-flip. When pin 4 goes low, pin 6 will go high and stay high, until pin 10 goes low. At the end of a scan line /H RESET will go low which will set HBLANKING

Guest

Guest

Vertical Counter

The next section is the vertical counter which works just like the horizontal counter. The input to the counter is the HRESET signal from the horizontal counter, so the vertical counter will increment once per horizontal scanline. The vertical counter, resets just like the horizontal, but on a count of 262, 256V + 4V + 1V + 1 (VRESET latched on the next clock pulse).  

Guest

Guest

Horizontal counter

The next stage is the horizontal counter.       The 7 MHz clock signal enters F8 which is a 4-bit binary counter. The clock is divided in half producing the 1H signal which is the low bit of the horizontal counter. Each stage of F8 divides the signal in half again producing 2H, 4H, and 8H. F9 continues the division producing 16H, 32H, 64H and 128H. Finally the clock is divided in half one more time by F6 to produce 256H and an inverted version called /256H. (I use the ‘

Guest

Guest

Pong Circuit Analysis

One of the things that I have always enjoyed about classic videogames, and classic arcade games in particular is learning how the actually operated. I have spent many an hour studying schematics of these machines to figure out exactly how they work.   Of particular interest are the earliest arcade games, since these did not have microprocessors. The graphics, sound and even game logic where implemented using just discrete logic circuits. What the designers of these machines managed to achieve

Guest

Guest

Main Clock

The heart of Pong, and any of the discrete logic games is the horizontal and vertical counter. These counters continuously step through each horizontal and vertical position on the screen. The output of the counters is fed to all the other logic of the game which ultimately determines if each pixel should be on or off (or what color it should be in the case of color graphics).   Everything begins here     This is the main clock generator in Pong. The crystal (which

Guest

Guest

×
×
  • Create New...