Migrate to egui (#3)

This commit is contained in:
2024-01-15 02:30:59 +00:00
committed by GitHub
parent 98c2c90c08
commit e05def8877
21 changed files with 887 additions and 1110 deletions
+6 -4
View File
@@ -1,12 +1,9 @@
use crate::cpu::CPU;
use crate::cpu::bus::Bus;
use crate::rom::ROM;
use crate::rom::lo_rom::LoROM;
pub struct Emulator {
pub cpu: CPU,
pub bus: Bus,
pub rom: Box<dyn ROM>,
}
impl Emulator {
@@ -14,7 +11,6 @@ impl Emulator {
Self {
cpu: CPU::new(),
bus: Bus::new(),
rom: Box::new(LoROM::new()),
}
}
@@ -41,4 +37,10 @@ impl Emulator {
pub fn reset(&mut self) {
self.cpu.reset_vector(&mut self.bus);
}
}
impl Default for Emulator {
fn default() -> Self {
Self::new()
}
}