This commit is contained in:
Sean Ramey
2021-03-25 02:42:15 -05:00
6 changed files with 1563 additions and 1505 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;

View File

@@ -167,7 +167,7 @@ const machine_t machines[] = {
{ "[OPTi 283] Olivetti M300-08", "m30008", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 20000000, 20000000, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 16384, 2048, 127, machine_at_olim300_08_init, at_m300_08_get_device },
{ "[OPTi 283] Olivetti M300-15", "m30015", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 25000000, 25000000, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 16384, 2048, 127, machine_at_olim300_15_init, NULL },
{ "[OPTi 291] DTK PPM-3333P", "awardsx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 16384, 1024, 127, machine_at_awardsx_init, NULL },
{ "[SCAMP] Commodore SL386SX-25", "cmdsl386sx16", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 8192, 512, 127, machine_at_commodore_sl386sx25_init, at_commodore_sl386sx25_get_device },
{ "[SCAMP] Commodore SL386SX-25", "cmdsl386sx25", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 8192, 512, 127, machine_at_commodore_sl386sx25_init, at_commodore_sl386sx25_get_device },
{ "[SCAMP] Samsung SPC-6033P", "spc6033p", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 12288, 2048, 127, machine_at_spc6033p_init, at_spc6033p_get_device },
{ "[SCAT] KMX-C-02", "kmxc02", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 512, 127, machine_at_kmxc02_init, NULL },
{ "[WD76C10] Amstrad MegaPC", "megapc", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 32768, 1024, 127, machine_at_wd76c10_init, NULL },

File diff suppressed because it is too large Load Diff

View File

@@ -4153,8 +4153,8 @@ s3_visionx68_video_engine_op(uint32_t cpu_dat, s3_t *s3)
svga_t *svga = &s3->svga;
int idf, odf, host;
int is_yuv;
uint32_t src, dest;
uint8_t r, g, b, r2, g2, b2;
uint32_t src, dest = 0x00000000;
uint8_t r = 0x00, g = 0x00, b = 0x00, r2 = 0x00, g2 = 0x00, b2 = 0x00;
uint16_t *vram_w = (uint16_t *)svga->vram;
uint32_t *vram_l = (uint32_t *)svga->vram;
uint32_t k2 = 0, dda = 0, diff = 0;

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 },