How bemxio/bad-apple-bootloader works
Bad Apple Bootloader turns grayscale video into a bootable image that plays from disk to the screen. The documented preparation flow converts video frames into palette-indexed data; the boot code then reads frames and displays them, with PIT timing supporting faithful playback. The compressor excerpt confirms palette loading and run-length output. Assembly responsibilities are represented by their filenames and README-level behavior; their internal calls are not shown, so those links are omitted. The README also documents QEMU as a way to run the image.
Main entry points: bootsector.asm Bootsector · compressor.c Frame compressor · palette.bin Color palette · disk.asm Disk access
Components 10
Video preparation
- Frame compressor
src/compressor.c - Color palette
palette.bin - Encoded frames
- Boot image
Boot playback
- Bootsector
src/bootsector.asm
Machine I/O
- Disk access
src/disk.asm - Video output
src/video.asm - Serial I/O
src/serial.asm
Other components
- Source video
- QEMU
Connections 8
- Source video → Frame compressor: supplies frames
README.md - Color palette → Frame compressor: loads palette
src/compressor.c - Frame compressor → Encoded frames: encodes frames
src/compressor.c - Encoded frames → Boot image: included in
README.md - Bootsector → Boot image: forms boot code
README.md - Bootsector → Disk access: reads frames
README.md - Bootsector → Video output: displays frames
README.md - Boot image → QEMU: runs in
README.md