Merge pull request #1661 from 86Box/tc1995
Fix the dword mode fix in the S3 code.
This commit is contained in:
@@ -2711,10 +2711,12 @@ static void s3_recalctimings(svga_t *svga)
|
|||||||
svga->lowres = !((svga->gdcreg[5] & 0x40) && (svga->crtc[0x3a] & 0x10));
|
svga->lowres = !((svga->gdcreg[5] & 0x40) && (svga->crtc[0x3a] & 0x10));
|
||||||
|
|
||||||
if (((svga->gdcreg[5] & 0x40) && (svga->crtc[0x3a] & 0x10)) || (svga->crtc[0x3a] & 0x10)) {
|
if (((svga->gdcreg[5] & 0x40) && (svga->crtc[0x3a] & 0x10)) || (svga->crtc[0x3a] & 0x10)) {
|
||||||
if (svga->crtc[0x31] & 0x08) { /*If the dword mode bit is not enabled when the S3 dword mode is enabled, enable it*/
|
if (svga->crtc[0x31] & 0x08) {
|
||||||
if (!(svga->crtc[0x14] & 0x40))
|
if (!(svga->crtc[0x17] & 0x40) && (svga->crtc[0x14] & 0x40)) /*Disable dword mode addressing when CRTC14 bit 6 is not enabled, regardless of the S3 dword mode bit.*/
|
||||||
svga->crtc[0x14] |= 0x40;
|
svga->force_dword_mode = 1;
|
||||||
}
|
} else
|
||||||
|
svga->force_dword_mode = 0;
|
||||||
|
|
||||||
switch (svga->bpp) {
|
switch (svga->bpp) {
|
||||||
case 8:
|
case 8:
|
||||||
svga->render = svga_render_8bpp_highres;
|
svga->render = svga_render_8bpp_highres;
|
||||||
@@ -2852,9 +2854,11 @@ static void s3_trio64v_recalctimings(svga_t *svga)
|
|||||||
svga->lowres = !((svga->gdcreg[5] & 0x40) && (svga->crtc[0x3a] & 0x10));
|
svga->lowres = !((svga->gdcreg[5] & 0x40) && (svga->crtc[0x3a] & 0x10));
|
||||||
if ((svga->gdcreg[5] & 0x40) && (svga->crtc[0x3a] & 0x10)) {
|
if ((svga->gdcreg[5] & 0x40) && (svga->crtc[0x3a] & 0x10)) {
|
||||||
if (svga->crtc[0x31] & 0x08) {
|
if (svga->crtc[0x31] & 0x08) {
|
||||||
if (!(svga->crtc[0x14] & 0x40))
|
if (!(svga->crtc[0x17] & 0x40) && (svga->crtc[0x14] & 0x40)) /*Disable dword mode addressing when CRTC14 bit 6 is not enabled, regardless of the S3 dword mode bit.*/
|
||||||
svga->crtc[0x14] |= 0x40;
|
svga->force_dword_mode = 1;
|
||||||
}
|
} else
|
||||||
|
svga->force_dword_mode = 0;
|
||||||
|
|
||||||
switch (svga->bpp) {
|
switch (svga->bpp) {
|
||||||
case 8:
|
case 8:
|
||||||
svga->render = svga_render_8bpp_highres;
|
svga->render = svga_render_8bpp_highres;
|
||||||
|
Reference in New Issue
Block a user