Introduction
You should submit your code and report at T-square as well.
In this assignment, you will learn how to use graphics modes and sound.
Assignment
In this assignment you are building an image controller.
You upload the provided 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 lab6.tar to get the 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.