Documentation ¶
Overview ¶
Package chip8 is a Chip-8 emulator written in Go. Chip-8 used to be implemented on 4k systems like the Telmac 1800 and Cosmac VIP where the chip-8 interpreter itself occpied the first 512 bytes of memory (up to 0x200). In modern CHIP-8 implementations (like ours here), where the interpreter is running natively outside the 4K memory space, there is no need to avoid the lower 512 bytes of memory (0x000-0x200), and it is common to store font data there.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VM ¶
type VM struct { // Our "CPU clock" Clock *time.Ticker // Channel for sending/receiving a shutdown signal ShutdownC chan struct{} // contains filtered or unexported fields }
VM represents the chip-8 virtual machine
func NewVM ¶
NewVM initializes a Window and a VM, loads the font set and the ROM into memory, and returns a pointer to the VM or an error
func (*VM) ManageAudio ¶
func (vm *VM) ManageAudio()
ManageAudio reads and decodes the beep.mp3, initializes the speaker, and plays a beep each time an audio event is placed on the channel