chip8
Version, currently main branch1 version
- main branchlatestMay 6, 2026
github.com/whtsht/chip-8
No description declared in shard.yml.
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
chip8:
github: whtsht/chip-8
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
- no constraint declared
- License
- MIT
- Target
chip8from src/main.cr
Dependencies
Runtime Dependencies
- sdl*github: ysbaddaden/sdl.cr
README
chip-8
A CHIP-8 interpreter written in Crystal.
Requirements
Build & Run
shards install
shards build # produces ./bin/chip8
shards run -- <rom-path> # or: crystal run src/main.cr -- <rom-path>
The ROM path is required. Example ROMs are bundled under ./roms/:
shards run -- ./roms/test/IBM_Logo.ch8
shards run -- ./roms/game/Tic_Tac_Toe.ch8
Options
| Flag | Default | Description |
|---|---|---|
--legacy-shift=BOOL | true | 8XY6 / 8XYE copy Vy into Vx before shifting (original COSMAC VIP behavior). |
--legacy-memory-inst=BOOL | false | When true, Fx55 / Fx65 increment I after the transfer. |
Any value other than the literal string true is treated as false.
Keypad
The CHIP-8 hex keypad is mapped to the left-hand side of a QWERTY keyboard:
CHIP-8 Keyboard
1 2 3 C 1 2 3 4
4 5 6 D <=> Q W E R
7 8 9 E A S D F
A 0 B F Z X C V
Specifications
- Display: 64 × 32, monochrome
- Memory: 4 KB; font sprites at
0x50, ROM loaded at0x200 - CPU target: ~700 Hz; timers (delay / sound) tick at 60 Hz
- Sound: square-wave beeper driven by SDL audio (44.1 kHz, mono, S16)
References
License
MIT
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- May 6, 2026
- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/whtsht/chip-8
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 17, 2026
- Synced
- Aug 17, 2026
- Versions
- 1