Chip8.Interpreter.Memory (chip8 v0.1.0)
Memory space available for programs to store and manipulate data.
The Chip-8 interpreter has a total of 4Kb
(4096 bytes) of memory space,
that is accessible from address 0x000
(0
) to 0xFFF
(4095
).
Originally, the interpreter implementation shared the same memory space
of programs and occupied the sector between 0x000
(0
) and 0x1FF
(511
), for this reason, programs should not use the interpreter space
so they usually start at location 0x200
(512
).
Link to this section Summary
Link to this section Types
Link to this type
data()
@type data() :: [byte()]
@type t() :: %Chip8.Interpreter.Memory{data: data(), size: non_neg_integer()}
Link to this section Functions
Link to this function
new(size)
@spec new(non_neg_integer()) :: t()
Link to this function
read(memory, address, amount)
@spec read(t(), non_neg_integer(), non_neg_integer()) :: data()
Link to this function
write(memory, address, data)
@spec write(t(), non_neg_integer(), data()) :: t()