AVR32 Linux Development/Pong

From AVRFreaks Wiki

Jump to: navigation, search
Screenshot from pong when playing.
Enlarge
Screenshot from pong when playing.

Pong is a Linux application showing the usage of DirectFB library on the ATSTK1000 development board.


Switch layout and functions

Some wiring is required before playing because the game uses the switches on ATSTK1000 as input. J1 header must be connected with a 10-pin flat cable to J25 header. In adition SW4 on ATSTK1002 must be set to GPIO/PS2B.

The switches have the following functions

 SW7    SW6     SW5   SW4     SW3     SW2    SW1     SW0
P1_up  P2_down  None  Quit  Restart  Start  P2_up  P2_down

Gameplay

The game starts up waiting for input from the user(s) with the Start-button. Pushing the Start-button will start the game, moving the ball towards player 2.

The point of the game is to allways place the bar between the screen edge and the ball, this will reflect the ball out towards the opposite player who has to do the same.

A point is given to the other player if a player fails to reflect the ball out.

After a point is given to a player the ball is returned to the middle of the screen and the Start-button must be pushed to start a new round.

The game can at any point be restarted by pushing the Restart-button. This will also reset the score.

To quit the game push the Quit-button.

Static version created: 2007-03-07
Copyright (c) 2007 Atmel Corporation