mirror of
https://github.com/FranLMSP/rmg-001.git
synced 2024-11-10 12:11:32 +00:00
Compare commits
No commits in common. "0957a79f15e970188a5ebddd77aca3e703d8d5c0" and "d90a25e6f671e4eaab3832eb843dc95545378725" have entirely different histories.
0957a79f15
...
d90a25e6f6
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1171,6 +1171,7 @@ dependencies = [
|
||||
"log",
|
||||
"pixels",
|
||||
"rand",
|
||||
"wgpu",
|
||||
"winit",
|
||||
"winit_input_helper",
|
||||
]
|
||||
|
@ -14,5 +14,6 @@ rand = "0.8"
|
||||
env_logger = "0.9"
|
||||
log = "0.4"
|
||||
pixels = "0.7"
|
||||
wgpu = "0.11"
|
||||
winit = "0.25"
|
||||
winit_input_helper = "0.10"
|
||||
|
@ -6,7 +6,7 @@ use crate::ppu::{WIDTH, HEIGHT};
|
||||
use std::{thread, time};
|
||||
|
||||
use log::error;
|
||||
use pixels::{wgpu, Pixels, PixelsBuilder, SurfaceTexture};
|
||||
use pixels::{Pixels, PixelsBuilder, SurfaceTexture};
|
||||
use winit::dpi::LogicalSize;
|
||||
use winit::event::{Event, VirtualKeyCode, WindowEvent};
|
||||
use winit::event_loop::{ControlFlow, EventLoop};
|
||||
|
@ -194,7 +194,9 @@ impl ROM {
|
||||
return self.data[address as usize];
|
||||
} else if BANK_SWITCHABLE.in_range(address) {
|
||||
return self.data[((self.rom_bank as usize * 0x4000) + (address as usize & 0x3FFF)) as usize];
|
||||
// return self.data[(address + (BANK_SWITCHABLE.begin() * (self.rom_bank - 1))) as usize];
|
||||
} else if EXTERNAL_RAM.in_range(address) {
|
||||
println!("RAM read");
|
||||
if !self.info.has_ram {
|
||||
return 0xFF;
|
||||
}
|
||||
@ -230,11 +232,7 @@ impl ROM {
|
||||
// println!("RAM bank {:02X}", data);
|
||||
self.ram_bank = data & 0b11;
|
||||
} else if address >= 0x6000 && address <= 0x7FFF { // Banking mode select
|
||||
self.banking_mode = match data & 1 {
|
||||
0 => BankingMode::Simple,
|
||||
1 => BankingMode::Advanced,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
// println!("Change banking mode");
|
||||
} else if EXTERNAL_RAM.in_range(address) {
|
||||
if !self.ram_enable || !self.info.has_ram {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user