From 32b3f1930d762a587915c5a83a8df8109a5441b7 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 14 Oct 2025 01:10:34 +0600 Subject: [PATCH] Fix bad PCI slots for onboard Mach64 PCI devices (#6341) --- src/video/vid_ati_mach64.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index f809a6c0e..bd65a1376 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -4897,7 +4897,7 @@ mach64_common_init(const device_t *info) mach64_io_set(mach64); if (info->flags & DEVICE_PCI) - pci_add_card(PCI_ADD_NORMAL, mach64_pci_read, mach64_pci_write, mach64, &mach64->pci_slot); + pci_add_card((info->local & (1 << 19)) ? PCI_ADD_VIDEO : PCI_ADD_NORMAL, mach64_pci_read, mach64_pci_write, mach64, &mach64->pci_slot); mach64->pci_regs[PCI_REG_COMMAND] = 3; mach64->pci_regs[0x30] = 0x00; @@ -4989,7 +4989,8 @@ mach64ct_init(const device_t *info) ati_eeprom_load(&mach64->eeprom, "mach64ct.nvr", 1); - rom_init(&mach64->bios_rom, BIOS_ROMCT_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); + if (!(info->local & (1 << 19))) + rom_init(&mach64->bios_rom, BIOS_ROMCT_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); mem_mapping_disable(&mach64->bios_rom.mapping);