Browse over 10,000 Electronics Projects

Color Tetris video game

Color Tetris video game

The project basically utilizes a Mega32 chip, along with a RGB-NTSC converter and a sync generator to produce color on a standard NTSC TV. The code for a “Tetris” type game is then written using the AVR CodeVision C environment

This project consists of two different parts–the hardware and the software. The hardware part consists of connecting the correct inputs and outputs in order to combine the Mega32, the AD724 RGB-NTSC converter, and the ELM304 Sync Generator.

The core of the hardware design is the AD724 RGB-NTSC converter. This chip takes an RGB signal and a composite sync to produce a TV signal that can be recognized by any standard NTSC TV. The RGB input are the 3 bits that are relayed by the Mega32. Since the Mega32 must be able to communicate with the AD724, it must trigger part of its code at the same clock frequency as the AD724. Thus, the AD724 horizontal sync input and the Mega32 interrupt trigger signal is the same signal that is delivered by the ELM304.



Advertisement1


The most difficult part of implementing color is to be able to synchronize the software to the vertical and horizontal sync pulses. The software design must be able to detect and distinguish the vertical and horizontal sync signals. Once this is done, the rest of the game code can be implemented using the controls that were implemented by the signal synchronizing portion of the code.

We have chosen to implement 8 colors, with the inclusion of black and white, for simplicity. These 8 colors are merely binary combinations of the 3 color bits. Black represents the background whereas the other colors represent the different pieces in the game.

Visit Here for more.

 


Top