This is port of Sopwith game on STM3241G-EVAL evaluation board. The game was originally created by David L. Clark of BMB Compuscience in 1984.
You can find all the information about the game on the following websites:
http://www.sopwith.org/
http://davidlclark.com/sopwith/sourcecode.html
It does not require any additional hardware except those that is provided in the evaluation board.
For the full game experience it is required to have 11 buttons. Buttons for break,
missile and startburst are not set (see swbuttons_hal.c).
But you can uncomment the code in swbuttons_hal.c
to replace one of the current action
(e.g. autopilot to home) with missing one.
You can either compile from the source code or use the precompiled binary.
To compile from the source code, do:
- Clone STM32CubeF4 repo from GitHub: https://github.com/STMicroelectronics/STM32CubeF4
I used versionRelease v1.24.1
. - Make sure that
STM32CUBEF4_ROOT
variable in Makefile points to the cloned repo. - GCC Arm Toolchain
- Download GCC Arm Toolchain 8-2019-q3-update from http://developer.arm.com
- Make sure that
GNU_INSTALL_ROOT
variable in Makefile points to the gcc toolchain folder. - Download and install
st-flash
utility from https://st.com
For Mac OS do:brew install stlink
.
My stlink version is1.6.0
. - Make sure
st-flash
utility is accessible fromPATH
env variable. - Run
make sopwith
to compile the game. - Run
make flash
to flash the binary.
Use any tool you have (e.g. st-flash
) to flash sopwith.bin
provided in bin
folder
at address 0x8000000.
Buttons mapping is the following:
Button | Action |
---|---|
Joystick Up | Flap Up / Menu Up |
Joystick Down | Flap Down / Menu Down |
Joystick Right | Accelerate |
Joystick Left | Deaccelerate |
Joystick Select | Drop a bomb / Select menu item |
Key | Shoot |
Tamper | Flip |
Wakeup | Autopilot to home |
In the menu you can select one of the game types:
- Novice
- Expert
- Game against computer
Additionaly you can:
- Enable missile and startburts
- Switch off sound
To be able to use missile or starburst, you need to re-map on of the buttons. See limitations section for the details.