Merge pull request #4326 from 86Box/tc1995
Tseng Labs fixes and bug-compatible fixes too.
This commit is contained in:
@@ -129,6 +129,7 @@ typedef struct svga_t {
|
|||||||
int hblank_end_mask;
|
int hblank_end_mask;
|
||||||
int hblank_sub;
|
int hblank_sub;
|
||||||
int packed_4bpp;
|
int packed_4bpp;
|
||||||
|
int ps_bit_bug;
|
||||||
int ati_4color;
|
int ati_4color;
|
||||||
|
|
||||||
/*The three variables below allow us to implement memory maps like that seen on a 1MB Trio64 :
|
/*The three variables below allow us to implement memory maps like that seen on a 1MB Trio64 :
|
||||||
|
@@ -557,8 +557,6 @@ static const device_config_t et3000_config[] = {
|
|||||||
.value = 256 },
|
.value = 256 },
|
||||||
{ .description = "512 KB",
|
{ .description = "512 KB",
|
||||||
.value = 512 },
|
.value = 512 },
|
||||||
{ .description = "1 MB",
|
|
||||||
.value = 1024 },
|
|
||||||
{ .description = "" } } },
|
{ .description = "" } } },
|
||||||
{ .type = CONFIG_END }
|
{ .type = CONFIG_END }
|
||||||
};
|
};
|
||||||
|
@@ -652,7 +652,9 @@ et4000_recalctimings(svga_t *svga)
|
|||||||
|
|
||||||
svga->ma_latch |= (svga->crtc[0x33] & 3) << 16;
|
svga->ma_latch |= (svga->crtc[0x33] & 3) << 16;
|
||||||
|
|
||||||
svga->hblankstart = (((svga->crtc[0x3f] & 0x4) >> 2) << 8) + svga->crtc[2];
|
svga->hblankstart = (((svga->crtc[0x3f] & 0x4) >> 2) << 8) + svga->crtc[2];
|
||||||
|
|
||||||
|
svga->ps_bit_bug = (dev->type == ET4000_TYPE_TC6058AF) && svga->lowres && ((svga->gdcreg[5] & 0x60) >= 0x40);
|
||||||
|
|
||||||
if (svga->crtc[0x35] & 1)
|
if (svga->crtc[0x35] & 1)
|
||||||
svga->vblankstart |= 0x400;
|
svga->vblankstart |= 0x400;
|
||||||
@@ -664,6 +666,8 @@ et4000_recalctimings(svga_t *svga)
|
|||||||
svga->vsyncstart |= 0x400;
|
svga->vsyncstart |= 0x400;
|
||||||
if (svga->crtc[0x35] & 0x10)
|
if (svga->crtc[0x35] & 0x10)
|
||||||
svga->split |= 0x400;
|
svga->split |= 0x400;
|
||||||
|
if (!svga->rowoffset && !svga->ps_bit_bug)
|
||||||
|
svga->rowoffset = 0x100;
|
||||||
if (svga->crtc[0x3f] & 1)
|
if (svga->crtc[0x3f] & 1)
|
||||||
svga->htotal |= 0x100;
|
svga->htotal |= 0x100;
|
||||||
if (svga->attrregs[0x16] & 0x20) {
|
if (svga->attrregs[0x16] & 0x20) {
|
||||||
@@ -727,13 +731,6 @@ et4000_recalctimings(svga_t *svga)
|
|||||||
svga->rowoffset <<= 1;
|
svga->rowoffset <<= 1;
|
||||||
svga->render = svga_render_8bpp_highres;
|
svga->render = svga_render_8bpp_highres;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dev->type == ET4000_TYPE_TC6058AF) {
|
|
||||||
if (svga->render == svga_render_8bpp_lowres)
|
|
||||||
svga->render = svga_render_8bpp_tseng_lowres;
|
|
||||||
else if (svga->render == svga_render_8bpp_highres)
|
|
||||||
svga->render = svga_render_8bpp_tseng_highres;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -960,6 +957,10 @@ static const device_config_t et4000_tc6058af_config[] = {
|
|||||||
.description = "512 KB",
|
.description = "512 KB",
|
||||||
.value = 512
|
.value = 512
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.description = "1 MB",
|
||||||
|
.value = 1024
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.description = ""
|
.description = ""
|
||||||
}
|
}
|
||||||
@@ -1069,7 +1070,7 @@ const device_t et4000_tc6058af_isa_device = {
|
|||||||
.name = "Tseng Labs ET4000AX (TC6058AF) (ISA)",
|
.name = "Tseng Labs ET4000AX (TC6058AF) (ISA)",
|
||||||
.internal_name = "et4000ax_tc6058af",
|
.internal_name = "et4000ax_tc6058af",
|
||||||
.flags = DEVICE_ISA,
|
.flags = DEVICE_ISA,
|
||||||
.local = 0,
|
.local = ET4000_TYPE_TC6058AF,
|
||||||
.init = et4000_init,
|
.init = et4000_init,
|
||||||
.close = et4000_close,
|
.close = et4000_close,
|
||||||
.reset = NULL,
|
.reset = NULL,
|
||||||
|
Reference in New Issue
Block a user