From 560a43271f01fddd720f1ba3fdc0f95c2190a5cd Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 15 Oct 2020 23:54:18 +0200 Subject: [PATCH 1/2] Fixed the ASUS TX97, renamed m_at_socket7_s7.c to m_at_socket7.c, added the Intel 82091AA ports to sio/sio_detect.c, and added the SIO_DETECT parameter to the makefile to build with that file in. --- .../{m_at_socket7_s7.c => m_at_socket7.c} | 23 ++------- src/sio/sio_detect.c | 6 ++- src/win/Makefile.mingw | 49 ++++++++++++------- 3 files changed, 38 insertions(+), 40 deletions(-) rename src/machine/{m_at_socket7_s7.c => m_at_socket7.c} (97%) diff --git a/src/machine/m_at_socket7_s7.c b/src/machine/m_at_socket7.c similarity index 97% rename from src/machine/m_at_socket7_s7.c rename to src/machine/m_at_socket7.c index 89e1051c3..151c4c82b 100644 --- a/src/machine/m_at_socket7_s7.c +++ b/src/machine/m_at_socket7.c @@ -860,13 +860,8 @@ machine_at_tx97_init(const machine_t *model) { int ret; -#if 0 ret = bios_load_linear(L"roms/machines/tx97/0112.001", 0x000e0000, 131072, 0); -#else - ret = bios_load_linear(L"roms/machines/tx97/0112.001", - 0x000c0000, 262144, 0); -#endif if (bios_only || !ret) return ret; @@ -875,7 +870,6 @@ machine_at_tx97_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); -#if 0 pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); @@ -883,22 +877,11 @@ machine_at_tx97_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); -#else - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ -#endif device_add(&i430tx_device); - // device_add(&piix4_device); - device_add(&piix4e_device); + device_add(&piix4_device); device_add(&keyboard_ps2_ami_pci_device); - // device_add(&w83877tf_acorp_device); - device_add(&pc87307_15c_device); - // device_add(&intel_flash_bxt_device); - device_add(&sst_flash_29ee020_device); + device_add(&w83877tf_acorp_device); + device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0x3, 128); hwm_values_t machine_hwm = { diff --git a/src/sio/sio_detect.c b/src/sio/sio_detect.c index e322ae544..8f83db3e3 100644 --- a/src/sio/sio_detect.c +++ b/src/sio/sio_detect.c @@ -74,7 +74,7 @@ sio_detect_init(const device_t *info) device_add(&fdc_at_smc_device); - io_sethandler(0x0024, 0x0004, + io_sethandler(0x0022, 0x0006, sio_detect_read, NULL, NULL, sio_detect_write, NULL, NULL, dev); io_sethandler(0x002e, 0x0002, sio_detect_read, NULL, NULL, sio_detect_write, NULL, NULL, dev); @@ -86,10 +86,14 @@ sio_detect_init(const device_t *info) sio_detect_read, NULL, NULL, sio_detect_write, NULL, NULL, dev); io_sethandler(0x0250, 0x0003, sio_detect_read, NULL, NULL, sio_detect_write, NULL, NULL, dev); + io_sethandler(0x026e, 0x0002, + sio_detect_read, NULL, NULL, sio_detect_write, NULL, NULL, dev); io_sethandler(0x0279, 0x0001, sio_detect_read, NULL, NULL, sio_detect_write, NULL, NULL, dev); io_sethandler(0x0370, 0x0002, sio_detect_read, NULL, NULL, sio_detect_write, NULL, NULL, dev); + io_sethandler(0x0398, 0x0002, + sio_detect_read, NULL, NULL, sio_detect_write, NULL, NULL, dev); io_sethandler(0x03e3, 0x0001, sio_detect_read, NULL, NULL, sio_detect_write, NULL, NULL, dev); io_sethandler(0x03f0, 0x0002, diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index fd05954c2..64574e56a 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -45,6 +45,12 @@ ifeq ($(DEV_BUILD), y) ifndef CYRIX_6X86 CYRIX_6X86 := y endif + ifndef DELLS4 + DELLS4 := y + endif + ifndef GUSMAX + GUSMAX := y + endif ifndef HEDAKA HEDAKA := y endif @@ -54,6 +60,9 @@ ifeq ($(DEV_BUILD), y) ifndef MGA MGA := y endif + ifndef NO_SIO + NO_SIO := y + endif ifndef OPEN_AT OPEN_AT := y endif @@ -81,6 +90,9 @@ ifeq ($(DEV_BUILD), y) ifndef SIEMENS SIEMENS := y endif + ifndef SIO_DETECT + SIO_DETECT := y + endif ifndef STPC STPC := y endif @@ -99,15 +111,6 @@ ifeq ($(DEV_BUILD), y) ifndef XL24 XL24 := y endif - ifndef NO_SIO - NO_SIO := y - endif - ifndef GUSMAX - GUSMAX := y - endif - ifndef DELLS4 - DELLS4 := y - endif else ifndef DEBUG DEBUG := n @@ -127,6 +130,12 @@ else ifndef CYRIX_6X86 CYRIX_6X86 := n endif + ifndef DELLS4 + DELLS4 := n + endif + ifndef GUSMAX + GUSMAX := n + endif ifndef HEDAKA HEDAKA := n endif @@ -136,6 +145,9 @@ else ifndef MGA MGA := n endif + ifndef NO_SIO + NO_SIO := n + endif ifndef OPEN_AT OPEN_AT := n endif @@ -163,6 +175,9 @@ else ifndef SIEMENS SIEMENS := n endif + ifndef SIO_DETECT + SIO_DETECT := n + endif ifndef STPC STPC := y endif @@ -181,15 +196,6 @@ else ifndef XL24 XL24 := n endif - ifndef NO_SIO - NO_SIO := n - endif - ifndef GUSMAX - GUSMAX := n - endif - ifndef DELLS4 - DELLS4 := n - endif endif # Defaults for several build options (possibly defined in a chained file.) @@ -568,6 +574,11 @@ ifeq ($(SIEMENS), y) OPTS += -DUSE_SIEMENS endif +ifeq ($(SIO_DETECT), y) +OPTS += -DUSE_SIO_DETECT +DEVBROBJ += sio_detect.o +endif + ifeq ($(STPC), y) OPTS += -DUSE_STPC DEVBROBJ += stpc.o @@ -656,7 +667,7 @@ MCHOBJ := machine.o machine_table.o \ m_ps2_isa.o m_ps2_mca.o \ m_at_compaq.o \ m_at_286_386sx.o m_at_386dx_486.o \ - m_at_socket4_5.o m_at_socket7_s7.o m_at_sockets7.o \ + m_at_socket4_5.o m_at_socket7.o m_at_sockets7.o \ m_at_socket8.o m_at_slot1.o m_at_slot2.o m_at_socket370.o \ m_at_misc.o From 8d1092688a874e46033d84f0cf05734b35aadce7 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 15 Oct 2020 23:55:29 +0200 Subject: [PATCH 2/2] Fixed a warning in video/vid_s3.c. --- src/video/vid_s3.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index 92667b268..6c062d30d 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -2581,7 +2581,6 @@ static uint8_t s3_accel_in(uint16_t port, void *p) { s3_t *s3 = (s3_t *)p; - svga_t *svga = &s3->svga; int temp; if (!s3->enable_8514)