class Chip8::CPU

Defined in:

cpu.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(display : DisplayProtocol, keyboard : KeyboardProtocol) #

[View source]

Instance Method Detail

def decrement_timers #

60 Hz


[View source]
def display : Display #

[View source]
def display=(display : Display) #

[View source]
def dt : UInt8 #

[View source]
def dt=(dt : UInt8) #

[View source]
def execute_cycle #

500 Hz


[View source]
def i : UInt16 #

[View source]
def i=(i : UInt16) #

[View source]
def keyboard : Keyboard #

[View source]
def keyboard=(keyboard : Keyboard) #

[View source]
def load(io) #

[View source]
def load_font #

[View source]
def memory : StaticArray(UInt8, 4048) #

Memory - 4kb (4096 bytes) memory storage (8-bit) I - stores memory addresses PC - Program Counter (8-bit) stores currently executing address


[View source]
def memory=(memory : StaticArray(UInt8, 4048)) #

Memory - 4kb (4096 bytes) memory storage (8-bit) I - stores memory addresses PC - Program Counter (8-bit) stores currently executing address


[View source]
def pc : UInt16 #

[View source]
def pc=(pc : UInt16) #

[View source]
def process_opcode(opcode : UInt16) #

[View source]
def read_opcode : UInt16 #

[View source]
def reset #

[View source]
def sp : Int8 #

[View source]
def sp=(sp : Int8) #

[View source]
def st : UInt8 #

ST - Sound Timer (8-bit) DT - Delay Timer (8-bit)


[View source]
def st=(st : UInt8) #

ST - Sound Timer (8-bit) DT - Delay Timer (8-bit)


[View source]
def stack : StaticArray(UInt16, 16) #

Stack - (16 * 16-bit) SP - Stack Pointer (8-bit) points at top level of stack


[View source]
def stack=(stack : StaticArray(UInt16, 16)) #

Stack - (16 * 16-bit) SP - Stack Pointer (8-bit) points at top level of stack


[View source]
def v : StaticArray(UInt8, 16) #

V - registers (16 * 8-bit) V0 through VF; VF is a flag


[View source]
def v=(v : StaticArray(UInt8, 16)) #

V - registers (16 * 8-bit) V0 through VF; VF is a flag


[View source]