fix stupid comments
This commit is contained in:
parent
4f52cda6c6
commit
3af4772363
|
@ -34,7 +34,7 @@ macro_rules! verbose_print {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Simple program to greet a person
|
/// Gameboy (DMG-A/B/C) emulator
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
#[command(author, version, about, long_about = None)]
|
#[command(author, version, about, long_about = None)]
|
||||||
#[command(group(ArgGroup::new("prints").args(["verbose","cycle_count"])))]
|
#[command(group(ArgGroup::new("prints").args(["verbose","cycle_count"])))]
|
||||||
|
@ -70,7 +70,7 @@ struct Args {
|
||||||
|
|
||||||
static mut PAUSE_ENABLED: bool = false;
|
static mut PAUSE_ENABLED: bool = false;
|
||||||
static mut PAUSE_QUEUED: bool = false;
|
static mut PAUSE_QUEUED: bool = false;
|
||||||
// static mut VERBOSE: bool = false;
|
|
||||||
static VERBOSE: RwLock<bool> = RwLock::new(false);
|
static VERBOSE: RwLock<bool> = RwLock::new(false);
|
||||||
|
|
||||||
const WIDTH: usize = 160;
|
const WIDTH: usize = 160;
|
||||||
|
|
|
@ -151,7 +151,6 @@ impl Cpu {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn enter_vblank(&mut self) {
|
fn enter_vblank(&mut self) {
|
||||||
// let gamepad = self.gamepad_handler.gamepads().last();
|
|
||||||
while self.gamepad_handler.next_event().is_some() {}
|
while self.gamepad_handler.next_event().is_some() {}
|
||||||
if self
|
if self
|
||||||
.memory
|
.memory
|
||||||
|
|
|
@ -144,10 +144,7 @@ impl Memory {
|
||||||
0xFE00..0xFEA0 => self.oam[(address - 0xFE00) as usize],
|
0xFE00..0xFEA0 => self.oam[(address - 0xFE00) as usize],
|
||||||
0xFEA0..0xFF00 => 0xFF,
|
0xFEA0..0xFF00 => 0xFF,
|
||||||
0xFF00..0xFF4C => self.get_io(address),
|
0xFF00..0xFF4C => self.get_io(address),
|
||||||
0xFF4C..0xFF80 => {
|
0xFF4C..0xFF80 => 0xFF,
|
||||||
// println!("empty space 2 read");
|
|
||||||
0xFF
|
|
||||||
}
|
|
||||||
0xFF80..0xFFFF => self.cpu_ram[(address - 0xFF80) as usize],
|
0xFF80..0xFFFF => self.cpu_ram[(address - 0xFF80) as usize],
|
||||||
0xFFFF => self.interrupts,
|
0xFFFF => self.interrupts,
|
||||||
}
|
}
|
||||||
|
@ -174,9 +171,7 @@ impl Memory {
|
||||||
0xFE00..0xFEA0 => {
|
0xFE00..0xFEA0 => {
|
||||||
self.oam[(address - 0xFE00) as usize] = data;
|
self.oam[(address - 0xFE00) as usize] = data;
|
||||||
}
|
}
|
||||||
0xFEA0..0xFF00 => {
|
0xFEA0..0xFF00 => {}
|
||||||
// println!("empty space write: {:#X} to addr {:#X}", data, address);
|
|
||||||
}
|
|
||||||
0xFF00..0xFF4C => {
|
0xFF00..0xFF4C => {
|
||||||
self.set_io(address, data);
|
self.set_io(address, data);
|
||||||
stdout().flush().unwrap();
|
stdout().flush().unwrap();
|
||||||
|
|
|
@ -40,7 +40,6 @@ pub struct Cpu {
|
||||||
// Hz
|
// Hz
|
||||||
const CLOCK_SPEED: usize = 4194304;
|
const CLOCK_SPEED: usize = 4194304;
|
||||||
const SPEEDUP: f64 = 1.;
|
const SPEEDUP: f64 = 1.;
|
||||||
// const FF04_SPEED: f64 = 16384.;
|
|
||||||
|
|
||||||
impl Cpu {
|
impl Cpu {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
|
|
Loading…
Reference in a new issue