SkillAgentSearch skills...

Chip8

A terminal-based, JIT-compiled CHIP-8 VM in Zig

Install / Use

/learn @silversquirl/Chip8
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

This is a simple CHIP-8 VM written in Zig, that runs inside a terminal.

It has an interpreter mode and a JIT mode (using copy-and-patch), built on the exact same instruction descriptions.

Caveats:

  • no keyboard support (terminals are too annoying)
  • no sound support
  • limited support for self-modifying code (might work, or might crash. Should work fine in interpreter mode)
  • a few niche ROMs might break the JIT (should just cause a compile error)

This was mostly a learning exercise, but maybe it'll be interesting to someone.

Inspired by this article on copy-and-patch.

View on GitHub
GitHub Stars15
CategoryDevelopment
Updated10mo ago
Forks0

Languages

Zig

Security Score

82/100

Audited on May 8, 2025

No findings