Space Invaders for STM32

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:

Joystick and VGA connector (click to enlarge)

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

  1. 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;
    }
    }

Leave a Reply