X16Community / x16-docs

Commander X16 Documentation (CC BY-SA)
88 stars 35 forks source link

Explain line IRQ differences between VGA and composite/RGB #201

Open mooinglemur opened 3 months ago

mooinglemur commented 3 months ago

In interlaced modes, the least significant bit of IRQLINE_L is ignored, so that raster interrupts end up happening on both fields.

On the VERA, the raster interrupt is delivered at the very end of the line that you call for, so your code will get control as the next line is scanning out. If you were to change the scroll of a layer, it would take effect on the next line.

Output type IRQLINE set to IRQ delivered Control gained on line Scroll offset changed on line
VGA 14 end of 13 14 15
VGA 15 end of 14 15 16
RGB/NTSC even field 12 or 13 end of 12 14 16
RGB/NTSC odd field 12 or 13 end of 13 15 17
RGB/NTSC even field 14 or 15 end of 14 16 18
RGB/NTSC odd field 14 or 15 end of 15 17 19

This means that for split-screen parallax, NTSC and RGB outputs need their raster interrupts set one line earlier than for VGA. For instance, 14 on VGA requires 12 (or 13) on NTSC.