Fixed SMM, overhauled the emulation of the VIA northbridges, and added the Via Apollo VP3.

This commit is contained in:
OBattler
2020-04-01 08:59:29 +02:00
parent 2c8bcea38c
commit b8b198a56a
37 changed files with 1915 additions and 5024 deletions

View File

@@ -469,8 +469,13 @@ piix_write(int func, int addr, uint8_t val, void *priv)
uint8_t *fregs;
/* Return on unsupported function. */
if (func > dev->max_func)
return;
if (dev->max_func > 0) {
if (func > dev->max_func)
return;
} else {
if (func > 1)
return;
}
piix_log("PIIX function %i write: %02X to %02X\n", func, val, addr);
fregs = (uint8_t *) dev->regs[func];
@@ -872,7 +877,7 @@ piix_read(int func, int addr, void *priv)
uint8_t ret = 0xff, *fregs;
/* Return on unsupported function. */
if (func <= dev->max_func) {
if ((func <= dev->max_func) || ((func == 1) && (dev->max_func == 0))) {
fregs = (uint8_t *) dev->regs[func];
ret = fregs[addr];