Skip to content

vTusharr/FLAPpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

FLAPpy - Flappy Bird Bootloader

A simple Flappy Bird game that runs as a bootloader! Written in x86 assembly, fits in just 512 bytes.

What is this?

This is a bootloader version of the classic Flappy Bird game. Instead of loading an operating system, your computer boots directly into the game.

Features

  • 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

Controls

  • Spacebar: Make the bird jump
  • Goal: Navigate through the gaps in the green pipes

Build & Test

Build:

nasm -f bin n.asm -o flappy.bin

Test in QEMU:

qemu-system-i386 -fda flappy.bin

On real hardware:

  1. Flash flappy.bin to USB using Rufus
  2. Enable Legacy Boot in BIOS
  3. Disable Secure Boot
  4. Boot from USB

Technical Details

  • 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)

Game Objects

  • Bird: Blue '#' character
  • Pipes: Green '||' characters
  • Movement: Pipes scroll left, bird falls with gravity
  • no collison as i lazy (skill issue)

BIOS Settings

For modern UEFI systems:

  1. Disable: Secure Boot / Intel Platform Trust
  2. Enable: Legacy Boot / CSM Support
  3. Set: Boot mode to Legacy
  4. Disable: Fast Boot

Learning Resources

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

https://www.nasm.us/xdoc/2.16.03/html/nasmdoc0.html

About

Thought expirement turned to game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •