   // Video RAM: $8000 – $9FFF
   if (address & 0xF000) <= 0x9000 {
     // VRAM cannot be accessed in mode 3
-    let mode = mmu_read8(0xFF41) & 3;
-    if mode == 3 { return 0xFF; }
+    // let mode = mmu_read8(0xFF41) & 3;
+    // if mode == 3 { return 0xFF; }
 
     return *(vram + (address & 0x1FFF));
   }


def gpu_step(cycles: uint8): bool {
  gpu_mode_clock += uint16(cycles);
  let vblank_begin = false;

  if gpu_mode == 2 {
    // Scanline: OAM read mode
    if gpu_mode_clock >= 80 {
      gpu_mode = 3;
      gpu_mode_clock -= 80;
    }
  } else if gpu_mode == 3 {
    // Scanline: VRAM read mode
    if gpu_mode_clock >= 172 {
      gpu_mode = 0;
      gpu_mode_clock -= 172;

      // Render Scanline
      gpu_render_scanline();
    }
  } else if gpu_mode == 0 {
    // HBLANK
    if gpu_mode_clock >= 204 {
      gpu_mode_clock -= 204;

      if gpu_line == 143 {
        gpu_mode = 1;
        vblank_begin = true;

        // VBLANK Interrupt
        IF |= 0x01;
      } else {
        gpu_mode = 2;
      }

      gpu_line += 1;
    }
  } else if gpu_mode == 1 {
    // VBLANK
    if gpu_mode_clock >= 456 {
      gpu_mode_clock -= 456;

      if gpu_line == 0 {
        gpu_line = 0;
        gpu_mode = 2;
      } else {
        gpu_line += 1;
      }
    } else if gpu_line == 153 and gpu_mode_clock >= 4 {
      gpu_line = 0;
    }
  }

  return vblank_begin;
}

def gpu_read(address: uint16): uint8 {

  // Sprite Attribute Table (OAM): $FE00 – $FE9F
  if (address >= 0xFE00) and (address <= 0xFE9F) {
    // FIXME: OAM cannot be accessed in modes 2 or 3
    // let mode = mmu_read8(0xFF41) & 3;
    // if gpu_lcd_enable and (mode == 3 or mode == 2) { return; }

    *(oam + (address & 0xFF)) = value;
    return;
