Merge pull request #2498 from jriwanek-forks/master-up

Missing ports from M&K
This commit is contained in:
Jasmine Iwanek
2022-07-23 02:14:51 -04:00
committed by GitHub
5 changed files with 42 additions and 3 deletions

View File

@@ -471,6 +471,7 @@ pci_bridge_init(const device_t *info)
pci_bridge_reset(dev);
dev->slot = pci_add_card(AGP_BRIDGE(dev->local) ? PCI_ADD_AGPBRIDGE : PCI_ADD_BRIDGE, pci_bridge_read, pci_bridge_write, dev);
interrupt_count = sizeof(interrupts);
interrupt_mask = interrupt_count - 1;
if (dev->slot < 32) {

View File

@@ -28,7 +28,6 @@
#include <86box/i2c.h>
#include <86box/smbus.h>
#ifdef ENABLE_SMBUS_PIIX4_LOG
int smbus_piix4_do_log = ENABLE_SMBUS_PIIX4_LOG;
@@ -99,7 +98,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
{
smbus_piix4_t *dev = (smbus_piix4_t *) priv;
uint8_t smbus_addr, cmd, read, block_len, prev_stat;
uint16_t timer_bytes = 0, i;
uint16_t timer_bytes = 0, i = 0;
smbus_piix4_log("SMBus PIIX4: write(%02X, %02X)\n", addr, val);

View File

@@ -332,6 +332,11 @@ extern int machine_get_ram_granularity(int m);
extern int machine_get_type(int m);
extern void machine_close(void);
extern uint8_t machine_get_p1(void);
extern void machine_load_p1(int m);
extern uint32_t machine_get_gpi(void);
extern void machine_load_gpi(int m);
extern void machine_set_gpi(uint32_t gpi);
/* Initialization functions for boards and systems. */
extern void machine_common_init(const machine_t *);

View File

@@ -53,7 +53,6 @@ typedef struct {
void *i2c;
} smbus_ali7101_t;
extern void smbus_piix4_remap(smbus_piix4_t *dev, uint16_t new_io_base, uint8_t enable);
extern void smbus_piix4_setclock(smbus_piix4_t *dev, int clock);

View File

@@ -10967,6 +10967,41 @@ const machine_t machines[] = {
}
};
/* Saved copies - jumpers get applied to these.
We use also machine_gpio to store IBM PC/XT jumpers as they need more than one byte. */
static uint16_t machine_p1;
static uint32_t machine_gpio;
uint8_t
machine_get_p1(void)
{
return machine_p1;
}
void
machine_load_p1(int m)
{
machine_p1 = machines[machine].kbc_p1;
}
uint32_t
machine_get_gpio(void)
{
return machine_gpio;
}
void
machine_load_gpio(int m)
{
machine_gpio = machines[machine].gpio;
}
void
machine_set_gpio(uint32_t gpio)
{
machine_gpio = gpio;
}
int
machine_count(void)
{