High Level Design
After working with the ATmega family of processors for the first six lab assignments, and
working extensively with generating television screen images, we decided that a video game
would be a viable goal for a final project. While not as hardware-intensive as some projects, we
decided that our experimentation with the analog-to-digital converter (ADC), as well as our plans
to build the circuit onto a permanent printed circuit board would provide a sufficient hardware
component for our project. We chose the Arkanoid concept because the basic game is not highly
complex, which would make it very likely that we would finish in the allotted four weeks for the
project. However, one the basic game works, the Arkanoid concept allows for many additions
that would enhance the game playing experience. When we started, we listed three sets of goals
which are listed below. The first set of goals was a minimum that wanted to accomplish, the
second set represented what we had hoped to have time to accomplish, and the third set
represented goals that we thought would be interesting but probably would not have time to
accomplish.
- Goal 1:
a working game with 128x100 resolution
reasonably smooth game play without any noticeable screen flicker
- Goal 2:
mechanism to keep score of the game
additional levels with more walls and obstacles
additional smoothing of game play (if necessary)
- Goal 3:
power ups
different ball speeds
more balls simultaneously
platform width adjustment
sound effects
The Arkanoid concept fit well with our desire to have such a set of goals, which is why we chose
it for our project.
At a high level, our project is composed of several key software and hardware
components. Our primary software component is the code that generates an NTSC video signal.
One section of this code is composed of functions that place points, lines, and text into RAM
where they are stored in a format that represents a black-and-white 128 x 100 pixel video image.
A second section works to output this image to the television screen at a specified interval of
about 60 Hz. Another key component is our algorithm that allows the ball to change direction
while maintaining a constant speed and allows the user to control the bounce angle by hitting the
ball with different parts of the platform. Another software component is our code to read the
analog joystick's position using the Atmega32's ADC. Finally, we have a section that keeps track
of game status information, such as the current level, the number of blocks remaining on the
current level, and the number of balls remaining.
On the hardware side, our major component is our joystick, for which we use a standard
potentiometer which is connected through a headphone jack and a length of telephone cable to the
project board. We also use a set of resistors and diodes to construct a circuit for generating a
black and white television image using a standard composite video connection. Finally, our stand-
alone board includes a 16 MHz crystal to clock the chip, a low-pass filter for the analog power
supply, a reset switch for the chip, a connector for an external 6V DC power supply, and a
connector for a programmer (such as an STK500 board) to program the chip.