Like many other 90s styles coming back in fashion, I’ve been seeing those retro 88x31 web buttons on more personal websites these days. What a throwback. Naturally, I scoured the internet to find buttons to add to my footer (see below). Since I couldn’t find a Game Boy one that I liked, obviously I had to make my own. There’s only one problem: I’m not patient (read: talented) enough to make the art myself. My idea was to use the boot animation from the Game Boy Color placed inside the traditional grey frame. Something like this: A rough mock-up of the web button. Not too complicated, right? So you’d think. First, we’ve got to find a way to export the animation from boot ROM. The easiest way I could think of to do that was to play it in an emulator and save screenshots of each frame individually. Well, in order to do that we need a way to stop the emulator at each frame. Thankfully, the emulator I used has breakpoints. So, where should those breakpoints go? Time for a quick crash course: The animation is programmed into the Game Boy’s boot ROM in GBZ80 assembly. This is proprietary code written by Nintendo that powers up the system and validates the cartridge before handing off execution to the game. Thankfully, some smart people have done the hard work of (1) dumping, (2) disassembling, and (3) labelling the boot ROM for us. For each Game Boy frame, there’s a period of time where the LCD idles before drawing the next frame. This is called vblank. Taking a look at the disassembly, we can see where vblank occurs: ; =============== S U B R O U T I N E ======================================= ; Wait until LCD VBlank Interrupt is flagged. ; ; Input: None. ; Output: None. Wait_for_next_VBLANK: push hl ld hl, $FF0F res 0, [hl] _wait_vblank_loop: bit 0, [hl] ; wait until hardware sets the vblank flag (bit 0 of FF0F) jr z, _wait_vblank_loop pop hl ret ; End of function Wait_for_next_VBLANK Using the debugger, we can see that this function is called from the following code: su...
First seen: 2026-01-06 04:30
Last seen: 2026-01-06 17:38