Documentation ¶
Overview ¶
Contains structs and methods for the chip-8 memory.
Index ¶
Constants ¶
View Source
const RamStartLocation = 0x200
Variables ¶
This section is empty.
Functions ¶
func DecodeKey ¶
Decode which key is pressed, emulator Does not support multiple key presses and the rightmost will be selected.
func NewKeyboard ¶
func NewKeyboard(keyboardBuffer *uint16) *chip8Keyboard
Initialise a new keyboard whose buffer is shared Between emulator logic and device logic.
func NewRegisters ¶
func NewRegisters(soundBuffer *bool) *chip8Registers
Initialise a new register with a sound buffer.
Types ¶
type CarryFunction ¶
This type of function is used to determine VF.
type LogicalInstructionType ¶
type LogicalInstructionType uint8
const ( Load LogicalInstructionType = iota Or And Xor Add Sub Shr Subn Shl = 0xE )
type OperationFunction ¶
This type of function is used to operate on register values.
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Main processor of the Chip-8
func NewProcessor ¶
func (*Processor) LoadETIProgram ¶
Load an ETI program to the memory and set the program counter accordingly.
func (*Processor) LoadProgram ¶
Load a standard Chip-8 Program to the memory And set the program counter accordingly.
func (*Processor) ShouldHalt ¶
Returns true if the processor should halt.
Click to show internal directories.
Click to hide internal directories.