Added the Super PC/Turbo TX, ASUS P/I-486SP3, ASUS PVI-486SP3C, PC Partner MB520N, MSI MS-6168, and Packard bell Bora Pro.

This commit is contained in:
OBattler
2021-04-06 07:17:38 +02:00
parent 03fdcf7a9e
commit 0415351497
19 changed files with 539 additions and 118 deletions

View File

@@ -13,8 +13,8 @@
# Copyright 2020,2021 David Hrdlička.
#
add_library(chipset OBJECT acc2168.c cs8230.c ali1217.c ali1429.c headland.c intel_82335.c
cs4031.c intel_420ex.c intel_4x0.c intel_sio.c intel_piix.c ../ioapic.c
add_library(chipset OBJECT acc2168.c cs8230.c ali1217.c ali1429.c ali1489.c headland.c
intel_82335.c cs4031.c intel_420ex.c intel_4x0.c intel_sio.c intel_piix.c ../ioapic.c
neat.c opti283.c opti291.c opti495.c opti895.c opti5x7.c scamp.c scat.c
sis_85c310.c sis_85c4xx.c sis_85c496.c sis_85c50x.c
umc_8886.c umc_8890.c umc_hb4.c
@@ -27,10 +27,6 @@ if(I450KX)
target_sources(chipset PRIVATE intel_i450kx.c)
endif()
if(M1489)
target_sources(chipset PRIVATE ali1489.c)
endif()
if(M154X)
target_sources(chipset PRIVATE ali1531.c)
target_sources(chipset PRIVATE ali1543.c)

View File

@@ -25,14 +25,10 @@
#define HAVE_STDARG_H
#include <86box/86box.h>
#include "cpu.h"
#include <86box/timer.h>
#include <86box/io.h>
#include <86box/device.h>
#include <86box/keyboard.h>
#include <86box/mem.h>
#include <86box/smram.h>
#include <86box/fdd.h>
#include <86box/fdc.h>
#include <86box/pic.h>
#include <86box/hdc.h>
#include <86box/hdc_ide.h>
@@ -237,6 +233,8 @@ vt82c49x_write(uint16_t addr, uint8_t val, void *priv)
ide_set_side(0, (val & 0x40) ? 0x376 : 0x3f6);
if (val & 0x01)
ide_pri_enable();
pclog("VT82C496 IDE now %sabled as %sary\n", (val & 0x01) ? "en": "dis",
(val & 0x40) ? "second" : "prim");
}
break;
}
@@ -257,7 +255,7 @@ vt82c49x_read(uint16_t addr, void *priv)
ret = pic_elcr_read(dev->index, &pic2) | (dev->regs[dev->index] & 0x01);
else if (dev->index == 0x62)
ret = pic_elcr_read(dev->index, &pic) | (dev->regs[dev->index] & 0x07);
else
else if (dev->index < 0x80)
ret = dev->regs[dev->index];
break;
}
@@ -266,6 +264,16 @@ vt82c49x_read(uint16_t addr, void *priv)
}
static void
vt82c49x_reset(void *priv)
{
uint8_t i;
for (i = 0; i < 256; i++)
vt82c49x_write(i, 0x00, priv);
}
static void
vt82c49x_close(void *priv)
{
@@ -316,6 +324,16 @@ const device_t via_vt82c49x_device = {
};
const device_t via_vt82c49x_pci_device = {
"VIA VT82C49X PCI",
DEVICE_PCI,
0,
vt82c49x_init, vt82c49x_close, vt82c49x_reset,
{ NULL }, NULL, NULL,
NULL
};
const device_t via_vt82c49x_ide_device = {
"VIA VT82C49X (With IDE)",
0,
@@ -324,3 +342,13 @@ const device_t via_vt82c49x_ide_device = {
{ NULL }, NULL, NULL,
NULL
};
const device_t via_vt82c49x_pci_ide_device = {
"VIA VT82C49X PCI (With IDE)",
DEVICE_PCI,
1,
vt82c49x_init, vt82c49x_close, vt82c49x_reset,
{ NULL }, NULL, NULL,
NULL
};

View File

@@ -32,55 +32,85 @@
typedef struct vt82c505_t
{
uint8_t pci_conf[256];
uint8_t index;
uint8_t pci_conf[256];
} vt82c505_t;
static void
vt82c505_write(int func, int addr, uint8_t val, void *priv)
{
vt82c505_t *dev = (vt82c505_t *) priv;
uint8_t irq;
const uint8_t irq_array[8] = { 0, 5, 9, 10, 11, 14, 15, 0 };
/* Read-Only Registers */
switch (addr) {
case 0x00: case 0x01:
case 0x02: case 0x03:
return;
}
pclog("vt82c505_write(%02X, %02X, %02X)\n", func, addr, val);
if (func != 0)
return;
switch(addr) {
/* RX00-07h: Mandatory header field */
case 0x04:
dev->pci_conf[0x04] = (dev->pci_conf[0x04] & ~0x07) | (val & 0x07);
dev->pci_conf[addr] = (dev->pci_conf[addr] & 0xbf) | (val & 0x40);
break;
case 0x07:
dev->pci_conf[0x07] &= ~(val & 0x90);
dev->pci_conf[addr] &= ~(val & 0x90);
break;
case 0x90:
if ((dev->pci_conf[0x90] & 0x08) && ((val & 0x07) != 0))
pci_set_irq_routing(PCI_INTC, val & 0x07);
/* RX80-9F: VT82C505 internal configuration registers */
case 0x80:
dev->pci_conf[addr] = (dev->pci_conf[addr] & 0x0f) | (val & 0xf0);
break;
case 0x81: case 0x84: case 0x85: case 0x87:
case 0x88: case 0x89: case 0x8a: case 0x8b:
case 0x8c: case 0x8d: case 0x8e: case 0x8f:
case 0x92: case 0x94:
dev->pci_conf[addr] = val;
break;
case 0x82:
dev->pci_conf[addr] = val & 0xdb;
break;
case 0x83:
dev->pci_conf[addr] = val & 0xf9;
break;
case 0x86:
dev->pci_conf[addr] = val & 0xef;
/* Bit 7 switches between the two PCI configuration mechanisms:
0 = configuration mechanism 1, 1 = configuration mechanism 2 */
pci_set_pmc(!(val & 0x80));
break;
case 0x90:
dev->pci_conf[addr] = val;
irq = irq_array[val & 0x07];
if ((val & 0x08) && (irq != 0))
pci_set_irq_routing(PCI_INTC, irq);
else
pci_set_irq_routing(PCI_INTC, PCI_IRQ_DISABLED);
if ((dev->pci_conf[0x90] & 0x80) && (((val & 0x07) << 4) != 0))
pci_set_irq_routing(PCI_INTD, ((val & 0x07) << 4));
irq = irq_array[(val & 0x70) >> 4];
if ((val & 0x80) && (irq != 0))
pci_set_irq_routing(PCI_INTD, irq);
else
pci_set_irq_routing(PCI_INTD, PCI_IRQ_DISABLED);
break;
case 0x91:
if ((dev->pci_conf[0x91] & 0x08) && ((val & 0x07) != 0))
pci_set_irq_routing(PCI_INTA, val & 0x07);
dev->pci_conf[addr] = val;
irq = irq_array[val & 0x07];
if ((val & 0x08) && (irq != 0))
pci_set_irq_routing(PCI_INTA, irq);
else
pci_set_irq_routing(PCI_INTA, PCI_IRQ_DISABLED);
if ((dev->pci_conf[0x91] & 0x80) && (((val & 0x07) << 4) != 0))
pci_set_irq_routing(PCI_INTB, ((val & 0x07) << 4));
irq = irq_array[(val & 0x70) >> 4];
if ((val & 0x80) && (irq != 0))
pci_set_irq_routing(PCI_INTB, irq);
else
pci_set_irq_routing(PCI_INTB, PCI_IRQ_DISABLED);
break;
case 0x93:
dev->pci_conf[addr] = val & 0xe0;
break;
}
}
@@ -91,8 +121,42 @@ vt82c505_read(int func, int addr, void *priv)
vt82c505_t *dev = (vt82c505_t *) priv;
uint8_t ret = 0xff;
if (func != 0)
return ret;
ret = dev->pci_conf[addr];
pclog("vt82c505_read(%02X, %02X) = %02X\n", func, addr, ret);
return ret;
}
static void
vt82c505_out(uint16_t addr, uint8_t val, void *priv)
{
vt82c505_t *dev = (vt82c505_t *) priv;
pclog("vt82c505_out(%04X, %02X)\n", addr, val);
if (addr == 0xa8)
dev->index = val;
else if ((addr == 0xa9) && (dev->index >= 0x80) && (dev->index <= 0x9f))
vt82c505_write(0, dev->index, val, priv);
}
static uint8_t
vt82c505_in(uint16_t addr, void *priv)
{
vt82c505_t *dev = (vt82c505_t *) priv;
uint8_t ret = 0xff;
if ((addr == 0xa9) && (dev->index >= 0x80) && (dev->index <= 0x9f))
ret = vt82c505_read(0, dev->index, priv);
pclog("vt82c505_in(%04X) = %02X\n", addr, ret);
return ret;
}
@@ -100,10 +164,28 @@ vt82c505_read(int func, int addr, void *priv)
static void
vt82c505_reset(void *priv)
{
pci_set_irq_routing(PCI_INTA, PCI_IRQ_DISABLED);
pci_set_irq_routing(PCI_INTB, PCI_IRQ_DISABLED);
pci_set_irq_routing(PCI_INTC, PCI_IRQ_DISABLED);
pci_set_irq_routing(PCI_INTD, PCI_IRQ_DISABLED);
vt82c505_t *dev = (vt82c505_t *) malloc(sizeof(vt82c505_t));
int i;
dev->pci_conf[0x04] = 0x07;
dev->pci_conf[0x07] = 0x00;
for (i = 0x80; i <= 0x9f; i++) {
switch (i) {
case 0x81:
vt82c505_write(0, i, 0x01, priv);
break;
case 0x84:
vt82c505_write(0, i, 0x03, priv);
break;
case 0x93:
vt82c505_write(0, i, 0x40, priv);
break;
default:
vt82c505_write(0, i, 0x00, priv);
break;
}
}
pic_reset();
}
@@ -128,19 +210,16 @@ vt82c505_init(const device_t *info)
dev->pci_conf[0x00] = 0x06;
dev->pci_conf[0x01] = 0x11;
dev->pci_conf[0x02] = 0x05;
dev->pci_conf[0x03] = 0x05;
dev->pci_conf[0x04] = 0x07;
dev->pci_conf[0x07] = 0x90;
dev->pci_conf[0x07] = 0x00;
dev->pci_conf[0x81] = 0x01;
dev->pci_conf[0x84] = 0x03;
dev->pci_conf[0x93] = 0x40;
io_sethandler(0x0a8, 0x0002, vt82c505_in, NULL, NULL, vt82c505_out, NULL, NULL, dev);
return dev;
}

View File

@@ -24,9 +24,7 @@ extern const device_t acc2168_device;
/* ALi */
extern const device_t ali1217_device;
extern const device_t ali1429_device;
#if defined(DEV_BRANCH) && defined(USE_M1489)
extern const device_t ali1489_device;
#endif
#if defined(DEV_BRANCH) && defined(USE_M154X)
extern const device_t ali1531_device;
extern const device_t ali1543_device;
@@ -129,9 +127,10 @@ extern const device_t umc_8886f_device;
extern const device_t umc_8886af_device;
/* VIA */
extern const device_t via_vt82c49x_device;
extern const device_t via_vt82c49x_ide_device;
extern const device_t via_vt82c505_device;
extern const device_t via_vt82c49x_device;
extern const device_t via_vt82c49x_pci_device;
extern const device_t via_vt82c49x_pci_ide_device;
extern const device_t via_vt82c505_device;
extern const device_t via_vpx_device;
extern const device_t via_vp3_device;
extern const device_t via_mvp3_device;

View File

@@ -323,6 +323,7 @@ extern int machine_at_pc330_6571_init(const machine_t *);
extern int machine_at_mvi486_init(const machine_t *);
extern int machine_at_sis401_init(const machine_t *);
extern int machine_at_isa486_init(const machine_t *);
extern int machine_at_av4_init(const machine_t *);
extern int machine_at_valuepoint433_init(const machine_t *);
@@ -339,15 +340,15 @@ extern int machine_at_4dps_init(const machine_t *);
extern int machine_at_4sa2_init(const machine_t *);
extern int machine_at_m4li_init(const machine_t *);
extern int machine_at_alfredo_init(const machine_t *);
extern int machine_at_486sp3_init(const machine_t *);
extern int machine_at_486sp3c_init(const machine_t *);
extern int machine_at_486sp3g_init(const machine_t *);
extern int machine_at_486ap4_init(const machine_t *);
#if defined(DEV_BRANCH) && defined(NO_SIO)
extern int machine_at_486vipio2_init(const machine_t *);
#endif
#if defined(DEV_BRANCH) && defined(USE_M1489)
extern int machine_at_abpb4_init(const machine_t *);
extern int machine_at_win486pci_init(const machine_t *);
#endif
extern int machine_at_atc1415_init(const machine_t *);
extern int machine_at_ecs486_init(const machine_t *);
@@ -435,6 +436,7 @@ extern int machine_at_equium5200_init(const machine_t *);
extern int machine_at_pcv240_init(const machine_t *);
extern int machine_at_p65up5_cp55t2d_init(const machine_t *);
extern int machine_at_mb520n_init(const machine_t *);
extern int machine_at_p55tvp4_init(const machine_t *);
extern int machine_at_p55va_init(const machine_t *);
extern int machine_at_i430vx_init(const machine_t *);
@@ -517,8 +519,12 @@ extern int machine_at_ergox365_init(const machine_t *);
extern int machine_at_ficka6130_init(const machine_t *);
extern int machine_at_p3v133_init(const machine_t *);
extern int machine_at_p3v4x_init(const machine_t *);
extern int machine_at_vei8_init(const machine_t *);
extern int machine_at_borapro_init(const machine_t *);
extern int machine_at_ms6168_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t *at_tsunamiatx_get_device(void);
#endif
@@ -544,6 +550,7 @@ extern int machine_at_6via90ap_init(const machine_t *);
extern int machine_at_603tcf_init(const machine_t *);
extern int machine_at_trinity371_init(const machine_t *);
extern int machine_at_p6bap_init(const machine_t *);
extern int machine_at_ms6198_init(const machine_t *);
/* m_at_ebga368.c */
extern int machine_at_arb9673_init(const machine_t *);
@@ -631,6 +638,7 @@ extern int machine_xt_amixt_init(const machine_t *);
extern int machine_xt_dtk_init(const machine_t *);
extern int machine_xt_jukopc_init(const machine_t *);
extern int machine_xt_open_xt_init(const machine_t *);
extern int machine_xt_pcxt_init(const machine_t *);
extern int machine_xt_pxxt_init(const machine_t *);
extern int machine_xt_ncrpc4i_init(const machine_t *);
extern int machine_xt_mpc1600_init(const machine_t *);

View File

@@ -52,10 +52,6 @@ if(PS2M70T4)
target_compile_definitions(mch PRIVATE USE_PS2M70T4)
endif()
if(M1489)
target_compile_definitions(mch PRIVATE USE_M1489)
endif()
if(M154X)
target_compile_definitions(mch PRIVATE USE_M154X)
endif()
@@ -66,8 +62,4 @@ endif()
if(VECT486VL)
target_compile_definitions(mch PRIVATE USE_VECT486VL)
endif()
if(DELLS4)
target_compile_definitions(mch PRIVATE USE_DELLS4)
endif()

View File

@@ -88,6 +88,18 @@ machine_at_asus386_init(const machine_t *model)
}
static void
machine_at_sis401_common_init(const machine_t *model)
{
machine_at_common_ide_init(model);
device_add(&sis_85c401_device);
device_add(&keyboard_at_ami_device);
if (fdc_type == FDC_INTERNAL)
device_add(&fdc_at_device);
}
int
machine_at_sis401_init(const machine_t *model)
{
@@ -99,12 +111,24 @@ machine_at_sis401_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_ide_init(model);
device_add(&sis_85c401_device);
device_add(&keyboard_at_ami_device);
machine_at_sis401_common_init(model);
if (fdc_type == FDC_INTERNAL)
device_add(&fdc_at_device);
return ret;
}
int
machine_at_isa486_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/isa486/ISA-486.BIN",
0x000f0000, 65536, 0);
if (bios_only || !ret)
return ret;
machine_at_sis401_common_init(model);
return ret;
}
@@ -538,6 +562,7 @@ machine_at_pc330_6571_init(const machine_t *model) // doesn't like every CPU oth
return ret;
}
int
machine_at_mvi486_init(const machine_t *model)
{
@@ -810,6 +835,34 @@ machine_at_4dps_init(const machine_t *model)
}
int
machine_at_486sp3c_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/486sp3c/SI4I0306.AWD",
0x000e0000, 131072, 0);
if (bios_only || !ret)
return ret;
machine_at_common_init_ex(model, 2);
machine_at_sis_85c496_common_init(model);
device_add(&sis_85c496_device);
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
device_add(&fdc37c665_device);
device_add(&keyboard_ps2_ami_pci_device);
device_add(&intel_flash_bxt_device);
return ret;
}
int
machine_at_4sa2_init(const machine_t *model)
{
@@ -871,6 +924,40 @@ machine_at_alfredo_init(const machine_t *model)
}
int
machine_at_486sp3_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/486sp3/awsi2737.bin",
0x000e0000, 131072, 0);
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
device_add(&ide_isa_device);
pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); /* 01 = SCSI */
pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */
pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */
pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */
pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
device_add(&keyboard_ps2_ami_pci_device); /* Uses the AMIKEY KBC */
device_add(&sio_device);
device_add(&fdc37c663_ide_device);
device_add(&sst_flash_29ee010_device);
device_add(&i420tx_device);
device_add(&ncr53c810_onboard_pci_device);
return ret;
}
int
machine_at_486sp3g_init(const machine_t *model)
{
@@ -883,20 +970,18 @@ machine_at_486sp3g_init(const machine_t *model)
return ret;
machine_at_common_init(model);
device_add(&ide_pci_2ch_device);
device_add(&ide_isa_device);
pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING);
pci_init(PCI_CONFIG_TYPE_2);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0);
pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */
pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */
pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */
pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */
pci_register_slot(0x07, PCI_CARD_SCSI, 1, 2, 3, 4); /* 07 = SCSI */
pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); /* 01 = SCSI */
pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 06 = Slot 1 */
pci_register_slot(0x05, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 05 = Slot 2 */
pci_register_slot(0x04, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 04 = Slot 3 */
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
device_add(&keyboard_ps2_ami_pci_device); /* Uses the AMIKEY KBC */
device_add(&sio_device); /* Site says it has a ZB, but the BIOS is designed for an IB. */
device_add(&pc87332_device);
device_add(&sio_zb_device);
device_add(&pc87332_398_ide_device);
device_add(&sst_flash_29ee010_device);
device_add(&i420zx_device);
@@ -958,18 +1043,17 @@ machine_at_486vipio2_init(const machine_t *model)
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
device_add(&via_vt82c49x_device);
device_add(&via_vt82c49x_pci_ide_device);
device_add(&via_vt82c505_device);
device_add(&ide_vlb_2ch_device);
device_add(&w83787f_device);
device_add(&keyboard_at_device);
device_add(&keyboard_ps2_ami_device);
device_add(&sst_flash_29ee010_device);
return ret;
}
#endif
#if defined(DEV_BRANCH) && defined(USE_M1489)
int
machine_at_abpb4_init(const machine_t *model)
{
@@ -983,7 +1067,7 @@ machine_at_abpb4_init(const machine_t *model)
machine_at_common_init(model);
pci_init(PCI_CONFIG_TYPE_1);
pci_init(PCI_CAN_SWITCH_TYPE);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1);
@@ -992,10 +1076,13 @@ machine_at_abpb4_init(const machine_t *model)
device_add(&ali1489_device);
device_add(&w83787f_device);
device_add(&keyboard_at_device);
// device_add(&intel_flash_bxt_device);
device_add(&sst_flash_29ee010_device);
return ret;
}
int
machine_at_win486pci_init(const machine_t *model)
{
@@ -1021,7 +1108,7 @@ machine_at_win486pci_init(const machine_t *model)
return ret;
}
#endif
int
machine_at_atc1415_init(const machine_t *model)
@@ -1053,6 +1140,7 @@ machine_at_atc1415_init(const machine_t *model)
return ret;
}
int
machine_at_ecs486_init(const machine_t *model)
{
@@ -1083,6 +1171,7 @@ machine_at_ecs486_init(const machine_t *model)
return ret;
}
int
machine_at_hot433_init(const machine_t *model)
{
@@ -1113,6 +1202,7 @@ machine_at_hot433_init(const machine_t *model)
return ret;
}
int
machine_at_itoxstar_init(const machine_t *model)
{

View File

@@ -623,6 +623,7 @@ machine_at_p3v4x_init(const machine_t *model)
return ret;
}
int
machine_at_vei8_init(const machine_t *model)
{
@@ -652,3 +653,69 @@ machine_at_vei8_init(const machine_t *model)
return ret;
}
static void
machine_at_ms6168_common_init(const machine_t *model)
{
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x14, PCI_CARD_SOUND, 3, 4, 1, 2);
pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1);
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
device_add(&i440zx_device);
device_add(&piix4e_device);
device_add(&w83977ef_device);
device_add(&keyboard_ps2_ami_pci_device);
device_add(&intel_flash_bxt_device);
spd_register(SPD_TYPE_SDRAM, 0x3, 256);
if (gfxcard == VID_INTERNAL)
device_add(&voodoo_3_2000_agp_onboard_8m_device);
if (sound_card_current == SOUND_INTERNAL)
device_add(&es1371_onboard_device);
}
int
machine_at_borapro_init(const machine_t *model)
{
/* AMI 440ZX Board. Packard Bell OEM of the MSI MS-6168
MIGHT REQUIRE MORE EXCESSIVE TESTING!
Reports emmersive amounts of RAM like few Intel OEM boards
we have. */
int ret;
ret = bios_load_linear("roms/machines/borapro/MS6168V2.50",
0x000c0000, 262144, 0);
if (bios_only || !ret)
return ret;
machine_at_ms6168_common_init(model);
return ret;
}
int
machine_at_ms6168_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/ms6168/w6168ims.130",
0x000c0000, 262144, 0);
if (bios_only || !ret)
return ret;
machine_at_ms6168_common_init(model);
return ret;
}

View File

@@ -38,6 +38,7 @@
#include <86box/machine.h>
#include <86box/clock.h>
int
machine_at_s370slm_init(const machine_t *model)
{
@@ -72,6 +73,7 @@ machine_at_s370slm_init(const machine_t *model)
return ret;
}
int
machine_at_trinity371_init(const machine_t *model)
{
@@ -104,6 +106,7 @@ machine_at_trinity371_init(const machine_t *model)
return ret;
}
int
machine_at_p6bap_init(const machine_t *model)
{
@@ -135,6 +138,7 @@ machine_at_p6bap_init(const machine_t *model)
return ret;
}
int
machine_at_cubx_init(const machine_t *model)
{
@@ -171,6 +175,7 @@ machine_at_cubx_init(const machine_t *model)
return ret;
}
int
machine_at_atc7020bxii_init(const machine_t *model)
{
@@ -203,6 +208,7 @@ machine_at_atc7020bxii_init(const machine_t *model)
return ret;
}
int
machine_at_ambx133_init(const machine_t *model)
{
@@ -235,6 +241,7 @@ machine_at_ambx133_init(const machine_t *model)
return ret;
}
int
machine_at_awo671r_init(const machine_t *model)
{
@@ -268,6 +275,7 @@ machine_at_awo671r_init(const machine_t *model)
return ret;
}
int
machine_at_63a_init(const machine_t *model)
{
@@ -300,6 +308,7 @@ machine_at_63a_init(const machine_t *model)
return ret;
}
int
machine_at_apas3_init(const machine_t *model)
{
@@ -331,6 +340,7 @@ machine_at_apas3_init(const machine_t *model)
return ret;
}
int
machine_at_wcf681_init(const machine_t *model)
{
@@ -368,6 +378,7 @@ machine_at_wcf681_init(const machine_t *model)
return ret;
}
int
machine_at_cuv4xls_init(const machine_t *model)
{
@@ -405,6 +416,7 @@ machine_at_cuv4xls_init(const machine_t *model)
return ret;
}
int
machine_at_6via90ap_init(const machine_t *model)
{
@@ -442,6 +454,7 @@ machine_at_6via90ap_init(const machine_t *model)
return ret;
}
int
machine_at_603tcf_init(const machine_t *model)
{
@@ -476,3 +489,42 @@ machine_at_603tcf_init(const machine_t *model)
return ret;
}
int
machine_at_ms6198_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/ms6198/a6198vms.160",
0x000c0000, 262144, 0);
if (bios_only || !ret)
return ret;
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
// pci_register_slot(0x04, PCI_CARD_SOUTHBRIDGE, 4, 1, 2, 3);
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 4, 1, 2, 3);
pci_register_slot(0x05, PCI_CARD_SOUND, 3, 0, 0, 0);
pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 0, 0);
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3);
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 0, 0, 0);
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
device_add(&via_apro133a_device);
device_add(&via_vt82c686a_device);
device_add(&via_vt82c686_sio_device);
device_add(&keyboard_ps2_ami_pci_device);
device_add(ics9xxx_get(ICS9250_18));
device_add(&sst_flash_39sf020_device);
spd_register(SPD_TYPE_SDRAM, 0xF, 512);
device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */
return ret;
}

View File

@@ -549,7 +549,7 @@ machine_at_apollo_init(const machine_t *model)
device_add(&keyboard_ps2_ami_pci_device);
device_add(&i430fx_device);
device_add(&piix_device);
device_add(&pc87332_ps1_device);
device_add(&pc87332_398_device);
device_add(&intel_flash_bxt_device);
return ret;

View File

@@ -551,6 +551,37 @@ machine_at_p65up5_cp55t2d_init(const machine_t *model)
return ret;
}
int
machine_at_mb520n_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/mb520n/520n503s.rom",
0x000e0000, 131072, 0);
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3);
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
device_add(&i430vx_device);
device_add(&piix3_device);
device_add(&keyboard_ps2_ami_pci_device);
device_add(&fdc37c669_device);
device_add(&intel_flash_bxt_device);
return ret;
}
int
machine_at_p55tvp4_init(const machine_t *model)
{

View File

@@ -573,7 +573,7 @@ machine_ps1_m2133_init(const machine_t *model)
ps1_common_init(model);
device_add(&ide_isa_device);
device_add(&vl82c480_device);
device_add(&pc87332_ps1_device);
device_add(&pc87332_398_device);
nmi_mask = 0x80;

View File

@@ -270,6 +270,27 @@ machine_xt_open_xt_init(const machine_t *model)
}
int
machine_xt_pcxt_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/pcxt/u18.rom",
0x000f8000, 65536, 0);
if (ret) {
bios_load_aux_linear("roms/machines/pcxt/u19.rom",
0x000f0000, 32768, 0);
}
if (bios_only || !ret)
return ret;
machine_xt_clone_init(model);
return ret;
}
#if defined(DEV_BRANCH) && defined(USE_HEDAKA)
int
machine_xt_hed919_init(const machine_t *model)
@@ -291,6 +312,7 @@ machine_xt_hed919_init(const machine_t *model)
}
#endif
int
machine_xt_pxxt_init(const machine_t *model)
{
@@ -307,6 +329,7 @@ machine_xt_pxxt_init(const machine_t *model)
return ret;
}
int
machine_xt_iskra3104_init(const machine_t *model)
{
@@ -324,6 +347,7 @@ machine_xt_iskra3104_init(const machine_t *model)
return ret;
}
int
machine_xt_ncrpc4i_init(const machine_t *model)
{
@@ -340,6 +364,7 @@ machine_xt_ncrpc4i_init(const machine_t *model)
return ret;
}
int
machine_xt_mpc1600_init(const machine_t *model)
{
@@ -382,6 +407,7 @@ machine_xt_eaglepcspirit_init(const machine_t *model)
return ret;
}
int
machine_xt_multitechpc700_init(const machine_t *model)
{
@@ -399,4 +425,3 @@ machine_xt_multitechpc700_init(const machine_t *model)
return ret;
}

View File

@@ -77,6 +77,7 @@ const machine_t machines[] = {
{ "[8088] Philips P3105/NMS9100", "p3105", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_XTA, 256, 768, 256, 0, machine_xt_p3105_init, NULL },
{ "[8088] Phoenix XT clone", "pxxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_pxxt_init, NULL },
{ "[8088] Schneider EuroPC", "europc", MACHINE_TYPE_8088, CPU_PKG_8088_EUROPC, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_XTA | MACHINE_MOUSE, 512, 640, 128, 15, machine_europc_init, NULL },
{ "[8088] Super PC/Turbo XT", "pcxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_pcxt_init, NULL },
{ "[8088] Tandy 1000", "tandy", MACHINE_TYPE_8088, CPU_PKG_8088_EUROPC, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 128, 640, 128, 0, machine_tandy_init, tandy1k_get_device },
{ "[8088] Tandy 1000 HX", "tandy1000hx", MACHINE_TYPE_8088, CPU_PKG_8088_EUROPC, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 256, 640, 128, 0, machine_tandy1000hx_init, tandy1k_hx_get_device },
{ "[8088] Toshiba T1000", "t1000", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO, 512, 1280, 768, 63, machine_xt_t1000_init, t1000_get_device },
@@ -208,6 +209,7 @@ const machine_t machines[] = {
{ "[OPTi 895] Jetway J-403TG", "403tg", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB, 1024, 65536, 1024, 127, machine_at_403tg_init, NULL },
{ "[OPTi 895] Mylex MVI486", "mvi486", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE_DUAL, 1024, 65536, 1024, 127, machine_at_mvi486_init, NULL },
{ "[SiS 401] AMI 486 Clone", "sis401", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_sis401_init, NULL },
{ "[SiS 401] ASUS ISA-486", "sis401", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_isa486_init, NULL },
{ "[SiS 460] ABIT AV4", "av4", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_av4_init, NULL },
{ "[SiS 461] IBM PS/ValuePoint 433DX/Si", "valuepoint433", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 65536, 1024, 127, machine_at_valuepoint433_init, NULL },
{ "[SiS 471] AMI 486 Clone", "ami471", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_ami471_init, NULL },
@@ -228,13 +230,13 @@ const machine_t machines[] = {
#endif
/* 486 machines which utilize the PCI bus */
#if defined(DEV_BRANCH) && defined(USE_M1489)
{ "[ALi M1489] ABIT AB-PB4", "abpb4", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, machine_at_abpb4_init, NULL },
{ "[ALi M1489] AMI WinBIOS 486 PCI", "win486pci", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, machine_at_win486pci_init, NULL },
#endif
{ "[i420EX] ASUS PVI-486AP4", "486ap4", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCIV | MACHINE_IDE_DUAL, 1024, 131072, 1024, 127, machine_at_486ap4_init, NULL },
{ "[i420ZX] ASUS PCI/I-486SP3G", "486sp3g", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 131072, 1024, 127, machine_at_486sp3g_init, NULL },
{ "[i420TX] ASUS PCI/I-486SP3", "486sp3", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 131072, 1024, 127, machine_at_486sp3_init, NULL },
{ "[i420TX] Intel Classic/PCI", "alfredo", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_alfredo_init, NULL },
{ "[SiS 496] ASUS PVI-486SP3C", "486sp3c", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCIV | MACHINE_IDE_DUAL, 1024, 261120, 1024, 255, machine_at_486sp3c_init, NULL },
{ "[SiS 496] Lucky Star LS-486E", "ls486e", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, machine_at_ls486e_init, NULL },
{ "[SiS 496] Micronics M4Li", "m4li", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024, 131072, 1024, 127, machine_at_m4li_init, NULL },
{ "[SiS 496] Rise Computer R418", "r418", MACHINE_TYPE_486, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 261120, 1024, 255, machine_at_r418_init, NULL },
@@ -327,6 +329,7 @@ const machine_t machines[] = {
{ "[i430VX] Epox P55-VA", "p55va", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_p55va_init, NULL },
{ "[i430VX] HP Brio 80xx", "brio80xx", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 66666667, 66666667, 2200, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_brio80xx_init, NULL },
{ "[i430VX] Packard Bell PB680", "pb680", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_pb680_init, NULL },
{ "[i430VX] PC Partner MB520N", "mb520n", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2600, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_mb520n_init, NULL },
{ "[i430VX] Shuttle HOT-557", "430vx", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_i430vx_init, NULL },
/* 430TX */
@@ -407,6 +410,10 @@ const machine_t machines[] = {
/* 440GX */
{ "[i440GX] Freeway FW-6400GX", "fw6400gx_s1", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 100000000, 150000000, 1800, 3500, 3.0, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 16384,2080768,16384, 511, machine_at_fw6400gx_init, NULL },
/* 440ZX */
{ "[i440ZX] MSI MS-6168", "ms6168", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 100000000, 150000000, 1800, 3500, 3.0, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND,8192, 524288, 8192, 255, machine_at_ms6168_init, NULL },
{ "[i440ZX] Packard Bell Bora Pro", "borapro", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 66666667, 1800, 3500, 3.0, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND,8192, 524288, 8192, 255, machine_at_borapro_init, NULL },
/* SMSC VictoryBX-66 */
{ "[SMSC VictoryBX-66] A-Trend ATC6310BXII","atc6310bxii", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 133333333, 1300, 3500, 3.0, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_atc6310bxii_init, NULL },
@@ -443,6 +450,7 @@ const machine_t machines[] = {
{ "[VIA Apollo Pro133A] AEWIN WCF-681", "wcf681", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 133333333, 1300, 3500, 2.0, 8.0, /* limits assumed */ MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_wcf681_init, NULL },
{ "[VIA Apollo Pro133A] ASUS CUV4X-LS", "cuv4xls", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 150000000, 1300, 3500, 2.0, 8.0, (MACHINE_AGP & ~MACHINE_AT) | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 16384,1572864, 8192, 255, machine_at_cuv4xls_init, NULL },
{ "[VIA Apollo Pro133A] Acorp 6VIA90AP", "6via90ap", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 150000000, 1300, 3500, MACHINE_MULTIPLIER_FIXED, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1572864, 8192, 255, machine_at_6via90ap_init, NULL },
{ "[VIA Apollo Pro133A] MSI MS-6198", "ms6198", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 150000000, 1300, 3500, 2.0, 8.0, (MACHINE_AGP & ~MACHINE_AT) | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 16384,1572864, 8192, 255, machine_at_ms6198_init, NULL },
{ "[VIA Apollo ProMedia] Jetway 603TCF", "603tcf", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 150000000, 1300, 3500, 2.0, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_603tcf_init, NULL },
/* EBGA368 machines */

View File

@@ -166,7 +166,6 @@ onesec_timer(void *priv)
void
nvr_init(nvr_t *nvr)
{
char temp[64];
struct tm *tm;
time_t now;
int c;

View File

@@ -107,7 +107,6 @@ ps2_nvr_write(uint16_t port, uint8_t val, void *priv)
static void *
ps2_nvr_init(const device_t *info)
{
char temp[64];
ps2_nvr_t *nvr;
FILE *f = NULL;
int c;

View File

@@ -135,11 +135,20 @@ fdc_handler(fdc37c66x_t *dev)
static void
ide_handler(fdc37c66x_t *dev)
{
ide_sec_disable();
ide_set_base(1, (dev->regs[0x05] & 0x02) ? 0x170 : 0x1f0);
ide_set_side(1, (dev->regs[0x05] & 0x02) ? 0x376 : 0x3f6);
if (dev->regs[0x00] & 0x01)
ide_sec_enable();
/* TODO: Make an ide_disable(channel) and ide_enable(channel) so we can simplify this. */
if (dev->has_ide == 2) {
ide_sec_disable();
ide_set_base(1, (dev->regs[0x05] & 0x02) ? 0x170 : 0x1f0);
ide_set_side(1, (dev->regs[0x05] & 0x02) ? 0x376 : 0x3f6);
if (dev->regs[0x00] & 0x01)
ide_sec_enable();
} else if (dev->has_ide == 1) {
ide_pri_disable();
ide_set_base(0, (dev->regs[0x05] & 0x02) ? 0x170 : 0x1f0);
ide_set_side(0, (dev->regs[0x05] & 0x02) ? 0x376 : 0x3f6);
if (dev->regs[0x00] & 0x01)
ide_pri_enable();
}
}
@@ -242,11 +251,12 @@ fdc37c66x_reset(fdc37c66x_t *dev)
lpt1_init(0x378);
fdc_reset(dev->fdc);
fdc_remove(dev->fdc);
dev->tries = 0;
memset(dev->regs, 0, 16);
dev->regs[0x0] = 0x3a;
dev->regs[0x0] = 0x2a;
dev->regs[0x1] = 0x9f;
dev->regs[0x2] = 0xdc;
dev->regs[0x3] = 0x78;
@@ -280,7 +290,7 @@ fdc37c66x_init(const device_t *info)
dev->uart[1] = device_add_inst(&ns16550_device, 2);
dev->chip_id = info->local & 0xff;
dev->has_ide = !!(info->local & 0x100);
dev->has_ide = (info->local >> 8) & 0xff;
io_sethandler(0x03f0, 0x0002,
fdc37c66x_read, NULL, NULL, fdc37c66x_write, NULL, NULL, dev);
@@ -302,6 +312,15 @@ const device_t fdc37c663_device = {
NULL
};
const device_t fdc37c663_ide_device = {
"SMC FDC37C663 Super I/O (With IDE)",
0,
0x163,
fdc37c66x_init, fdc37c66x_close, NULL,
{ NULL }, NULL, NULL,
NULL
};
const device_t fdc37c665_device = {
"SMC FDC37C665 Super I/O",
0,
@@ -312,9 +331,9 @@ const device_t fdc37c665_device = {
};
const device_t fdc37c665_ide_device = {
"SMC FDC37C665 Super I/O",
"SMC FDC37C665 Super I/O (With IDE)",
0,
0x165,
0x265,
fdc37c66x_init, fdc37c66x_close, NULL,
{ NULL }, NULL, NULL,
NULL

View File

@@ -36,7 +36,7 @@
typedef struct {
uint8_t tries,
uint8_t tries, has_ide,
regs[15];
int cur_reg;
fdc_t *fdc;
@@ -129,6 +129,26 @@ serial_handler(pc87332_t *dev, int uart)
}
static void
ide_handler(pc87332_t *dev)
{
/* TODO: Make an ide_disable(channel) and ide_enable(channel) so we can simplify this. */
if (dev->has_ide == 2) {
ide_sec_disable();
ide_set_base(1, (dev->regs[0x00] & 0x80) ? 0x170 : 0x1f0);
ide_set_side(1, (dev->regs[0x00] & 0x80) ? 0x376 : 0x3f6);
if (dev->regs[0x00] & 0x40)
ide_sec_enable();
} else if (dev->has_ide == 1) {
ide_pri_disable();
ide_set_base(0, (dev->regs[0x00] & 0x80) ? 0x170 : 0x1f0);
ide_set_side(0, (dev->regs[0x00] & 0x80) ? 0x376 : 0x3f6);
if (dev->regs[0x00] & 0x40)
ide_pri_enable();
}
}
static void
pc87332_write(uint16_t port, uint8_t val, void *priv)
{
@@ -177,6 +197,8 @@ pc87332_write(uint16_t port, uint8_t val, void *priv)
if ((val & 8) && !(dev->regs[2] & 1))
fdc_set_base(dev->fdc, (val & 0x20) ? 0x370 : 0x3f0);
}
if (dev->has_ide && (valxor & 0xc0))
ide_handler(dev);
break;
case 1:
if (valxor & 3) {
@@ -251,7 +273,9 @@ pc87332_reset(pc87332_t *dev)
{
memset(dev->regs, 0, 15);
dev->regs[0x00] = 0x0F;
dev->regs[0x00] = 0x07;
if (dev->has_ide == 2)
dev->regs[0x00] = 0x87;
dev->regs[0x01] = 0x10;
dev->regs[0x03] = 0x01;
dev->regs[0x05] = 0x0D;
@@ -268,6 +292,10 @@ pc87332_reset(pc87332_t *dev)
serial_handler(dev, 0);
serial_handler(dev, 1);
fdc_reset(dev->fdc);
fdc_remove(dev->fdc);
if (dev->has_ide)
ide_handler(dev);
}
@@ -291,9 +319,10 @@ pc87332_init(const device_t *info)
dev->uart[0] = device_add_inst(&ns16550_device, 1);
dev->uart[1] = device_add_inst(&ns16550_device, 2);
dev->has_ide = (info->local >> 8) & 0xff;
pc87332_reset(dev);
if (info->local == 1) {
if ((info->local & 0xff) == (0x01)) {
io_sethandler(0x398, 0x0002,
pc87332_read, NULL, NULL, pc87332_write, NULL, NULL, dev);
} else {
@@ -308,17 +337,27 @@ pc87332_init(const device_t *info)
const device_t pc87332_device = {
"National Semiconductor PC87332 Super I/O",
0,
0,
0x00,
pc87332_init, pc87332_close, NULL,
{ NULL }, NULL, NULL,
NULL
};
const device_t pc87332_ps1_device = {
"National Semiconductor PC87332 Super I/O (IBM PS/1 Model 2133 EMEA 451)",
const device_t pc87332_398_device = {
"National Semiconductor PC87332 Super I/O (Port 398h)",
0,
1,
0x01,
pc87332_init, pc87332_close, NULL,
{ NULL }, NULL, NULL,
NULL
};
const device_t pc87332_398_ide_device = {
"National Semiconductor PC87332 Super I/O (Port 398h) (With IDE)",
0,
0x101,
pc87332_init, pc87332_close, NULL,
{ NULL }, NULL, NULL,
NULL

View File

@@ -78,9 +78,6 @@ ifeq ($(DEV_BUILD), y)
ifndef SIO_DETECT
SIO_DETECT := y
endif
ifndef M1489
M1489 := y
endif
ifndef M154X
M154X := y
endif
@@ -157,9 +154,6 @@ else
ifndef SIO_DETECT
SIO_DETECT := n
endif
ifndef M1489
M1489 := n
endif
ifndef M154X
M154X := n
endif
@@ -484,7 +478,7 @@ RFLAGS += -DUSE_VNC
OPTS += -I$(VNC_PATH)\INCLUDE
VNCLIB := -L$(VNC_PATH)\LIB
endif
VNCLIB += -lvncserver
VNCLIB += -lvncserver
VNCOBJ := vnc.o vnc_keymap.o
endif
@@ -566,11 +560,6 @@ OPTS += -DUSE_SIO_DETECT
DEVBROBJ += sio_detect.o
endif
ifeq ($(M1489), y)
OPTS += -DUSE_M1489
DEVBROBJ += ali1489.o
endif
ifeq ($(M145X), y)
OPTS += -DUSE_M154X
DEVBROBJ += ali1531.o ali1543.o
@@ -608,7 +597,7 @@ endif
# Final versions of the toolchain flags.
CFLAGS := $(WX_FLAGS) $(OPTS) $(DFLAGS) $(COPTIM) $(AOPTIM) \
$(AFLAGS) -mstackrealign -Wall \
$(AFLAGS) -fomit-frame-pointer -mstackrealign -Wall \
-fno-strict-aliasing
# Add freetyp2 references through pkgconfig
@@ -632,7 +621,7 @@ CPUOBJ := cpu.o cpu_table.o \
x86seg.o x87.o x87_timings.o \
$(DYNARECOBJ)
CHIPSETOBJ := acc2168.o cs8230.o ali1217.o ali1429.o headland.o intel_82335.o cs4031.o \
CHIPSETOBJ := acc2168.o cs8230.o ali1217.o ali1429.o ali1489.o headland.o intel_82335.o cs4031.o \
intel_420ex.o intel_4x0.o intel_sio.o intel_piix.o ioapic.o \
neat.o opti495.o opti895.o opti5x7.o scamp.o scat.o via_vt82c49x.o via_vt82c505.o \
gc100.o olivetti_eva.o \
@@ -775,6 +764,7 @@ VIDOBJ := video.o \
vid_bt48x_ramdac.o \
vid_av9194.o vid_icd2061.o vid_ics2494.o vid_ics2595.o \
vid_cl54xx.o \
vid_et3000.o \
vid_et4000.o vid_sc1148x_ramdac.o \
vid_sc1502x_ramdac.o \
vid_et4000w32.o vid_stg_ramdac.o \
@@ -887,9 +877,9 @@ all: $(PROG).exe
$(PROG).exe: $(OBJ) 86Box.res
@echo Linking $(PROG).exe ..
@$(CC) $(LDFLAGS) -o $(PROG).exe $(OBJ) 86Box.res $(LIBS) -pipe
ifneq ($(DEBUG), y)
@$(STRIP) $(PROG).exe
endif
#ifneq ($(DEBUG), y)
# @$(STRIP) $(PROG).exe
#endif
pcap_if.res: pcap_if.rc
@echo Processing $<