A Game Boy emulator written in Zig.
ziggyboy is a Game Boy emulator project built using the Zig programming language. The project aims to provide accurate emulation of the original Game Boy hardware.
- CPU implementation with register management
- Flag register support (Zero, Subtraction, Half Carry, Carry)
- Instruction structure for Game Boy opcodes
Make sure you have Zig installed on your system. You can download it from ziglang.org.
zig buildAfter building, you can run the emulator:
./zig-out/bin/ziggyboy.exeAlternatively, you can build and run in one step:
zig build runRun all tests:
zig build test --summary allRun specific test suites:
# Run CPU tests only
zig build test-cpu --summary all
# Run instruction tests only
zig build test-instructions --summary all├── src/
│ ├── main.zig # Main entry point
│ ├── cpu.zig # CPU implementation
│ ├── library.zig # Helper functions
│ └── instructions/
│ ├── instruction.zig # Instruction structure and types
│ └── instruction_table.zig # Instruction lookup table
├── build.zig # Build configuration
├── build.zig.zon # Package configuration
└── LICENSE # MIT License
This project is currently in early development. Core CPU functionality is being implemented.
This project is licensed under the MIT License - see the LICENSE file for details.
I'm trying to learn Zig and Game Boy emulation on my own, so no PRs please. But feel free to fork or to use this code to learn for yourself!