A dot is the shortest period over which the PPU can output one pixel: is it equivalent to 1 T-state on DMG or on CGB single-speed mode or 2 T-states on CGB double-speed mode. On each dot during mode 3, either the PPU outputs a pixel or the fetcher is stalling the FIFOs.
LY indicates the current horizontal line, which might be about to be drawn, being drawn, or just been drawn. LY can hold any value from 0 to 153, with values from 144 to 153 indicating the VBlank period.
The Game Boy constantly compares the value of the LYC and LY registers. When both values are identical, the “LYC=LY” flag in the STAT register is set, and (if enabled) a STAT interrupt is requested.
|LYC int select||Mode 2 int select||Mode 1 int select||Mode 0 int select||LYC == LY||PPU mode|
- LYC int select (Read/Write): If set, selects the
LYcondition for the STAT interrupt.
- Mode 2 int select (Read/Write): If set, selects the Mode 2 condition for the STAT interrupt.
- Mode 1 int select (Read/Write): If set, selects the Mode 1 condition for the STAT interrupt.
- Mode 0 int select (Read/Write): If set, selects the Mode 0 condition for the STAT interrupt.
- LYC == LY (Read-only): Set when LY contains the same value as LYC; it is constantly updated.
- PPU mode (Read-only): Indicates the PPU’s current status.
A hardware quirk in the monochrome Game Boy makes the LCD interrupt sometimes trigger when writing to STAT (including writing $00) during OAM scan, HBlank, VBlank, or LY=LYC. It behaves as if $FF were written for one cycle, and then the written value were written the next cycle. Because the GBC in DMG mode does not have this quirk, two games that depend on this quirk (Ocean’s Road Rash and Vic Tokai’s Xerd no Densetsu) will not run on a GBC.