Results

There were some problems with our hardware, mainly our NES controllers. Some of the buttons on the controller did not work as well as we had hoped due to their age, particularly the right button on the 1st controller and the start button on the 2nd controller. The interaction between the LCD and the controllers was not harmed too much by this.

The timing of the button pushes and the timing of the ball were controlled by the timer0 overflow interrupt. It was set for a 2 msec time base. The clock signal that was outputted to the controllers was run approximately at 500 Hz. We say approximately because we used the timer0 overflow interrupt which is not cycle accurate, but our design project did not need to depend on these accuracies. The nintendo controllers were able to work on even greater frequencies than these, but we felt it was unnecessary for game play. A button, after being pressed, would be read in 30 msec in the worst case. This does not account for the timer0 inaccuracies and other delays in evaluating the button, so it is safe to say that it would be read under 40 msec. This is well under any human's reaction time so we felt that optimizing for speed was unnecessary. During game play, the ball was updated on the LCD approximately every 25 msec. Again inaccuracies in timer0 were present but did not affect overall gameplay. The paddle movements were controlled by the button pushes, so they were actually independent of the ball update. So the paddle movements were updated approximately every 40 msec.

All in all, our results were very good. There was realistic game play with almost no delay between the interaction of the NES controllers and the LCD. There were few anomolies present when the ball would move. We did not have the code running fast enough to move the ball pixel by pixel, so instead we moved the ball a couple pixels at a time. This caused a tiny error when a paddle hit the ball and change direction. The ball would not fully come in contact with the paddle, but it is very hard to notice.

Had we had more time, one feature that we really wanted to implement is having some sort of theme song on the menu screen. This would have been easily implemented by using the Timer1 Compare on Match A interrupt, and toggling the appropriate port at the right times to get the correct musical notes that we wanted. Another feature we wanted to add was to have different levels that would have various obstacles in the middle of the game. This would have made the game much more entertaining especially in the 1 player mode.