mirror of
https://github.com/86Box/86Box.git
synced 2026-02-25 04:45:31 -07:00
Named initializers in machine table
This commit is contained in:
@@ -236,7 +236,7 @@ cpu_is_eligible(const cpu_family_t *cpu_family, int cpu, int machine)
|
||||
return 1;
|
||||
|
||||
/* Add implicit CPU package compatibility. */
|
||||
packages = machine_s->cpu_package;
|
||||
packages = machine_s->cpu.package;
|
||||
if (packages & CPU_PKG_SOCKET3)
|
||||
packages |= CPU_PKG_SOCKET1;
|
||||
else if (packages & CPU_PKG_SLOT1)
|
||||
@@ -251,11 +251,11 @@ cpu_is_eligible(const cpu_family_t *cpu_family, int cpu, int machine)
|
||||
return 1;
|
||||
|
||||
/* Check CPU blocklist. */
|
||||
if (machine_s->cpu_block) {
|
||||
if (machine_s->cpu.block) {
|
||||
i = 0;
|
||||
|
||||
while (machine_s->cpu_block[i]) {
|
||||
if (machine_s->cpu_block[i++] == cpu_s->cpu_type)
|
||||
while (machine_s->cpu.block[i]) {
|
||||
if (machine_s->cpu.block[i++] == cpu_s->cpu_type)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -263,19 +263,19 @@ cpu_is_eligible(const cpu_family_t *cpu_family, int cpu, int machine)
|
||||
bus_speed = cpu_s->rspeed / cpu_s->multi;
|
||||
|
||||
/* Minimum bus speed with ~0.84 MHz (for 8086) tolerance. */
|
||||
if (machine_s->cpu_min_bus && (bus_speed < (machine_s->cpu_min_bus - 840907)))
|
||||
if (machine_s->cpu.min_bus && (bus_speed < (machine_s->cpu.min_bus - 840907)))
|
||||
return 0;
|
||||
|
||||
/* Maximum bus speed with ~0.84 MHz (for 8086) tolerance. */
|
||||
if (machine_s->cpu_max_bus && (bus_speed > (machine_s->cpu_max_bus + 840907)))
|
||||
if (machine_s->cpu.max_bus && (bus_speed > (machine_s->cpu.max_bus + 840907)))
|
||||
return 0;
|
||||
|
||||
/* Minimum voltage with 0.1V tolerance. */
|
||||
if (machine_s->cpu_min_voltage && (cpu_s->voltage < (machine_s->cpu_min_voltage - 100)))
|
||||
if (machine_s->cpu.min_voltage && (cpu_s->voltage < (machine_s->cpu.min_voltage - 100)))
|
||||
return 0;
|
||||
|
||||
/* Maximum voltage with 0.1V tolerance. */
|
||||
if (machine_s->cpu_max_voltage && (cpu_s->voltage > (machine_s->cpu_max_voltage + 100)))
|
||||
if (machine_s->cpu.max_voltage && (cpu_s->voltage > (machine_s->cpu.max_voltage + 100)))
|
||||
return 0;
|
||||
|
||||
/* Account for CPUs which use a different internal multiplier than specified by jumpers. */
|
||||
@@ -285,7 +285,7 @@ cpu_is_eligible(const cpu_family_t *cpu_family, int cpu, int machine)
|
||||
if (cpu_s->cpu_flags & CPU_FIXED_MULTIPLIER)
|
||||
return 1;
|
||||
else if (cpu_family->package & CPU_PKG_SOCKET5_7) {
|
||||
if ((multi == 1.5) && (cpu_s->cpu_type == CPU_5K86) && (machine_s->cpu_min_multi > 1.5)) /* K5 5k86 */
|
||||
if ((multi == 1.5) && (cpu_s->cpu_type == CPU_5K86) && (machine_s->cpu.min_multi > 1.5)) /* K5 5k86 */
|
||||
multi = 2.0;
|
||||
else if (multi == 1.75) /* K5 5k86 */
|
||||
multi = 2.5;
|
||||
@@ -296,7 +296,7 @@ cpu_is_eligible(const cpu_family_t *cpu_family, int cpu, int machine)
|
||||
else if ((cpu_s->cpu_type == CPU_K6_2P) || (cpu_s->cpu_type == CPU_K6_3P))
|
||||
multi = 2.5;
|
||||
else if (((cpu_s->cpu_type == CPU_WINCHIP) || (cpu_s->cpu_type == CPU_WINCHIP2)) &&
|
||||
(machine_s->cpu_min_multi > 2.0)) /* WinChip (2) */
|
||||
(machine_s->cpu.min_multi > 2.0)) /* WinChip (2) */
|
||||
multi = 2.5;
|
||||
}
|
||||
else if (multi == (7.0 / 3.0)) /* WinChip 2A - 2.33x */
|
||||
@@ -312,27 +312,27 @@ cpu_is_eligible(const cpu_family_t *cpu_family, int cpu, int machine)
|
||||
else if (multi == 4.0) {
|
||||
/* WinChip (2) */
|
||||
if ((cpu_s->cpu_type == CPU_WINCHIP) || (cpu_s->cpu_type == CPU_WINCHIP2)) {
|
||||
if (machine_s->cpu_min_multi >= 1.5)
|
||||
if (machine_s->cpu.min_multi >= 1.5)
|
||||
multi = 1.5;
|
||||
else if (machine_s->cpu_min_multi >= 3.5)
|
||||
else if (machine_s->cpu.min_multi >= 3.5)
|
||||
multi = 3.5;
|
||||
else if (machine_s->cpu_min_multi >= 4.5)
|
||||
else if (machine_s->cpu.min_multi >= 4.5)
|
||||
multi = 4.5;
|
||||
} else if ((cpu_s->cpu_type == CPU_Cx6x86) || (cpu_s->cpu_type == CPU_Cx6x86L)) /* 6x86(L) */
|
||||
multi = 3.0;
|
||||
} else if ((multi == 5.0) && ((cpu_s->cpu_type == CPU_WINCHIP) || (cpu_s->cpu_type == CPU_WINCHIP2)) &&
|
||||
(machine_s->cpu_min_multi > 5.0)) /* WinChip (2) */
|
||||
(machine_s->cpu.min_multi > 5.0)) /* WinChip (2) */
|
||||
multi = 5.5;
|
||||
else if (multi == 6.0) /* K6-2(+) / K6-3(+) */
|
||||
multi = 2.0;
|
||||
}
|
||||
|
||||
/* Minimum multiplier, */
|
||||
if (multi < machine_s->cpu_min_multi)
|
||||
if (multi < machine_s->cpu.min_multi)
|
||||
return 0;
|
||||
|
||||
/* Maximum multiplier. */
|
||||
if (machine_s->cpu_max_multi && (multi > machine_s->cpu_max_multi))
|
||||
if (machine_s->cpu.max_multi && (multi > machine_s->cpu.max_multi))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -41,6 +41,94 @@ typedef struct {
|
||||
#define RSHIFT_OFF 0x105
|
||||
|
||||
|
||||
/* KBC #define's */
|
||||
#define KBC_UNKNOWN 0x0000 /* As yet unknown keyboard */
|
||||
|
||||
/* IBM-style controllers */
|
||||
#define KBC_IBM_PC_XT 0x0000 /* IBM PC/XT */
|
||||
#define KBC_IBM_PCJR 0x0001 /* IBM PCjr */
|
||||
#define KBC_IBM_TYPE_1 0x0002 /* IBM AT / PS/2 Type 1 */
|
||||
#define KBC_IBM_TYPE_2 0x0003 /* IBM PS/2 Type 2 */
|
||||
#define KBC_AMI_ACCESS_METHODS 0x0004 /* Access Methods AMI */
|
||||
#define KBC_JU_JET 0x0005 /* Ju-Jet */
|
||||
/* OEM proprietary */
|
||||
#define KBC_TANDY 0x0011 /* Tandy 1000/1000HX */
|
||||
#define KBC_TANDY_SL2 0x0012 /* Tandy 1000SL2 */
|
||||
#define KBC_AMSTRAD 0x0013 /* Amstrad */
|
||||
#define KBC_OLIVETTI_XT 0x0014 /* Olivetti XT */
|
||||
#define KBC_OLIVETTI 0x0015 /* Olivetti AT */
|
||||
#define KBC_TOSHIBA 0x0016 /* Toshiba AT */
|
||||
#define KBC_COMPAQ 0x0017 /* Compaq */
|
||||
#define KBC_NCR 0x0018 /* NCR */
|
||||
#define KBC_QUADTEL 0x0019 /* Quadtel */
|
||||
#define KBC_SIEMENS 0x001A /* Siemens */
|
||||
/* Phoenix MultiKey/42 */
|
||||
#define PHOENIX_MK42_105 0x0521 /* Phoenix MultiKey/42 1.05 */
|
||||
#define PHOENIX_MK42_129 0x2921 /* Phoenix MultiKey/42 1.29 */
|
||||
#define PHOENIX_MK42_138 0x3821 /* Phoenix MultiKey/42 1.38 */
|
||||
#define PHOENIX_MK42_140 0x3821 /* Phoenix MultiKey/42 1.40 */
|
||||
#define PHOENIX_MKC42_214 0x1422 /* Phoenix MultiKey/C42 2.14 */
|
||||
#define PHOENIX_MK42I_416 0x1624 /* Phoenix MultiKey/42i 4.16 */
|
||||
#define PHOENIX_MK42I_419 0x1924 /* Phoenix MultiKey/42i 4.19 */
|
||||
/* AMI 0x3x */
|
||||
#define KBC_ACER_V30 0x0030 /* Acer (0xA1 returns nothing, 0xAF returns 0x00) */
|
||||
#define KBC_AMI_MEGAKEY_SUPER_IO 0x0035 /* AMI '5' MegaKey 1994 NSC (and SM(S)C?) */
|
||||
#define KBC_AMI_8 0x0038 /* AMI '8' */
|
||||
/* AMI 0x4x */
|
||||
#define KBC_AMI_B 0x0042 /* AMI 'B' */
|
||||
#define KBC_AMI_D 0x0044 /* AMI 'D' */
|
||||
#define KBC_AMI_E 0x0045 /* AMI 'E' */
|
||||
#define KBC_AMIKEY 0x0046 /* AMI 'F'/AMIKEY */
|
||||
#define KBC_AMIKEY_2 0x0048 /* AMI 'H'/AMIEY-2 */
|
||||
#define KBC_MR 0x004D /* MR 'M' - Temporary classification until we get a dump */
|
||||
/* AMI 0x5x */
|
||||
#define KBC_AMI_MEGAKEY_1993 0x0050 /* AMI 'P' MegaKey 1993 */
|
||||
#define KBC_AMI_MEGAKEY_1994 0x0052 /* AMI 'R' MegaKey 1994 - 0xA0 returns 1993 copyright */
|
||||
#define KBC_AMI_TRIGEM 0x005A /* TriGem AMI 'Z' (1990 AMI copyright) */
|
||||
/* AMI 0x6x */
|
||||
#define KBC_TANDON 0x0061 /* Tandon 'a' - Temporary classification until we get a dump */
|
||||
/* Holtek */
|
||||
#define KBC_HT_REGIONAL_6542 0x1046 /* Holtek 'F' (Regional 6542) */
|
||||
#define KBC_HT_HT6542B_BESTKEY 0x1048 /* Holtek 'H' (Holtek HT6542B, BestKey) */
|
||||
/* AMI 0x0x clone without command 0xA0 */
|
||||
#define KBC_UNK_00 0x2000 /* Unknown 0x00 */
|
||||
#define KBC_UNK_01 0x2001 /* Unknown 0x01 */
|
||||
/* AMI 0x3x clone without command 0xA0 */
|
||||
#define KBC_UNK_7 0x2037 /* Unknown '7' - Temporary classification until we get a dump */
|
||||
#define KBC_UNK_9 0x2037 /* Unknown '9' - Temporary classification until we get a dump */
|
||||
#define KBC_JETKEY_NO_VER 0x2038 /* No-version JetKey '8' */
|
||||
/* AMI 0x4x clone without command 0xA0 */
|
||||
#define KBC_UNK_A 0x2041 /* Unknown 'A' - Temporary classification until we get a dump */
|
||||
#define KBC_JETKEY_5_W83C42 0x2046 /* JetKey 5.0 'F' and Winbond W83C42 */
|
||||
#define KBC_UNK_G 0x2047 /* Unknown 'G' - Temporary classification until we get a dump */
|
||||
#define KBC_MB_300E_SIS 0x2048 /* MB-300E Non-VIA 'H' and SiS 5582/559x */
|
||||
#define KBC_UNK_L 0x204C /* Unknown 'L' - Temporary classification until we get a dump */
|
||||
/* AMI 0x0x clone with command 0xA0 (Get Copyright String) only returning 0x00 */
|
||||
#define KBC_VPC_2007 0x3000 /* Microsoft Virtual PC 2007 - everything returns 0x00 */
|
||||
/* AMI 0x4x clone with command 0xA0 (Get Copyright String) only returning 0x00 */
|
||||
#define KBC_ALI_M148X 0x3045 /* ALi M148x 'E'/'U' (0xA1 actually returns 'F' but BIOS shows 'E' or 'U') */
|
||||
#define KBC_LANCE_UTRON 0x3046 /* Lance LT38C41 'F', Utron */
|
||||
/* AMI 0x5x clone with command 0xA0 (Get Copyright String) only returning 0x00 */
|
||||
#define KBC_SARC_6042 0x3055 /* SARC 6042 'U' */
|
||||
/* Award and clones */
|
||||
#define KBC_AWARD 0x4200 /* Award (0xA1 returns 0x00) - Temporary classification until we get
|
||||
the real 0xAF return */
|
||||
#define KBC_VIA_VT82C4XN 0x4246 /* VIA VT82C41N, VT82C4N (0xA1 returns 'F') */
|
||||
#define KBC_VIA_VT82C586A 0x4346 /* VIA VT82C586A (0xA1 returns 'F') */
|
||||
#define KBC_VIA_VT82C586B 0x4446 /* VIA VT82C586B (0xA1 returns 'F') */
|
||||
#define KBC_VIA_VT82C686B 0x4546 /* VIA VT82C686B (0xA1 returns 'F') */
|
||||
/* UMC */
|
||||
#define KBC_UMC_UM8886 0x5048 /* UMC UM8886 'H' */
|
||||
/* IBM-style controllers with inverted P1 video type bit polarity */
|
||||
#define KBC_IBM_TYPE_1_XI8088 0x8000 /* Xi8088: IBM Type 1 */
|
||||
/* AMI (this is the 0xA1 revision byte) with inverted P1 video type bit polarity */
|
||||
#define KBC_ACER_V30_INV 0x8030 /* Acer (0xA1 returns nothing, 0xAF returns 0x00) */
|
||||
/* Holtek with inverted P1 video type bit polarity */
|
||||
#define KBC_HT_HT6542B_XI8088 0x9048 /* Xi8088: Holtek 'H' (Holtek HT6542B, BestKey) */
|
||||
/* Award and clones with inverted P1 video type bit polarity */
|
||||
#define KBC_VIA_VT82C4XN_XI8088 0xC246 /* Xi8088: VIA VT82C41N, VT82C4N (0xA1 returns 'F') */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -126,11 +126,9 @@
|
||||
#define IS_AT(m) (((machines[m].bus_flags & (MACHINE_BUS_ISA16 | MACHINE_BUS_EISA | MACHINE_BUS_VLB | MACHINE_BUS_MCA | MACHINE_BUS_PCI | MACHINE_BUS_PCMCIA | MACHINE_BUS_AGP | MACHINE_BUS_AC97)) && !(machines[m].bus_flags & MACHINE_PC98)) ? 1 : 0)
|
||||
|
||||
#define CPU_BLOCK(...) (const uint8_t[]) {__VA_ARGS__, 0}
|
||||
#define MACHINE_MULTIPLIER_FIXED -1, -1
|
||||
#define MACHINE_MULTIPLIER_FIXED -1
|
||||
|
||||
#define CPU_BLOCK_NONE 0
|
||||
#define CPU_BLOCK_QDI_FMB CPU_BLOCK(CPU_WINCHIP, CPU_WINCHIP2, CPU_Cx6x86, CPU_Cx6x86L, CPU_Cx6x86MX)
|
||||
#define CPU_BLOCK_SOYO_4SAW2 CPU_BLOCK(CPU_i486SX, CPU_i486DX, CPU_Am486SX, CPU_Am486DX)
|
||||
|
||||
/* Make sure it's always an invalid value to avoid misdetections. */
|
||||
#if (defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64)
|
||||
@@ -256,6 +254,22 @@ typedef struct _machine_filter_ {
|
||||
const char id;
|
||||
} machine_filter_t;
|
||||
|
||||
typedef struct _machine_cpu_ {
|
||||
uint32_t package;
|
||||
const uint8_t *block;
|
||||
uint32_t min_bus;
|
||||
uint32_t max_bus;
|
||||
uint16_t min_voltage;
|
||||
uint16_t max_voltage;
|
||||
float min_multi;
|
||||
float max_multi;
|
||||
} machine_cpu_t;
|
||||
|
||||
typedef struct _machine_memory_ {
|
||||
uint32_t min, max;
|
||||
int step;
|
||||
} machine_memory_t;
|
||||
|
||||
typedef struct _machine_ {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
@@ -263,25 +277,29 @@ typedef struct _machine_ {
|
||||
uint32_t chipset;
|
||||
int (*init)(const struct _machine_ *);
|
||||
uintptr_t pad, pad0, pad1, pad2;
|
||||
uint32_t cpu_package;
|
||||
const uint8_t *cpu_block;
|
||||
uint32_t cpu_min_bus;
|
||||
uint32_t cpu_max_bus;
|
||||
uint16_t cpu_min_voltage;
|
||||
uint16_t cpu_max_voltage;
|
||||
float cpu_min_multi;
|
||||
float cpu_max_multi;
|
||||
const machine_cpu_t cpu;
|
||||
uintptr_t bus_flags;
|
||||
uintptr_t flags;
|
||||
uint32_t min_ram, max_ram;
|
||||
const machine_memory_t ram;
|
||||
int ram_granularity;
|
||||
int nvrmask;
|
||||
uint16_t kbc;
|
||||
/* Bits:
|
||||
7-0 Set bits are forced set on P1 (no forced set = 0x00);
|
||||
15-8 Clear bits are forced clear on P1 (no foced clear = 0xff). */
|
||||
uint16_t kbc_p1;
|
||||
uint32_t gpio;
|
||||
uint32_t gpio_acpi;
|
||||
#ifdef EMU_DEVICE_H
|
||||
const device_t *(*get_device)(void);
|
||||
const device_t *(*get_vid_device)(void);
|
||||
const device_t *device;
|
||||
const device_t *vid_device;
|
||||
const device_t *snd_device;
|
||||
const device_t *net_device;
|
||||
#else
|
||||
void *get_device;
|
||||
void *get_vid_device;
|
||||
void *device;
|
||||
void *vid_device;
|
||||
void *snd_device;
|
||||
void *net_device;
|
||||
#endif
|
||||
} machine_t;
|
||||
|
||||
@@ -773,16 +791,16 @@ extern const device_t ps1_hdc_device;
|
||||
#endif
|
||||
|
||||
/* m_ps2_isa.c */
|
||||
extern int machine_ps2_m30_286_init(const machine_t *);
|
||||
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_50_init(const machine_t *);
|
||||
extern int machine_ps2_model_60_init(const machine_t *);
|
||||
extern int machine_ps2_model_55sx_init(const machine_t *);
|
||||
extern int machine_ps2_model_65sx_init(const machine_t *);
|
||||
extern int machine_ps2_model_70_type3_init(const machine_t *);
|
||||
extern int machine_ps2_model_80_init(const machine_t *);
|
||||
extern int machine_ps2_model_80_axx_init(const machine_t *);
|
||||
extern int machine_ps2_model_55sx_init(const machine_t *);
|
||||
extern int machine_ps2_model_65sx_init(const machine_t *);
|
||||
extern int machine_ps2_model_70_type3_init(const machine_t *);
|
||||
extern int machine_ps2_model_80_init(const machine_t *);
|
||||
extern int machine_ps2_model_80_axx_init(const machine_t *);
|
||||
|
||||
/* m_tandy.c */
|
||||
extern int tandy1k_eeprom_read(void);
|
||||
|
||||
@@ -670,7 +670,7 @@ vid_speed_change_1512(void *priv)
|
||||
recalc_timings_1512(vid);
|
||||
}
|
||||
|
||||
device_config_t vid_1512_config[] = {
|
||||
const device_config_t vid_1512_config[] = {
|
||||
{
|
||||
.name = "display_type",
|
||||
.description = "Display type",
|
||||
@@ -723,7 +723,7 @@ device_config_t vid_1512_config[] = {
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_1512_device = {
|
||||
const device_t vid_1512_device = {
|
||||
.name = "Amstrad PC1512 (video)",
|
||||
.internal_name = "vid_1512",
|
||||
.flags = 0,
|
||||
@@ -737,13 +737,6 @@ static const device_t vid_1512_device = {
|
||||
.config = vid_1512_config
|
||||
};
|
||||
|
||||
const device_t *
|
||||
pc1512_get_device(void)
|
||||
{
|
||||
return(&vid_1512_device);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
recalc_timings_1640(amsvid_t *vid)
|
||||
{
|
||||
@@ -882,7 +875,7 @@ vid_speed_changed_1640(void *priv)
|
||||
recalc_timings_1640(vid);
|
||||
}
|
||||
|
||||
device_config_t vid_1640_config[] = {
|
||||
const device_config_t vid_1640_config[] = {
|
||||
{
|
||||
.name = "language",
|
||||
.description = "BIOS language",
|
||||
@@ -906,7 +899,7 @@ device_config_t vid_1640_config[] = {
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_1640_device = {
|
||||
const device_t vid_1640_device = {
|
||||
.name = "Amstrad PC1640 (video)",
|
||||
.internal_name = "vid_1640",
|
||||
.flags = 0,
|
||||
@@ -920,12 +913,6 @@ static const device_t vid_1640_device = {
|
||||
.config = vid_1640_config
|
||||
};
|
||||
|
||||
const device_t *
|
||||
pc1640_get_device(void)
|
||||
{
|
||||
return(&vid_1640_device);
|
||||
}
|
||||
|
||||
/* Display type */
|
||||
#define PC200_CGA 0 /* CGA monitor */
|
||||
#define PC200_MDA 1 /* MDA monitor */
|
||||
@@ -1715,7 +1702,7 @@ vid_close_200(void *priv)
|
||||
}
|
||||
|
||||
|
||||
device_config_t vid_200_config[] = {
|
||||
const device_config_t vid_200_config[] = {
|
||||
/* TODO: Should have options here for:
|
||||
*
|
||||
* > Display port (TTL or RF)
|
||||
@@ -1791,7 +1778,7 @@ device_config_t vid_200_config[] = {
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_200_device = {
|
||||
const device_t vid_200_device = {
|
||||
.name = "Amstrad PC200 (video)",
|
||||
.internal_name = "vid_200",
|
||||
.flags = 0,
|
||||
@@ -1805,13 +1792,7 @@ static const device_t vid_200_device = {
|
||||
.config = vid_200_config
|
||||
};
|
||||
|
||||
const device_t *
|
||||
pc200_get_device(void)
|
||||
{
|
||||
return(&vid_200_device);
|
||||
}
|
||||
|
||||
device_config_t vid_ppc512_config[] = {
|
||||
const device_config_t vid_ppc512_config[] = {
|
||||
/* TODO: Should have options here for:
|
||||
*
|
||||
* > Display port (TTL or RF)
|
||||
@@ -1895,7 +1876,7 @@ device_config_t vid_ppc512_config[] = {
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_ppc512_device = {
|
||||
const device_t vid_ppc512_device = {
|
||||
.name = "Amstrad PPC512 (video)",
|
||||
.internal_name = "vid_ppc512",
|
||||
.flags = 0,
|
||||
@@ -1909,13 +1890,7 @@ static const device_t vid_ppc512_device = {
|
||||
.config = vid_ppc512_config
|
||||
};
|
||||
|
||||
const device_t *
|
||||
ppc512_get_device(void)
|
||||
{
|
||||
return(&vid_ppc512_device);
|
||||
}
|
||||
|
||||
device_config_t vid_pc2086_config[] = {
|
||||
const device_config_t vid_pc2086_config[] = {
|
||||
{
|
||||
.name = "language",
|
||||
.description = "BIOS language",
|
||||
@@ -1933,7 +1908,7 @@ device_config_t vid_pc2086_config[] = {
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_pc2086_device = {
|
||||
const device_t vid_pc2086_device = {
|
||||
.name = "Amstrad PC2086",
|
||||
.internal_name = "vid_pc2086",
|
||||
.flags = 0,
|
||||
@@ -1947,13 +1922,7 @@ static const device_t vid_pc2086_device = {
|
||||
.config = vid_pc2086_config
|
||||
};
|
||||
|
||||
const device_t *
|
||||
pc2086_get_device(void)
|
||||
{
|
||||
return(&vid_pc2086_device);
|
||||
}
|
||||
|
||||
device_config_t vid_pc3086_config[] = {
|
||||
const device_config_t vid_pc3086_config[] = {
|
||||
{
|
||||
.name = "language",
|
||||
.description = "BIOS language",
|
||||
@@ -1971,7 +1940,7 @@ device_config_t vid_pc3086_config[] = {
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_pc3086_device = {
|
||||
const device_t vid_pc3086_device = {
|
||||
.name = "Amstrad PC3086",
|
||||
.internal_name = "vid_pc3086",
|
||||
.flags = 0,
|
||||
@@ -1985,13 +1954,6 @@ static const device_t vid_pc3086_device = {
|
||||
.config = vid_pc3086_config
|
||||
};
|
||||
|
||||
const device_t *
|
||||
pc3086_get_device(void)
|
||||
{
|
||||
return(&vid_pc3086_device);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ms_write(uint16_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
|
||||
@@ -99,14 +99,6 @@ machine_at_tg286m_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_ama932j_get_device(void)
|
||||
{
|
||||
return &oti067_ama932j_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_ama932j_init(const machine_t *model)
|
||||
{
|
||||
@@ -418,14 +410,6 @@ machine_at_spc4216p_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_spc4620p_get_device(void)
|
||||
{
|
||||
return &ati28800k_spc4620p_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_spc4620p_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -186,14 +186,6 @@ machine_at_valuepoint433_init(const machine_t *model) // hangs without the PS/2
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_valuepoint433_get_device(void)
|
||||
{
|
||||
return &et4000w32_onboard_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_ecs386_init(const machine_t *model)
|
||||
{
|
||||
@@ -361,13 +353,6 @@ machine_at_vect486vl_init(const machine_t *model) // has HDC problems
|
||||
return ret;
|
||||
}
|
||||
|
||||
const device_t *
|
||||
at_vect486vl_get_device(void)
|
||||
{
|
||||
return &gd5428_onboard_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_d824_init(const machine_t *model)
|
||||
{
|
||||
@@ -392,14 +377,6 @@ machine_at_d824_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_d824_get_device(void)
|
||||
{
|
||||
return &gd5428_onboard_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_acera1g_init(const machine_t *model)
|
||||
{
|
||||
@@ -426,14 +403,6 @@ machine_at_acera1g_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_acera1g_get_device(void)
|
||||
{
|
||||
return &gd5428_onboard_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_acerv10_init(const machine_t *model)
|
||||
{
|
||||
@@ -1453,14 +1422,6 @@ machine_at_sbc490_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_sbc490_get_device(void)
|
||||
{
|
||||
return &tgui9440_onboard_pci_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_tf486_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -719,7 +719,7 @@ const device_config_t compaq_plasma_config[] = {
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t compaq_plasma_device = {
|
||||
const device_t compaq_plasma_device = {
|
||||
.name = "Compaq Plasma",
|
||||
.internal_name = "compaq_plasma",
|
||||
.flags = 0,
|
||||
@@ -792,12 +792,6 @@ write_raml(uint32_t addr, uint32_t val, void *priv)
|
||||
mem_write_raml_page(addr, val, &pages[addr >> 12]);
|
||||
}
|
||||
|
||||
const device_t *
|
||||
at_cpqiii_get_device(void)
|
||||
{
|
||||
return &compaq_plasma_device;
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_compaq_init(const machine_t *model, int type)
|
||||
{
|
||||
|
||||
@@ -481,14 +481,6 @@ machine_at_s1846_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_s1846_get_device(void)
|
||||
{
|
||||
return &es1371_onboard_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_ficka6130_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -436,14 +436,6 @@ machine_at_cuv4xls_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_cuv4xls_get_device(void)
|
||||
{
|
||||
return &cmi8738_onboard_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_6via90ap_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -363,14 +363,6 @@ machine_at_pb520r_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_pb520r_get_device(void)
|
||||
{
|
||||
return &gd5434_onboard_pci_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_excalibur_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -418,13 +418,6 @@ machine_at_presario2240_init(const machine_t *model)
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_presario2240_get_device(void)
|
||||
{
|
||||
return &s3_trio64v2_dx_onboard_pci_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_presario4500_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -159,14 +159,6 @@ machine_at_thor_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_thor_get_device(void)
|
||||
{
|
||||
return &s3_phoenix_trio64vplus_onboard_pci_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_mrthor_init(const machine_t *model)
|
||||
{
|
||||
@@ -218,14 +210,6 @@ machine_at_endeavor_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_endeavor_get_device(void)
|
||||
{
|
||||
return &s3_phoenix_trio64_onboard_pci_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_ms5119_init(const machine_t *model)
|
||||
{
|
||||
@@ -289,14 +273,6 @@ machine_at_pb640_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_pb640_get_device(void)
|
||||
{
|
||||
return &gd5440_onboard_pci_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_at_fmb_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -788,7 +788,7 @@ static const device_config_t pcjr_config[] = {
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t pcjr_device = {
|
||||
const device_t pcjr_device = {
|
||||
"IBM PCjr",
|
||||
"pcjr",
|
||||
0,
|
||||
@@ -802,13 +802,6 @@ static const device_t pcjr_device = {
|
||||
pcjr_config
|
||||
};
|
||||
|
||||
const device_t *
|
||||
pcjr_get_device(void)
|
||||
{
|
||||
return &pcjr_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_pcjr_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -217,4 +217,3 @@ machine_ps2_m30_286_init(const machine_t *model)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1521,5 +1521,3 @@ machine_ps2_model_80_axx_init(const machine_t *model)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1143,7 +1143,7 @@ vid_init(tandy_t *dev)
|
||||
}
|
||||
|
||||
|
||||
static const device_config_t vid_config[] = {
|
||||
const device_config_t vid_config[] = {
|
||||
{
|
||||
.name = "display_type",
|
||||
.description = "Display type",
|
||||
@@ -1161,7 +1161,7 @@ static const device_config_t vid_config[] = {
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_device = {
|
||||
const device_t vid_device = {
|
||||
.name = "Tandy 1000",
|
||||
.internal_name = "tandy1000_video",
|
||||
.flags = 0,
|
||||
@@ -1175,7 +1175,7 @@ static const device_t vid_device = {
|
||||
.config = vid_config
|
||||
};
|
||||
|
||||
static const device_t vid_device_hx = {
|
||||
const device_t vid_device_hx = {
|
||||
.name = "Tandy 1000 HX",
|
||||
.internal_name = "tandy1000_hx_video",
|
||||
.flags = 0,
|
||||
@@ -1189,7 +1189,7 @@ static const device_t vid_device_hx = {
|
||||
.config = vid_config
|
||||
};
|
||||
|
||||
static const device_t vid_device_sl = {
|
||||
const device_t vid_device_sl = {
|
||||
.name = "Tandy 1000SL2",
|
||||
.internal_name = "tandy1000_sl_video",
|
||||
.flags = 0,
|
||||
@@ -1203,26 +1203,6 @@ static const device_t vid_device_sl = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t *
|
||||
tandy1k_get_device(void)
|
||||
{
|
||||
return &vid_device;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
tandy1k_hx_get_device(void)
|
||||
{
|
||||
return &vid_device_hx;
|
||||
}
|
||||
|
||||
const device_t *
|
||||
tandy1k_sl_get_device(void)
|
||||
{
|
||||
return &vid_device_sl;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
eep_write(uint16_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
|
||||
@@ -642,13 +642,6 @@ const device_t m19_vid_device = {
|
||||
.config = m19_vid_config
|
||||
};
|
||||
|
||||
const device_t *
|
||||
m19_get_device(void)
|
||||
{
|
||||
return &m19_vid_device;
|
||||
}
|
||||
|
||||
|
||||
static uint8_t
|
||||
m24_read(uint16_t port, void *priv)
|
||||
{
|
||||
@@ -738,14 +731,6 @@ m24_read(uint16_t port, void *priv)
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
m24_get_device(void)
|
||||
{
|
||||
return &ogc_m24_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_xt_m24_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -841,14 +841,6 @@ t1000_read_roml(uint32_t addr, void *priv)
|
||||
return(*(uint32_t *)(&sys->romdrive[sys->rom_offset + (addr & 0xffff)]));
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
t1000_get_device(void)
|
||||
{
|
||||
return(&t1000_video_device);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_xt_t1000_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -177,13 +177,6 @@ const device_t xi8088_device = {
|
||||
.config = xi8088_config
|
||||
};
|
||||
|
||||
const device_t *
|
||||
xi8088_get_device(void)
|
||||
{
|
||||
return &xi8088_device;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_xt_xi8088_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -130,12 +130,6 @@ machine_zenith_init(const machine_t *model){
|
||||
|
||||
}
|
||||
|
||||
const device_t *
|
||||
z184_get_device(void)
|
||||
{
|
||||
return &cga_device;
|
||||
}
|
||||
|
||||
/*
|
||||
* Current bugs and limitations:
|
||||
* - missing NVRAM implementation
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -359,7 +359,7 @@ spd_write_drbs(uint8_t *regs, uint8_t reg_min, uint8_t reg_max, uint8_t drb_unit
|
||||
/* No SPD: split SIMMs into pairs as if they were "DIMM"s. */
|
||||
if (!spd_present) {
|
||||
dimm = ((reg_max - reg_min) + 1) >> 1; /* amount of "DIMM"s, also used to determine the maximum "DIMM" size */
|
||||
spd_populate(rows, dimm, mem_size >> 10, drb_unit, 1 << (log2i((machines[machine].max_ram >> 10) / dimm)), 0);
|
||||
spd_populate(rows, dimm, mem_size >> 10, drb_unit, 1 << (log2i((machines[machine].ram.max >> 10) / dimm)), 0);
|
||||
}
|
||||
|
||||
/* Write DRBs for each row. */
|
||||
@@ -411,7 +411,7 @@ spd_write_drbs_with_ext(uint8_t *regs, uint8_t reg_min, uint8_t reg_max, uint8_t
|
||||
/* No SPD: split SIMMs into pairs as if they were "DIMM"s. */
|
||||
if (!spd_present) {
|
||||
dimm = ((reg_max - reg_min) + 1) >> 1; /* amount of "DIMM"s, also used to determine the maximum "DIMM" size */
|
||||
spd_populate(rows, dimm, mem_size >> 10, drb_unit, 1 << (log2i((machines[machine].max_ram >> 10) / dimm)), 0);
|
||||
spd_populate(rows, dimm, mem_size >> 10, drb_unit, 1 << (log2i((machines[machine].ram.max >> 10) / dimm)), 0);
|
||||
}
|
||||
|
||||
/* Write DRBs for each row. */
|
||||
@@ -462,7 +462,7 @@ spd_write_drbs_interleaved(uint8_t *regs, uint8_t reg_min, uint8_t reg_max, uint
|
||||
/* No SPD: split SIMMs into pairs as if they were "DIMM"s. */
|
||||
if (!spd_present) {
|
||||
dimm = ((reg_max - reg_min) + 1) >> 2; /* amount of "DIMM"s, also used to determine the maximum "DIMM" size */
|
||||
spd_populate(rows, dimm, mem_size >> 10, drb_unit, 1 << (log2i((machines[machine].max_ram >> 10) / dimm)), 0);
|
||||
spd_populate(rows, dimm, mem_size >> 10, drb_unit, 1 << (log2i((machines[machine].ram.max >> 10) / dimm)), 0);
|
||||
}
|
||||
|
||||
/* Write DRBs for each row. */
|
||||
@@ -514,7 +514,7 @@ spd_write_drbs_ali1621(uint8_t *regs, uint8_t reg_min, uint8_t reg_max)
|
||||
/* No SPD: split SIMMs into pairs as if they were "DIMM"s. */
|
||||
if (!spd_present) {
|
||||
dimm = ((reg_max - reg_min) + 1) >> 2; /* amount of "DIMM"s, also used to determine the maximum "DIMM" size */
|
||||
spd_populate(rows, dimm, mem_size >> 10, 4, 1 << (log2i((machines[machine].max_ram >> 10) / dimm)), 0);
|
||||
spd_populate(rows, dimm, mem_size >> 10, 4, 1 << (log2i((machines[machine].ram.max >> 10) / dimm)), 0);
|
||||
}
|
||||
|
||||
/* Write DRBs for each row. */
|
||||
|
||||
Reference in New Issue
Block a user