add chip.rs
This commit is contained in:
parent
4009845fce
commit
27b897cd0d
19
src/chip.rs
Normal file
19
src/chip.rs
Normal file
@ -0,0 +1,19 @@
|
||||
use cpu::CPU;
|
||||
|
||||
pub struct Chip {
|
||||
cpu: CPU,
|
||||
rom: Box<[u8]>,
|
||||
ram: Box<[u8]>,
|
||||
|
||||
// TODO: List of devices
|
||||
}
|
||||
|
||||
impl Chip {
|
||||
pub fn new(rom: Box<[u8]>) -> Chip {
|
||||
Self {
|
||||
cpu: CPU::new(),
|
||||
rom: rom,
|
||||
ram: Box::new([0u8; 8 * 1024 + 1024]),
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user