mirror of
https://github.com/FranLMSP/snes.git
synced 2026-08-03 08:30:01 -04:00
upgrade eframe and wgpu
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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)))),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user