A simple Flappy Bird game that runs as a bootloader! Written in x86 assembly, fits in just 512 bytes.
This is a bootloader version of the classic Flappy Bird game. Instead of loading an operating system, your computer boots directly into the game.
- Tiny: Fits in the 512-byte boot sector
- controls: Just press spacebar to jump
- Sound effects: Beeps when you jump (works on real hardware)
- Physics: Gravity and jumping mechanics
- Obstacles: Moving pipes to dodge
- Spacebar: Make the bird jump
- Goal: Navigate through the gaps in the green pipes
Build:
nasm -f bin n.asm -o flappy.binTest in QEMU:
qemu-system-i386 -fda flappy.binOn real hardware:
- Flash
flappy.binto USB using Rufus - Enable Legacy Boot in BIOS
- Disable Secure Boot
- Boot from USB
- Language: x86 Assembly (NASM syntax)
- Target: 16-bit real mode (default state of modern cpu, in actual booting process of a os say windows a interrupt is send to uplift it to 64 bit)
- Size: Exactly 512 bytes (boot sector, auto fill at last to flate it to 512)
- Graphics: 80x25 text mode
- Sound: BIOS beep (int 0x10, char 0x07)
- Bird: Blue '#' character
- Pipes: Green '||' characters
- Movement: Pipes scroll left, bird falls with gravity
- no collison as i lazy (skill issue)
For modern UEFI systems:
- Disable: Secure Boot / Intel Platform Trust
- Enable: Legacy Boot / CSM Support
- Set: Boot mode to Legacy
- Disable: Fast Boot
https://ia801505.us.archive.org/18/items/bitsavers_ibmpcps2PSTechnicalReferenceApr87_5816663/PS2_and_PC_BIOS_Interface_Technical_Reference_Apr87.pdf (without this, its impossible)
https://edge.edx.org/c4x/BITSPilani/EEE231/asset/8086_family_Users_Manual_1_.pdf