     );
   } else if address == 0xFF41 {
     // STAT – LCDC Status (R/W)
-    // TODO: Status interrupt enable/disable
-    // TODO: Coincidence Interrupt (LYC / LY)
-    return uint8(gpu_mode);
+    return (
+      bit(true, 7) |
+      bit(gpu_stat_lyc_compare_enable, 6) |
+      bit(gpu_stat_oam_enable, 5) |
+      bit(gpu_stat_vblank_enable, 4) |
+      bit(gpu_stat_hblank_enable, 3) |
+      bit(gpu_line == gpu_line_compare, 2) |
+      uint8(gpu_mode)
+    );
   } else if address == 0xFF44 {
     // LY – LCDC Y-Coordinate (R)
     return gpu_line;


  // High RAM (HRAM): $FF80 – $FFFE
  if (address >= 0xFF80 and address <= 0xFFFE) {
    *(hram + ((address & 0xFF) - 0x80)) = value;
    return;
  }

  // GPU Register
  if (address & 0xF0) >= 0x40 and (address & 0xF0) <= 0x70 {

let gpu_sprite_enable: bool;
let gpu_bg_enable: bool;

let gpu_stat_lyc_compare_enable: bool = false;
let gpu_stat_oam_enable: bool = false;
let gpu_stat_vblank_enable: bool = false;
let gpu_stat_hblank_enable: bool = false;

// 0=9800-9BFF, 1=9C00-9FFF
let gpu_window_tm_select: bool;
let gpu_bg_tm_select: bool;
