VIA 694X & 693A Implementation
Just to continue the VIA northbridge work
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
#define VIA_597 0x05970100
|
||||
#define VIA_598 0x05980000
|
||||
#define VIA_691 0x06910000
|
||||
#define VIA_693A 0x06914400
|
||||
#define VIA_694 0x0691c200
|
||||
#define VIA_8601 0x86010500
|
||||
|
||||
typedef struct via_apollo_t
|
||||
@@ -108,12 +110,18 @@ via_apollo_setup(via_apollo_t *dev)
|
||||
dev->pci_conf[0x10] = 0x08;
|
||||
dev->pci_conf[0x34] = 0xa0;
|
||||
|
||||
if (dev->id == VIA_8601)
|
||||
dev->pci_conf[0x52] = 0x10;
|
||||
if ((dev->id >= VIA_694))
|
||||
dev->pci_conf[0x52] = (dev->id == VIA_694) ? 0x90 : 0x10;
|
||||
|
||||
if ((dev->id >= VIA_693A))
|
||||
dev->pci_conf[0x53] = 0x10;
|
||||
|
||||
if (dev->id == VIA_691) {
|
||||
dev->pci_conf[0x56] = 0x01;
|
||||
dev->pci_conf[0x57] = 0x01;
|
||||
}
|
||||
if (dev->id >= VIA_693A)
|
||||
dev->pci_conf[0x58] = 0x40;
|
||||
dev->pci_conf[0x5a] = 0x01;
|
||||
dev->pci_conf[0x5b] = 0x01;
|
||||
dev->pci_conf[0x5c] = 0x01;
|
||||
@@ -124,7 +132,7 @@ via_apollo_setup(via_apollo_t *dev)
|
||||
dev->pci_conf[0x64] = 0xec;
|
||||
dev->pci_conf[0x65] = 0xec;
|
||||
dev->pci_conf[0x66] = 0xec;
|
||||
if (dev->id == VIA_691)
|
||||
if (dev->id >= VIA_691)
|
||||
dev->pci_conf[0x67] = 0xec; /* DRAM Timing for Banks 6,7. */
|
||||
dev->pci_conf[0x6b] = 0x01;
|
||||
|
||||
@@ -133,6 +141,16 @@ via_apollo_setup(via_apollo_t *dev)
|
||||
dev->pci_conf[0xa4] = 0x03;
|
||||
dev->pci_conf[0xa5] = 0x02;
|
||||
dev->pci_conf[0xa7] = 0x07;
|
||||
|
||||
if(dev->id == VIA_693A) {
|
||||
dev->pci_conf[0xac] = 0x08;
|
||||
dev->pci_conf[0xad] = 0x02;
|
||||
}
|
||||
|
||||
if(dev->id == VIA_694) {
|
||||
dev->pci_conf[0xb0] = 0x80; /* The datasheet refers it as 8xh */
|
||||
dev->pci_conf[0xb1] = 0x63;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -168,6 +186,8 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
||||
case 0x0d:
|
||||
if(dev->id == VIA_8601)
|
||||
dev->pci_conf[0x0d] = (dev->pci_conf[0x0d] & ~0x07) | (val & 0x07);
|
||||
else if(dev->id == VIA_694)
|
||||
dev->pci_conf[0x0d] = (dev->pci_conf[0x0d] & ~0xf8) | (val & 0xf8);
|
||||
else
|
||||
dev->pci_conf[0x0d] = (dev->pci_conf[0x0d] & ~0x07) | (val & 0x07);
|
||||
|
||||
@@ -184,13 +204,19 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
||||
case 0x50: /* Cache Control 1 */
|
||||
if (dev->id == VIA_8601)
|
||||
dev->pci_conf[0x50] = (dev->pci_conf[0x50] & ~0xd3) | (val & 0xd3);
|
||||
else if (dev->id >= VIA_693A)
|
||||
dev->pci_conf[0x50] = (dev->pci_conf[0x50] & ~0xd1) | (val & 0xd1);
|
||||
else if (dev->id == VIA_691)
|
||||
dev->pci_conf[0x50] = val;
|
||||
else
|
||||
dev->pci_conf[0x50] = (dev->pci_conf[0x50] & ~0xf8) | (val & 0xf8);
|
||||
break;
|
||||
case 0x51: /* Cache Control 2 */
|
||||
if (dev->id >= VIA_691)
|
||||
if (dev->id == VIA_694)
|
||||
dev->pci_conf[0x51] = (dev->pci_conf[0x51] & ~0xdd) | (val & 0xdd);
|
||||
else if (dev->id >= VIA_693A)
|
||||
dev->pci_conf[0x51] = (dev->pci_conf[0x51] & ~0xd9) | (val & 0xd9);
|
||||
else if (dev->id >= VIA_691)
|
||||
dev->pci_conf[0x51] = val;
|
||||
else
|
||||
dev->pci_conf[0x51] = (dev->pci_conf[0x51] & ~0xeb) | (val & 0xeb);
|
||||
@@ -198,6 +224,8 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
||||
case 0x52: /* Non_Cacheable Control */
|
||||
if (dev->id == VIA_8601)
|
||||
dev->pci_conf[0x52] = (dev->pci_conf[0x52] & ~0xdf) | (val & 0xdf);
|
||||
else if (dev->id >= VIA_693A)
|
||||
dev->pci_conf[0x52] = val;
|
||||
else if (dev->id == VIA_691)
|
||||
dev->pci_conf[0x52] = (dev->pci_conf[0x52] & ~0x9f) | (val & 0x9f);
|
||||
else
|
||||
@@ -206,11 +234,16 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
||||
case 0x53: /* System Performance Control */
|
||||
if (dev->id == VIA_8601)
|
||||
dev->pci_conf[0x53] = (dev->pci_conf[0x53] & ~0xfc) | (val & 0xfc);
|
||||
else if (dev->id == VIA_691)
|
||||
else if ((dev->id == VIA_691) || (dev->id == VIA_694))
|
||||
dev->pci_conf[0x53] = val;
|
||||
else if (dev->id == VIA_693A)
|
||||
dev->pci_conf[0x53] = (dev->pci_conf[0x53] & ~0xf8) | (val & 0xf8);
|
||||
else
|
||||
dev->pci_conf[0x53] = (dev->pci_conf[0x53] & ~0xf0) | (val & 0xf0);
|
||||
break;
|
||||
case 0x54:
|
||||
dev->pci_conf[0x54] = (dev->pci_conf[0x54] & ~0x07) | (val & 0x07);
|
||||
break;
|
||||
|
||||
case 0x56: case 0x57: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: /* DRAM Row Ending Address */
|
||||
if (dev->id >= VIA_691)
|
||||
@@ -220,13 +253,15 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
||||
break;
|
||||
|
||||
case 0x58:
|
||||
if ((dev->id == VIA_597) || (dev->id == VIA_8601))
|
||||
if ((dev->id == VIA_597) || ((dev->id >= VIA_693A) || (dev->id < VIA_8601)))
|
||||
dev->pci_conf[0x58] = (dev->pci_conf[0x58] & ~0xee) | (val & 0xee);
|
||||
else
|
||||
dev->pci_conf[0x58] = val;
|
||||
break;
|
||||
case 0x59:
|
||||
if (dev->id == VIA_691)
|
||||
if (dev->id >= VIA_693A)
|
||||
dev->pci_conf[0x59] = (dev->pci_conf[0x59] & ~0xee) | (val & 0xee);
|
||||
else if (dev->id == VIA_691)
|
||||
dev->pci_conf[0x59] = val;
|
||||
else
|
||||
dev->pci_conf[0x59] = (dev->pci_conf[0x59] & ~0xf0) | (val & 0xf0);
|
||||
@@ -318,19 +353,21 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
||||
case 0x68:
|
||||
if (dev->id == VIA_597)
|
||||
dev->pci_conf[0x68] = (dev->pci_conf[0x6b] & ~0xfe) | (val & 0xfe);
|
||||
else if ((dev->id == VIA_598) || (dev->id == VIA_8601))
|
||||
else if ((dev->id == VIA_598) || (dev->id == VIA_693A) || (dev->id == VIA_8601))
|
||||
dev->pci_conf[0x68] = val;
|
||||
else if (dev->id == VIA_694)
|
||||
dev->pci_conf[0x68] = (dev->pci_conf[0x68] & ~0xdf) | (val & 0xdf);
|
||||
else
|
||||
dev->pci_conf[0x68] = (dev->pci_conf[0x6b] & ~0xfd) | (val & 0xfd);
|
||||
break;
|
||||
case 0x69:
|
||||
if (dev->id == VIA_8601)
|
||||
if ((dev->id == VIA_693A) || (dev->id < VIA_8601))
|
||||
dev->pci_conf[0x69] = (dev->pci_conf[0x69] & ~0xfe) | (val & 0xfe);
|
||||
else
|
||||
dev->pci_conf[0x69] = val;
|
||||
break;
|
||||
case 0x6b:
|
||||
if (dev->id == VIA_8601)
|
||||
if ((dev->id == VIA_693A) || (dev->id < VIA_8601))
|
||||
dev->pci_conf[0x6b] = val;
|
||||
else if (dev->id == VIA_691)
|
||||
dev->pci_conf[0x6b] = (dev->pci_conf[0x6b] & ~0xcf) | (val & 0xcf);
|
||||
@@ -338,7 +375,7 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
||||
dev->pci_conf[0x6b] = (dev->pci_conf[0x6b] & ~0xc1) | (val & 0xc1);
|
||||
break;
|
||||
case 0x6c:
|
||||
if ((dev->id == VIA_597) || (dev->id == VIA_8601))
|
||||
if ((dev->id == VIA_597) || ((dev->id == VIA_693A) || (dev->id < VIA_8601)))
|
||||
dev->pci_conf[0x6c] = (dev->pci_conf[0x6c] & ~0x1f) | (val & 0x1f);
|
||||
else if (dev->id == VIA_598)
|
||||
dev->pci_conf[0x6c] = (dev->pci_conf[0x6c] & ~0x7f) | (val & 0x7f);
|
||||
@@ -346,51 +383,62 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
||||
dev->pci_conf[0x6c] = val;
|
||||
break;
|
||||
case 0x6d:
|
||||
if (dev->id == VIA_597)
|
||||
if ((dev->id == VIA_597) || (dev->id == VIA_694))
|
||||
dev->pci_conf[0x6d] = (dev->pci_conf[0x6d] & ~0x0f) | (val & 0x0f);
|
||||
else if ((dev->id == VIA_598) || (dev->id == VIA_8601))
|
||||
else if ((dev->id == VIA_598) || (dev->id == VIA_693A) || (dev->id == VIA_8601))
|
||||
dev->pci_conf[0x6d] = (dev->pci_conf[0x6d] & ~0x7f) | (val & 0x7f);
|
||||
else
|
||||
dev->pci_conf[0x6d] = val;
|
||||
break;
|
||||
case 0x6e:
|
||||
if(dev->id == VIA_694)
|
||||
dev->pci_conf[0x6e] = val;
|
||||
else
|
||||
dev->pci_conf[0x6e] = (dev->pci_conf[0x6e] & ~0xb7) | (val & 0xb7);
|
||||
break;
|
||||
|
||||
case 0x70:
|
||||
if (dev->id == VIA_8601)
|
||||
if ((dev->id >= VIA_693A))
|
||||
dev->pci_conf[0x70] = (dev->pci_conf[0x70] & ~0xdf) | (val & 0xdf);
|
||||
else if (dev->id == VIA_597)
|
||||
dev->pci_conf[0x70] = (dev->pci_conf[0x70] & ~0xf1) | (val & 0xf1);
|
||||
else
|
||||
dev->pci_conf[0x70] = val;
|
||||
break;
|
||||
case 0x71:
|
||||
if(dev->id == VIA_694)
|
||||
dev->pci_conf[0x71] = (dev->pci_conf[0x71] & ~0xdf) | (val & 0xdf);
|
||||
else
|
||||
dev->pci_conf[0x71] = val;
|
||||
break;
|
||||
case 0x73:
|
||||
if (dev->id == VIA_8601)
|
||||
if ((dev->id >= VIA_693A))
|
||||
dev->pci_conf[0x73] = (dev->pci_conf[0x73] & ~0x7f) | (val & 0x7f);
|
||||
else
|
||||
dev->pci_conf[0x73] = val;
|
||||
break;
|
||||
case 0x74:
|
||||
if (dev->id == VIA_8601)
|
||||
if ((dev->id == VIA_693A) || (dev->id == VIA_8601))
|
||||
dev->pci_conf[0x74] = (dev->pci_conf[0x74] & ~0xdf) | (val & 0xdf);
|
||||
else if (dev->id == VIA_694)
|
||||
dev->pci_conf[0x74] = (dev->pci_conf[0x74] & ~0x9f) | (val & 0x9f);
|
||||
else
|
||||
dev->pci_conf[0x74] = (dev->pci_conf[0x74] & ~0xc0) | (val & 0xc0);
|
||||
break;
|
||||
case 0x75:
|
||||
if (dev->id == VIA_8601)
|
||||
if (dev->id >= VIA_693A)
|
||||
dev->pci_conf[0x75] = val;
|
||||
else
|
||||
dev->pci_conf[0x75] = (dev->pci_conf[0x75] & ~0xcf) | (val & 0xcf);
|
||||
break;
|
||||
case 0x76:
|
||||
if (dev->id == VIA_8601)
|
||||
if (dev->id >= VIA_693A)
|
||||
dev->pci_conf[0x75] = val;
|
||||
else
|
||||
dev->pci_conf[0x76] = (dev->pci_conf[0x76] & ~0xf0) | (val & 0xf0);
|
||||
break;
|
||||
case 0x77:
|
||||
if (dev->id != VIA_8601)
|
||||
if (dev->id < VIA_693A)
|
||||
dev->pci_conf[0x77] = (dev->pci_conf[0x77] & ~0xc0) | (val & 0xc0);
|
||||
break;
|
||||
case 0x78:
|
||||
@@ -403,7 +451,7 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
||||
dev->pci_conf[0x7a] = (dev->pci_conf[0x7a] & ~0x89) | (val & 0x89);
|
||||
break;
|
||||
case 0x7e:
|
||||
if (dev->id != VIA_8601)
|
||||
if ((dev->id != VIA_8601) || (dev->id != VIA_694))
|
||||
dev->pci_conf[0x7e] = (dev->pci_conf[0x7e] & ~0x3f) | (val & 0x3f);
|
||||
break;
|
||||
|
||||
@@ -413,13 +461,13 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
||||
case 0x84:
|
||||
/* The datasheet first mentions 7-0 but then says 3-0 are reserved -
|
||||
- minimum of 16 MB for the graphics aperture? 8601 datasheet doesn't refer it. */
|
||||
if(dev->id == VIA_8601)
|
||||
if(dev->id >= VIA_693A)
|
||||
dev->pci_conf[0x84] = val;
|
||||
else
|
||||
dev->pci_conf[0x84] = (dev->pci_conf[0x84] & ~0xf0) | (val & 0xf0);
|
||||
break;
|
||||
case 0x88:
|
||||
if(dev->id == VIA_8601)
|
||||
if((dev->id == VIA_693A) || (dev->id == VIA_8601))
|
||||
dev->pci_conf[0x88] = (dev->pci_conf[0x88] & ~0x06) | (val & 0x06);
|
||||
else
|
||||
dev->pci_conf[0x88] = (dev->pci_conf[0x88] & ~0x07) | (val & 0x07);
|
||||
@@ -427,13 +475,16 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
||||
case 0x89:
|
||||
case 0x8a:
|
||||
case 0x8b:
|
||||
if(dev->id == VIA_8601)
|
||||
if((dev->id == VIA_693A) || (dev->id == VIA_8601))
|
||||
dev->pci_conf[addr] = val;
|
||||
else
|
||||
dev->pci_conf[0x89] = (dev->pci_conf[0x89] & ~0xf0) | (val & 0xf0);
|
||||
break;
|
||||
|
||||
case 0xa8:
|
||||
if(dev->id == VIA_694)
|
||||
dev->pci_conf[0xa8] = (dev->pci_conf[0xa8] & ~0x33) | (val & 0x33);
|
||||
else
|
||||
dev->pci_conf[0xa8] = (dev->pci_conf[0xa8] & ~0x03) | (val & 0x03);
|
||||
break;
|
||||
case 0xa9:
|
||||
@@ -524,10 +575,6 @@ via_apollo_init(const device_t *info)
|
||||
device_add(&via_vp3_agp_device);
|
||||
break;
|
||||
|
||||
case VIA_598:
|
||||
device_add(&via_mvp3_agp_device);
|
||||
break;
|
||||
|
||||
case VIA_691:
|
||||
device_add(&via_apro_agp_device);
|
||||
break;
|
||||
@@ -535,6 +582,12 @@ via_apollo_init(const device_t *info)
|
||||
case VIA_8601:
|
||||
device_add(&via_vt8601_agp_device);
|
||||
break;
|
||||
|
||||
case VIA_598:
|
||||
case VIA_693A:
|
||||
case VIA_694:
|
||||
device_add(&via_mvp3_agp_device);
|
||||
break;
|
||||
}
|
||||
|
||||
via_apollo_setup(dev);
|
||||
@@ -596,6 +649,32 @@ const device_t via_apro_device = {
|
||||
NULL
|
||||
};
|
||||
|
||||
const device_t via_apro133_device = {
|
||||
"VIA Apollo Pro133",
|
||||
DEVICE_PCI,
|
||||
VIA_693A, /*VT82C693A*/
|
||||
via_apollo_init,
|
||||
via_apollo_close,
|
||||
via_apollo_reset,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
const device_t via_apro133a_device = {
|
||||
"VIA Apollo Pro133A",
|
||||
DEVICE_PCI,
|
||||
VIA_694, /*VT82C694X*/
|
||||
via_apollo_init,
|
||||
via_apollo_close,
|
||||
via_apollo_reset,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
const device_t via_vt8601_device = {
|
||||
"VIA Apollo ProMedia",
|
||||
DEVICE_PCI,
|
||||
|
143
src/include/chipset.h
Normal file
143
src/include/chipset.h
Normal file
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Handling of the emulated chipsets.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2019,2020 Miran Grca.
|
||||
*/
|
||||
#ifndef EMU_CHIPSET_H
|
||||
# define EMU_CHIPSET_H
|
||||
|
||||
|
||||
/* ACC */
|
||||
extern const device_t acc2168_device;
|
||||
|
||||
/* ALi */
|
||||
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_M6117)
|
||||
extern const device_t ali6117d_device;
|
||||
#endif
|
||||
|
||||
/* AMD */
|
||||
extern const device_t amd640_device;
|
||||
|
||||
/* C&T */
|
||||
extern const device_t neat_device;
|
||||
extern const device_t scat_device;
|
||||
extern const device_t scat_4_device;
|
||||
extern const device_t scat_sx_device;
|
||||
extern const device_t cs8230_device;
|
||||
extern const device_t cs4031_device;
|
||||
|
||||
/* Headland */
|
||||
extern const device_t headland_gc10x_device;
|
||||
extern const device_t headland_ht18a_device;
|
||||
extern const device_t headland_ht18b_device;
|
||||
extern const device_t headland_ht18c_device;
|
||||
|
||||
/* Intel */
|
||||
extern const device_t intel_82335_device;
|
||||
extern const device_t i420ex_device;
|
||||
extern const device_t i420tx_device;
|
||||
extern const device_t i420zx_device;
|
||||
extern const device_t i430lx_device;
|
||||
extern const device_t i430nx_device;
|
||||
extern const device_t i430fx_device;
|
||||
extern const device_t i430fx_rev02_device;
|
||||
extern const device_t i430hx_device;
|
||||
extern const device_t i430vx_device;
|
||||
extern const device_t i430tx_device;
|
||||
extern const device_t i440fx_device;
|
||||
extern const device_t i440lx_device;
|
||||
extern const device_t i440ex_device;
|
||||
extern const device_t i440bx_device;
|
||||
extern const device_t i440gx_device;
|
||||
extern const device_t i440zx_device;
|
||||
|
||||
extern const device_t sio_device;
|
||||
extern const device_t sio_zb_device;
|
||||
|
||||
extern const device_t piix_device;
|
||||
extern const device_t piix_rev02_device;
|
||||
extern const device_t piix3_device;
|
||||
extern const device_t piix4_device;
|
||||
extern const device_t piix4e_device;
|
||||
extern const device_t slc90e66_device;
|
||||
|
||||
extern const device_t ioapic_device;
|
||||
|
||||
/* OPTi */
|
||||
extern const device_t opti283_device;
|
||||
extern const device_t opti291_device;
|
||||
extern const device_t opti493_device;
|
||||
extern const device_t opti495_device;
|
||||
extern const device_t opti802g_device;
|
||||
extern const device_t opti895_device;
|
||||
extern const device_t opti5x7_device;
|
||||
|
||||
/* SiS */
|
||||
extern const device_t rabbit_device;
|
||||
extern const device_t sis_85c401_device;
|
||||
extern const device_t sis_85c460_device;
|
||||
extern const device_t sis_85c461_device;
|
||||
extern const device_t sis_85c471_device;
|
||||
extern const device_t sis_85c496_device;
|
||||
extern const device_t sis_85c496_ls486e_device;
|
||||
#if defined(DEV_BRANCH) && defined(USE_SIS_85C50X)
|
||||
extern const device_t sis_85c50x_device;
|
||||
#endif
|
||||
|
||||
/* ST */
|
||||
#if defined(DEV_BRANCH) && defined(USE_STPC)
|
||||
extern const device_t stpc_client_device;
|
||||
extern const device_t stpc_consumer2_device;
|
||||
extern const device_t stpc_elite_device;
|
||||
extern const device_t stpc_atlas_device;
|
||||
extern const device_t stpc_serial_device;
|
||||
extern const device_t stpc_lpt_device;
|
||||
#endif
|
||||
|
||||
/* UMC */
|
||||
extern const device_t umc491_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_vpx_device;
|
||||
extern const device_t via_vp3_device;
|
||||
extern const device_t via_mvp3_device;
|
||||
extern const device_t via_apro_device;
|
||||
extern const device_t via_apro133_device;
|
||||
extern const device_t via_apro133a_device;
|
||||
extern const device_t via_vt8601_device;
|
||||
extern const device_t via_vt82c586b_device;
|
||||
extern const device_t via_vt82c596_device;
|
||||
extern const device_t via_vt82c596b_device;
|
||||
extern const device_t via_vt82c686a_device;
|
||||
extern const device_t via_vt82c686b_device;
|
||||
|
||||
/* VLSI */
|
||||
extern const device_t vl82c480_device;
|
||||
extern const device_t vlsi_scamp_device;
|
||||
|
||||
/* WD */
|
||||
extern const device_t wd76c10_device;
|
||||
|
||||
/* Miscellaneous Hardware */
|
||||
extern const device_t phoenix_486_jumper_device;
|
||||
extern const device_t vpc2007_device;
|
||||
|
||||
#endif /*EMU_CHIPSET_H*/
|
601
src/include/machine.h
Normal file
601
src/include/machine.h
Normal file
@@ -0,0 +1,601 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Handling of the emulated machines.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
*/
|
||||
#ifndef EMU_MACHINE_H
|
||||
# define EMU_MACHINE_H
|
||||
|
||||
|
||||
/* Machine feature flags. */
|
||||
// #define MACHINE_PC 0x00000000 /* PC architecture */
|
||||
/* Feature flags for features. */
|
||||
#define MACHINE_NONMI 0x00000001 /* sys does not have NMI's */
|
||||
/* Feature flags for BUS'es. */
|
||||
#define MACHINE_BUS_ISA 0x00000004 /* sys has ISA bus */
|
||||
#define MACHINE_BUS_ISA16 0x00000008 /* sys has ISA16 bus - PC/AT architecture */
|
||||
#define MACHINE_BUS_CBUS 0x00000010 /* sys has C-BUS bus */
|
||||
#define MACHINE_BUS_PS2 0x00000020 /* system has PS/2 keyboard and mouse ports */
|
||||
#define MACHINE_BUS_EISA 0x00000040 /* sys has EISA bus */
|
||||
#define MACHINE_BUS_VLB 0x00000080 /* sys has VL bus */
|
||||
#define MACHINE_BUS_MCA 0x00000100 /* sys has MCA bus */
|
||||
#define MACHINE_BUS_PCI 0x00000200 /* sys has PCI bus */
|
||||
#define MACHINE_BUS_PCMCIA 0x00000400 /* sys has PCMCIA bus */
|
||||
#define MACHINE_BUS_AGP 0x00000800 /* sys has AGP bus */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_PC 0x00000004 /* sys is PC/XT-compatible (ISA) */
|
||||
#define MACHINE_AT 0x0000000C /* sys is AT-compatible (ISA + ISA16) */
|
||||
#define MACHINE_PC98 0x00000010 /* sys is NEC PC-98x1 series */
|
||||
#define MACHINE_EISA 0x0000004C /* sys is AT-compatible with EISA */
|
||||
#define MACHINE_VLB 0x0000008C /* sys is AT-compatible with VLB */
|
||||
#define MACHINE_VLB98 0x00000090 /* sys is NEC PC-98x1 series with VLB (did that even exist?) */
|
||||
#define MACHINE_VLBE 0x000000CC /* sys is AT-compatible with EISA and VLB */
|
||||
#define MACHINE_MCA 0x00000100 /* sys is MCA */
|
||||
#define MACHINE_PCI 0x0000020C /* sys is AT-compatible with PCI */
|
||||
#define MACHINE_PCI98 0x00000210 /* sys is NEC PC-98x1 series with PCI */
|
||||
#define MACHINE_PCIE 0x0000024C /* sys is AT-compatible with PCI, and EISA */
|
||||
#define MACHINE_PCIV 0x0000028C /* sys is AT-compatible with PCI and VLB */
|
||||
#define MACHINE_PCIVE 0x000002CC /* sys is AT-compatible with PCI, VLB, and EISA */
|
||||
#define MACHINE_PCMCIA 0x00000400 /* sys is AT-compatible laptop with PCMCIA */
|
||||
#define MACHINE_AGP 0x00000A0C /* sys is AT-compatible with AGP */
|
||||
#define MACHINE_AGP98 0x00000A10 /* sys is NEC PC-98x1 series with AGP (did that even exist?) */
|
||||
#define MACHINE_IS_AT 0x00000FCC /* sys is AT-compatible (ISA + ISA16) */
|
||||
/* Feature flags for miscellaneous internal devices. */
|
||||
#define MACHINE_VIDEO 0x00001000 /* sys has int video */
|
||||
#define MACHINE_VIDEO_ONLY 0x00002000 /* sys has fixed video */
|
||||
#define MACHINE_MOUSE 0x00004000 /* sys has int mouse */
|
||||
#define MACHINE_SOUND 0x00008000 /* sys has int sound */
|
||||
#define MACHINE_FDC 0x00010000 /* sys has int FDC */
|
||||
#define MACHINE_NIC 0x00020000 /* sys has int NIC */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_VIDEO_FIXED 0x00003000 /* sys has fixed int video */
|
||||
/* Feature flags for internal storage controllers. */
|
||||
#define MACHINE_HDC 0x0FFC0000 /* sys has int HDC */
|
||||
#define MACHINE_MFM 0x00100000 /* sys has int MFM/RLL */
|
||||
#define MACHINE_XTA 0x00200000 /* sys has int XTA */
|
||||
#define MACHINE_ESDI 0x00400000 /* sys has int ESDI */
|
||||
#define MACHINE_IDE_PRI 0x00800000 /* sys has int pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_SEC 0x01000000 /* sys has int sec IDE/ATAPI */
|
||||
#define MACHINE_IDE_TER 0x02000000 /* sys has int ter IDE/ATAPI */
|
||||
#define MACHINE_IDE_QUA 0x04000000 /* sys has int qua IDE/ATAPI */
|
||||
#define MACHINE_SCSI_PRI 0x08000000 /* sys has int pri SCSI */
|
||||
#define MACHINE_SCSI_SEC 0x10000000 /* sys has int sec SCSI */
|
||||
#define MACHINE_USB 0x20000000 /* sys has int USB */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_IDE 0x00800000 /* sys has int single IDE/ATAPI - mark as pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_DUAL 0x01800000 /* sys has int dual IDE/ATAPI - mark as both pri and sec IDE/ATAPI */
|
||||
#define MACHINE_IDE_QUAD 0x07800000 /* sys has int quad IDE/ATAPI - mark as dual + both ter and and qua IDE/ATAPI */
|
||||
#define MACHINE_SCSI 0x08000000 /* sys has int single SCSI - mark as pri SCSI */
|
||||
#define MACHINE_SCSI_DUAL 0x18000000 /* sys has int dual SCSI - mark as both pri and sec SCSI */
|
||||
|
||||
#define IS_ARCH(m, a) (machines[(m)].flags & (a)) ? 1 : 0;
|
||||
|
||||
|
||||
enum {
|
||||
MACHINE_TYPE_NONE = 0,
|
||||
MACHINE_TYPE_8088,
|
||||
MACHINE_TYPE_8086,
|
||||
MACHINE_TYPE_286,
|
||||
MACHINE_TYPE_386SX,
|
||||
MACHINE_TYPE_386DX,
|
||||
MACHINE_TYPE_486,
|
||||
MACHINE_TYPE_SOCKET4,
|
||||
MACHINE_TYPE_SOCKET5,
|
||||
MACHINE_TYPE_SOCKET7_3V,
|
||||
MACHINE_TYPE_SOCKET7,
|
||||
MACHINE_TYPE_SOCKETS7,
|
||||
MACHINE_TYPE_SOCKET8,
|
||||
MACHINE_TYPE_SLOT1,
|
||||
MACHINE_TYPE_SLOT2,
|
||||
MACHINE_TYPE_SOCKET370,
|
||||
MACHINE_TYPE_MISC,
|
||||
MACHINE_TYPE_MAX
|
||||
};
|
||||
|
||||
|
||||
typedef struct _machine_type_ {
|
||||
const char *name;
|
||||
const char id;
|
||||
} machine_type_t;
|
||||
|
||||
|
||||
#ifdef NEW_STRUCT
|
||||
typedef struct _machine_ {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
const char type;
|
||||
#ifdef EMU_DEVICE_H
|
||||
const device_t *device;
|
||||
#else
|
||||
void *device;
|
||||
#endif
|
||||
struct {
|
||||
const char *name;
|
||||
#ifdef EMU_CPU_H
|
||||
CPU *cpus;
|
||||
#else
|
||||
void *cpus;
|
||||
#endif
|
||||
} cpu[5];
|
||||
int flags;
|
||||
uint32_t min_ram, max_ram;
|
||||
int ram_granularity;
|
||||
int nvrmask;
|
||||
} machine_t;
|
||||
#else
|
||||
typedef struct _machine_ {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
const char type;
|
||||
struct {
|
||||
const char *name;
|
||||
#ifdef EMU_CPU_H
|
||||
CPU *cpus;
|
||||
#else
|
||||
void *cpus;
|
||||
#endif
|
||||
} cpu[5];
|
||||
int flags;
|
||||
uint32_t min_ram, max_ram;
|
||||
int ram_granularity;
|
||||
int nvrmask;
|
||||
int (*init)(const struct _machine_ *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
const device_t *(*get_device)(void);
|
||||
#else
|
||||
void *get_device;
|
||||
#endif
|
||||
} machine_t;
|
||||
#endif
|
||||
|
||||
|
||||
/* Global variables. */
|
||||
extern const machine_type_t machine_types[];
|
||||
extern const machine_t machines[];
|
||||
extern int bios_only;
|
||||
extern int machine;
|
||||
extern int AT, PCI;
|
||||
|
||||
|
||||
/* Core functions. */
|
||||
extern int machine_count(void);
|
||||
extern int machine_available(int m);
|
||||
extern char *machine_getname(void);
|
||||
extern char *machine_get_internal_name(void);
|
||||
extern int machine_get_machine_from_internal_name(char *s);
|
||||
extern void machine_init(void);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *machine_getdevice(int m);
|
||||
#endif
|
||||
extern char *machine_get_internal_name_ex(int m);
|
||||
extern int machine_get_nvrmask(int m);
|
||||
extern void machine_close(void);
|
||||
|
||||
|
||||
/* Initialization functions for boards and systems. */
|
||||
extern void machine_common_init(const machine_t *);
|
||||
|
||||
/* m_amstrad.c */
|
||||
extern int machine_pc1512_init(const machine_t *);
|
||||
extern int machine_pc1640_init(const machine_t *);
|
||||
extern int machine_pc200_init(const machine_t *);
|
||||
extern int machine_ppc512_init(const machine_t *);
|
||||
extern int machine_pc2086_init(const machine_t *);
|
||||
extern int machine_pc3086_init(const machine_t *);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *pc1512_get_device(void);
|
||||
extern const device_t *pc1640_get_device(void);
|
||||
extern const device_t *pc200_get_device(void);
|
||||
extern const device_t *ppc512_get_device(void);
|
||||
extern const device_t *pc2086_get_device(void);
|
||||
extern const device_t *pc3086_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_at.c */
|
||||
extern void machine_at_common_init_ex(const machine_t *, int type);
|
||||
extern void machine_at_common_init(const machine_t *);
|
||||
extern void machine_at_init(const machine_t *);
|
||||
extern void machine_at_ps2_init(const machine_t *);
|
||||
extern void machine_at_common_ide_init(const machine_t *);
|
||||
extern void machine_at_ibm_common_ide_init(const machine_t *);
|
||||
extern void machine_at_ide_init(const machine_t *);
|
||||
extern void machine_at_ps2_ide_init(const machine_t *);
|
||||
|
||||
extern int machine_at_ibm_init(const machine_t *);
|
||||
|
||||
//IBM AT with custom BIOS
|
||||
extern int machine_at_ibmatami_init(const machine_t *); // IBM AT with AMI BIOS
|
||||
extern int machine_at_ibmatpx_init(const machine_t *); //IBM AT with Phoenix BIOS
|
||||
extern int machine_at_ibmatquadtel_init(const machine_t *); // IBM AT with Quadtel BIOS
|
||||
|
||||
extern int machine_at_ibmxt286_init(const machine_t *);
|
||||
|
||||
#if defined(DEV_BRANCH) && defined(USE_SIEMENS)
|
||||
extern int machine_at_siemens_init(const machine_t *); //Siemens PCD-2L. N82330 discrete machine. It segfaults in some places
|
||||
#endif
|
||||
|
||||
#if defined(DEV_BRANCH) && defined(USE_OPEN_AT)
|
||||
extern int machine_at_open_at_init(const machine_t *);
|
||||
#endif
|
||||
|
||||
/* m_at_286_386sx.c */
|
||||
extern int machine_at_tg286m_init(const machine_t *);
|
||||
extern int machine_at_ama932j_init(const machine_t *);
|
||||
extern int machine_at_px286_init(const machine_t *);
|
||||
extern int machine_at_quadt286_init(const machine_t *);
|
||||
extern int machine_at_mr286_init(const machine_t *);
|
||||
|
||||
extern int machine_at_neat_init(const machine_t *);
|
||||
extern int machine_at_neat_ami_init(const machine_t *);
|
||||
|
||||
extern int machine_at_award286_init(const machine_t *);
|
||||
extern int machine_at_gdc212m_init(const machine_t *);
|
||||
extern int machine_at_gw286ct_init(const machine_t *);
|
||||
extern int machine_at_super286tr_init(const machine_t *);
|
||||
extern int machine_at_spc4200p_init(const machine_t *);
|
||||
extern int machine_at_spc4216p_init(const machine_t *);
|
||||
extern int machine_at_kmxc02_init(const machine_t *);
|
||||
extern int machine_at_deskmaster286_init(const machine_t *);
|
||||
|
||||
extern int machine_at_shuttle386sx_init(const machine_t *);
|
||||
extern int machine_at_adi386sx_init(const machine_t *);
|
||||
extern int machine_at_commodore_sl386sx_init(const machine_t *);
|
||||
extern int machine_at_wd76c10_init(const machine_t *);
|
||||
|
||||
extern int machine_at_awardsx_init(const machine_t *);
|
||||
#if defined(DEV_BRANCH) && defined(USE_M6117)
|
||||
extern int machine_at_arb1375_init(const machine_t *);
|
||||
extern int machine_at_pja511m_init(const machine_t *);
|
||||
#endif
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *at_ama932j_get_device(void);
|
||||
extern const device_t *at_commodore_sl386sx_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_at_386dx_486.c */
|
||||
|
||||
extern int machine_at_acc386_init(const machine_t *);
|
||||
extern int machine_at_asus386_init(const machine_t *);
|
||||
extern int machine_at_ecs386_init(const machine_t *);
|
||||
extern int machine_at_ustechnologies386_init(const machine_t *);
|
||||
extern int machine_at_micronics386_init(const machine_t *);
|
||||
|
||||
extern int machine_at_rycleopardlx_init(const machine_t *);
|
||||
|
||||
extern int machine_at_486vchd_init(const machine_t *);
|
||||
|
||||
extern int machine_at_cs4031_init(const machine_t *);
|
||||
|
||||
extern int machine_at_pb410a_init(const machine_t *);
|
||||
|
||||
extern int machine_at_acera1g_init(const machine_t *);
|
||||
extern int machine_at_ali1429_init(const machine_t *);
|
||||
extern int machine_at_winbios1429_init(const machine_t *);
|
||||
|
||||
extern int machine_at_opti495_init(const machine_t *);
|
||||
extern int machine_at_opti495_ami_init(const machine_t *);
|
||||
extern int machine_at_opti495_mr_init(const machine_t *);
|
||||
|
||||
#if defined(DEV_BRANCH) && defined(USE_VECT486VL)
|
||||
extern int machine_at_vect486vl_init(const machine_t *);
|
||||
#endif
|
||||
|
||||
extern int machine_at_403tg_init(const machine_t *);
|
||||
extern int machine_at_pc330_6571_init(const machine_t *);
|
||||
|
||||
extern int machine_at_sis401_init(const machine_t *);
|
||||
extern int machine_at_valuepoint433_init(const machine_t *);
|
||||
|
||||
extern int machine_at_vli486sv2g_init(const machine_t *);
|
||||
extern int machine_at_ami471_init(const machine_t *);
|
||||
extern int machine_at_dtk486_init(const machine_t *);
|
||||
extern int machine_at_px471_init(const machine_t *);
|
||||
extern int machine_at_win471_init(const machine_t *);
|
||||
extern int machine_at_vi15g_init(const machine_t *);
|
||||
|
||||
extern int machine_at_r418_init(const machine_t *);
|
||||
extern int machine_at_ls486e_init(const machine_t *);
|
||||
extern int machine_at_4dps_init(const machine_t *);
|
||||
extern int machine_at_4sa2_init(const machine_t *);
|
||||
extern int machine_at_alfredo_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 *);
|
||||
#endif
|
||||
#if defined(DEV_BRANCH) && defined(USE_STPC)
|
||||
extern int machine_at_itoxstar_init(const machine_t *);
|
||||
extern int machine_at_arb1479_init(const machine_t *);
|
||||
extern int machine_at_pcm9340_init(const machine_t *);
|
||||
extern int machine_at_pcm5330_init(const machine_t *);
|
||||
#endif
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *at_acera1g_get_device(void);
|
||||
#if defined(DEV_BRANCH) && defined(USE_VECT486VL)
|
||||
extern const device_t *at_vect486vl_get_device(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* m_at_commodore.c */
|
||||
extern int machine_at_cmdpc_init(const machine_t *);
|
||||
|
||||
/* m_at_compaq.c */
|
||||
extern int machine_at_portableii_init(const machine_t *);
|
||||
extern int machine_at_portableiii_init(const machine_t *);
|
||||
extern int machine_at_portableiii386_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *at_cpqiii_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_at_socket4_5.c */
|
||||
extern int machine_at_excalibur_init(const machine_t *);
|
||||
|
||||
extern int machine_at_batman_init(const machine_t *);
|
||||
extern int machine_at_ambradp60_init(const machine_t *);
|
||||
extern int machine_at_valuepointp60_init(const machine_t *);
|
||||
extern int machine_at_p5mp3_init(const machine_t *);
|
||||
extern int machine_at_pb520r_init(const machine_t *);
|
||||
extern int machine_at_586mc1_init(const machine_t *);
|
||||
|
||||
extern int machine_at_plato_init(const machine_t *);
|
||||
extern int machine_at_ambradp90_init(const machine_t *);
|
||||
extern int machine_at_430nx_init(const machine_t *);
|
||||
|
||||
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
|
||||
extern int machine_at_powermate_v_init(const machine_t *);
|
||||
extern int machine_at_acerv30_init(const machine_t *);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *at_endeavor_get_device(void);
|
||||
extern const device_t *at_pb520r_get_device(void);
|
||||
extern const device_t *at_thor_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_at_socket7_s7.c */
|
||||
extern int machine_at_chariot_init(const machine_t *);
|
||||
extern int machine_at_mr586_init(const machine_t *);
|
||||
extern int machine_at_thor_init(const machine_t *);
|
||||
extern int machine_at_gw2katx_init(const machine_t *);
|
||||
extern int machine_at_mrthor_init(const machine_t *);
|
||||
extern int machine_at_pb640_init(const machine_t *);
|
||||
|
||||
extern int machine_at_acerm3a_init(const machine_t *);
|
||||
extern int machine_at_acerv35n_init(const machine_t *);
|
||||
extern int machine_at_ap53_init(const machine_t *);
|
||||
extern int machine_at_p55t2p4_init(const machine_t *);
|
||||
extern int machine_at_p55t2s_init(const machine_t *);
|
||||
extern int machine_at_8500tuc_init(const machine_t *);
|
||||
extern int machine_at_m7shi_init(const machine_t *);
|
||||
extern int machine_at_tc430hx_init(const machine_t *);
|
||||
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_p55tvp4_init(const machine_t *);
|
||||
extern int machine_at_p55va_init(const machine_t *);
|
||||
extern int machine_at_i430vx_init(const machine_t *);
|
||||
extern int machine_at_brio80xx_init(const machine_t *);
|
||||
extern int machine_at_8500tvxa_init(const machine_t *);
|
||||
extern int machine_at_presario4500_init(const machine_t *);
|
||||
extern int machine_at_gw2kte_init(const machine_t *);
|
||||
extern int machine_at_pb680_init(const machine_t *);
|
||||
|
||||
extern int machine_at_nupro592_init(const machine_t *);
|
||||
extern int machine_at_tx97_init(const machine_t *);
|
||||
extern int machine_at_ym430tx_init(const machine_t *);
|
||||
extern int machine_at_mb540n_init(const machine_t *);
|
||||
extern int machine_at_p5mms98_init(const machine_t *);
|
||||
|
||||
extern int machine_at_ficva502_init(const machine_t *);
|
||||
|
||||
extern int machine_at_ficpa2012_init(const machine_t *);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *at_thor_get_device(void);
|
||||
extern const device_t *at_pb640_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_at_super7_ss7.c */
|
||||
extern int machine_at_ax59pro_init(const machine_t *);
|
||||
extern int machine_at_mvp3_init(const machine_t *);
|
||||
extern int machine_at_ficva503a_init(const machine_t *);
|
||||
|
||||
/* m_at_socket8.c */
|
||||
extern int machine_at_686nx_init(const machine_t *);
|
||||
extern int machine_at_v60n_init(const machine_t *);
|
||||
extern int machine_at_vs440fx_init(const machine_t *);
|
||||
extern int machine_at_ap440fx_init(const machine_t *);
|
||||
extern int machine_at_mb600n_init(const machine_t *);
|
||||
extern int machine_at_8500ttc_init(const machine_t *);
|
||||
extern int machine_at_m6mi_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern void machine_at_p65up5_common_init(const machine_t *, const device_t *northbridge);
|
||||
#endif
|
||||
extern int machine_at_p65up5_cp6nd_init(const machine_t *);
|
||||
|
||||
/* m_at_slot1.c */
|
||||
extern int machine_at_p65up5_cpknd_init(const machine_t *);
|
||||
extern int machine_at_kn97_init(const machine_t *);
|
||||
|
||||
extern int machine_at_lx6_init(const machine_t *);
|
||||
extern int machine_at_spitfire_init(const machine_t *);
|
||||
|
||||
extern int machine_at_p6i440e2_init(const machine_t *);
|
||||
|
||||
extern int machine_at_p2bls_init(const machine_t *);
|
||||
extern int machine_at_p3bf_init(const machine_t *);
|
||||
extern int machine_at_bf6_init(const machine_t *);
|
||||
extern int machine_at_ax6bc_init(const machine_t *);
|
||||
extern int machine_at_atc6310bxii_init(const machine_t *);
|
||||
extern int machine_at_tsunamiatx_init(const machine_t *);
|
||||
extern int machine_at_p6sba_init(const machine_t *);
|
||||
extern int machine_at_ficka6130_init(const machine_t *);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *at_tsunamiatx_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_at_slot2.c */
|
||||
extern int machine_at_6gxu_init(const machine_t *);
|
||||
extern int machine_at_s2dge_init(const machine_t *);
|
||||
extern int machine_at_fw6400gx_init(const machine_t *);
|
||||
|
||||
/* m_at_socket370.c */
|
||||
extern int machine_at_s370slm_init(const machine_t *);
|
||||
|
||||
extern int machine_at_cubx_init(const machine_t *);
|
||||
extern int machine_at_atc7020bxii_init(const machine_t *);
|
||||
extern int machine_at_ambx133_init(const machine_t *);
|
||||
extern int machine_at_awo671r_init(const machine_t *);
|
||||
extern int machine_at_63a_init(const machine_t *);
|
||||
extern int machine_at_s370sba_init(const machine_t *);
|
||||
extern int machine_at_apas3_init(const machine_t *);
|
||||
extern int machine_at_wcf681_init(const machine_t *);
|
||||
extern int machine_at_6via85x_init(const machine_t *);
|
||||
extern int machine_at_603tcf_init(const machine_t *);
|
||||
|
||||
/* m_at_misc.c */
|
||||
extern int machine_at_vpc2007_init(const machine_t *);
|
||||
|
||||
/* m_at_t3100e.c */
|
||||
extern int machine_at_t3100e_init(const machine_t *);
|
||||
|
||||
/* m_europc.c */
|
||||
extern int machine_europc_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t europc_device;
|
||||
#endif
|
||||
|
||||
/* m_oivetti_m24.c */
|
||||
extern int machine_olim24_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *m24_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_pcjr.c */
|
||||
extern int machine_pcjr_init(const machine_t *);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *pcjr_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_ps1.c */
|
||||
extern int machine_ps1_m2011_init(const machine_t *);
|
||||
extern int machine_ps1_m2121_init(const machine_t *);
|
||||
extern int machine_ps1_m2133_init(const machine_t *);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *ps1_m2133_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_ps1_hdc.c */
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern void ps1_hdc_inform(void *, uint8_t *);
|
||||
extern const device_t ps1_hdc_device;
|
||||
#endif
|
||||
|
||||
/* m_ps2_isa.c */
|
||||
extern int machine_ps2_m30_286_init(const machine_t *);
|
||||
|
||||
/* m_ps2_mca.c */
|
||||
extern int machine_ps2_model_50_init(const machine_t *);
|
||||
extern int machine_ps2_model_55sx_init(const machine_t *);
|
||||
extern int machine_ps2_model_70_type3_init(const machine_t *);
|
||||
#if defined(DEV_BRANCH) && defined(USE_PS2M70T4)
|
||||
extern int machine_ps2_model_70_type4_init(const machine_t *);
|
||||
#endif
|
||||
extern int machine_ps2_model_80_init(const machine_t *);
|
||||
|
||||
/* m_tandy.c */
|
||||
extern int tandy1k_eeprom_read(void);
|
||||
extern int machine_tandy_init(const machine_t *);
|
||||
extern int machine_tandy1000hx_init(const machine_t *);
|
||||
extern int machine_tandy1000sl2_init(const machine_t *);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *tandy1k_get_device(void);
|
||||
extern const device_t *tandy1k_hx_get_device(void);
|
||||
extern const device_t *tandy1k_sl_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_xt.c */
|
||||
extern int machine_pc_init(const machine_t *);
|
||||
extern int machine_pc82_init(const machine_t *);
|
||||
|
||||
extern int machine_xt_init(const machine_t *);
|
||||
extern int machine_genxt_init(const machine_t *);
|
||||
|
||||
extern int machine_xt86_init(const machine_t *);
|
||||
|
||||
extern int machine_xt_americxt_init(const machine_t *);
|
||||
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_pxxt_init(const machine_t *);
|
||||
|
||||
extern int machine_xt_iskra3104_init(const machine_t *);
|
||||
|
||||
#if defined(DEV_BRANCH) && defined(USE_HEDAKA)
|
||||
extern int machine_xt_hed919_init(const machine_t *);
|
||||
#endif
|
||||
|
||||
/* m_xt_compaq.c */
|
||||
extern int machine_xt_compaq_deskpro_init(const machine_t *);
|
||||
extern int machine_xt_compaq_portable_init(const machine_t *);
|
||||
|
||||
/* m_xt_laserxt.c */
|
||||
#if defined(DEV_BRANCH) && defined(USE_LASERXT)
|
||||
extern int machine_xt_laserxt_init(const machine_t *);
|
||||
extern int machine_xt_lxt3_init(const machine_t *);
|
||||
#endif
|
||||
|
||||
/* m_xt_t1000.c */
|
||||
extern int machine_xt_t1000_init(const machine_t *);
|
||||
extern int machine_xt_t1200_init(const machine_t *);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *t1000_get_device(void);
|
||||
extern const device_t *t1200_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_xt_zenith.c */
|
||||
extern int machine_xt_zenith_init(const machine_t *);
|
||||
|
||||
/* m_xt_xi8088.c */
|
||||
extern int machine_xt_xi8088_init(const machine_t *);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *xi8088_get_device(void);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*EMU_MACHINE_H*/
|
@@ -307,6 +307,91 @@ machine_at_apas3_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_wcf681_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear(L"roms/machines/wcf681/681osda2.bin",
|
||||
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(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 0, 0);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x01, PCI_CARD_SPECIAL, 1, 2, 3, 4);
|
||||
device_add(&via_apro133a_device);
|
||||
device_add(&via_vt82c596b_device);
|
||||
device_add(&w83977tf_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_6via85x_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear(L"roms/machines/6via85x/6VIA85X_ver_1_1.bin",
|
||||
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(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 0, 0);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x01, PCI_CARD_SPECIAL, 1, 2, 3, 4);
|
||||
device_add(&via_apro133a_device);
|
||||
device_add(&via_vt82c686b_device);
|
||||
device_add(&via_vt82c686_sio_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
hwm_values_t machine_hwm = {
|
||||
{ /* fan speeds */
|
||||
3000, /* Chassis */
|
||||
3000, /* CPU */
|
||||
3000 /* Power */
|
||||
}, { /* temperatures */
|
||||
30, /* MB */
|
||||
30, /* JTPWR */
|
||||
30 /* CPU */
|
||||
}, { /* voltages */
|
||||
2050, /* VCORE (2.05V by default) */
|
||||
0, /* unused */
|
||||
3300, /* +3.3V */
|
||||
RESISTOR_DIVIDER(5000, 11, 16), /* +5V (divider values bruteforced) */
|
||||
RESISTOR_DIVIDER(12000, 28, 10), /* +12V (28K/10K divider suggested in the W83781D datasheet) */
|
||||
RESISTOR_DIVIDER(12000, 59, 20), /* -12V (divider values bruteforced) */
|
||||
RESISTOR_DIVIDER(5000, 1, 2) /* -5V (divider values bruteforced) */
|
||||
}
|
||||
};
|
||||
hwm_set_values(machine_hwm);
|
||||
device_add(&via_vt82c686_hwm_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_603tcf_init(const machine_t *model)
|
||||
{
|
||||
|
@@ -244,7 +244,6 @@ const machine_t machines[] = {
|
||||
{ "[SiS 496] Lucky Star LS-486E", "ls486e", MACHINE_TYPE_486, {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_IDE_DUAL, 1, 128, 1, 255, machine_at_ls486e_init, NULL },
|
||||
{ "[SiS 496] Rise Computer R418", "r418", MACHINE_TYPE_486, {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_IDE_DUAL, 1, 255, 1, 255, machine_at_r418_init, NULL },
|
||||
{ "[SiS 496] Soyo 4SA2", "4sa2", MACHINE_TYPE_486, {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_IDE_DUAL, 1, 255, 1, 255, machine_at_4sa2_init, NULL },
|
||||
{ "[SiS 496] Micronics M4Li", "m4li", MACHINE_TYPE_486, {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1, 128, 1, 127, machine_at_m4li_init, NULL },
|
||||
{ "[SiS 496] Zida Tomato 4DP", "4dps", MACHINE_TYPE_486, {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_IDE_DUAL, 1, 255, 1, 255, machine_at_4dps_init, NULL },
|
||||
#if defined(DEV_BRANCH) && defined(NO_SIO)
|
||||
{ "[VIA VT82C496G] FIC VIP-IO2", "486vipio2", MACHINE_TYPE_486, {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, MACHINE_PCIV | MACHINE_IDE_DUAL, 1, 128, 1, 255, machine_at_486vipio2_init, NULL },
|
||||
@@ -266,11 +265,7 @@ const machine_t machines[] = {
|
||||
/* 430LX */
|
||||
{ "[i430LX] IBM Ambra DP60 PCI", "ambradp60", MACHINE_TYPE_SOCKET4, {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2, 128, 2, 127, machine_at_ambradp60_init, NULL },
|
||||
{ "[i430LX] IBM PS/ValuePoint P60", "valuepointp60", MACHINE_TYPE_SOCKET4, {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2, 128, 2, 127, machine_at_valuepointp60_init, NULL },
|
||||
#if defined(DEV_BRANCH) && defined(USE_DELLS4)
|
||||
{ "[i430LX] Dell Dimension XPS P60", "dellxp60", MACHINE_TYPE_SOCKET4, {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2, 128, 2, 127, machine_at_dellxp60_init, NULL },
|
||||
{ "[i430LX] Dell OptiPlex 560/L", "opti560l", MACHINE_TYPE_SOCKET4, {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2, 128, 2, 127, machine_at_opti560l_init, NULL },
|
||||
#endif
|
||||
{ "[i430LX] Intel Premiere/PCI", "revenge", MACHINE_TYPE_SOCKET4, {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2, 128, 2, 127, machine_at_batman_init, NULL },
|
||||
{ "[i430LX] Intel Premiere/PCI", "revenge", MACHINE_TYPE_SOCKET4, {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2, 128, 2, 127, machine_at_batman_init, NULL },
|
||||
{ "[i430LX] ASUS P/I-P5MP3", "p5mp3", MACHINE_TYPE_SOCKET4, {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE, 2, 192, 2, 127, machine_at_p5mp3_init, NULL },
|
||||
{ "[i430LX] Micro Star 586MC1", "586mc1", MACHINE_TYPE_SOCKET4, {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2, 128, 2, 127, machine_at_586mc1_init, NULL },
|
||||
{ "[i430LX] Packard Bell PB520R", "pb520r", MACHINE_TYPE_SOCKET4, {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 8, 136, 2, 127, machine_at_pb520r_init, at_pb520r_get_device },
|
||||
@@ -367,7 +362,6 @@ const machine_t machines[] = {
|
||||
|
||||
/* 440EX */
|
||||
{ "[i440EX] QDI EXCELLENT II", "p6i440e2", MACHINE_TYPE_SLOT1, {{"Intel", cpus_PentiumII66}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 512, 8, 255, machine_at_p6i440e2_init, NULL },
|
||||
|
||||
/* 440BX */
|
||||
{ "[i440BX] ASUS P2B-LS", "p2bls", MACHINE_TYPE_SLOT1, {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 1024, 8, 255, machine_at_p2bls_init, NULL },
|
||||
{ "[i440BX] ASUS P3B-F", "p3bf", MACHINE_TYPE_SLOT1, {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 1024, 8, 255, machine_at_p3bf_init, NULL },
|
||||
@@ -404,6 +398,8 @@ const machine_t machines[] = {
|
||||
|
||||
/* VIA Apollo Pro */
|
||||
{ "[VIA Apollo Pro] PC Partner APAS3", "apas3", MACHINE_TYPE_SOCKET370, {{"Intel", cpus_Celeron}, {"VIA", cpus_Cyrix3}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 768, 8, 255, machine_at_apas3_init, NULL },
|
||||
{ "[VIA Apollo Pro133A] Aewin WCF-681", "wcf681", MACHINE_TYPE_SOCKET370, {{"Intel", cpus_Celeron}, {"VIA", cpus_Cyrix3}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 768, 8, 255, machine_at_wcf681_init, NULL },
|
||||
{ "[VIA Apollo Pro133A] Acorp 6VIA85X", "6via85x", MACHINE_TYPE_SOCKET370, {{"Intel", cpus_Celeron}, {"VIA", cpus_Cyrix3}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 768, 8, 255, machine_at_6via85x_init, NULL },
|
||||
{ "[VIA Apollo ProMedia] Jetway 603TCF", "603tcf", MACHINE_TYPE_SOCKET370, {{"Intel", cpus_Celeron}, {"VIA", cpus_Cyrix3}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 512, 8, 255, machine_at_603tcf_init, NULL },
|
||||
|
||||
/* Miscellaneous/Fake/Hypervisor machines */
|
||||
|
Reference in New Issue
Block a user