class Vm::Interpreter

Defined in:

vm/interpreter.cr

Constant Summary

FONTSET = [240, 144, 144, 144, 240, 32, 96, 32, 32, 112, 240, 16, 240, 128, 240, 240, 16, 240, 16, 240, 144, 144, 240, 16, 16, 240, 128, 240, 16, 240, 240, 128, 240, 144, 240, 240, 16, 32, 64, 64, 240, 144, 240, 144, 240, 240, 144, 240, 16, 240, 240, 144, 240, 144, 144, 224, 144, 224, 144, 224, 240, 128, 128, 128, 240, 224, 144, 144, 144, 224, 240, 128, 240, 128, 240, 240, 128, 240, 128, 128]

Constructors

Instance Method Summary

Constructor Detail

def self.new(file : File, debug : Bool = false) #

[View source]

Instance Method Detail

def char_font_p(char) #

[View source]
def cpu_cycle : Nil #

[View source]
def load_fontset! #

[View source]
def load_program! : Nil #

[View source]
def log(str) #

[View source]
def next_code! #

[View source]
def process_(opcode) : Nil #

[View source]
def read_opcode #

[View source]
def repeat(hz : Int, in_fiber : Bool, &block) #

[View source]
def repeat(hz : Int, &block) #

[View source]
def run! : Nil #

stealing go brrr (thanks https://github.com/mattrberry/chip-8 for good practices!)


[View source]
def skip_next_code! #

[View source]
def timers_cycle : Nil #

[View source]