From edfda4fd848bf5e2dcde3c98044ed001be721fec Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Mon, 6 Feb 2023 12:19:15 +1100 Subject: [PATCH] remove stupid commented out code --- src/main.rs | 2 -- src/processor/gpu.rs | 3 --- src/processor/gpu/tile_window.rs | 1 - src/processor/mod.rs | 16 ---------------- 4 files changed, 22 deletions(-) diff --git a/src/main.rs b/src/main.rs index 134828a..31955ce 100644 --- a/src/main.rs +++ b/src/main.rs @@ -258,8 +258,6 @@ fn main() { *v = args.verbose; } - // let buffer: Vec = ; - let mut window = Window::new( "Gameboy", WIDTH * FACTOR, diff --git a/src/processor/gpu.rs b/src/processor/gpu.rs index 649f5c0..cd68fea 100644 --- a/src/processor/gpu.rs +++ b/src/processor/gpu.rs @@ -236,8 +236,6 @@ impl CPU { TiledataArea::D8000, byte_to_palette(self.memory.get(0xFF47)), ); - // self.memory - // .set(0xFF0F, clear_bit(self.memory.get(0xFF0F), 0)); } fn set_lcd_status(&mut self) { @@ -255,7 +253,6 @@ impl CPU { ); self.memory.set(0xFF41, stat); self.memory.set(0xFF44, self.gpu.scanline); - // println!("set scanline to {}", self.memory.get(0xFF44)); } fn render_scanline(&mut self, scanline: u8, lcdc: &LCDC) { diff --git a/src/processor/gpu/tile_window.rs b/src/processor/gpu/tile_window.rs index deb6f9f..23037dd 100644 --- a/src/processor/gpu/tile_window.rs +++ b/src/processor/gpu/tile_window.rs @@ -24,7 +24,6 @@ impl CPU { let msb = get_bit(msbs, 7 - px_x); let colour = bits_to_mapped_colour(lsb, msb, palette); - // if buself.gpu.b self.gpu.sprite_buffer[real_px_x + (real_px_y * TILE_WINDOW_EDGE_LENGTH)] = colour.to_rgb(); } diff --git a/src/processor/mod.rs b/src/processor/mod.rs index cddc1c6..2e14452 100644 --- a/src/processor/mod.rs +++ b/src/processor/mod.rs @@ -50,12 +50,6 @@ impl CPU { } } - // if self.vblank_timer >= (1. / 59.7) { - // self.vblank_timer = 0.; - // self.vblank_remaining = 20; - // self.memory.set(0xFF0F, set_bit(self.memory.get(0xFF0F), 0)); - // } - verbose_println!( "exec {:#4X} from pc: {:#X}", opcode, @@ -72,16 +66,6 @@ impl CPU { let secs = (cycles * 4) as f64 / CLOCK_SPEED; self.advance_gpu_clock(cycles); - // self.vblank_timer += secs; - // if self.vblank_remaining > 0 { - // self.vblank_remaining = self.vblank_remaining.saturating_sub(cycles); - // if self.vblank_remaining == 0 { - // self.memory - // .set(0xFF0F, clear_bit(self.memory.get(0xFF0F), 0)); - // self.draw(); - // } - // } - self.memory.set( 0xFF04, self.memory