v1.19.3: Last-minute video tweaks (fixed EGA graphics modes and eliminated unnecessary forced updates)

This commit is contained in:
Jeff Parsons 2015-09-02 08:45:41 -07:00
commit 62292571da
3 changed files with 32 additions and 37 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1176,16 +1176,16 @@ Card.CRTC = {
MAX_SCAN: {
INDX: 0x09,
SCAN_LINE: 0x1f,
VBLANK_START_BIT9: 0x20,
LINE_COMPARE_BIT9: 0x40,
CONVERT400: 0x80 // 200-to-400 scan-line conversion is in effect
VBLANK_START_BIT9: 0x20, // (VGA only)
LINE_COMPARE_BIT9: 0x40, // (VGA only)
CONVERT400: 0x80 // 200-to-400 scan-line conversion is in effect (VGA only)
},
CURSOR_START: {
INDX: 0x0A,
MASK: 0x1F,
BLINKON: 0x00, // (supposedly, 0x04 has the same effect as 0x00)
BLINKOFF: 0x20, // if blinking is disabled, the cursor is effectively hidden
BLINKFAST: 0x60 // default is 1/16 of the frame rate; this switches to 1/32 of the frame rate
BLINKON: 0x00, // (VGA only; supposedly, 0x04 has the same effect as 0x00)
BLINKOFF: 0x20, // if blinking is disabled, the cursor is effectively hidden (VGA only)
BLINKFAST: 0x60 // default is 1/16 of the frame rate; this switches to 1/32 of the frame rate (VGA only)
},
CURSOR_END: {
INDX: 0x0B,
@ -1208,8 +1208,8 @@ Card.CRTC = {
UNDERLINE: {
INDX: 0x14,
ROWSCAN: 0x1f,
COUNTBY4: 0x20,
DWORD: 0x40
COUNTBY4: 0x20, // (VGA only)
DWORD: 0x40 // (VGA only)
},
VBLANK_START: 0x15,
VBLANK_END: 0x16,
@ -4804,9 +4804,9 @@ Video.prototype.checkMode = function(fForce)
nMode = Video.MODE.VGA_320X400;
}
}
else if (nCRTCMaxScan & Card.CRTC.EGA.MAX_SCAN.CONVERT400) {
else if ((nCRTCMaxScan & Card.CRTC.EGA.MAX_SCAN.CONVERT400) || nCRTCVertTotal < 350) {
nMode = (fSEQDotClock? Video.MODE.EGA_320X200 : Video.MODE.EGA_640X200);
} else if (nCRTCVertTotal > 500) {
} else if (nCRTCVertTotal >= 480) {
nMode = (this.nMonitorType == ChipSet.MONITOR.MONO? Video.MODE.VGA_640X480_MONO : Video.MODE.VGA_640X480);
}
if (DEBUG && this.messageEnabled()) {
@ -4925,14 +4925,9 @@ Video.prototype.setMode = function(nMode, fForce)
return false;
}
}
this.setDimensions();
if (fForce !== false) {
this.updateScreen(true);
} else {
this.invalidateScreen(true);
}
this.updateScreen();
}
return true;
};