School of computer science

Georgia Institute of Technology

CS4803DGC, Spring 2010
Programming Assignment #8
Due: Monday, April 19, 12:00 pm (before the class)
Hyesoon Kim, Instructor

Introduction
Although two students are sharing a hardware, this is an individual assignment. Each student needs to submit their code into the T-square.
The demo should be done individually.
In this assignment, you will learn how to read touch screen coordinates.


Assignment In this assignment you are building a space ship controller.
You upload the provided ship image into the bottom screen.
Use graphics mode 5 and set appropriate affine matrix to control the background image


Features
Up/down - move up/down
Left/right - move left/right
A - reset to the original position
L/R - rotate
X/Y - scale up/ scale down
Touch screen: detect the direction and move the direction
Sound - Every 10th degree rotation, generate sound
Please see the lecture notes (lec_arm_prog3.pptx) file to get some initial starting code.


Grading
You demo your screen and then submit the code in the T-square.
The demo will be during the classroom.
Depending on how cleanly the ship moves, you will get credits. Report: 5%
, Report should include commented code and simple descriptions. Any problems encountered and solutions


Useful links
Background image setup


Start up code
Download lab8.tar to get the ship image and the basic background setup.


Important tips
Sin and cos functions are implemented as a lookup table. 0 to 2 pi radians is broken up into 32768 values.
The sin and cos functions return values in the fixed point format. The sin and cost functions use 1.3.12 fixed format.
The X, Y position of the background is determined by REG_BG3X and REG_BG3Y.
However, these registers are corrected by other parts of unknown APIs. So please set those values to zero and use immediate values to handle them. Incrementing/decrementing these registers directly does not work.