+ bool inActiveDisplayArea = true;
+
+//Interlacing is still not handled correctly here... !!! FIX !!!
+ if (scanline & 0x01) // Execute OP only on even lines (non-interlaced only!)
+ return;
+
+ if (scanline >= (uint16)GET16(tom_ram_8, VDB) && scanline < (uint16)GET16(tom_ram_8, VDE))
+ {
+ if (render)
+ {
+ uint8 * current_line_buffer = (uint8 *)&tom_ram_8[0x1800];
+ uint8 bgHI = tom_ram_8[BG], bgLO = tom_ram_8[BG + 1];
+
+ // Clear line buffer with BG
+ if (GET16(tom_ram_8, VMODE) & BGEN) // && (CRY or RGB16)...
+ for(uint32 i=0; i<720; i++)
+ *current_line_buffer++ = bgHI, *current_line_buffer++ = bgLO;
+
+ OPProcessList(scanline, render);
+ }
+ }
+ else
+ inActiveDisplayArea = false;
+
+ // Here's our virtualized scanline code...
+ if (scanline >= TOP_VISIBLE_VC && scanline < BOTTOM_VISIBLE_VC)