Fixed 1280x1024x8/16bpp and 1600x1200x8/16bpp video modes in the S3 trio class cards.

The 1990 Spock BIOS uses ID 6 for the boot drive.
This commit is contained in:
TC1995
2021-05-24 23:13:30 +02:00
parent a41adb884d
commit ee9dd9ab3f
2 changed files with 17 additions and 9 deletions

View File

@@ -491,7 +491,8 @@ spock_process_imm_cmd(spock_t *scsi)
scsi_device_reset(&scsi_devices[i]);
spock_log("Adapter Reset\n");
if (!scsi->adapter_reset)
if (!scsi->adapter_reset && scsi->bios_ver) /*The early 1990 bios must have its boot drive
set to ID 6 according https://www.ardent-tool.com/IBM_SCSI/SCSI-A.html */
scsi->adapter_reset = 1;
else
scsi->adapter_reset = 0;
@@ -1101,12 +1102,16 @@ spock_init(const device_t *info)
scsi->bios_ver = device_get_config_int("bios_ver");
if (scsi->bios_ver)
rom_init_interleaved(&scsi->bios_rom, SPOCK_U68_1991_ROM, SPOCK_U69_1991_ROM,
switch (scsi->bios_ver) {
case 1:
rom_init_interleaved(&scsi->bios_rom, SPOCK_U68_1991_ROM, SPOCK_U69_1991_ROM,
0xc8000, 0x8000, 0x7fff, 0x4000, MEM_MAPPING_EXTERNAL);
else
rom_init_interleaved(&scsi->bios_rom, SPOCK_U68_1990_ROM, SPOCK_U69_1990_ROM,
break;
case 0:
rom_init_interleaved(&scsi->bios_rom, SPOCK_U68_1990_ROM, SPOCK_U69_1990_ROM,
0xc8000, 0x8000, 0x7fff, 0x4000, MEM_MAPPING_EXTERNAL);
break;
}
mem_mapping_disable(&scsi->bios_rom.mapping);
@@ -1146,7 +1151,7 @@ static int
spock_available(void)
{
return rom_present(SPOCK_U68_1991_ROM) && rom_present(SPOCK_U69_1991_ROM) &&
rom_present(SPOCK_U68_1990_ROM) && rom_present(SPOCK_U69_1990_ROM);
rom_present(SPOCK_U68_1990_ROM) && rom_present(SPOCK_U69_1990_ROM);
}
static const device_config_t spock_rom_config[] = {

View File

@@ -2565,7 +2565,8 @@ static void s3_recalctimings(svga_t *svga)
if (s3->chip == S3_86C928) {
if (s3->width == 2048 || s3->width == 1280 || s3->width == 1600)
svga->hdisp *= 2;
} else if ((s3->chip != S3_86C801) && (s3->chip != S3_86C805)) {
} else if ((s3->chip != S3_86C801) && (s3->chip != S3_86C805) && (s3->chip != S3_TRIO32) &&
(s3->chip != S3_TRIO64) && (s3->chip != S3_TRIO64V)) {
if (s3->width == 1280 || s3->width == 1600)
svga->hdisp *= 2;
}
@@ -2581,7 +2582,8 @@ static void s3_recalctimings(svga_t *svga)
else if (s3->chip != S3_VISION968)
svga->hdisp /= 2;
}
if (s3->chip != S3_VISION868) {
if ((s3->chip != S3_VISION868) && (s3->chip != S3_TRIO32) &&
(s3->chip != S3_TRIO64) && (s3->chip != S3_TRIO64V)) {
if (s3->width == 1280 || s3->width == 1600)
svga->hdisp *= 2;
}
@@ -2596,7 +2598,8 @@ static void s3_recalctimings(svga_t *svga)
else if (s3->chip != S3_VISION968)
svga->hdisp /= 2;
}
if (s3->chip != S3_VISION868) {
if ((s3->chip != S3_VISION868) && (s3->chip != S3_TRIO32) &&
(s3->chip != S3_TRIO64) && (s3->chip != S3_TRIO64V)) {
if (s3->width == 1280 || s3->width == 1600)
svga->hdisp *= 2;
}