diff --git a/devices/video/control.cpp b/devices/video/control.cpp index 1e58e49..e9e963a 100644 --- a/devices/video/control.cpp +++ b/devices/video/control.cpp @@ -388,7 +388,9 @@ void ControlVideo::enable_display() new_height = swatch_params[ControlRegs::VFP-1] - swatch_params[ControlRegs::VAL-1]; new_width *= clk_divisor; - new_height >>= 1; // FIXME: assume non-interlaced mode for now + if (this->enables & SCAN_CONTROL) { + new_height >>= 1; + } this->active_width = new_width; this->active_height = new_height; @@ -431,7 +433,9 @@ void ControlVideo::enable_display() this->vert_blank = swatch_params[ControlRegs::VAL-1] + (swatch_params[ControlRegs::VSYNC-1] - swatch_params[ControlRegs::VFP-1]); - this->vert_blank >>= 1; + if (this->enables & SCAN_CONTROL) { + this->vert_blank >>= 1; + } this->hori_total = this->hori_blank + new_width; this->vert_total = this->vert_blank + new_height; diff --git a/devices/video/control.h b/devices/video/control.h index c284c44..4254cc0 100644 --- a/devices/video/control.h +++ b/devices/video/control.h @@ -78,6 +78,7 @@ enum { // Bit definitions for MISC_ENABLES register. enum { + SCAN_CONTROL = 1 << 0, // 0 - interlaced, 1 - progressive FB_ENDIAN_LITTLE = 1 << 1, // framebuffer endianness: 0 - big, 1 - little VRAM_WIDE_MODE = 1 << 6, // VRAM bus width: 1 - 128bit, 0 - 64bit BLANK_DISABLE = 1 << 11, // 0 - enable blanking, 1 - disable it