Game Boy Graphics: Reverse Engineering a Tilemap, Part 2

This is the second part of reverse engineering a tilemap from Pokémon Red/Blue. Check out the first part if you haven’t already! Reminder: Here’s what I’m trying to recreate (minus the sprites). Step 3b: Convert a PNG to Binary on Compile I used rgbgfx to convert the PNG to a binary file in the last post. However, I want to automate this process so I don’t have to run the command every time I make a change to the tileset. To do this, I just need to add a few lines to my Makefile: ...

June 4, 2024 · 2 min

Game Boy Graphics: Reverse Engineering a Tilemap, Part 1

I concluded my last post by saying I should create a more intricate tilemap. However, I didn’t consider that I am not skilled in art at all! I was really regretting that statement until I realized I could do something more fun: reverse engineer an existing tilemap! So, today I’ll be reverse engineering a tilemap from Pokémon Red/Blue. The Ground Rules I’m still learning, so this isn’t going to be perfect, but I want to get as close as possible to recreating what I would see in the game without doing anything too complicated yet. So, here are some of the rules I’m setting for myself: ...

May 29, 2024 · 5 min

Game Boy Graphics: My First Tilemap

Last week, I filled the Game Boy screen with a single tile. Today, I’m expanding on that concept by creating and displaying my first tilemap. This is the first step towards crafting more intricate and engaging visuals on the Game Boy. What is a Tilemap? A tilemap is essentially data representing a grid composed of numerous “tiles.” Tilemaps offer a concise way to represent larger images in a game. Instead of storing an entire screen as a single image, you can break it down into smaller, reusable pieces. This method is particularly beneficial for the Game Boy, given its limited memory and processing power. ...

May 7, 2024 · 7 min

Game Boy Graphics: Displaying a Tile

Last time, I explored how to encode a Game Boy tile. Today, I want to take it a step further by displaying a tile on the screen. Getting Started Before I could get started, I needed to learn how to create my first Game Boy ROM. There are many tools available, but I chose RGBDS, the most popular assembler and linker for developing Game Boy applications today. It is well-documented and supported by a large community, which is ideal for a beginner like me. I’m also aiming to work as close to the hardware as possible, which is why I’ve opted for assembly language over higher-level tools. ...

May 1, 2024 · 4 min

Game Boy Graphics: Tile Encoding

In the previous installment of this series on Game Boy graphics, I created my first Game Boy tile and exported it. Today, I want to explore exactly what was exported. The Code To refresh, here is the assembly code I exported last time: ; EXPORT.Z80 ; ; Tile Source File. ; ; Info: ; Section : Tiles ; Bank : 0 ; Form : All tiles as one unit. ; Format : Gameboy 4 color. ; Compression : None. ; Counter : None. ; Tile size : 8 x 8 ; Tiles : 0 to 0 ; ; Palette colors : None. ; SGB Palette : None. ; CGB Palette : None. ; ; Convert to metatiles : No. ; ; This file was generated by GBTD v2.2 SECTION "Tiles", HOME ; Start of tile array. TileLabel:: DB $AA,$1C,$55,$8E,$AA,$C7,$55,$E3 DB $AA,$71,$55,$38,$AA,$1C,$55,$8E ; End of EXPORT.Z80 Z80 The file I exported is named EXPORT.Z80. The Z80 extension denotes the flavor of assembly language used. The Zilog Z80 was a widely popular microprocessor utilized in numerous retro devices. ...

April 28, 2024 · 5 min

Game Boy Graphics - Creating My First Tile

In my previous post, I discussed how the Game Boy uses 2 bits to represent one pixel. Today, I want to dive deeper into Game Boy graphics and explore tiles. What is a tile? In video games, a tile is a small graphic that forms the building blocks of larger images. Tiles are arranged within a grid to craft more intricate scenes on the screen. The Game Boy utilizes tiles that are 8 pixels by 8 pixels in size (8x8). This dimension is not unique to the Game Boy; in fact, many retro gaming systems also adopted 8x8 tiles. ...

April 27, 2024 · 3 min
Game Boy - 2bpp diagram

Game Boy Graphics: 2 Bits Per Pixel (2bpp)

Launched in 1989, the Game Boy revolutionized portable gaming, even with its simple graphics system. Today, I want to explore how this iconic device encoded graphics at its most fundamental unit: the pixel. What’s a bit? The smallest unit of data a computer can work with is a bit. A bit can only be on or off; there are no other states. To represent this in binary, we use 0 (off) or 1 (on). It’s as simple as that! ...

April 22, 2024 · 2 min
Hugo Logo

Built With Hugo

For several years, I’ve owned the domain bradyanderson.tech. It originally started as a single static HTML page and has undergone a few upgrades since then. Each iteration made this site slightly better, but it has always been a bit too complex. That’s why I’m excited to relaunch this site with the help of a framework that’s brand-new to me: Hugo. Why Hugo? As a seasoned React developer, stepping away from the familiar was not easy. However, Hugo is a static site generator that bills itself as “the world’s fastest framework for building websites”. With such a claim, I knew I had to give Hugo a try. So what else did Hugo have to offer me? ...

April 21, 2024 · 2 min

Hello, World!

Is this thing working? I hope so. If you found this post, you found the start of a brand new bradyanderson.tech. More content coming real soon…

April 20, 2024 · 1 min