Boot Sector Pong As A Crash Course In Assembly

Have you ever wanted to develop a playable game small enough to fit into a disk’s 512 byte boot sector? How about watching somebody develop a program in assembly for nearly two hours? If you answered yes to either of those questions, or ideally both of them, you’re going to love this project from [Queso Fuego].

Whether you just want to check out the public domain source code or watch along as he literally starts from a blank file and codes every line for your viewing pleasure, chances are good that you’ll pick up a trick or two from this project. For example, he explains how all of the “graphics” in the game are done in 80 x 25 text mode simply by setting the background color of character cells without printing any text to them.

We really like the presentation in the video after the break, which was recorded over the course of multiple days, judging by the changing light levels in the background. As he types out each line of code, he explains what its function is and gives any background information necessary to explain how it will fit into the larger program. If you’ve ever wondered if you had what it takes to program in ASM, watching this video is a great way to decide.

[Queso Fuego] mentions that this project, and his research into this sort of low-level programming, came about due to the social distancing boredom that many of us are feeling. While we’re certainly not advocating for him to kept locked in his home permanently, with projects like this, you’ve got to admit it seems like a win for the rest of us.

[Thanks to Joe for the tip.]

13 thoughts on “Boot Sector Pong As A Crash Course In Assembly

    1. I like this! Trying to get the maximum out of a space- and power-restreined (??) µC is real fun. Using a big RaPi or STM32 to blink an LED everybody can do it.

      Nitpick: On your article about USBASP-update there is an error: “Arduino as IPS” should be “as ISP” i assume?

      1. Glad you liked it. You are right: the point in using an ATtiny10 is to be forced to look for alternative and creative solutions for common problems. Also, using assembly for the first time meant I spent a lot of time with pen and paper solving puzzles to make it work.
        Thanks for the heads-up on the typo.

    2. This is really awesome. I used a bit-banged OLED library for fast I2C to implement a fun little Mario-type game with two OLED screens and an ATtiny85 and I thought that was a challenge to squeeze everything in… I see now I was spoilt! Your assembly + ATtiny10 is another level though, wow!


      1. Duncan, that is very, very cool. And thank you for a real writeup as well as videos. Relevant videos, that complement the written words, pictures and diagrams. You win Hackaday for the week. You HAVE submitted this to Hackaday, right?

        1. Thanks Nick! I do like to try to document things in a way that is hopefully interesting to others, but also with enough detail that someone could repeat what I’ve done. I also tend to forget the details of various projects myself, so my other motivation is to record it so that *I* can remember how to do something!

          I actually hadn’t submitted this to Hackaday, but I have now. Thanks for your encouragement.

    1. I’d have to go looking to see if I still have a copy of it , but , go back 20 years ago there were at least two different game boot-sector compo’s that I saw. Between both compo’s there could have easily been another 20 or 30 games to add to your list. I think Hugi did one of them (old yahoogroups list) Do a google, might be able to find them.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.