This is a port of the Space Invaders game for Portenta C33 and LCD to the H7 with USB-C - HDMI video, including a screen set in Star Wars theme.
The Portenta H7 board comes with some interesting features besides the powerful STM32H7 dual core processor.
It's equipped with a ChromArt image processing DMA, combined with a LCD / TFT driver called LTDC - link, able to generate DSI video signals. Combines with a MIPI-DSI/DPI to USB Type-C™ Bridge, ANX7625 it can Generate HDMI video out over USB-c.
LibrariesThe standard Embed Arduino H7 Video library is expanded by a new set that supports Alpha images, making animations a bit easier, and a tool to create C-array image code from PNG or BMP's:
H7 Video-Extension-with-Canvas-and-Sprite (GitHub)
H7-C-Array-Converter-for-USBDisk: (GitHub)
SpaceShips.
For the freaks : these are the space ships in the game, 4 Imperial, 1 Rebellion
The game is the classic space invaders. Shoot and kill, and avoid the bombs. Game is in 800x600 resolution, and runs on the Sprite-Screen. Game has BlueTooth Remote control : check the App to use, and it stores high-scores on the Flash USB-Drive.
There is a original Space Invaders set as well in the Screenset-directory. Just replace the Screen.cpp and Screen.h files.
Debuggingthe code uses a DEBUGF for sensing debug info to the Serial-port.This is Serial3, as the USB-serial is not usable once the USB-C Video is running.You can ignore this port, but in case you like to use it, you require the HAT expander:
- Vertical sync problems : needs solving in the Embed Library ?
- Add more background screens - bmp-usb-drive reader needed
- Add Destructable Bunkers
- Add Sound
Comments
Please log in or sign up to comment.