August 29th, 2009

Pong on FPGA

Pong on FPGA

Released by Atari in 1972, Pong was a simple video game that became a huge commercial success and is actually considered the game that started the whole video game industry. Pong has simple 2D black-and-white graphics and involves hitting a ball with a paddle located on one side of the screen, simulating table tennis. It can be played with a computer controlled opponent or with another human player and has many different variants that emerged over the years, including on home consoles.

This project features a game of Pong on a Pluto FPGA board that connects to a VGA monitor and has a mouse as a game controller. The HS and VS (horizontal and vertical synchronization, respectively) are digital signals and can be directly connected to FPGA pins or using two low values resistances. The R, G, B signals are analog, so three resistances are required to form voltage dividers that get the 3.3V FPGA output close to the 0.7V nominal values of the aforementioned analog signals (you can find more information about these values and calculations in the link).

Displaying the actual game on the monitor is a bit tricky, you have to generate the HS and VS to be able to display something on the monitor. Then, drawing the actual game, the paddles and the ball is another story, you need to generate the R, G, B and make the ball moving. Another part that can get hairy is the collision detection, you need the ball bouncing off when it hits the paddles. The code for all this is available below, as well as detailed pictures on the board, the VGA connectors and other Pong FPGA project links.

Pong on FPGA: [Link]

March 11th, 2009

Micro Pong game

micro pong game

Looking at the schematic and the firmware this is probably the most compact pong game project, the PIC12F675 has only 6 pins which can be used, an very small flash and ram resources, only 64 byte of RAM!

The TV output is PAL, no other format is supported, the game is controlled with two consoles made of potentiometer and push button, both dual and single player mode is available with two speed option, the small hardware has even an audio output which sends outs the beeps.

The source code is written in assembler language and highly optimized yet reasonable commented, but I don’t recommend reverse engineering it, it is easier to read the authors documentation.

This project shows the real power of assembler language if used properly, this doesn’t mean that every project should be implemented in assembler language, but if space and speed requirements are scarce, then it’s the only solution.

Micro Pong game: [via] [link]



© 2007-2011 YourITronics | Any logo, trademark and project represented here are property of their respective owners | Wordpress | Privacy Policy    RSS