I wrote a Pong game in a 512-byte boot sector
Mood
excited
Sentiment
positive
Category
tech
Key topics
low-level programming
retro gaming
boot sector development
The author created a Pong game within a 512-byte boot sector, showcasing impressive coding skills.
Snapshot generated from the HN discussion
Discussion Activity
Active discussionFirst comment
3m
Peak period
12
Day 5
Avg / period
6.5
Based on 13 loaded comments
Key moments
- 01Story posted
11/15/2025, 12:36:51 AM
4d ago
Step 01 - 02First comment
11/15/2025, 12:39:26 AM
3m after posting
Step 02 - 03Peak activity
12 comments in Day 5
Hottest window of the conversation
Step 03 - 04Latest activity
11/19/2025, 4:10:17 PM
3h ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Run it: nasm -f bin pong.asm -o boot.bin qemu-system-x86_64 boot.bin
You can add it to the list at https://gist.github.com/XlogicX/8204cf17c432cc2b968d138eb639... I think there are already at least two Pong game there.
There's a working Rogue port for Minix2 under a 16 bit CPU (and for the Z Machine too, and GBA, and several others...), but I think even Hack 1.0.3 would be too big to fit under a 286 with 640k.
It would be a good start if Nethack 1.3d got working under CP/M for instance, rewritten with T3X0 and some ASM hacks for speeds...
Out of interest, is there a difference in environment between running a COM executable for MS-DOS versus running a bootblock? I know there's the whole of MS-DOS, but a typical size-coded demo (http://www.sizecoding.org/wiki/DOS) will only use int 10h to switch mode, and that's it. Everything else is IO mapped (e.g. the keyboard) or memory mapped (e.g. screen memory). Could these equally run as a bootblock, and vice-versa?
One difference I know of is that DOS maintains an ever-increasing timer that it writes to 0:046C... is that available at bootblock execution time?
More advanced than my attempt: https://github.com/mat-sz/pongloader
BTW: You could provide a live online demo using v86 - https://github.com/copy/v86
BTW I checked out your Github and tried the link to your personal site - looks like the www prefix isn't working.
www.akshatjoshi.com fails but akshatjoshi.com works. Gotta fix those A records!
I spent three days disassembling Guillermo Sais's 142-byte winner, which was challenging to understand. My notes may be of interest; they are in gsais-pong.md in http://canonical.org/~kragen/sw/pavnotes2.git/
I hope this is not interpreted as any kind of criticism. I would much rather be responsible for maintaining Joshi's code than Sais's. But I suspect that most people who are interested in either work will be interested in the other.
some ideas: - could try to add another player. just need to map 4 more keys. IO should be fine doing it the same way (dont think itd need thread or whatever) the io is super fast in the qemu scenario.
- rather than have this in the MBR. make an MBR where you can select this sector to load as next sector and jump, maybe even with ability to return. *you can then expose other games too if ud ever be bothered for snake or minesweeper :D
just some tinkering ideas. cool project and hats off. its always more tricky than it looks these things!
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.