mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-07 10:26:04 +08:00
Merge pull request #5683 from smunaut/pci-bus-fixes
PCI bus improvements : Allow device to see full size access
This commit is contained in:
commit
383ed6e4cf
@ -84,7 +84,7 @@ public:
|
||||
/* NTS: If I recall, this virtual function call means that we'll call the
|
||||
* C++ subclass's config_read() NOT our own--right? */
|
||||
for (Bitu i=0;i < iolen;i++)
|
||||
v += ((config_read((uint8_t)(regnum+i),1)&0xFF) << ((iolen-i-1)*8));
|
||||
v += ((config_read((uint8_t)(regnum+i),1)&0xFF) << (i*8));
|
||||
}
|
||||
|
||||
return v;
|
||||
|
@ -346,8 +346,9 @@ static void InitializePCI(void) {
|
||||
PCI_ReadHandler[0].Install(0xcf8,read_pci_addr,IO_MD);
|
||||
// install PCI-register read/write handlers
|
||||
for (Bitu ct=0;ct<4;ct++) {
|
||||
PCI_WriteHandler[1+ct].Install(0xcfc+ct,write_pci,IO_MB);
|
||||
PCI_ReadHandler[1+ct].Install(0xcfc+ct,read_pci,IO_MB);
|
||||
Bitu msk = IO_MB | ((ct & 1) ? 0 : IO_MW) | ((ct & 3) ? 0 : IO_MD);;
|
||||
PCI_WriteHandler[1+ct].Install(0xcfc+ct,write_pci,msk);
|
||||
PCI_ReadHandler[1+ct].Install(0xcfc+ct,read_pci,msk);
|
||||
}
|
||||
|
||||
callback_pci.Install(&PCI_PM_Handler,CB_IRETD,"PCI PM");
|
||||
|
Loading…
x
Reference in New Issue
Block a user