diff --git a/src/Makefile.mingw b/src/Makefile.mingw
index 20374043e..1289db48f 100644
--- a/src/Makefile.mingw
+++ b/src/Makefile.mingw
@@ -148,7 +148,7 @@ SYSOBJ = model.o \
olivetti_m24.o ps1.o ps2.o ps2_mca.o \
tandy_eeprom.o tandy_rom.o
DEVOBJ = bugger.o lpt.o serial.o \
- um8669f.o pc87306.o sis85c471.o w83877f.o \
+ pc87306.o sis85c471.o w83877f.o \
keyboard.o \
keyboard_xt.o keyboard_at.o keyboard_pcjr.o \
keyboard_amstrad.o keyboard_olim24.o \
diff --git a/src/SOUND/snd_sb.c b/src/SOUND/snd_sb.c
index 179a449ee..317d066e2 100644
--- a/src/SOUND/snd_sb.c
+++ b/src/SOUND/snd_sb.c
@@ -187,8 +187,8 @@ static void sb_get_buffer_emu8k(int32_t *buffer, int len, void *p)
int c_emu8k = (((c/2) * 44100) / 48000)*2;
int32_t out_l, out_r;
- out_l = (((int32_t)sb->opl.buffer[c] * (int32_t)mixer->fm_l) >> 16);
- out_r = (((int32_t)sb->opl.buffer[c + 1] * (int32_t)mixer->fm_r) >> 16);
+ out_l = ((((sb->opl.buffer[c] * mixer->fm_l) >> 16) * (opl3_type ? 47000 : 51000)) >> 16);
+ out_r = ((((sb->opl.buffer[c + 1] * mixer->fm_r) >> 16) * (opl3_type ? 47000 : 51000)) >> 16);
out_l += ((sb->emu8k.buffer[c_emu8k] * mixer->fm_l) >> 16);
out_r += ((sb->emu8k.buffer[c_emu8k + 1] * mixer->fm_l) >> 16);
diff --git a/src/intel_flash.c b/src/intel_flash.c
index 6ded787ef..cbab0384f 100644
--- a/src/intel_flash.c
+++ b/src/intel_flash.c
@@ -179,9 +179,11 @@ void *intel_flash_init(uint8_t type)
case ROM_REVENGE:
wcscpy(flash_path, L"revenge.bin");
break;
+#if 0
case ROM_586MC1:
wcscpy(flash_path, L"586mc1.bin");
break;
+#endif
case ROM_PLATO:
wcscpy(flash_path, L"plato.bin");
break;
@@ -203,12 +205,14 @@ void *intel_flash_init(uint8_t type)
case ROM_ACERM3A:
wcscpy(flash_path, L"acerm3a.bin");
break;
+#if 0
case ROM_ACERV35N:
wcscpy(flash_path, L"acerv35n.bin");
break;
case ROM_430VX:
wcscpy(flash_path, L"430vx.bin");
break;
+#endif
case ROM_P55VA:
wcscpy(flash_path, L"p55va.bin");
break;
diff --git a/src/mem.c b/src/mem.c
index 17b564a9e..5fd0cf5a2 100644
--- a/src/mem.c
+++ b/src/mem.c
@@ -434,6 +434,7 @@ int loadbios()
pclog("Load SIS496 %x %x\n", rom[0x1fff0], rom[0xfff0]);
return 1;
+#if 0
case ROM_430VX:
f = romfopen(L"roms/430vx/55XWUQ0E.BIN", L"rb");
if (!f) break;
@@ -441,6 +442,7 @@ int loadbios()
fclose(f);
biosmask = 0x1ffff;
return 1;
+#endif
case ROM_REVENGE:
f = romfopen(L"roms/revenge/1009AF2_.BIO", L"rb");
@@ -650,6 +652,7 @@ int loadbios()
pclog("Load R418 %x %x\n", rom[0x1fff0], rom[0xfff0]);
return 1;
+#if 0
case ROM_586MC1:
f = romfopen(L"roms/586mc1/IS.34", L"rb");
if (!f) break;
@@ -657,6 +660,7 @@ int loadbios()
fclose(f);
biosmask = 0x1ffff;
return 1;
+#endif
case ROM_PLATO:
f = romfopen(L"roms/plato/1016AX1_.BIO", L"rb");
@@ -712,6 +716,7 @@ int loadbios()
biosmask = 0x1ffff;
return 1;
+#if 0
case ROM_ACERV35N:
f = romfopen(L"roms/acerv35n/V35ND1S1.BIN", L"rb");
if (!f) break;
@@ -719,6 +724,7 @@ int loadbios()
fclose(f);
biosmask = 0x1ffff;
return 1;
+#endif
case ROM_P55VA:
f = romfopen(L"roms/p55va/VA021297.BIN", L"rb");
diff --git a/src/model.c b/src/model.c
index 9e4dc6b7e..9abbe7e14 100644
--- a/src/model.c
+++ b/src/model.c
@@ -84,7 +84,9 @@
#include "sound/snd_sn76489.h"
#include "tandy_eeprom.h"
#include "tandy_rom.h"
+#if 0
#include "um8669f.h"
+#endif
#include "video/vid_pcjr.h"
#include "video/vid_tandy.h"
#include "w83877f.h"
@@ -118,7 +120,9 @@ extern void at_ali1429_init(void);
extern void at_headland_init(void);
extern void at_opti495_init(void);
extern void at_sis496_init(void);
+#if 0
extern void at_i430vx_init(void);
+#endif
extern void at_batman_init(void);
extern void at_endeavor_init(void);
@@ -226,7 +230,9 @@ MODEL models[] =
{"Acer V35N", ROM_ACERV35N, "acerv3n", { "Intel", cpus_Pentium, "IDT", cpus_WinChip, "Cyrix", cpus_6x86, "AMD", cpus_K56, "", NULL}, 0, MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI, 1, 256, 1, at_acerv35n_init, NULL},
#endif
{"ASUS P/I-P55T2P4", ROM_P55T2P4, "p55r2p4", { "Intel", cpus_Pentium, "IDT", cpus_WinChip, "Cyrix", cpus_6x86, "AMD", cpus_K56, "", NULL}, 0, MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI, 1, 256, 1, at_p55t2p4_init, NULL},
+#if 0
{"Award 430VX PCI", ROM_430VX, "430vx", { "Intel", cpus_Pentium, "IDT", cpus_WinChip, "Cyrix", cpus_6x86, "AMD", cpus_K56, "", NULL}, 0, MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI, 1, 256, 1, at_i430vx_init, NULL},
+#endif
{"Epox P55-VA", ROM_P55VA, "p55va", { "Intel", cpus_Pentium, "IDT", cpus_WinChip, "Cyrix", cpus_6x86, "AMD", cpus_K56, "", NULL}, 0, MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI, 1, 256, 1, at_p55va_init, NULL},
{"ASUS P/I-P55TVP4", ROM_P55TVP4, "p55tvp4", { "Intel", cpus_Pentium, "IDT", cpus_WinChip, "Cyrix", cpus_6x86, "AMD", cpus_K56, "", NULL}, 0, MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI, 1, 256, 1, at_p55tvp4_init, NULL},
{"Tyan Titan-Pro AT", ROM_440FX, "440fx", { "Intel", cpus_PentiumPro, "", NULL, "", NULL, "", NULL, "", NULL}, 0, MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI, 1, 256, 1, at_i440fx_init, NULL},
@@ -818,6 +824,7 @@ void at_p55t2p4_init(void)
device_add(&intel_flash_bxt_device);
}
+#if 0
void at_i430vx_init(void)
{
at_ide_init();
@@ -832,6 +839,7 @@ void at_i430vx_init(void)
um8669f_init();
device_add(&intel_flash_bxt_device);
}
+#endif
void at_p55tvp4_init(void)
{
diff --git a/src/nvr.c b/src/nvr.c
index 8862ec08f..44a909627 100644
--- a/src/nvr.c
+++ b/src/nvr.c
@@ -240,7 +240,9 @@ void loadnvr(void)
case ROM_AMI486: f = nvrfopen(L"ami486.nvr", L"rb"); nvrmask = 127; break;
case ROM_WIN486: f = nvrfopen(L"win486.nvr", L"rb"); nvrmask = 127; break;
case ROM_SIS496: f = nvrfopen(L"sis496.nvr", L"rb"); nvrmask = 127; break;
+#if 0
case ROM_430VX: f = nvrfopen(L"430vx.nvr", L"rb"); nvrmask = 127; break;
+#endif
case ROM_REVENGE: f = nvrfopen(L"revenge.nvr", L"rb"); nvrmask = 127; break;
case ROM_ENDEAVOR: f = nvrfopen(L"endeavor.nvr", L"rb"); nvrmask = 127; break;
case ROM_DTK386: f = nvrfopen(L"dtk386.nvr", L"rb"); nvrmask = 127; break;
@@ -248,14 +250,18 @@ void loadnvr(void)
case ROM_AMI386DX_OPTI495: f = nvrfopen(L"ami386dx_opti495.nvr", L"rb"); nvrmask = 127; break;
case ROM_DTK486: f = nvrfopen(L"dtk486.nvr", L"rb"); nvrmask = 127; break;
case ROM_R418: f = nvrfopen(L"r418.nvr", L"rb"); nvrmask = 127; break;
+#if 0
case ROM_586MC1: f = nvrfopen(L"586mc1.nvr", L"rb"); nvrmask = 127; break;
+#endif
case ROM_PLATO: f = nvrfopen(L"plato.nvr", L"rb"); nvrmask = 127; break;
case ROM_MB500N: f = nvrfopen(L"mb500n.nvr", L"rb"); nvrmask = 127; break;
case ROM_P54TP4XE: f = nvrfopen(L"p54tp4xe.nvr", L"rb"); nvrmask = 127; break;
case ROM_AP53: f = nvrfopen(L"ap53.nvr", L"rb"); nvrmask = 127; break;
case ROM_P55T2S: f = nvrfopen(L"p55t2s.nvr", L"rb"); nvrmask = 127; break;
case ROM_ACERM3A: f = nvrfopen(L"acerm3a.nvr", L"rb"); nvrmask = 127; break;
+#if 0
case ROM_ACERV35N: f = nvrfopen(L"acerv35n.nvr", L"rb"); nvrmask = 127; break;
+#endif
case ROM_P55VA: f = nvrfopen(L"p55va.nvr", L"rb"); nvrmask = 127; break;
case ROM_P55T2P4: f = nvrfopen(L"p55t2p4.nvr", L"rb"); nvrmask = 127; break;
case ROM_P55TVP4: f = nvrfopen(L"p55tvp4.nvr", L"rb"); nvrmask = 127; break;
@@ -325,7 +331,9 @@ void savenvr(void)
case ROM_AMI486: f = nvrfopen(L"ami486.nvr", L"wb"); break;
case ROM_WIN486: f = nvrfopen(L"win486.nvr", L"wb"); break;
case ROM_SIS496: f = nvrfopen(L"sis496.nvr", L"wb"); break;
+#if 0
case ROM_430VX: f = nvrfopen(L"430vx.nvr", L"wb"); break;
+#endif
case ROM_REVENGE: f = nvrfopen(L"revenge.nvr", L"wb"); break;
case ROM_ENDEAVOR: f = nvrfopen(L"endeavor.nvr", L"wb"); break;
case ROM_DTK386: f = nvrfopen(L"dtk386.nvr", L"wb"); break;
@@ -333,14 +341,18 @@ void savenvr(void)
case ROM_AMI386DX_OPTI495: f = nvrfopen(L"ami386dx_opti495.nvr", L"wb"); break;
case ROM_DTK486: f = nvrfopen(L"dtk486.nvr", L"wb"); break;
case ROM_R418: f = nvrfopen(L"r418.nvr", L"wb"); break;
+#if 0
case ROM_586MC1: f = nvrfopen(L"586mc1.nvr", L"wb"); break;
+#endif
case ROM_PLATO: f = nvrfopen(L"plato.nvr", L"wb"); break;
case ROM_MB500N: f = nvrfopen(L"mb500n.nvr", L"wb"); break;
case ROM_P54TP4XE: f = nvrfopen(L"p54tp4xe.nvr", L"wb"); break;
case ROM_AP53: f = nvrfopen(L"ap53.nvr", L"wb"); break;
case ROM_P55T2S: f = nvrfopen(L"p55t2s.nvr", L"wb"); break;
case ROM_ACERM3A: f = nvrfopen(L"acerm3a.nvr", L"wb"); break;
+#if 0
case ROM_ACERV35N: f = nvrfopen(L"acerv35n.nvr", L"wb"); break;
+#endif
case ROM_P55VA: f = nvrfopen(L"p55va.nvr", L"wb"); break;
case ROM_P55T2P4: f = nvrfopen(L"p55t2p4.nvr", L"wb"); break;
case ROM_P55TVP4: f = nvrfopen(L"p55tvp4.nvr", L"wb"); break;
diff --git a/src/um8669f.c b/src/um8669f.c
deleted file mode 100644
index 964f2613a..000000000
--- a/src/um8669f.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * 86Box A hypervisor and IBM PC system emulator that specializes in
- * running old operating systems and software designed for IBM
- * PC systems and compatibles from 1981 through fairly recent
- * system designs based on the PCI bus.
- *
- * This file is part of the 86Box distribution.
- *
- * Emulation of the UMC UM8669F Super I/O Chip.
- *
- * Version: @(#)um8669f.c 1.0.0 2017/05/30
- *
- * Author: Sarah Walker,
- * Miran Grca,
- * Copyright 2008-2017 Sarah Walker.
- * Copyright 2016-2017 Miran Grca.
- */
-
-/*um8669f :
-
- aa to 108 unlocks
- next 108 write is register select (Cx?)
- data read/write to 109
- 55 to 108 locks
-
-
-
-
-C0
-bit 3 = LPT1 enable
-bit 2 = COM2 enable
-bit 1 = COM1 enable
-bit 0 = FDC enable
-
-C1
-bits 7-6 = LPT1 mode : 11 = ECP/EPP, 01 = EPP, 10 = SPP
-bit 3 = clear when LPT1 = 278
-
-Added by OBattler based on more sources:
- C2
- bit 2 = I430FX: floppy drive swap (1 = swap, 0 = do not swap)
- I430VX: DENSEL polarity
- bits 3-6 = IR stuff
- bits 3-4 = 00 = Normal, 01 = Infrared (HPSIR), 10 - Amplitude Shift Keyed IR (ASKIR), 11 - Reserved
-
-C3
-bits 7-6 = LPT1 DMA mode : 11 = ECP/EPP DMA1, 10 = ECP/EPP DMA3, 01 = EPP/SPP, 00 = ECP
-bits 5-4 = LPT1 addr : 10 = 278/IRQ5, 01 = 3BC/IRQ7, 00 = 378/IRQ7
-
-COM1 :
-3f8, IRQ4 - C1 = BF, C3 = 00
-2f8, IRQ3 - C1 = BF, C3 = 03
-3e8, IRQ4 - C1 = BD, C3 = 00
-2e8, IRQ3 - B1 = BD, C3 = 03
-
-COM2 :
-3f8, IRQ4 - C1 = BF, C3 = 0C
-2f8, IRQ3 - C1 = BF, C3 = 00
-3e8, IRQ4 - C1 = BB, C3 = 0C
-2e8, IRQ3 - C1 = BB, C3 = 00
-
- */
-
-#include "ibm.h"
-
-#include "disc.h"
-#include "fdc.h"
-#include "fdd.h"
-#include "io.h"
-#include "lpt.h"
-#include "serial.h"
-#include "um8669f.h"
-
-static int um8669f_locked;
-static int um8669f_curreg;
-static uint8_t um8669f_regs[256];
-
-void um8669f_write(uint16_t port, uint8_t val, void *priv)
-{
- int temp;
- if (um8669f_locked)
- {
- if (port == 0x108 && val == 0xaa)
- um8669f_locked = 0;
- }
- else
- {
- if (port == 0x108)
- {
- if (val == 0x55)
- um8669f_locked = 1;
- else
- um8669f_curreg = val;
- }
- else
- {
- um8669f_regs[um8669f_curreg] = val;
-
- fdc_remove();
- if (um8669f_regs[0xc0] & 1)
- fdc_add();
-
- if (um8669f_regs[0xc0] & 2)
- {
- temp = um8669f_regs[0xc3] & 1; /*might be & 2*/
- if (!(um8669f_regs[0xc1] & 2))
- temp |= 2;
- switch (temp)
- {
- case 0: serial_setup(1, 0x3f8, 4); break;
- case 1: serial_setup(1, 0x2f8, 4); break;
- case 2: serial_setup(1, 0x3e8, 4); break;
- case 3: serial_setup(1, 0x2e8, 4); break;
- }
- }
-
- if (um8669f_regs[0xc0] & 4)
- {
- temp = (um8669f_regs[0xc3] & 4) ? 0 : 1; /*might be & 8*/
- if (!(um8669f_regs[0xc1] & 4))
- temp |= 2;
- switch (temp)
- {
- case 0: serial_setup(2, 0x3f8, 3); break;
- case 1: serial_setup(2, 0x2f8, 3); break;
- case 2: serial_setup(2, 0x3e8, 3); break;
- case 3: serial_setup(2, 0x2e8, 3); break;
- }
- }
-
- if (um8669f_curreg == 0xC2)
- {
- /* Make sure to invert this. */
- if (romset == ROM_430VX)
- {
- fdc_update_densel_polarity(val & 4 ? 0 : 1);
- }
- else
- {
- fdd_setswap(val & 4 ? 1 : 0);
- }
- }
-
- lpt1_remove();
- lpt2_remove();
- temp = (um8669f_regs[0xc3] >> 4) & 3;
- switch (temp)
- {
- case 0: lpt1_init(0x378); break;
- case 1: lpt1_init(0x3bc); break;
- case 2: lpt1_init(0x278); break;
- }
- }
- }
-}
-
-uint8_t um8669f_read(uint16_t port, void *priv)
-{
- if (um8669f_locked)
- return 0xff;
-
- if (port == 0x108)
- return um8669f_curreg; /*???*/
- else
- return um8669f_regs[um8669f_curreg];
-}
-
-void um8669f_init()
-{
- io_sethandler(0x0108, 0x0002, um8669f_read, NULL, NULL, um8669f_write, NULL, NULL, NULL);
- um8669f_locked = 1;
-}
diff --git a/src/um8669f.h b/src/um8669f.h
deleted file mode 100644
index 92052a151..000000000
--- a/src/um8669f.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * 86Box A hypervisor and IBM PC system emulator that specializes in
- * running old operating systems and software designed for IBM
- * PC systems and compatibles from 1981 through fairly recent
- * system designs based on the PCI bus.
- *
- * This file is part of the 86Box distribution.
- *
- * Emulation of the UMC UM8669F Super I/O Chip.
- *
- * Version: @(#)um8669f.h 1.0.0 2017/05/30
- *
- * Author: Sarah Walker,
- * Miran Grca,
- * Copyright 2008-2017 Sarah Walker.
- * Copyright 2016-2017 Miran Grca.
- */
-
-extern void um8669f_init();
diff --git a/src/um8881f.c b/src/um8881f.c
deleted file mode 100644
index c39c21b11..000000000
--- a/src/um8881f.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright holders: Sarah Walker
- see COPYING for more details
-*/
-#include "ibm.h"
-#include "io.h"
-#include "mem.h"
-#include "pci.h"
-
-#include "um8881f.h"
-
-static uint8_t card_16[256];
-static uint8_t card_18[256];
-
-void um8881f_write(int func, int addr, uint8_t val, void *priv)
-{
-// pclog("um8881f_write : addr=%02x val=%02x %04x:%04x\n", addr, val, CS, pc);
- if (addr == 0x54)
- {
-/* if ((card_16[0x54] ^ val) & 0x01)
- {
- if (val & 1)
- mem_bios_set_state(0xe0000, 0x10000, 1, 1);
- else
- mem_bios_set_state(0xe0000, 0x10000, 0, 0);
- }*/
- flushmmucache_nopc();
- }
- if (addr == 0x55)
- {
- if ((card_16[0x55] ^ val) & 0xc0)
- {
-/* switch (val & 0xc0)
- {
- case 0x00: mem_bios_set_state(0xf0000, 0x10000, 0, 1); break;
- case 0x40: mem_bios_set_state(0xf0000, 0x10000, 0, 0); break;
- case 0x80: mem_bios_set_state(0xf0000, 0x10000, 1, 1); break;
- case 0xc0: mem_bios_set_state(0xf0000, 0x10000, 1, 0); break;
- }*/
- shadowbios = val & 0x80;
- shadowbios_write = !(val & 0x40);
- flushmmucache_nopc();
- }
- }
- if (addr >= 4)
- card_16[addr] = val;
-}
-
-uint8_t um8881f_read(int func, int addr, void *priv)
-{
- return card_16[addr];
-}
-
-void um8886f_write(int func, int addr, uint8_t val, void *priv)
-{
- if (addr >= 4)
- card_18[addr] = val;
-}
-
-uint8_t um8886f_read(int func, int addr, void *priv)
-{
- return card_18[addr];
-}
-
-void um8881f_init()
-{
- pci_add_specific(16, um8881f_read, um8881f_write, NULL);
- pci_add_specific(18, um8886f_read, um8886f_write, NULL);
-
- card_16[0] = card_18[0] = 0x60; /*UMC*/
- card_16[1] = card_18[1] = 0x10;
- card_16[2] = 0x81; card_16[3] = 0x88; /*UM8881 Host - PCI bridge*/
- card_18[2] = 0x86; card_18[3] = 0x88; /*UM8886 PCI - ISA bridge*/
-}
diff --git a/src/um8881f.h b/src/um8881f.h
deleted file mode 100644
index 4ee34640d..000000000
--- a/src/um8881f.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* Copyright holders: Sarah Walker
- see COPYING for more details
-*/
-void um8881f_init();