tinychip 0.1.1

CHIP-8 emulator/interpreter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub trait Memory {
    /// Write a byte at index the `index`
    fn write_byte_at(&mut self, byte: u8, index: usize);
    /// Write n bytes at index the `index`
    fn write_any(&mut self, bytes: Vec<u8>, index: usize) {
        for i in 0..bytes.len() {
            self.write_byte_at(bytes[i], index + i);
        }
    }
    /// Read a byte at the index `index`
    fn read_byte(&self, index: usize) -> u8;
    /// Read an unsigned short int
    fn read_short(&self, index: usize) -> u16;
}