Machine mergers and added the Olivetti PCS 44/C.

This commit is contained in:
OBattler
2025-08-26 18:00:25 +02:00
parent 5180646dfd
commit a3f5ea358f
16 changed files with 958 additions and 1430 deletions

View File

@@ -38,6 +38,7 @@
#define BIOS_067_M300_15_PATH "roms/machines/m30015/EVC_BIOS.ROM"
#define BIOS_077_PATH "roms/video/oti/oti077.vbi"
#define BIOS_077_ACER100T_PATH "roms/machines/acer100t/oti077_acer100t.BIN"
#define BIOS_077_PCS44C_PATH "roms/machines/pcs44c/V032004G.25"
enum {
OTI_037C = 0,
@@ -46,7 +47,8 @@ enum {
OTI_067_AMA932J = 3,
OTI_067_M300 = 4,
OTI_077 = 5,
OTI_077_ACER100T = 6
OTI_077_ACER100T = 6,
OTI_077_PCS44C = 7
};
typedef struct {
@@ -104,7 +106,8 @@ oti_out(uint16_t addr, uint8_t val, void *priv)
case 0x3c7:
case 0x3c8:
case 0x3c9:
if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T))
if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) ||
(oti->chip_id == OTI_077_PCS44C))
sc1148x_ramdac_out(addr, 0, val, svga->ramdac, svga);
else
svga_out(addr, val, svga);
@@ -166,7 +169,8 @@ oti_out(uint16_t addr, uint8_t val, void *priv)
mem_mapping_disable(&svga->mapping);
else
mem_mapping_enable(&svga->mapping);
} else if (oti->chip_id == OTI_077 || oti->chip_id == OTI_077_ACER100T) {
} else if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) ||
(oti->chip_id == OTI_077_PCS44C)) {
svga->vram_display_mask = (val & 0x0c) ? oti->vram_mask : 0x3ffff;
switch ((val & 0xc0) >> 6) {
@@ -251,7 +255,8 @@ oti_in(uint16_t addr, void *priv)
case 0x3c7:
case 0x3c8:
case 0x3c9:
if (oti->chip_id == OTI_077 || oti->chip_id == OTI_077_ACER100T)
if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) ||
(oti->chip_id == OTI_077_PCS44C))
temp = sc1148x_ramdac_in(addr, 0, svga->ramdac, svga);
else
temp = svga_in(addr, svga);
@@ -324,7 +329,9 @@ oti_in(uint16_t addr, void *priv)
case 0x3de:
temp = oti->index;
if (oti->chip_id)
if (oti->chip_id > 5)
temp |= (5 << 5);
else if (oti->chip_id)
temp |= (oti->chip_id << 5);
break;
@@ -495,6 +502,12 @@ oti_init(const device_t *info)
oti->pos = 0x08; /* Tell the BIOS the I/O ports are already enabled to avoid a double I/O handler mess. */
io_sethandler(0x46e8, 1, oti_pos_in, NULL, NULL, oti_pos_out, NULL, NULL, oti);
break;
case OTI_077_PCS44C:
romfn = BIOS_077_PCS44C_PATH;
oti->vram_size = device_get_config_int("memory");
oti->pos = 0x08; /* Tell the BIOS the I/O ports are already enabled to avoid a double I/O handler mess. */
io_sethandler(0x46e8, 1, oti_pos_in, NULL, NULL, oti_pos_out, NULL, NULL, oti);
break;
default:
break;
@@ -513,12 +526,13 @@ oti_init(const device_t *info)
*/
video_inform(0x1, &timing_oti);
} else
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_oti);
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_oti);
svga_init(info, &oti->svga, oti, oti->vram_size << 10,
oti_recalctimings, oti_in, oti_out, NULL, NULL);
if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T))
if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) ||
(oti->chip_id == OTI_077_PCS44C))
oti->svga.ramdac = device_add(&sc11487_ramdac_device); /*Actually a 82c487, probably a clone.*/
io_sethandler(0x03c0, 32,
@@ -574,6 +588,12 @@ oti077_acer100t_available(void)
return (rom_present(BIOS_077_ACER100T_PATH));
}
static int
oti077_pcs44c_available(void)
{
return (rom_present(BIOS_077_PCS44C_PATH));
}
static int
oti067_077_available(void)
{
@@ -766,3 +786,16 @@ const device_t oti077_acer100t_device = {
.force_redraw = oti_force_redraw,
.config = oti077_acer100t_config
};
const device_t oti077_pcs44c_device = {
.name = "Oak OTI-077 (Olivetti PCS 44/C)",
.internal_name = "oti077_pcs44c",
.flags = DEVICE_ISA,
.local = 7,
.init = oti_init,
.close = oti_close,
.reset = NULL,
.available = oti077_pcs44c_available,
.speed_changed = oti_speed_changed,
.force_redraw = oti_force_redraw,
.config = oti077_acer100t_config
};