Zemu6502 An emulator for 6502 based 8bit micro computers

Was initially a learning exercise but has evolved into being a configurable emulator.

This started as a Rust project but I was introduced to Zig and ported over my initial work.

Has matured to the point where I am now rapidly adding new features and adding more configuration options and starting to develop more peripherals.

Looking to introduce Mach for graphical output (currently only has simple terminal output) and to improve input handling.

Available on GitHub GitHub - timsavage/zemu6502: Flexible 6502/8Bit Micro computer emulator implemented in Zig

9 Likes

That ops table is massive - cool stuff!

I actually cheated a little with that and used a speedsheet with a python script that generated the table along with boilerplate for every micro-op function.

1 Like

Also there is a fairly large update I’ve yet to push on the develop branch. Still a couple of issues to iron out before I push.

Nothin’ wrong with that. That’s probably a smart way to avoid copy-paste errors, typos… etc.

This has turned into a larger learning exercise.

The project now uses raylib for display and input, includes the gdb protocol over TCP (along with a custom client in python as gdb does not have native support for the 6502).

GDB was a great exercise in parsing an incoming data stream, as well as getting across the use of sockets and epoll with Zig.

Still having some trouble with getting raylib-zig to reliably link. Hopefully it’s upgraded to 0.12 soon.

Devel branch is now building against 0.12 GitHub - Not-Nik/raylib-zig: Manually tweaked, auto-generated raylib bindings for zig. https://github.com/raysan5/raylib