upgrade eframe and wgpu

This commit is contained in:
2024-11-06 21:54:40 -05:00
parent 442cf5748b
commit cee99d12f4
5 changed files with 11 additions and 5 deletions
+6
View File
@@ -35,6 +35,12 @@ impl Bus {
}
}
pub fn hard_reset(&mut self) {
self.wram = [0; 0x10000];
self.internal_registers = InternalRegisters::new();
self.dma = DMA::new();
}
fn read_wram(&self, address: u32) -> u8 {
self.wram[(address & 0xFFFF) as usize]
}
+2 -1
View File
@@ -40,7 +40,8 @@ impl Emulator {
pub fn hard_reset(&mut self) {
self.cpu = CPU::new();
self.bus = Bus::new();
self.bus.hard_reset();
self.reset_vector();
}
}
+2 -2
View File
@@ -9,11 +9,11 @@ edition = "2021"
snes-core = { path = "../snes-core" }
# Frontend stuff
eframe = "0.26.0"
eframe = "0.29.1"
env_logger = "0.10.1"
rfd = "0.12.1"
regex = "1.10.2"
wgpu = "0.19.0"
wgpu = "23.0.0"
[features]
wgpu = ["eframe/wgpu"]
-1
View File
@@ -15,7 +15,6 @@ pub fn build_menu_bar(emulator: &mut Emulator, ui: &mut egui::Ui, state: &mut Ap
emulator.hard_reset();
state.emulation_state.is_paused = false;
state.emulation_state.one_tick_per_frame = false;
emulator.reset_vector();
println!("Loaded ROM");
},
Err(err) => println!("Error loading the ROM: {}", err),
+1 -1
View File
@@ -53,6 +53,6 @@ fn main() -> eframe::Result<()> {
eframe::run_native(
"SNES Emulator",
native_options,
Box::new(|cc| Box::new(SnesEmulatorApp::new(cc))),
Box::new(|cc| Ok(Box::new(SnesEmulatorApp::new(cc)))),
)
}