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
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
Select- Save current status (X-axis, Y-axis, Rotation, Scale)
Start- Replay (rollback to the saved status from the original status) If there is no saved status, it resets to the original position
Please see the lecture notes (6.lec_arm_prog3.pptx) file to get some initial starting code.
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 object moves, you will get credits. Report: 10%
, Report should include commented code and simple descriptions. Any problems encountered and solutions
Background image setup
GBA programming but useful especially affine vectors .
Start up code
Download lab2.tar to get the image and the basic background setup.
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 cos 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.
Please follow the submission instructions. If you do not follow the submission instruction, you will not receive the full credit.
The file name should be lab2.tar.
You cannot add any additional files. You should add your code in main.cpp. Do you use any additional libraries in main.cpp
Makefile should work only with the command "make" Only one member in the team should submit the code but all members should submit their own reports.