diff --git a/src/chipset/opti499.c b/src/chipset/opti499.c index 132754ac7..d9fc61907 100644 --- a/src/chipset/opti499.c +++ b/src/chipset/opti499.c @@ -84,7 +84,10 @@ opti499_recalc(opti499_t *dev) base = 0xd0000 + (i << 14); if ((dev->regs[0x22] & ((base >= 0xe0000) ? 0x20 : 0x40)) && (dev->regs[0x23] & (1 << i))) { - shflags = MEM_READ_INTERNAL; + if (dev->regs[0x2d] & (1 << ((i >> 1) + 2))) + shflags = MEM_READ_EXTANY; + else + shflags = MEM_READ_INTERNAL; shflags |= (dev->regs[0x22] & ((base >= 0xe0000) ? 0x08 : 0x10)) ? MEM_WRITE_DISABLED : MEM_WRITE_INTERNAL; } else { if (dev->regs[0x2d] & (1 << ((i >> 1) + 2))) diff --git a/src/device/phoenix_486_jumper.c b/src/device/phoenix_486_jumper.c index ed4349082..b4300981e 100644 --- a/src/device/phoenix_486_jumper.c +++ b/src/device/phoenix_486_jumper.c @@ -52,6 +52,14 @@ Bit 0 = ???? */ +/* + Intel Monsoon bit meanings: + Bit 5 = Password enable + Bit 4 = Onboard video: 1 = disabled, 0 = enabled + Bit 3 = CMOS Setup enable + Bit 2 = CMOS clear: 1 = normal, 0 = clear CMOS +*/ + typedef struct phoenix_486_jumper_t { uint8_t type; uint8_t jumper; @@ -84,7 +92,11 @@ phoenix_486_jumper_write(UNUSED(uint16_t addr), uint8_t val, void *priv) dev->jumper = val & 0xbf; else if (dev->type == 2) /* PB600 */ dev->jumper = ((val & 0xbf) | 0x02); - else + else if (dev->type == 3) { /* Intel Monsoon */ + dev->jumper = ((val & 0xef) | 0x2c); + if (gfxcard[0] != 0x01) + dev->jumper |= 0x10; + } else dev->jumper = val; } @@ -106,7 +118,11 @@ phoenix_486_jumper_reset(void *priv) dev->jumper = 0x00; else if (dev->type == 2) /* PB600 */ dev->jumper = 0x02; - else { + else if (dev->type == 3) { /* Intel Monsoon */ + dev->jumper = 0x2c; + if (gfxcard[0] != 0x01) + dev->jumper |= 0x10; + } else { dev->jumper = 0x9f; if (gfxcard[0] != 0x01) dev->jumper |= 0x40; @@ -176,3 +192,18 @@ const device_t phoenix_486_jumper_pci_pb600_device = { .force_redraw = NULL, .config = NULL }; + +const device_t phoenix_486_jumper_monsoon_device = { + .name = "Phoenix 486 Jumper Readout (Monsoon)", + .internal_name = "phoenix_486_jumper_monsoon", + .flags = 0, + .local = 3, + .init = phoenix_486_jumper_init, + .close = phoenix_486_jumper_close, + .reset = phoenix_486_jumper_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + diff --git a/src/include/86box/chipset.h b/src/include/86box/chipset.h index 4ded831bd..6fa7881ca 100644 --- a/src/include/86box/chipset.h +++ b/src/include/86box/chipset.h @@ -234,6 +234,7 @@ extern const device_t nec_mate_unk_device; extern const device_t phoenix_486_jumper_device; extern const device_t phoenix_486_jumper_pci_device; extern const device_t phoenix_486_jumper_pci_pb600_device; +extern const device_t phoenix_486_jumper_monsoon_device; extern const device_t ast_readout_device; extern const device_t ast_nvr_device; diff --git a/src/include/86box/video.h b/src/include/86box/video.h index b7f86ac18..32e1ace03 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -375,6 +375,7 @@ extern const device_t gd5401_isa_device; extern const device_t gd5401_onboard_device; extern const device_t gd5402_isa_device; extern const device_t gd5402_onboard_device; +extern const device_t gd5402_onboard_commodore_device; extern const device_t gd5420_isa_device; extern const device_t gd5420_onboard_device; extern const device_t gd5422_isa_device; diff --git a/src/machine/m_at_386sx.c b/src/machine/m_at_386sx.c index 6b5c4414c..d996a14bc 100644 --- a/src/machine/m_at_386sx.c +++ b/src/machine/m_at_386sx.c @@ -586,7 +586,7 @@ machine_at_cmdsl386sx25_init(const machine_t *model) return ret; if (gfxcard[0] == VID_INTERNAL) - device_add(&gd5402_onboard_device); + device_add(&gd5402_onboard_commodore_device); machine_at_common_init_ex(model, 2); diff --git a/src/machine/m_at_socket2.c b/src/machine/m_at_socket2.c index 5c4a19f17..5b871d298 100644 --- a/src/machine/m_at_socket2.c +++ b/src/machine/m_at_socket2.c @@ -389,6 +389,7 @@ machine_at_monsoon_init(const machine_t *model) device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); device_add(&intel_flash_bxt_device); + device_add(&phoenix_486_jumper_monsoon_device); if (gfxcard[0] == VID_INTERNAL) device_add(machine_get_vid_device(machine)); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 85b09676e..fd7f5b1f0 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -5905,7 +5905,7 @@ const machine_t machines[] = { .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, - .vid_device = &gd5402_onboard_device, + .vid_device = &gd5402_onboard_commodore_device, .snd_device = NULL, .net_device = NULL }, diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index 0a3060467..71ded9010 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -53,6 +53,9 @@ #define BIOS_GD5428_DIAMOND_B1_VLB_PATH "roms/video/cirruslogic/Diamond SpeedStar PRO VLB v3.04.bin" #define BIOS_GD5428_ISA_PATH "roms/video/cirruslogic/5428.bin" #define BIOS_GD5428_MCA_PATH "roms/video/cirruslogic/SVGA141.ROM" +#define BIOS_GD5428_ONBOARD_ACER_PATH "roms/machines/acera1g/4alo001.bin" +#define BIOS_GD5428_ONBOARD_HP_PATH "roms/machines/vect486vl/aa0500.ami" +#define BIOS_GD5428_ONBOARD_SNI_PATH "roms/machines/d824/fts-biosupdated824noflashbiosepromv320-320334-160.bin" #define BIOS_GD5428_PATH "roms/video/cirruslogic/vlbusjapan.BIN" #define BIOS_GD5428_BOCA_ISA_PATH_1 "roms/video/cirruslogic/boca_gd5428_1.30b_1.bin" #define BIOS_GD5428_BOCA_ISA_PATH_2 "roms/video/cirruslogic/boca_gd5428_1.30b_2.bin" @@ -4284,6 +4287,8 @@ gd54xx_init(const device_t *info) case CIRRUS_ID_CLGD5402: if (info->local & 0x200) + romfn = NULL; + else if (info->local & 0x100) romfn = BIOS_GD5402_ONBOARD_PATH; else romfn = BIOS_GD5402_PATH; @@ -4326,7 +4331,14 @@ gd54xx_init(const device_t *info) case CIRRUS_ID_CLGD5428: if (info->local & 0x200) { - romfn = NULL; + if (machines[machine].init == machine_at_vect486vl_init) + romfn = BIOS_GD5428_ONBOARD_HP_PATH; + else if (machines[machine].init == machine_at_d824_init) + romfn = BIOS_GD5428_ONBOARD_SNI_PATH; + else if (machines[machine].init == machine_at_acera1g_init) + romfn = BIOS_GD5428_ONBOARD_ACER_PATH; + else + romfn = NULL; gd54xx->has_bios = 0; } else if (info->local & 0x100) if (gd54xx->vlb) @@ -5032,6 +5044,20 @@ const device_t gd5402_onboard_device = { .config = NULL, }; +const device_t gd5402_onboard_commodore_device = { + .name = "Cirrus Logic GD5402 (ISA) (ACUMOS AVGA2) (On-Board) (Commodore)", + .internal_name = "cl_gd5402_onboard_commodore", + .flags = DEVICE_ISA16, + .local = CIRRUS_ID_CLGD5402 | 0x100, + .init = gd54xx_init, + .close = gd54xx_close, + .reset = gd54xx_reset, + .available = NULL, + .speed_changed = gd54xx_speed_changed, + .force_redraw = gd54xx_force_redraw, + .config = NULL, +}; + const device_t gd5420_isa_device = { .name = "Cirrus Logic GD5420 (ISA)", .internal_name = "cl_gd5420_isa", @@ -5248,7 +5274,7 @@ const device_t gd5428_onboard_device = { .name = "Cirrus Logic GD5428 (ISA) (On-Board)", .internal_name = "cl_gd5428_onboard", .flags = DEVICE_ISA16, - .local = CIRRUS_ID_CLGD5428, + .local = CIRRUS_ID_CLGD5428 | 0x200, .init = gd54xx_init, .close = gd54xx_close, .reset = gd54xx_reset, @@ -5262,7 +5288,7 @@ const device_t gd5428_vlb_onboard_device = { .name = "Cirrus Logic GD5428 (VLB) (On-Board)", .internal_name = "cl_gd5428_vlb_onboard", .flags = DEVICE_VLB, - .local = CIRRUS_ID_CLGD5428, + .local = CIRRUS_ID_CLGD5428 | 0x200, .init = gd54xx_init, .close = gd54xx_close, .reset = gd54xx_reset,