remove stupid commented out code

This commit is contained in:
Alex Janka 2023-02-06 12:19:15 +11:00
parent 56e2735e58
commit edfda4fd84
4 changed files with 0 additions and 22 deletions

View file

@ -258,8 +258,6 @@ fn main() {
*v = args.verbose; *v = args.verbose;
} }
// let buffer: Vec<u32> = ;
let mut window = Window::new( let mut window = Window::new(
"Gameboy", "Gameboy",
WIDTH * FACTOR, WIDTH * FACTOR,

View file

@ -236,8 +236,6 @@ impl CPU {
TiledataArea::D8000, TiledataArea::D8000,
byte_to_palette(self.memory.get(0xFF47)), byte_to_palette(self.memory.get(0xFF47)),
); );
// self.memory
// .set(0xFF0F, clear_bit(self.memory.get(0xFF0F), 0));
} }
fn set_lcd_status(&mut self) { fn set_lcd_status(&mut self) {
@ -255,7 +253,6 @@ impl CPU {
); );
self.memory.set(0xFF41, stat); self.memory.set(0xFF41, stat);
self.memory.set(0xFF44, self.gpu.scanline); self.memory.set(0xFF44, self.gpu.scanline);
// println!("set scanline to {}", self.memory.get(0xFF44));
} }
fn render_scanline(&mut self, scanline: u8, lcdc: &LCDC) { fn render_scanline(&mut self, scanline: u8, lcdc: &LCDC) {

View file

@ -24,7 +24,6 @@ impl CPU {
let msb = get_bit(msbs, 7 - px_x); let msb = get_bit(msbs, 7 - px_x);
let colour = bits_to_mapped_colour(lsb, msb, palette); 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)] = self.gpu.sprite_buffer[real_px_x + (real_px_y * TILE_WINDOW_EDGE_LENGTH)] =
colour.to_rgb(); colour.to_rgb();
} }

View file

@ -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!( verbose_println!(
"exec {:#4X} from pc: {:#X}", "exec {:#4X} from pc: {:#X}",
opcode, opcode,
@ -72,16 +66,6 @@ impl CPU {
let secs = (cycles * 4) as f64 / CLOCK_SPEED; let secs = (cycles * 4) as f64 / CLOCK_SPEED;
self.advance_gpu_clock(cycles); 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( self.memory.set(
0xFF04, 0xFF04,
self.memory self.memory