GameBoy Video-Interupts v0.01 201299/GPZ-HIT ------------------------------------------------------------------------------- Type priority jumps to V-Blank highest $0040 LCDC . $0048 Timer . $0050 serial . $0058 pad lowest $0060 general IRQ registers: ---------------------- $ffff (rIE) IRQ Enable (read/write) bit: 7-5 ? 4 Transition High=>Low Pin P10-P13 0:disabled 1:enabled 3 serial i/o transfer complete 0:disabled 1:enabled 2 Timer overflow 0:disabled 1:enabled 1 LCDC 0:disabled 1:enabled 0 V-Blank 0:disabled 1:enabled $ff0f (rIF) IRQ Flag (read) - if an interupt has occured, this register tells what kind of interupt it was. bit: 7-5 ? 4 Transition High=>Low Pin P10-P13 3 serial i/o transfer complete 2 Timer overflow 1 LCDC 0 V-Blank LCDC IRQ-Registers: ------------------- $ff44 (rLY) LCDC Y-Coordinate read: current Rasterline write: reset lcd-y counter $ff45 (rLYC) LY-Compare (read/write) - if rLYC = rLY then bit 2 of rSTAT is set $ff41 (rSTAT) LCDC Status bit: 7 ? IRQ source selection: 6 rLYC=rLY < 5 mode %10 (searching OAM) | write 4 mode %01 (V-Blank) | 3 mode %00 (H-Blank) < 2 rLYC=rLY Flag < | 1-0 current mode: | | %00 H-Blank | read %01 V-Blank | %10 searching OAM | %11 transfering data to LCD <