Made sure the dummy "None"/"Internal" devices never get initialized and fixed some PCI AGP bridge mess (including AGP-less 440BX/ZX/GX erroneously initializing the 440LX/EX AGP bridge), fixes #3696.

This commit is contained in:
OBattler
2023-10-14 06:45:45 +02:00
parent 02fb5ffbd8
commit 7013949310
13 changed files with 101 additions and 82 deletions

View File

@@ -817,10 +817,12 @@ pci_add_bridge(uint8_t agp, uint8_t (*read)(int func, int addr, void *priv), voi
pci_card_t *card;
uint8_t bridge_slot = agp ? pci_find_slot(PCI_ADD_AGPBRIDGE, 0xff) : last_normal_pci_card_id;
card = &pci_cards[bridge_slot];
card->read = read;
card->write = write;
card->priv = priv;
if (bridge_slot != PCI_CARD_INVALID) {
card = &pci_cards[bridge_slot];
card->read = read;
card->write = write;
card->priv = priv;
}
*slot = bridge_slot;
}