explaingit

pret/pokered

4,695AssemblyAudience · developerComplexity · 5/5Setup · hard

TLDR

A complete, compilable disassembly of Pokémon Red and Blue for the original Game Boy, lets you study how the games work, document bugs, or create modified ROM hacks from the reconstructed Assembly source code.

Mindmap

mindmap
  root((pokered))
    What it is
      Game disassembly
      Game Boy ROM source
      Byte identical output
    Use Cases
      Bug research
      ROM hacking
      Retro game study
    Tech Stack
      Assembly
      Game Boy
    Community
      pret group
      Discord server
      Wiki tutorials
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Study how the original Pokémon Red game was programmed to understand Game Boy assembly and retro game architecture.

USE CASE 2

Create a ROM hack of Pokémon Red by modifying the source code and compiling a custom game cartridge image.

USE CASE 3

Find and document known bugs from the original game by tracing the exact Assembly code that causes them.

Tech stack

Assembly

Getting it running

Difficulty · hard Time to first run · 1h+

Requires the rgbds Game Boy assembly toolchain and familiarity with low-level Assembly to make meaningful changes.

In plain English

This repository contains a disassembly of the original Pokemon Red and Blue games for the Game Boy, released in the late 1990s. A disassembly means that someone took the finished game files and worked backwards to reconstruct the original source code in a human-readable form. The result is an Assembly language codebase that, when compiled, produces byte-for-byte identical copies of the original game cartridge files. Assembly is the lowest-level programming language, sitting just above the raw instructions that a processor executes. Writing or reading it requires understanding the specific chip inside the original Game Boy hardware. The project targets that chip and produces the exact same game ROM files that Nintendo shipped, verified by matching cryptographic checksums. The main use of a disassembly like this is to let people study how the original games work, find and document bugs, or create modified versions of the games. The repository links to a wiki with tutorials explaining how to make changes, a symbols file listing the names of functions and variables found in the code, and a set of tools for working with Game Boy assembly code. To build the ROM files from the source code, you follow setup instructions in a separate install document. The project is part of a broader effort by the pret community, which has produced disassemblies of many other Pokemon games and Game Boy titles. There is a Discord server where contributors and enthusiasts discuss the project.

Copy-paste prompts

Prompt 1
Using the pret/pokered disassembly, find and explain the code that causes the MissingNo glitch in the original Pokémon Red.
Prompt 2
How do I compile the pokered disassembly into a ROM file and run it in a Game Boy emulator on my computer?
Prompt 3
Modify the pokered source to change the starter Pokémon in Professor Oak's lab from Bulbasaur to a different Pokémon, then recompile.
Prompt 4
What tools from the pret project do I need to edit sprites or maps in the pokered disassembly?
Open on GitHub → Explain another repo

← pret on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.