Skip to content

Latest commit

Β 

History

History
59 lines (45 loc) Β· 1.66 KB

File metadata and controls

59 lines (45 loc) Β· 1.66 KB

chp8

                         β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
                        β–ˆβ–ˆ      β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ
                        β–ˆβ–ˆ      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
                        β–ˆβ–ˆ      β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆ      β–ˆβ–ˆ   β–ˆβ–ˆ
                         β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆ       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ

A CHIP-8 implementation.

Usage

chp8 /path/to/rom.ch8

Features

  • Zero-dependency, no_std core
  • Quirks

Architecture

The system is divided into two main components: the virtual machine Vm and host Host.

block-beta
  columns 1
  io<["I/O"]>(up, down)
  block:Host
    Display
    Sound
    Keyboard
  end
  space
  block:VM
    CPU
    Memory
  end
  Host <-- "Syscalls" --> VM
Loading

The virtual machine integrates the CPU and memory. It has no dependencies and is compatible with no_std environments. The Host trait provides the Vm with access to the keyboard, framebuffer, and sound.

Think of Vm as the interpreter and Host as the emulator. The chp8 binary implements a host using SDL2.

Acknowledgements

I found the following resources helpful: