Open joncampbell123 opened 9 years ago
White line does not appear unless machine=svga_s3.
Which means the blame lies with this code in src/hardware/vga_draw.cpp:
void VGA_Update_SplitLineCompare() { vga.draw.split_line = vga.config.line_compare+1; if (svgaCard==SVGA_S3Trio) { if (vga.config.line_compare==0) vga.draw.split_line=0; if (vga.s3.reg_42 & 0x20) { // interlaced mode vga.draw.split_line *= 2; } } vga.draw.split_line -= vga.draw.vblank_skip; }
I wonder if the guy who added that code simply wanted to double the line count for interlaced. We could fix this bug and possibly emulate the S3 interlaced line count correctly if we replaced it with:
if (svgaCard==SVGA_S3Trio) { if (vga.s3.reg_42 & 0x20) { vga.draw.split_line--; vga.draw.split_line *= 2; vga.draw.split_line++; } }
The question then comes down to: Do S3 chipsets emulate line compare such that line_compare == 0 means the first scanline is repeated? Or do S3 chipsets special-case against that, and do not repeat the first scanline?
During the silent copperbars part an extra white line is visible at the top of the screen that doesn't happen on real hardware.