Added the Winbond W83878F variant with HEFERE = 0 (key = 88h) and correctly made the MS-5124 use it.

This commit is contained in:
OBattler
2023-10-20 21:48:51 +02:00
parent 9c434f4ed0
commit f3ca2a6dcd
3 changed files with 25 additions and 8 deletions

View File

@@ -72,6 +72,7 @@ extern const device_t sio_detect_device;
#endif
extern const device_t um8669f_device;
extern const device_t via_vt82c686_sio_device;
extern const device_t w83787f_88h_device;
extern const device_t w83787f_device;
extern const device_t w83787f_ide_device;
extern const device_t w83787f_ide_en_device;

View File

@@ -757,7 +757,7 @@ machine_at_ms5124_init(const machine_t *model)
device_add(&sis_5511_device);
device_add(&keyboard_ps2_ami_device);
device_add(&w83787f_device);
device_add(&w83787f_88h_device);
device_add(&sst_flash_29ee010_device);
return ret;

View File

@@ -374,6 +374,8 @@ w83787f_read(uint16_t port, void *priv)
static void
w83787f_reset(w83787f_t *dev)
{
uint16_t hefere = dev->reg_init & 0x0100;
lpt1_remove();
lpt1_init(LPT1_ADDR);
lpt1_irq(LPT1_IRQ);
@@ -410,7 +412,7 @@ w83787f_reset(w83787f_t *dev)
dev->regs[0x07] = 0xF5;
dev->regs[0x09] = dev->reg_init & 0xff;
dev->regs[0x0a] = 0x1F;
dev->regs[0x0c] = 0x2C;
dev->regs[0x0c] = 0x0C | (hefere >> 3);
dev->regs[0x0d] = 0xA3;
gameport_remap(dev->gameport, 0);
@@ -420,7 +422,7 @@ w83787f_reset(w83787f_t *dev)
w83787f_lpt_handler(dev);
dev->key = 0x89;
dev->key = 0x88 | (hefere >> 8);
w83787f_remap(dev);
@@ -456,17 +458,31 @@ w83787f_init(const device_t *info)
dev->ide_start = !!(info->local & 0x40);
dev->reg_init = info->local & 0x0f;
dev->reg_init = info->local & 0x010f;
w83787f_reset(dev);
return dev;
}
const device_t w83787f_88h_device = {
.name = "Winbond W83787F/IF Super I/O",
.internal_name = "w83787f",
.flags = 0,
.local = 0x0009,
.init = w83787f_init,
.close = w83787f_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
const device_t w83787f_device = {
.name = "Winbond W83787F/IF Super I/O",
.internal_name = "w83787f",
.flags = 0,
.local = 0x09,
.local = 0x0109,
.init = w83787f_init,
.close = w83787f_close,
.reset = NULL,
@@ -480,7 +496,7 @@ const device_t w83787f_ide_device = {
.name = "Winbond W83787F/IF Super I/O (With IDE)",
.internal_name = "w83787f_ide",
.flags = 0,
.local = 0x19,
.local = 0x0119,
.init = w83787f_init,
.close = w83787f_close,
.reset = NULL,
@@ -494,7 +510,7 @@ const device_t w83787f_ide_en_device = {
.name = "Winbond W83787F/IF Super I/O (With IDE Enabled)",
.internal_name = "w83787f_ide_en",
.flags = 0,
.local = 0x59,
.local = 0x0159,
.init = w83787f_init,
.close = w83787f_close,
.reset = NULL,
@@ -508,7 +524,7 @@ const device_t w83787f_ide_sec_device = {
.name = "Winbond W83787F/IF Super I/O (With Secondary IDE)",
.internal_name = "w83787f_ide_sec",
.flags = 0,
.local = 0x39,
.local = 0x0139,
.init = w83787f_init,
.close = w83787f_close,
.reset = NULL,