Matt's Homebrew GPU

Try it yourself

Run the EPIC 6502

This is the emulator I wrote to develop the BIOS and cartridges, running the real BIOS ROM and the example cartridges, right here in your browser.

Cartridge

Loading…

CPU -

What you're looking at

The emulator models the whole machine from part 5: the 65c02 CPU, 16kb of RAM, the 32kb ROM with the BIOS and Enhanced BASIC, the 65c22 VIA and its timer, the GPU, and a cartridge in the first I/O port.

When you pick a cartridge the machine resets, and the BIOS loads it exactly as it does on the real board: it copies the tiles and map into the GPU's video memory one byte at a time, then copies the program into RAM and jumps to it. That loading normally takes a while, so the emulator runs flat out until the program starts.

The screen is the GPU's 400x300 output. Everything on it is made of 16x16 tiles, including BASIC's text, where each character is a tile from the cartridge's font.

Things to know

The emulator is written in TypeScript. Its source, along with the BIOS, the cartridges and the schematics, is on Bitbucket.