Using the previous VGA output project, we have created this Space Invaders version for STM32.
The source code is kept as a separated project, but uses the same engine of the VGA output project.
Click here to download the source code.
The project is in KEIL uVision format. You can download the KEIL uVision evaluation version from www.keil.com
Here is a video of the results:
Connections
We have added three push-buttons to the original connections. These push-buttons serve as a joystick.
Here are the connections for the push-buttons and the VGA connector:
AK-STM32-LKIT pin | VGA connector pin | Push-button | Edit |
PA1 | Pin 14 | Vertical Sync | |
PA7 | Pin 2 | Green | |
PA8 | Pin 13 | Horizontal Sync | |
PA5 | K1 | Left button | |
PA4 | K2 | Right button | |
PA0 | K3 | Fire button |
Have fun!
The Artekit Team.
3 Responses
good project, launched on my debug board with STM32F103RBT6 the link you can download the PCB http://www.techstuff.in.ua/forum/48-ARM/47-%D0%9F%D0%B5%D1%87%D0%B0%D1%82%D0%BD%D0%B0%D1%8F-%D0%BF%D0%BB%D0%B0%D1%82%D0%B0-STM32F103RBT6.html
PS wanted to realize here is that old game “Battle City” http://www.battlecity.com.ua/ http://ru.wikipedia.org/wiki/Battle_City
There is a bug in function
siBadBoysFire(void)
In case of all BadBomb is a live the function freeze the game.
possible solution:
// Select a random Bad Boy to fire bomb
for (i = 0; i = 0; row--) {
if (sibb[row][col].mode == SI_ALIVE){
siBomb[i].x = sibb[row][col].x + 7 + siBadBoysShiftX;
siBomb[i].y = sibb[row][col].y + 12 + siBadBoysShiftY;
siBomb[i].mode = SI_ALIVE;
return;
}
}