An ARM assembly based Flappy Bird
Tested on a Snapdragon X Elite machine under WSL 2 ARM64 Ubuntu
You need the gcc compiler and git. You will also need the SDL library :
sudo apt-get install libsdl2-dev libsdl-ttf2.0-0 libsdl2-image-dev
To run it just clone the repo :
git clone https://github.com/Volko61/FlappyAsm-ARM.git
And give execution permission to build and run :
chmod +x build_and_run.sh
./build_and_run.sh
Install gdb
On VS Code I recommend to setup a launch.json :
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug ARM64 (GDB)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/entry_point",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set disassembly flavor to intel (optional)",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "build arm64 asm"
}
]
}with his tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "build arm64 asm",
"type": "shell",
"command": "gcc",
"args": [
"-g",
"-o",
"entry_point",
"entry_point.s",
"utils/print.s",
"utils/terminal_render.s",
"utils/sleep.s",
"utils/convertions.s",
"SDL/window.s",
"SDL/text.s",
"SDL/rectangle.s",
"SDL/image.s",
"flappy/draw.s",
"flappy/gravity.s",
"flappy/jump.s",
"flappy/score.s",
"flappy/menu.s",
"-lSDL2",
"-lSDL2_ttf",
"-lSDL2_image"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}Press F5 to debug
Don't move the mouse when you press an input because the mouse input will be registered at the place of your input