mirror of
https://github.com/FranLMSP/rmg-001.git
synced 2024-09-20 18:20:50 +00:00
24 lines
368 B
Rust
24 lines
368 B
Rust
|
use crate::cpu::CPU;
|
||
|
use crate::ppu::PPU;
|
||
|
use crate::bus::Bus;
|
||
|
|
||
|
pub struct Console {
|
||
|
cpu: CPU,
|
||
|
ppu: PPU,
|
||
|
bus: Bus,
|
||
|
}
|
||
|
|
||
|
impl Console {
|
||
|
pub fn new() -> Self {
|
||
|
Self {
|
||
|
cpu: CPU::new(),
|
||
|
ppu: PPU::new(),
|
||
|
bus: Bus::new(),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
pub fn cpu_run(&mut self) {
|
||
|
self.cpu.run(&mut self.bus);
|
||
|
}
|
||
|
}
|