Skip to content

Commit be79227

Browse files
committed
Rework of the scan-doubling, pixel-doubling, and aspect ratio calculation logic
TODO details
1 parent 59729fa commit be79227

File tree

4 files changed

+305
-257
lines changed

4 files changed

+305
-257
lines changed

include/vga.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,6 @@ void VGA_LogInitialization(const char *adapter_name,
881881
const size_t num_modes);
882882

883883
void VGA_SetVgaDoubleScanHandling(const VgaDoubleScanHandling vga_double_scane_handling);
884-
bool VGA_IsDoubleScanningVgaModes();
885884

886885
extern VGA_Type vga;
887886

src/hardware/vga.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -306,20 +306,6 @@ double VGA_GetPreferredRate()
306306
return vga.draw.dos_refresh_hz;
307307
}
308308

309-
// Are we using a VGA card and asked to emulate double-scanning? (This is a
310-
// helper function to avoid repeating this logic in the VGA drawing and CRTC
311-
// areas).
312-
bool VGA_IsDoubleScanningVgaModes()
313-
{
314-
return IS_VGA_ARCH &&
315-
vga.draw.vga_double_scan_handling == VgaDoubleScanHandling::DoubleScan &&
316-
(vga.mode == M_EGA || vga.mode == M_VGA);
317-
318-
// TODO: Non-composite CGA modes should be included here too, as VGA
319-
// cards also line-doubled those modes, however more work is needed to
320-
// correctly draw double-scanned CGA lines.
321-
}
322-
323309
void VGA_SetClock(const Bitu which, const uint32_t desired_clock)
324310
{
325311
if (svga.set_clock) {
@@ -522,3 +508,4 @@ void SVGA_Setup_Driver(void) {
522508
break;
523509
}
524510
}
511+

src/hardware/vga_crtc.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,6 @@ void vga_write_p3d5(io_port_t, io_val_t value, io_width_t)
146146
vga.config.line_compare = (vga.config.line_compare & 0x5ff) |
147147
(val & 0x40) << 3;
148148
}
149-
if (VGA_IsDoubleScanningVgaModes()) {
150-
vga.draw.address_line_total = (val & 0x1F) + 1;
151-
if (val & 0x80) {
152-
vga.draw.address_line_total *= 2;
153-
}
154-
}
155149
vga.crtc.maximum_scan_line.data = val;
156150
VGA_StartResize();
157151
break;

0 commit comments

Comments
 (0)