Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Fontset = [80]byte{
0xF0, 0x90, 0x90, 0x90, 0xF0,
0x20, 0x60, 0x20, 0x20, 0x70,
0xF0, 0x10, 0xF0, 0x80, 0xF0,
0xF0, 0x10, 0xF0, 0x10, 0xF0,
0x90, 0x90, 0xF0, 0x10, 0x10,
0xF0, 0x80, 0xF0, 0x10, 0xF0,
0xF0, 0x80, 0xF0, 0x90, 0xF0,
0xF0, 0x10, 0x20, 0x40, 0x40,
0xF0, 0x90, 0xF0, 0x90, 0xF0,
0xF0, 0x90, 0xF0, 0x10, 0xF0,
0xF0, 0x90, 0xF0, 0x90, 0x90,
0xE0, 0x90, 0xE0, 0x90, 0xE0,
0xF0, 0x80, 0x80, 0x80, 0xF0,
0xE0, 0x90, 0x90, 0x90, 0xE0,
0xF0, 0x80, 0xF0, 0x80, 0xF0,
0xF0, 0x80, 0xF0, 0x80, 0x80,
}
The CHIP-8 fontset.
Functions ¶
This section is empty.
Types ¶
type CPU ¶
type CPU struct { PC uint16 // program counter V [16]uint8 // registers I uint16 // index register SP uint8 // stack pointer Memory *Memory // memory DelayTimer uint8 // delay timer SoundTimer uint8 // sound timer Display *image.RGBA // display Draw bool // draw flag Keys Keys // input state // contains filtered or unexported fields }
func (*CPU) ClearDisplay ¶
func (cpu *CPU) ClearDisplay()
func (*CPU) UpdateDelayTimer ¶
func (cpu *CPU) UpdateDelayTimer()
func (*CPU) UpdateSoundTimer ¶
func (cpu *CPU) UpdateSoundTimer()
func (*CPU) UpdateTimers ¶
func (cpu *CPU) UpdateTimers()
Update the timers. This must be called at 60 Hz
Click to show internal directories.
Click to hide internal directories.