Cleaned up the ET4000/W32, fixed the ICS 53xx/GENDAC/SDAC RAMDAC's, and readded the Cardex ET4000/W32p Rev. C with ICS 5341 RAMDAC.

This commit is contained in:
OBattler
2021-03-25 06:32:10 +01:00
parent 22bf154153
commit 7b22fa60d1
4 changed files with 1560 additions and 1502 deletions

View File

@@ -261,6 +261,8 @@ extern const device_t et4000_mca_device;
extern const device_t et4000w32_device;
extern const device_t et4000w32i_isa_device;
extern const device_t et4000w32i_vlb_device;
extern const device_t et4000w32p_revc_vlb_device;
extern const device_t et4000w32p_revc_pci_device;
extern const device_t et4000w32p_vlb_device;
extern const device_t et4000w32p_pci_device;
extern const device_t et4000w32p_noncardex_vlb_device;

File diff suppressed because it is too large Load Diff

View File

@@ -39,6 +39,13 @@ enum
};
#define ICS_S3_MASK 7
#define ICS_S3 8
#define S3_86C708 (ICS_5300 | ICS_S3)
#define S3_86C716 (ICS_5342 | ICS_S3)
typedef struct sdac_ramdac_t
{
uint16_t regs[256];
@@ -54,7 +61,7 @@ sdac_control_write(sdac_ramdac_t *ramdac, svga_t *svga, uint8_t val)
{
ramdac->command = val;
switch (ramdac->type) {
switch (ramdac->type & ICS_S3_MASK) {
case ICS_5300:
case ICS_5301:
switch (val >> 5) {
@@ -150,17 +157,31 @@ sdac_ramdac_out(uint16_t addr, int rs2, uint8_t val, void *p, svga_t *svga)
{
sdac_ramdac_t *ramdac = (sdac_ramdac_t *) p;
uint8_t rs = (addr & 0x03);
rs |= (!!rs2 << 8);
rs |= ((!!rs2) << 2);
if (rs != 0x02)
ramdac->magic_count = 0;
switch (rs) {
case 0x02:
if (ramdac->magic_count == 4)
sdac_control_write(ramdac, svga, val);
/* Fall through. */
switch (ramdac->magic_count) {
case 4:
sdac_control_write(ramdac, svga, val);
if (!(ramdac->type & ICS_S3))
ramdac->magic_count = 0;
break;
case 5:
ramdac->magic_count = 0;
break;
default:
svga_out(addr, val, svga);
break;
}
break;
case 0x00:
case 0x01:
case 0x03:
ramdac->magic_count = 0;
svga_out(addr, val, svga);
break;
case 0x04:
ramdac->windex = val;
@@ -177,8 +198,6 @@ sdac_ramdac_out(uint16_t addr, int rs2, uint8_t val, void *p, svga_t *svga)
ramdac->reg_ff = 0;
break;
}
svga_out(addr, val, svga);
}
@@ -188,24 +207,41 @@ sdac_ramdac_in(uint16_t addr, int rs2, void *p, svga_t *svga)
sdac_ramdac_t *ramdac = (sdac_ramdac_t *) p;
uint8_t temp = 0xff;
uint8_t rs = (addr & 0x03);
rs |= (!!rs2 << 8);
rs |= ((!!rs2) << 2);
if (rs != 0x02)
ramdac->magic_count = 0;
switch (rs) {
case 0x02:
if (ramdac->magic_count < 5)
switch (ramdac->magic_count) {
case 1:
case 2: case 3:
temp = 0x00;
ramdac->magic_count++;
if ((ramdac->magic_count == 4) && (ramdac->type != 1) && (ramdac->type != 2))
temp = 0x70; /*SDAC ID*/
else if (ramdac->magic_count == 5) {
break;
case 4:
if (ramdac->type & ICS_S3) {
temp = 0x70; /* SDAC ID */
ramdac->magic_count++;
} else {
temp = ramdac->command;
ramdac->magic_count = 0;
}
break;
case 5:
temp = ramdac->command;
ramdac->magic_count = 0;
} else
break;
default:
temp = svga_in(addr, svga);
ramdac->magic_count++;
break;
}
break;
case 0x00:
case 0x01:
case 0x03:
ramdac->magic_count = 0;
temp = svga_in(addr, svga);
break;
case 0x04:
@@ -281,7 +317,7 @@ sdac_ramdac_close(void *priv)
const device_t gendac_ramdac_device =
{
"S3 GENDAC 86c708 RAMDAC",
0, ICS_5300,
0, S3_86C708,
sdac_ramdac_init, sdac_ramdac_close,
NULL, { NULL }, NULL, NULL
};
@@ -305,7 +341,7 @@ const device_t tseng_ics5341_ramdac_device =
const device_t sdac_ramdac_device =
{
"S3 SDAC 86c716 RAMDAC",
0, ICS_5342,
0, S3_86C716,
sdac_ramdac_init, sdac_ramdac_close,
NULL, { NULL }, NULL, NULL
};

View File

@@ -91,7 +91,7 @@ video_cards[] = {
{ "mda", &mda_device },
{ "genius", &genius_device },
{ "metheus928_isa", &s3_metheus_86c928_isa_device },
{ "nga", &nga_device },
{ "nga", &nga_device },
{ "ogc", &ogc_device },
{ "oti037c", &oti037c_device },
{ "oti067", &oti067_device },
@@ -120,7 +120,8 @@ video_cards[] = {
{ "mach64gx_pci", &mach64gx_pci_device },
{ "mach64vt2", &mach64vt2_device },
{ "et4000w32p_pci", &et4000w32p_cardex_pci_device },
{ "et4000w32p_nc_pci", &et4000w32p_noncardex_pci_device },
{ "et4000w32p_nc_pci", &et4000w32p_noncardex_pci_device },
{ "et4000w32p_revc_pci", &et4000w32p_revc_pci_device },
{ "cl_gd5430_pci", &gd5430_pci_device, },
{ "cl_gd5434_pci", &gd5434_pci_device },
{ "cl_gd5436_pci", &gd5436_pci_device },
@@ -160,9 +161,10 @@ video_cards[] = {
{ "voodoo3_2k_pci", &voodoo_3_2000_device },
{ "voodoo3_3k_pci", &voodoo_3_3000_device },
{ "mach64gx_vlb", &mach64gx_vlb_device },
{ "et4000w32i_vlb", &et4000w32i_vlb_device },
{ "et4000w32i_vlb", &et4000w32i_vlb_device },
{ "et4000w32p_vlb", &et4000w32p_cardex_vlb_device },
{ "et4000w32p_nc_vlb", &et4000w32p_noncardex_vlb_device },
{ "et4000w32p_nc_vlb", &et4000w32p_noncardex_vlb_device },
{ "et4000w32p_revc_vlb", &et4000w32p_revc_vlb_device },
{ "cl_gd5424_vlb", &gd5424_vlb_device },
{ "cl_gd5428_vlb", &gd5428_vlb_device },
{ "cl_gd5429_vlb", &gd5429_vlb_device },