struct Chip8
- Chip8
- Struct
- Value
- Object
Overview
The chip object. Contains all the memory and registers of the Chip-8
Defined in:
interpreter.crConstructors
Instance Method Summary
-
#delay_reg : UInt8
special purpose 8Bit delay register.
-
#delay_reg=(delay_reg : UInt8)
special purpose 8Bit delay register.
-
#i_reg : UInt16
16Bit I register
-
#i_reg=(i_reg : UInt16)
16Bit I register
- #interpret
-
#load_file(file_name)
reads in the binary file with chip8 instructions and loads it into memory
-
#load_memory(data : Array(UInt8))
Use for manually loading memory values for testing
-
#mem : Array(UInt8)
4KB of RAM starting at 0x000 to 0xFFF First 512B (0x000 to 0x1FF) are for interpreter and shouldn't be used property mem = Array(UInt8).new(MAX_MEMORY, 0)
-
#mem=(mem : Array(UInt8))
4KB of RAM starting at 0x000 to 0xFFF First 512B (0x000 to 0x1FF) are for interpreter and shouldn't be used property mem = Array(UInt8).new(MAX_MEMORY, 0)
-
#mem_size : Int32
This will store how large the actual file is
-
#mem_size=(mem_size : Int32)
This will store how large the actual file is
-
#pc : UInt16
16Bit program counter
-
#pc=(pc : UInt16)
16Bit program counter
-
#reg : Array(UInt8)
16 general purpose 8Bit registers
-
#reg=(reg : Array(UInt8))
16 general purpose 8Bit registers
-
#sound_reg : UInt8
special purpose 8Bit sound timer.
-
#sound_reg=(sound_reg : UInt8)
special purpose 8Bit sound timer.
-
#sp : UInt8
8Bit stack pointer
-
#sp=(sp : UInt8)
8Bit stack pointer
-
#stack : Array(UInt16)
16 16bit stack values
-
#stack=(stack : Array(UInt16))
16 16bit stack values
Constructor Detail
Instance Method Detail
reads in the binary file with chip8 instructions and loads it into memory
4KB of RAM starting at 0x000 to 0xFFF First 512B (0x000 to 0x1FF) are for interpreter and shouldn't be used property mem = Array(UInt8).new(MAX_MEMORY, 0)
4KB of RAM starting at 0x000 to 0xFFF First 512B (0x000 to 0x1FF) are for interpreter and shouldn't be used property mem = Array(UInt8).new(MAX_MEMORY, 0)