From 5ba2ad529d5dc12aaa1236c9947396e28af7158a Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 16 Jul 2023 00:01:59 -0300 Subject: [PATCH 1/4] printer: Fix Windows build --- src/printer/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/printer/CMakeLists.txt b/src/printer/CMakeLists.txt index 4f4158476..dea0c7fbe 100644 --- a/src/printer/CMakeLists.txt +++ b/src/printer/CMakeLists.txt @@ -26,5 +26,9 @@ find_package(PkgConfig REQUIRED) pkg_check_modules(FREETYPE REQUIRED IMPORTED_TARGET freetype2) target_link_libraries(86Box PkgConfig::FREETYPE) if(STATIC_BUILD) + if(QT) + # Qt provides its own version of harfbuzz which leads to duplicated symbols. + target_link_options(86Box PRIVATE "LINKER:--allow-multiple-definition") + endif() target_link_libraries(86Box -static ${FREETYPE_STATIC_LIBRARIES}) endif() From 7d41b46c5e600773cb5785a0af74224b42556a35 Mon Sep 17 00:00:00 2001 From: richardg867 Date: Tue, 18 Jul 2023 11:58:09 -0300 Subject: [PATCH 2/4] machine: Declare onboard slots on ASUS P2B-LS, fixes Adaptec SCSI hang on some BIOS versions --- src/machine/m_at_slot1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 3cedb669a..f13fe72cd 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -200,8 +200,8 @@ machine_at_p2bls_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* SCSI */ - pci_register_slot(0x07, PCI_CARD_NORMAL, 3, 4, 1, 2); /* LAN */ + pci_register_slot(0x06, PCI_CARD_SCSI, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_NETWORK, 3, 4, 1, 2); pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); From 7ee94927639dfe46a61cca96965c3b1e1e2af327 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 20 Jul 2023 20:28:19 -0300 Subject: [PATCH 3/4] AudioPCI: Fix nonsensical read masking on interrupt status register --- src/sound/snd_audiopci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/snd_audiopci.c b/src/sound/snd_audiopci.c index 6b9d8d792..533cd5430 100644 --- a/src/sound/snd_audiopci.c +++ b/src/sound/snd_audiopci.c @@ -621,11 +621,11 @@ es1371_inb(uint16_t port, void *p) audiopci_log("[R] STATUS 8-15 = %02X\n", ret); break; case 0x06: - ret = (dev->int_status >> 16) & 0x0f; + ret = (dev->int_status >> 16) & 0xff; audiopci_log("[R] STATUS 16-23 = %02X\n", ret); break; case 0x07: - ret = ((dev->int_status >> 24) & 0x03) | 0xfc; + ret = (dev->int_status >> 24) & 0xff; audiopci_log("[R] STATUS 24-31 = %02X\n", ret); break; From c5b50fabf04d5290cbb311fa4dd0d94800a06e11 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 20 Jul 2023 21:59:26 -0300 Subject: [PATCH 4/4] AudioPCI: Fix GPIO quirk for returning back to ES1371 revision ID --- src/sound/snd_audiopci.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sound/snd_audiopci.c b/src/sound/snd_audiopci.c index 533cd5430..b46a40dda 100644 --- a/src/sound/snd_audiopci.c +++ b/src/sound/snd_audiopci.c @@ -311,7 +311,13 @@ es1371_reset(void *p) /* Interrupt/Chip Select Control Register, Address 00H Addressable as longword only */ - dev->int_status = 0x7ffffec0; + /* Bit 13 is supposed to be always 1 on ES1371, and one of the GPIO interrupt + flags on ES1373. The 5.12.01 WDM driver only initializes its GPIO interrupt + handler on chip revisions which support this feature (1371 >= 0x04 and 5880 + all), but calls it anyway during interrupt servicing regardless of revision, + crashing on ES1371 as soon as an interrupt arrives while that bit is set. + Pending hardware research because actual early ES1371 cards are rare. */ + dev->int_status = 0x7fffdec0; /* UART Status Register, Address 09H Addressable as byte only */ @@ -1551,7 +1557,7 @@ es1371_pci_read(int func, int addr, void *p) return 0x00; case 0x08: - return 0x08; /* Revision ID - 0x02 (datasheet, VMware) has issues with the 2001 Creative WDM driver */ + return 0x02; /* Revision ID - 0x02 is supposed to be early Ensoniq-branded ES1371 but unconfirmed */ case 0x09: return 0x00; /* Multimedia audio device */ case 0x0a: