Added the AMI Apollo.
This commit is contained in:
@@ -366,6 +366,7 @@ extern int machine_at_p54tp4xe_init(const machine_t *);
|
||||
extern int machine_at_endeavor_init(const machine_t *);
|
||||
extern int machine_at_zappa_init(const machine_t *);
|
||||
extern int machine_at_mb500n_init(const machine_t *);
|
||||
extern int machine_at_apollo_init(const machine_t *);
|
||||
#if defined(DEV_BRANCH) && defined(USE_VECTRA54)
|
||||
extern int machine_at_vectra54_init(const machine_t *);
|
||||
#endif
|
||||
|
||||
@@ -93,6 +93,7 @@ extern const device_t amstrad_nvr_device;
|
||||
extern const device_t ibmat_nvr_device;
|
||||
extern const device_t piix4_nvr_device;
|
||||
extern const device_t ls486e_nvr_device;
|
||||
extern const device_t ami_apollo_nvr_device;
|
||||
extern const device_t via_nvr_device;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ extern const device_t fdc37c932fr_device;
|
||||
extern const device_t fdc37c932qf_device;
|
||||
extern const device_t fdc37c935_device;
|
||||
extern const device_t i82091aa_device;
|
||||
extern const device_t i82091aa_398_device;
|
||||
extern const device_t i82091aa_ide_device;
|
||||
extern const device_t pc87306_device;
|
||||
extern const device_t pc87307_device;
|
||||
|
||||
@@ -426,6 +426,7 @@ machine_at_zappa_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_mb500n_init(const machine_t *model)
|
||||
{
|
||||
@@ -456,6 +457,37 @@ machine_at_mb500n_init(const machine_t *model)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_apollo_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear(L"roms/machines/apollo/S728P.ROM",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
device_add(&ami_apollo_nvr_device);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add(&pc87332_ps1_device);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#if defined(DEV_BRANCH) && defined(USE_VECTRA54)
|
||||
int
|
||||
machine_at_vectra54_init(const machine_t *model)
|
||||
|
||||
@@ -278,6 +278,7 @@ const machine_t machines[] = {
|
||||
|
||||
/* 430FX */
|
||||
{ "[i430FX] Acer V30", "acerv30", MACHINE_TYPE_SOCKET5, MACHINE_CPUS_PENTIUM_S5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 128, 8, 127, machine_at_acerv30_init, NULL },
|
||||
{ "[i430FX] AMI Apollo", "apollo", MACHINE_TYPE_SOCKET5, MACHINE_CPUS_PENTIUM_S5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 128, 8, 127, machine_at_apollo_init, NULL },
|
||||
#if defined(DEV_BRANCH) && defined(USE_VECTRA54)
|
||||
{ "[i430FX] HP Vectra VL 5 Series 4", "vectra54", MACHINE_TYPE_SOCKET5, MACHINE_CPUS_PENTIUM_S5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 128, 8, 511, machine_at_vectra54_init, NULL },
|
||||
#endif
|
||||
|
||||
53
src/nvr_at.c
53
src/nvr_at.c
@@ -287,7 +287,8 @@
|
||||
#define RTC_REGS 14 /* number of registers */
|
||||
|
||||
#define FLAG_LS_HACK 0x01
|
||||
#define FLAG_PIIX4 0x02
|
||||
#define FLAG_APOLLO_HACK 0x02
|
||||
#define FLAG_PIIX4 0x04
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -703,9 +704,7 @@ nvr_read(uint16_t addr, void *priv)
|
||||
case 0x2e:
|
||||
case 0x2f:
|
||||
if (local->flags & FLAG_LS_HACK) {
|
||||
checksum = (nvr->regs[0x2e] << 8) | nvr->regs[0x2f];
|
||||
if (nvr->regs[0x2c] & 0x80)
|
||||
checksum -= 0x80;
|
||||
checksum = ((nvr->regs[0x2e] << 8) | nvr->regs[0x2f]) - (nvr->regs[0x2c] & 0x80);
|
||||
if (local->addr[addr_id] == 0x2e)
|
||||
ret = checksum >> 8;
|
||||
else
|
||||
@@ -714,6 +713,25 @@ nvr_read(uint16_t addr, void *priv)
|
||||
ret = nvr->regs[local->addr[addr_id]];
|
||||
break;
|
||||
|
||||
case 0x3e:
|
||||
case 0x3f:
|
||||
if (local->flags & FLAG_APOLLO_HACK) {
|
||||
checksum = ((nvr->regs[0x3e] << 8) | nvr->regs[0x3f]) - (nvr->regs[0x52] & 0x0c);
|
||||
if (local->addr[addr_id] == 0x3e)
|
||||
ret = checksum >> 8;
|
||||
else
|
||||
ret = checksum & 0xff;
|
||||
} else
|
||||
ret = nvr->regs[local->addr[addr_id]];
|
||||
break;
|
||||
|
||||
case 0x52:
|
||||
if (local->flags & FLAG_APOLLO_HACK)
|
||||
ret = nvr->regs[local->addr[addr_id]] & 0xf3;
|
||||
else
|
||||
ret = nvr->regs[local->addr[addr_id]];
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = nvr->regs[local->addr[addr_id]];
|
||||
break;
|
||||
@@ -894,13 +912,17 @@ nvr_at_init(const device_t *info)
|
||||
local->cent = 0xff;
|
||||
break;
|
||||
|
||||
case 5: /* Lucky Star LS-486E */
|
||||
local->flags |= FLAG_LS_HACK;
|
||||
/*FALLTHROUGH*/
|
||||
|
||||
case 1: /* standard AT */
|
||||
case 5: /* Lucky Star LS-486E */
|
||||
case 6: /* AMI Apollo */
|
||||
if (info->local == 9)
|
||||
local->flags |= FLAG_PIIX4;
|
||||
else {
|
||||
if ((info->local & 7) == 5)
|
||||
local->flags |= FLAG_LS_HACK;
|
||||
else if ((info->local & 7) == 6)
|
||||
local->flags |= FLAG_APOLLO_HACK;
|
||||
}
|
||||
nvr->irq = 8;
|
||||
local->cent = RTC_CENTURY_AT;
|
||||
break;
|
||||
@@ -922,7 +944,7 @@ nvr_at_init(const device_t *info)
|
||||
local->def = 0xff;
|
||||
break;
|
||||
|
||||
case 6: /* VIA VT82C586B */
|
||||
case 7: /* VIA VT82C586B */
|
||||
nvr->irq = 8;
|
||||
local->cent = RTC_CENTURY_VIA;
|
||||
break;
|
||||
@@ -1049,11 +1071,20 @@ const device_t ls486e_nvr_device = {
|
||||
NULL
|
||||
};
|
||||
|
||||
const device_t via_nvr_device = {
|
||||
"VIA PC/AT NVRAM",
|
||||
const device_t ami_apollo_nvr_device = {
|
||||
"AMI Apollo PC/AT NVRAM",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
14,
|
||||
nvr_at_init, nvr_at_close, NULL,
|
||||
NULL, nvr_at_speed_changed,
|
||||
NULL
|
||||
};
|
||||
|
||||
const device_t via_nvr_device = {
|
||||
"VIA PC/AT NVRAM",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
15,
|
||||
nvr_at_init, nvr_at_close, NULL,
|
||||
NULL, nvr_at_speed_changed,
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -285,6 +285,16 @@ const device_t i82091aa_device = {
|
||||
};
|
||||
|
||||
|
||||
const device_t i82091aa_398_device = {
|
||||
"Intel 82091AA Super I/O (Port 398h)",
|
||||
0,
|
||||
0x148,
|
||||
i82091aa_init, i82091aa_close, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
const device_t i82091aa_ide_device = {
|
||||
"Intel 82091AA Super I/O (With IDE)",
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user