braheezy/zoleco
ColecoVision emulator
424ff5f9245ef352e4c508c77ddaeed2f46bd605
The ColecoVision was a 2nd-generation video game console from the early 80s. zoleco
is a full emulator of the system, capable of running ROMs for that console.
See demos for more.
You need Zig and SDL2 to run this project.
# macos
brew install sdl2 zig
Then build and run:
zig build
./zig-out/bin/zoleco <path to rom>
Most ROMs are easily found online. I don't know the full legality but this stuff is so old I doubt anyone cares.
I've only tested this on MacOS but the dependencies are platform agnostic so it might work on yours. If it does, let me know in an Issue!
The emulator supports two controllers with the following default keybindings:
Press ESC to quit the emulator.
The emulator currently only supports standard ColecoVision ROMs. Super Game Module (SGM) capabilities and other hardware expansions are not currently supported.
This project has three main components emulator components:
Most of the remaining code is ties the components together to drive them with cycle accuracy, provide interrupt handling, handle input, and draw the framebuffer to the screen.
I developed the individual components in isolation. There are isolated example programs for each one:
examples/vgm_player
: Read a VGM file for the SN76489 sound chip and play it.examples/z80_tester.zig
: Execute the exhaustive Z80 test suite for JSMoo. Each opcode has 1000 test cases. Run with zig build cputest
.examples/tms9918_viewer
: Displays an image file using a TMS9918 emulator. Not actually used.The tms9918_viewer
example video code is not actually used in the emulator because I couldn't figure out how to integrate it. Instead, I ported the video emulator code from Gearcoleco. Maybe one day I'll try integrating TMS9918 properly. The overall application setup and emulation loop is also taken from Gearcoleco.
zoleco
is a minimal emulator that can run ROMs and that's about it.
For a full-featured modern emulator, see the esteemed Gearcoleco.