Don't depend on DEV_BRANCH

Allows things to be compiled independently
This commit is contained in:
Jasmine Iwanek
2024-08-08 20:25:03 -04:00
parent 3cd59235c9
commit 892f066ffa
19 changed files with 163 additions and 163 deletions

View File

@@ -47,7 +47,7 @@
#ifdef USE_DYNAREC
# include "codegen.h"
#endif
#endif /* USE_DYNAREC */
#include "x87_timings.h"
#define CCR1_USE_SMI (1 << 1)
@@ -119,7 +119,7 @@ const OpFn *x86_dynarec_opcodes_df_a32;
const OpFn *x86_dynarec_opcodes_REPE;
const OpFn *x86_dynarec_opcodes_REPNE;
const OpFn *x86_dynarec_opcodes_3DNOW;
#endif
#endif /* USE_DYNAREC */
const OpFn *x86_opcodes;
const OpFn *x86_opcodes_0f;
@@ -504,7 +504,7 @@ cpu_set(void)
#ifdef USE_ACYCS
acycs = 0;
#endif
#endif /* USE_ACYCS */
soft_reset_pci = 0;
cpu_init = 0;
@@ -576,7 +576,7 @@ cpu_set(void)
x86_setopcodes(ops_386, ops_386_0f, dynarec_ops_386, dynarec_ops_386_0f);
#else
x86_setopcodes(ops_386, ops_386_0f);
#endif
#endif /* USE_DYNAREC */
x86_setopcodes_2386(ops_2386_386, ops_2386_386_0f);
x86_opcodes_REPE = ops_REPE;
x86_opcodes_REPNE = ops_REPNE;
@@ -587,7 +587,7 @@ cpu_set(void)
x86_dynarec_opcodes_REPE = dynarec_ops_REPE;
x86_dynarec_opcodes_REPNE = dynarec_ops_REPNE;
x86_dynarec_opcodes_3DNOW = dynarec_ops_3DNOW;
#endif
#endif /* USE_DYNAREC */
if (hasfpu) {
#ifdef USE_DYNAREC
@@ -626,7 +626,7 @@ cpu_set(void)
x86_dynarec_opcodes_df_a16 = dynarec_ops_fpu_df_a16;
x86_dynarec_opcodes_df_a32 = dynarec_ops_fpu_df_a32;
}
#endif
#endif /* USE_DYNAREC */
if (fpu_softfloat) {
x86_opcodes_d8_a16 = ops_sf_fpu_d8_a16;
x86_opcodes_d8_a32 = ops_sf_fpu_d8_a32;
@@ -714,7 +714,7 @@ cpu_set(void)
x86_dynarec_opcodes_de_a32 = dynarec_ops_nofpu_a32;
x86_dynarec_opcodes_df_a16 = dynarec_ops_nofpu_a16;
x86_dynarec_opcodes_df_a32 = dynarec_ops_nofpu_a32;
#endif
#endif /* USE_DYNAREC */
x86_opcodes_d8_a16 = ops_nofpu_a16;
x86_opcodes_d8_a32 = ops_nofpu_a32;
x86_opcodes_d9_a16 = ops_nofpu_a16;
@@ -752,7 +752,7 @@ cpu_set(void)
#ifdef USE_DYNAREC
codegen_timing_set(&codegen_timing_486);
#endif
#endif /* USE_DYNAREC */
memset(&msr, 0, sizeof(msr));
@@ -774,7 +774,7 @@ cpu_set(void)
x86_setopcodes(ops_186, ops_186_0f, dynarec_ops_186, dynarec_ops_186_0f);
#else
x86_setopcodes(ops_186, ops_186_0f);
#endif
#endif /* USE_DYNAREC */
x86_setopcodes_2386(ops_2386_186, ops_2386_186_0f);
break;
@@ -783,7 +783,7 @@ cpu_set(void)
x86_setopcodes(ops_286, ops_286_0f, dynarec_ops_286, dynarec_ops_286_0f);
#else
x86_setopcodes(ops_286, ops_286_0f);
#endif
#endif /* USE_DYNAREC */
x86_setopcodes_2386(ops_2386_286, ops_2386_286_0f);
if (fpu_type == FPU_287) {
@@ -819,7 +819,7 @@ cpu_set(void)
x86_dynarec_opcodes_df_a16 = dynarec_ops_fpu_287_df_a16;
x86_dynarec_opcodes_df_a32 = dynarec_ops_fpu_287_df_a32;
}
#endif
#endif /* USE_DYNAREC */
if (fpu_softfloat) {
x86_opcodes_d9_a16 = ops_sf_fpu_287_d9_a16;
x86_opcodes_d9_a32 = ops_sf_fpu_287_d9_a32;
@@ -921,7 +921,7 @@ cpu_set(void)
x86_setopcodes(ops_386, ops_ibm486_0f, dynarec_ops_386, dynarec_ops_ibm486_0f);
#else
x86_setopcodes(ops_386, ops_ibm486_0f);
#endif
#endif /* USE_DYNAREC */
x86_setopcodes_2386(ops_2386_386, ops_2386_ibm486_0f);
cpu_features = CPU_FEATURE_MSR;
fallthrough;
@@ -961,7 +961,7 @@ cpu_set(void)
x86_dynarec_opcodes_df_a16 = dynarec_ops_fpu_287_df_a16;
x86_dynarec_opcodes_df_a32 = dynarec_ops_fpu_287_df_a32;
}
#endif
#endif /* USE_DYNAREC */
if (fpu_softfloat) {
x86_opcodes_d9_a16 = ops_sf_fpu_287_d9_a16;
x86_opcodes_d9_a32 = ops_sf_fpu_287_d9_a32;
@@ -1067,7 +1067,7 @@ cpu_set(void)
x86_setopcodes(ops_386, ops_486_0f, dynarec_ops_386, dynarec_ops_486_0f);
#else
x86_setopcodes(ops_386, ops_486_0f);
#endif
#endif /* USE_DYNAREC */
x86_setopcodes_2386(ops_2386_386, ops_2386_486_0f);
timing_rr = 1; /* register dest - register src */
@@ -1107,7 +1107,7 @@ cpu_set(void)
x86_setopcodes(ops_386, ops_486_0f, dynarec_ops_386, dynarec_ops_486_0f);
#else
x86_setopcodes(ops_386, ops_486_0f);
#endif
#endif /* USE_DYNAREC */
x86_setopcodes_2386(ops_2386_386, ops_2386_486_0f);
timing_rr = 1; /* register dest - register src */
@@ -1160,7 +1160,7 @@ cpu_set(void)
x86_setopcodes(ops_386, ops_486_0f, dynarec_ops_386, dynarec_ops_486_0f);
#else
x86_setopcodes(ops_386, ops_486_0f);
#endif
#endif /* USE_DYNAREC */
x86_setopcodes_2386(ops_2386_386, ops_2386_486_0f);
timing_rr = 1; /* register dest - register src */
@@ -1209,7 +1209,7 @@ cpu_set(void)
x86_setopcodes(ops_386, ops_stpc_0f);
else
x86_setopcodes(ops_386, ops_c486_0f);
#endif
#endif /* USE_DYNAREC */
timing_rr = 1; /* register dest - register src */
timing_rm = 3; /* register dest - memory src */
@@ -1252,7 +1252,7 @@ cpu_set(void)
x86_setopcodes(ops_386, ops_c486_0f, dynarec_ops_386, dynarec_ops_c486_0f);
#else
x86_setopcodes(ops_386, ops_c486_0f);
#endif
#endif /* USE_DYNAREC */
timing_rr = 1; /* register dest - register src */
timing_rm = 1; /* register dest - memory src */
@@ -1301,7 +1301,7 @@ cpu_set(void)
x86_setopcodes(ops_386, ops_winchip2_0f);
else
x86_setopcodes(ops_386, ops_winchip_0f);
#endif
#endif /* USE_DYNAREC */
timing_rr = 1; /* register dest - register src */
timing_rm = 2; /* register dest - memory src */
@@ -1350,7 +1350,7 @@ cpu_set(void)
codegen_timing_set(&codegen_timing_winchip2);
else
codegen_timing_set(&codegen_timing_winchip);
#endif
#endif /* USE_DYNAREC */
break;
case CPU_P24T:
@@ -1366,7 +1366,7 @@ cpu_set(void)
x86_setopcodes(ops_386, ops_pentiummmx_0f);
else
x86_setopcodes(ops_386, ops_pentium_0f);
#endif
#endif /* USE_DYNAREC */
timing_rr = 1; /* register dest - register src */
timing_rm = 2; /* register dest - memory src */
@@ -1409,10 +1409,10 @@ cpu_set(void)
cpu_CR4_mask = CR4_VME | CR4_PVI | CR4_TSD | CR4_DE | CR4_PSE | CR4_MCE | CR4_PCE;
#ifdef USE_DYNAREC
codegen_timing_set(&codegen_timing_pentium);
#endif
#endif /* USE_DYNAREC */
break;
#if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
#ifdef USE_CYRIX_6X86
case CPU_Cx6x86:
case CPU_Cx6x86L:
case CPU_CxGX1:
@@ -1434,7 +1434,7 @@ cpu_set(void)
x86_dynarec_opcodes_df_a16 = dynarec_ops_fpu_686_df_a16;
x86_dynarec_opcodes_df_a32 = dynarec_ops_fpu_686_df_a32;
}
# endif
# endif /* USE_DYNAREC */
if (fpu_softfloat) {
x86_opcodes_da_a16 = ops_sf_fpu_686_da_a16;
x86_opcodes_da_a32 = ops_sf_fpu_686_da_a32;
@@ -1472,7 +1472,7 @@ cpu_set(void)
# if 0
x86_setopcodes(ops_386, ops_c6x86_0f);
# endif
# endif
# endif /* USE_DYNAREC */
timing_rr = 1; /* register dest - register src */
timing_rm = 1; /* register dest - memory src */
@@ -1524,19 +1524,19 @@ cpu_set(void)
# ifdef USE_DYNAREC
codegen_timing_set(&codegen_timing_686);
# endif
# endif /* USE_DYNAREC */
if ((cpu_s->cpu_type == CPU_Cx6x86L) || (cpu_s->cpu_type == CPU_Cx6x86MX))
ccr4 = 0x80;
else if (CPU_Cx6x86)
CPUID = 0; /* Disabled on powerup by default */
break;
#endif
#endif /* USE_CYRIX_6X86 */
#if defined(DEV_BRANCH) && defined(USE_AMD_K5)
#ifdef USE_AMD_K5
case CPU_K5:
case CPU_5K86:
#endif
#endif /* USE_AMD_K5 */
case CPU_K6:
case CPU_K6_2:
case CPU_K6_2C:
@@ -1546,7 +1546,7 @@ cpu_set(void)
#ifdef USE_DYNAREC
if (cpu_s->cpu_type >= CPU_K6_2)
x86_setopcodes(ops_386, ops_k62_0f, dynarec_ops_386, dynarec_ops_k62_0f);
# if defined(DEV_BRANCH) && defined(USE_AMD_K5)
# ifdef USE_AMD_K5
else if (cpu_s->cpu_type == CPU_K6)
x86_setopcodes(ops_386, ops_k6_0f, dynarec_ops_386, dynarec_ops_k6_0f);
else
@@ -1554,11 +1554,11 @@ cpu_set(void)
# else
else
x86_setopcodes(ops_386, ops_k6_0f, dynarec_ops_386, dynarec_ops_k6_0f);
# endif
# endif /* USE_AMD_K5 */
#else
if (cpu_s->cpu_type >= CPU_K6_2)
x86_setopcodes(ops_386, ops_k62_0f);
# if defined(DEV_BRANCH) && defined(USE_AMD_K5)
# ifdef USE_AMD_K5
else if (cpu_s->cpu_type == CPU_K6)
x86_setopcodes(ops_386, ops_k6_0f);
else
@@ -1566,14 +1566,14 @@ cpu_set(void)
# else
else
x86_setopcodes(ops_386, ops_k6_0f);
# endif
#endif
# endif /* USE_AMD_K5 */
#endif /* USE_DYNAREC */
if ((cpu_s->cpu_type == CPU_K6_2P) || (cpu_s->cpu_type == CPU_K6_3P)) {
x86_opcodes_3DNOW = ops_3DNOWE;
#ifdef USE_DYNAREC
x86_dynarec_opcodes_3DNOW = dynarec_ops_3DNOWE;
#endif
#endif /* USE_DYNAREC */
}
timing_rr = 1; /* register dest - register src */
@@ -1613,7 +1613,7 @@ cpu_set(void)
cpu_features |= CPU_FEATURE_3DNOW;
if ((cpu_s->cpu_type == CPU_K6_2P) || (cpu_s->cpu_type == CPU_K6_3P))
cpu_features |= CPU_FEATURE_3DNOWE;
#if defined(DEV_BRANCH) && defined(USE_AMD_K5)
#ifdef USE_AMD_K5
cpu_CR4_mask = CR4_TSD | CR4_DE | CR4_MCE;
if (cpu_s->cpu_type >= CPU_K6) {
cpu_CR4_mask |= (CR4_VME | CR4_PVI | CR4_PSE);
@@ -1629,11 +1629,11 @@ cpu_set(void)
cpu_CR4_mask |= CR4_PCE;
else if (cpu_s->cpu_type >= CPU_K6_2C)
cpu_CR4_mask |= CR4_PGE;
#endif
#endif /* USE_AMD_K5 */
#ifdef USE_DYNAREC
codegen_timing_set(&codegen_timing_k6);
#endif
#endif /* USE_DYNAREC */
break;
case CPU_PENTIUMPRO:
@@ -1668,7 +1668,7 @@ cpu_set(void)
x86_setopcodes(ops_386, ops_pentium2d_0f);
else
x86_setopcodes(ops_386, ops_pentium2_0f);
#endif
#endif /* USE_DYNAREC */
if (fpu_softfloat) {
x86_opcodes_da_a16 = ops_sf_fpu_686_da_a16;
x86_opcodes_da_a32 = ops_sf_fpu_686_da_a32;
@@ -1726,7 +1726,7 @@ cpu_set(void)
#ifdef USE_DYNAREC
codegen_timing_set(&codegen_timing_p6);
#endif
#endif /* USE_DYNAREC */
break;
case CPU_CYRIX3S:
@@ -1734,7 +1734,7 @@ cpu_set(void)
x86_setopcodes(ops_386, ops_winchip2_0f, dynarec_ops_386, dynarec_ops_winchip2_0f);
#else
x86_setopcodes(ops_386, ops_winchip2_0f);
#endif
#endif /* USE_DYNAREC */
timing_rr = 1; /* register dest - register src */
timing_rm = 2; /* register dest - memory src */
timing_mr = 2; /* memory dest - register src */
@@ -1774,7 +1774,7 @@ cpu_set(void)
#ifdef USE_DYNAREC
codegen_timing_set(&codegen_timing_winchip);
#endif
#endif /* USE_DYNAREC */
break;
default:
@@ -1812,7 +1812,7 @@ cpu_set(void)
cpu_exec = exec386_dynarec;
cpu_use_exec = 1;
} else
#endif
#endif /* defined(USE_DYNAREC) && !defined(USE_GDBSTUB) */
/* Use exec386 for CPU_IBM486SLC because it can reach 100 MHz. */
if ((cpu_s->cpu_type == CPU_IBM486SLC) || (cpu_s->cpu_type == CPU_IBM486BL) ||
cpu_iscyrix || (cpu_s->cpu_type > CPU_486DLC) || cpu_override_interpreter) {
@@ -2065,7 +2065,7 @@ cpu_CPUID(void)
EAX = EBX = ECX = EDX = 0;
break;
#if defined(DEV_BRANCH) && defined(USE_AMD_K5)
#ifdef USE_AMD_K5
case CPU_K5:
if (!EAX) {
EAX = 0x00000001;
@@ -2123,7 +2123,7 @@ cpu_CPUID(void)
break;
}
break;
#endif
#endif /* USE_AMD_K5 */
case CPU_K6:
switch (EAX) {
@@ -2354,7 +2354,7 @@ cpu_CPUID(void)
EAX = EBX = ECX = EDX = 0;
break;
#if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
#ifdef USE_CYRIX_6X86
case CPU_Cx6x86:
if (!EAX) {
EAX = 0x00000001;
@@ -2410,7 +2410,7 @@ cpu_CPUID(void)
} else
EAX = EBX = ECX = EDX = 0;
break;
#endif
#endif /* USE_CYRIX_6X86 */
case CPU_PENTIUMPRO:
if (!EAX) {
@@ -2565,10 +2565,10 @@ cpu_ven_reset(void)
msr.amd_psor = (cpu_s->cpu_type >= CPU_K6_3) ? 0x008cULL : 0x018cULL;
fallthrough;
case CPU_K6_2:
#if defined(DEV_BRANCH) && defined(USE_AMD_K5)
#ifdef USE_AMD_K5
case CPU_K5:
case CPU_5K86:
#endif
#endif /* USE_AMD_K5 */
case CPU_K6:
msr.amd_efer = (cpu_s->cpu_type >= CPU_K6_2C) ? 2ULL : 0ULL;
break;
@@ -2789,10 +2789,10 @@ cpu_RDMSR(void)
}
break;
#if defined(DEV_BRANCH) && defined(USE_AMD_K5)
#ifdef USE_AMD_K5
case CPU_K5:
case CPU_5K86:
#endif
#endif /* USE_AMD_K5 */
case CPU_K6:
case CPU_K6_2:
case CPU_K6_2C:
@@ -3075,7 +3075,7 @@ pentium_invalid_rdmsr:
cpu_log("RDMSR: ECX = %08X, val = %08X%08X\n", ECX, EDX, EAX);
break;
#if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
#ifdef USE_CYRIX_6X86
case CPU_Cx6x86:
case CPU_Cx6x86L:
case CPU_CxGX1:
@@ -3115,7 +3115,7 @@ pentium_invalid_rdmsr:
}
cpu_log("RDMSR: ECX = %08X, val = %08X%08X\n", ECX, EDX, EAX);
break;
#endif
#endif /* USE_CYRIX_6X86 */
case CPU_PENTIUMPRO:
case CPU_PENTIUM2:
@@ -3638,10 +3638,10 @@ cpu_WRMSR(void)
}
break;
#if defined(DEV_BRANCH) && defined(USE_AMD_K5)
#ifdef USE_AMD_K5
case CPU_K5:
case CPU_5K86:
#endif
#endif /* USE_AMD_K5 */
case CPU_K6:
case CPU_K6_2:
case CPU_K6_2C:
@@ -3902,7 +3902,7 @@ pentium_invalid_wrmsr:
}
break;
#if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
#ifdef USE_CYRIX_6X86
case CPU_Cx6x86:
case CPU_Cx6x86L:
case CPU_CxGX1:
@@ -3936,7 +3936,7 @@ pentium_invalid_wrmsr:
break;
}
break;
#endif
#endif /* USE_CYRIX_6X86 */
case CPU_PENTIUMPRO:
case CPU_PENTIUM2:
@@ -4249,14 +4249,14 @@ cpu_write(uint16_t addr, uint8_t val, UNUSED(void *priv))
case 0xe8: /* CCR4 */
if ((ccr3 & 0xf0) == 0x10) {
ccr4 = val;
#if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
#ifdef USE_CYRIX_6X86
if (cpu_s->cpu_type >= CPU_Cx6x86) {
if (val & 0x80)
CPUID = cpu_s->cpuid_model;
else
CPUID = 0;
}
#endif
#endif /* USE_CYRIX_6X86 */
}
break;
case 0xe9: /* CCR5 */
@@ -4330,7 +4330,7 @@ x86_setopcodes(const OpFn *opcodes, const OpFn *opcodes_0f)
x86_opcodes = opcodes;
x86_opcodes_0f = opcodes_0f;
}
#endif
#endif /* USE_DYNAREC */
void
x86_setopcodes_2386(const OpFn *opcodes, const OpFn *opcodes_0f)

View File

@@ -4474,7 +4474,7 @@ const cpu_family_t cpu_families[] = {
{ .name = "", 0 }
}
},
#if defined(DEV_BRANCH) && defined(USE_AMD_K5)
#ifdef USE_AMD_K5
{
.package = CPU_PKG_SOCKET5_7,
.manufacturer = "AMD",
@@ -4629,7 +4629,7 @@ const cpu_family_t cpu_families[] = {
{ .name = "", 0 }
}
},
#endif
#endif /* USE_AMD_K5 */
{
.package = CPU_PKG_SOCKET5_7,
.manufacturer = "AMD",
@@ -5982,7 +5982,7 @@ const cpu_family_t cpu_families[] = {
{ .name = "", 0 }
}
},
#if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
#ifdef USE_CYRIX_6X86
{
.package = CPU_PKG_SOCKET5_7,
.manufacturer = "Cyrix",
@@ -6342,7 +6342,7 @@ const cpu_family_t cpu_families[] = {
{ .name = "", 0 }
}
},
#endif
#endif /* USE_CYRIX_6X86 */
{
.package = CPU_PKG_SOCKET8,
.manufacturer = "Intel",

View File

@@ -90,10 +90,10 @@ extern const OpFn dynarec_ops_winchip2_0f[1024];
extern const OpFn dynarec_ops_pentium_0f[1024];
extern const OpFn dynarec_ops_pentiummmx_0f[1024];
# if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
# ifdef USE_CYRIX_6X86
extern const OpFn dynarec_ops_c6x86_0f[1024];
extern const OpFn dynarec_ops_c6x86mx_0f[1024];
# endif
# endif /* USE_CYRIX_6X86 */
extern const OpFn dynarec_ops_k6_0f[1024];
extern const OpFn dynarec_ops_k62_0f[1024];
@@ -232,10 +232,10 @@ extern const OpFn ops_winchip2_0f[1024];
extern const OpFn ops_pentium_0f[1024];
extern const OpFn ops_pentiummmx_0f[1024];
#if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
#ifdef USE_CYRIX_6X86
extern const OpFn ops_c6x86_0f[1024];
extern const OpFn ops_c6x86mx_0f[1024];
#endif
#endif /* USE_CYRIX_6X86 */
extern const OpFn ops_k6_0f[1024];
extern const OpFn ops_k62_0f[1024];

View File

@@ -110,7 +110,7 @@ opMOVD_mm_l_a32(uint32_t fetchdat)
return 0;
}
#if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
#ifdef USE_CYRIX_6X86
/*Cyrix maps both MOVD and SMINT to the same opcode*/
static int
opMOVD_mm_l_a16_cx(uint32_t fetchdat)
@@ -170,7 +170,7 @@ opMOVD_mm_l_a32_cx(uint32_t fetchdat)
return 0;
}
#endif
#endif /* USE_CYRIX_6X86 */
static int
opMOVQ_q_mm_a16(uint32_t fetchdat)

View File

@@ -1699,7 +1699,7 @@ static const device_t brxt_device = {
.config = brxt_config
};
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_BRAT)
#ifdef USE_ISAMEM_BRAT
static const device_config_t brat_config[] = {
// clang-format off
{
@@ -1804,7 +1804,7 @@ static const device_t brat_device = {
.force_redraw = NULL,
.config = brat_config
};
#endif
#endif /* USE_ISAMEM_BRAT */
static const device_config_t lotech_config[] = {
// clang-format off
@@ -1871,7 +1871,7 @@ static const device_t lotech_device = {
.config = lotech_config
};
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_RAMPAGE)
#ifdef USE_ISAMEM_RAMPAGE
// TODO: Dual Paging support
// TODO: Conventional memory suppport
static const device_config_t rampage_config[] = {
@@ -1939,9 +1939,9 @@ static const device_t rampage_device = {
.force_redraw = NULL,
.config = rampage_config
};
#endif
#endif /* USE_ISAMEM_RAMPAGE */
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_IAB)
#ifdef USE_ISAMEM_IAB
static const device_config_t iab_config[] = {
// clang-format off
{
@@ -2038,7 +2038,7 @@ static const device_t iab_device = {
.force_redraw = NULL,
.config = iab_config
};
#endif
#endif /* USE_ISAMEM_IAB */
static const struct {
const device_t *dev;
@@ -2063,15 +2063,15 @@ static const struct {
{ &ev159_device },
{ &ev165a_device },
{ &brxt_device },
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_BRAT)
#ifdef USE_ISAMEM_BRAT
{ &brat_device },
#endif
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_RAMPAGE)
#endif /* USE_ISAMEM_BRAT */
#ifdef USE_ISAMEM_RAMPAGE
{ &rampage_device },
#endif
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_IAB)
#endif /* USE_ISAMEM_RAMPAGE */
#ifdef USE_ISAMEM_IAB
{ &iab_device },
#endif
#endif /* USE_ISAMEM_IAB */
{ &lotech_device },
{ NULL }
// clang-format on

View File

@@ -928,11 +928,11 @@ kbd_read(uint16_t port, void *priv)
else {
/* LaserXT = Always 512k RAM;
LaserXT/3 = Bit 0: set = 512k, clear = 256k. */
#if defined(DEV_BRANCH) && defined(USE_LASERXT)
#ifdef USE_LASERXT
if (kbd->type == KBD_TYPE_VTECH)
ret = ((mem_size == 512) ? 0x0d : 0x0c) | (hasfpu ? 0x02 : 0x00);
else
#endif
#endif /* USE_LASERXT */
ret = (kbd->pd & 0x0d) | (hasfpu ? 0x02 : 0x00);
}
}
@@ -1292,7 +1292,7 @@ const device_t keyboard_xt_t1x00_device = {
.config = NULL
};
#if defined(DEV_BRANCH) && defined(USE_LASERXT)
#ifdef USE_LASERXT
const device_t keyboard_xt_lxt3_device = {
.name = "VTech Laser XT3 Keyboard",
.internal_name = "keyboard_xt_lxt3",
@@ -1306,7 +1306,7 @@ const device_t keyboard_xt_lxt3_device = {
.force_redraw = NULL,
.config = NULL
};
#endif
#endif /* USE_LASERXT */
const device_t keyboard_xt_olivetti_device = {
.name = "Olivetti XT Keyboard",

View File

@@ -195,7 +195,7 @@ extern const device_t nec_mate_unk_device;
extern const device_t phoenix_486_jumper_device;
extern const device_t phoenix_486_jumper_pci_device;
#if defined(DEV_BRANCH) && defined(USE_OLIVETTI)
#ifdef USE_OLIVETTI
extern const device_t olivetti_eva_device;
#endif
#endif /* USE_OLIVETTI */
#endif /*EMU_CHIPSET_H*/

View File

@@ -222,9 +222,9 @@ extern const device_t keyboard_xt86_device;
extern const device_t keyboard_xt_compaq_device;
extern const device_t keyboard_xt_t1x00_device;
extern const device_t keyboard_tandy_device;
# if defined(DEV_BRANCH) && defined(USE_LASERXT)
# ifdef USE_LASERXT
extern const device_t keyboard_xt_lxt3_device;
# endif /*defined(DEV_BRANCH) && defined(USE_LASERXT) */
# endif /* USE_LASERXT */
extern const device_t keyboard_xt_olivetti_device;
extern const device_t keyboard_xt_zenith_device;
extern const device_t keyboard_xt_hyundai_device;

View File

@@ -437,9 +437,9 @@ extern int machine_at_ibmxt286_init(const machine_t *);
extern int machine_at_siemens_init(const machine_t *); // Siemens PCD-2L. N82330 discrete machine. It segfaults in some places
extern int machine_at_wellamerastar_init(const machine_t *); // Wells American A*Star with custom award BIOS
#if defined(DEV_BRANCH) && defined(USE_OPEN_AT)
#ifdef USE_OPEN_AT
extern int machine_at_openat_init(const machine_t *);
#endif
#endif /* USE_OPEN_AT */
/* m_at_286_386sx.c */
extern int machine_at_tg286m_init(const machine_t *);
@@ -468,9 +468,9 @@ extern int machine_at_deskmaster286_init(const machine_t *);
extern int machine_at_pc8_init(const machine_t *);
extern int machine_at_3302_init(const machine_t *);
#if defined(DEV_BRANCH) && defined(USE_OLIVETTI)
#ifdef USE_OLIVETTI
extern int machine_at_m290_init(const machine_t *);
#endif
#endif /* USE_OLIVETTI */
extern int machine_at_shuttle386sx_init(const machine_t *);
extern int machine_at_adi386sx_init(const machine_t *);

View File

@@ -104,18 +104,18 @@ extern void midi_in_sysex(uint8_t *buffer, uint32_t len);
#ifdef EMU_DEVICE_H
extern const device_t rtmidi_output_device;
extern const device_t rtmidi_input_device;
# if defined(DEV_BRANCH) && defined(USE_OPL4ML)
# ifdef USE_OPL4ML
extern const device_t opl4_midi_device;
# endif
# endif /* USE_OPL4ML */
# ifdef USE_FLUIDSYNTH
extern const device_t fluidsynth_device;
# endif
# endif /* USE_FLUIDSYNTH */
# ifdef USE_MUNT
extern const device_t mt32_old_device;
extern const device_t mt32_new_device;
extern const device_t cm32l_device;
extern const device_t cm32ln_device;
# endif
# endif /* USE_MUNT */
#endif
#endif /*EMU_SOUND_MIDI_H*/

View File

@@ -75,9 +75,9 @@ extern const device_t prime3b_ide_device;
extern const device_t prime3c_device;
extern const device_t prime3c_ide_device;
extern const device_t ps1_m2133_sio;
#if defined(DEV_BRANCH) && defined(USE_SIO_DETECT)
#ifdef USE_SIO_DETECT
extern const device_t sio_detect_device;
#endif
#endif /* USE_SIO_DETECT */
extern const device_t um8663af_device;
extern const device_t um8663af_ide_device;
extern const device_t um8663af_sec_device;

View File

@@ -330,9 +330,9 @@ extern const device_t ati28800k_device;
extern const device_t ati28800k_spc4620p_device;
extern const device_t ati28800k_spc6033p_device;
extern const device_t compaq_ati28800_device;
# if defined(DEV_BRANCH) && defined(USE_XL24)
# ifdef USE_XL24
extern const device_t ati28800_wonderxl24_device;
# endif
# endif /* USE_XL24 */
/* Bochs */
extern const device_t bochs_svga_device;
@@ -448,7 +448,7 @@ extern const device_t mystique_220_device;
extern const device_t millennium_ii_device;
#ifdef USE_G100
extern const device_t productiva_g100_device;
#endif
#endif /* USE_G100 */
/* Oak OTI-0x7 */
extern const device_t oti037c_device;

View File

@@ -275,7 +275,7 @@ machine_at_wellamerastar_init(const machine_t *model)
return ret;
}
#if defined(DEV_BRANCH) && defined(USE_OPEN_AT)
#ifdef USE_OPEN_AT
int
machine_at_openat_init(const machine_t *model)
{
@@ -291,4 +291,4 @@ machine_at_openat_init(const machine_t *model)
return ret;
}
#endif
#endif /* USE_OPEN_AT */

View File

@@ -965,7 +965,7 @@ machine_at_pc916sx_init(const machine_t *model)
return ret;
}
#if defined(DEV_BRANCH) && defined(USE_OLIVETTI)
#ifdef USE_OLIVETTI
int
machine_at_m290_init(const machine_t *model)
{
@@ -988,4 +988,4 @@ machine_at_m290_init(const machine_t *model)
return ret;
}
#endif
#endif /* USE_OLIVETTI */

View File

@@ -935,7 +935,7 @@ machine_at_tx97_init(const machine_t *model)
return ret;
}
#if defined(DEV_BRANCH) && defined(USE_AN430TX)
#ifdef USE_AN430TX
int
machine_at_an430tx_init(const machine_t *model)
{
@@ -979,7 +979,7 @@ machine_at_an430tx_init(const machine_t *model)
return ret;
}
#endif
#endif /* USE_AN430TX */
int
machine_at_ym430tx_init(const machine_t *model)

View File

@@ -76,19 +76,19 @@ static const MIDI_OUT_DEVICE devices[] = {
{ &device_none },
#ifdef USE_FLUIDSYNTH
{ &fluidsynth_device },
#endif
#endif /* USE_FLUIDSYNTH */
#ifdef USE_MUNT
{ &mt32_old_device },
{ &mt32_new_device },
{ &cm32l_device },
{ &cm32ln_device },
#endif
#endif /*USE_MUNT */
#ifdef USE_RTMIDI
{ &rtmidi_output_device },
#endif
#if defined(DEV_BRANCH) && defined(USE_OPL4ML)
#endif /* USE_RTMIDI */
#ifdef USE_OPL4ML
{ &opl4_midi_device },
#endif
#endif /* USE_OPL4ML */
{ NULL }
// clang-format on
};
@@ -98,7 +98,7 @@ static const MIDI_IN_DEVICE midi_in_devices[] = {
{ &device_none },
#ifdef USE_RTMIDI
{ &rtmidi_input_device },
#endif
#endif /* USE_RTMIDI */
{ NULL }
// clang-format on
};

View File

@@ -16,9 +16,9 @@
#include <86box/pic.h>
#include <86box/sound.h>
#include <86box/timer.h>
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
# include <86box/snd_ad1848.h>
#endif
#endif /*USE_GUSMAX */
#include <86box/plat_fallthrough.h>
#include <86box/plat_unused.h>
@@ -144,11 +144,11 @@ typedef struct gus_t {
uint8_t usrr;
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
uint8_t max_ctrl;
ad1848_t ad1848;
#endif
#endif /*USE_GUSMAX */
} gus_t;
static int gus_gf1_irqs[8] = { -1, 2, 5, 3, 7, 11, 12, 15 };
@@ -256,9 +256,9 @@ writegus(uint16_t addr, uint8_t val, void *priv)
int d;
int old;
uint16_t port;
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
uint16_t csioport;
#endif
#endif /*USE_GUSMAX */
if ((addr == 0x388) || (addr == 0x389))
port = addr;
@@ -606,10 +606,10 @@ writegus(uint16_t addr, uint8_t val, void *priv)
gus->irq_midi = gus->irq;
} else
gus->irq_midi = gus_midi_irqs[(val >> 3) & 7];
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
if (gus->type == GUS_MAX)
ad1848_setirq(&gus->ad1848, gus->irq);
#endif
#endif /*USE_GUSMAX */
gus->sb_nmi = val & 0x80;
} else {
@@ -622,10 +622,10 @@ writegus(uint16_t addr, uint8_t val, void *priv)
gus->dma2 = gus->dma;
} else
gus->dma2 = gus_dmas[(val >> 3) & 7];
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
if (gus->type == GUS_MAX)
ad1848_setdma(&gus->ad1848, gus->dma2);
#endif
#endif /*USE_GUSMAX */
}
break;
case 1:
@@ -683,7 +683,7 @@ writegus(uint16_t addr, uint8_t val, void *priv)
break;
case 0x306:
case 0x706:
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
if (gus->type == GUS_MAX) {
if (gus->dma >= 4)
val |= 0x10;
@@ -703,7 +703,7 @@ writegus(uint16_t addr, uint8_t val, void *priv)
}
}
}
#endif
#endif /*USE_GUSMAX */
break;
default:
@@ -755,11 +755,11 @@ readgus(uint16_t addr, void *priv)
return val;
case 0x20F:
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
if (gus->type == GUS_MAX)
val = 0x02;
else
#endif
#endif /*USE_GUSMAX */
val = 0x00;
break;
@@ -878,11 +878,11 @@ readgus(uint16_t addr, void *priv)
break;
case 0x306:
case 0x706:
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
if (gus->type == GUS_MAX)
val = 0x0a; /* GUS MAX */
else
#endif
#endif /*USE_GUSMAX */
val = 0xff; /*Pre 3.7 - no mixer*/
break;
@@ -939,7 +939,7 @@ readgus(uint16_t addr, void *priv)
gus->ad_status &= ~0x01;
#ifdef OLD_NMI_BEHAVIOR
nmi = 0;
#endif
#endif /* OLD_NMI_BEHAVIOR */
fallthrough;
case 0x389:
val = gus->ad_data;
@@ -1182,24 +1182,24 @@ gus_get_buffer(int32_t *buffer, int len, void *priv)
{
gus_t *gus = (gus_t *) priv;
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
ad1848_update(&gus->ad1848);
#endif
#endif /*USE_GUSMAX */
gus_update(gus);
for (int c = 0; c < len * 2; c++) {
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
buffer[c] += (int32_t) (gus->ad1848.buffer[c] / 2);
#endif
#endif /*USE_GUSMAX */
buffer[c] += (int32_t) gus->buffer[c & 1][c >> 1];
}
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
gus->ad1848.pos = 0;
#endif
#endif /*USE_GUSMAX */
gus->pos = 0;
}
@@ -1332,9 +1332,9 @@ gus_reset(void *priv)
gus->usrr = 0;
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
gus->max_ctrl = 0;
#endif
#endif /*USE_GUSMAX */
gus->irq_state = 0;
gus->midi_irq_state = 0;
@@ -1383,7 +1383,7 @@ gus_init(UNUSED(const device_t *info))
io_sethandler(0x0506 + gus->base, 0x0001, readgus, NULL, NULL, writegus, NULL, NULL, gus);
io_sethandler(0x0388, 0x0002, readgus, NULL, NULL, writegus, NULL, NULL, gus);
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
if (gus->type == GUS_MAX) {
ad1848_init(&gus->ad1848, AD1848_TYPE_CS4231);
ad1848_setirq(&gus->ad1848, 5);
@@ -1391,7 +1391,7 @@ gus_init(UNUSED(const device_t *info))
io_sethandler(0x10C + gus->base, 4,
ad1848_read, NULL, NULL, ad1848_write, NULL, NULL, &gus->ad1848);
}
#endif
#endif /*USE_GUSMAX */
timer_add(&gus->samp_timer, gus_poll_wave, gus, 1);
timer_add(&gus->timer_1, gus_poll_timer_1, gus, 1);
@@ -1424,10 +1424,10 @@ gus_speed_changed(void *priv)
else
gus->samp_latch = (uint64_t) (TIMER_USEC * (1000000.0 / gusfreqs[gus->voices - 14]));
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
ad1848_speed_changed(&gus->ad1848);
#endif
#endif /*USE_GUSMAX */
}
static const device_config_t gus_config[] = {
@@ -1445,12 +1445,12 @@ static const device_config_t gus_config[] = {
.description = "Classic",
.value = GUS_CLASSIC
},
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
#ifdef USE_GUSMAX
{
.description = "MAX",
.value = GUS_MAX
},
#endif
#endif /*USE_GUSMAX */
{ NULL }
},
},

View File

@@ -37,9 +37,9 @@
#include <86box/vid_svga_render.h>
#define VGAWONDERXL 1
#if defined(DEV_BRANCH) && defined(USE_XL24)
#ifdef USE_XL24
# define VGAWONDERXL24 2
#endif
#endif /* USE_XL24 */
#define BIOS_ATIKOR_PATH "roms/video/ati28800/atikorvga.bin"
#define BIOS_ATIKOR_4620P_PATH_L "roms/machines/spc4620p/31005h.u8"
@@ -52,10 +52,10 @@
#define BIOS_VGAXL_EVEN_PATH "roms/video/ati28800/xleven.bin"
#define BIOS_VGAXL_ODD_PATH "roms/video/ati28800/xlodd.bin"
#if defined(DEV_BRANCH) && defined(USE_XL24)
#ifdef USE_XL24
# define BIOS_XL24_EVEN_PATH "roms/video/ati28800/112-14318-102.bin"
# define BIOS_XL24_ODD_PATH "roms/video/ati28800/112-14319-102.bin"
#endif
#endif /* USE_XL24 */
#define BIOS_ROM_PATH "roms/video/ati28800/bios.bin"
#define BIOS_VGAXL_ROM_PATH "roms/video/ati28800/ATI_VGAWonder_XL.bin"
@@ -609,7 +609,7 @@ ati28800_init(const device_t *info)
ati28800->svga.ramdac = device_add(&sc11486_ramdac_device);
break;
#if defined(DEV_BRANCH) && defined(USE_XL24)
#ifdef USE_XL24
case VGAWONDERXL24:
ati28800->id = 6;
rom_init_interleaved(&ati28800->bios_rom,
@@ -618,7 +618,7 @@ ati28800_init(const device_t *info)
0xc0000, 0x10000, 0xffff,
0, MEM_MAPPING_EXTERNAL);
break;
#endif
#endif /* USE_XL24 */
default:
ati28800->id = 5;
@@ -653,11 +653,11 @@ ati28800_init(const device_t *info)
ati_eeprom_load(&ati28800->eeprom, "ati28800xl.nvr", 0);
break;
#if defined(DEV_BRANCH) && defined(USE_XL24)
#ifdef USE_XL24
case VGAWONDERXL24:
ati_eeprom_load(&ati28800->eeprom, "ati28800xl24.nvr", 0);
break;
#endif
#endif /* USE_XL24 */
default:
ati_eeprom_load(&ati28800->eeprom, "ati28800.nvr", 0);
@@ -685,13 +685,13 @@ compaq_ati28800_available(void)
return (rom_present(BIOS_VGAXL_ROM_PATH));
}
#if defined(DEV_BRANCH) && defined(USE_XL24)
#ifdef USE_XL24
static int
ati28800_wonderxl24_available(void)
{
return (rom_present(BIOS_XL24_EVEN_PATH) && rom_present(BIOS_XL24_ODD_PATH));
}
#endif
#endif /* USE_XL24 */
static void
ati28800_close(void *priv)
@@ -749,7 +749,7 @@ static const device_config_t ati28800_config[] = {
}
};
#if defined(DEV_BRANCH) && defined(USE_XL24)
#ifdef USE_XL24
static const device_config_t ati28800_wonderxl_config[] = {
{
.name = "memory",
@@ -778,7 +778,7 @@ static const device_config_t ati28800_wonderxl_config[] = {
.type = CONFIG_END
}
};
#endif
#endif /* USE_XL24 */
// clang-format on
const device_t ati28800_device = {
@@ -851,7 +851,7 @@ const device_t compaq_ati28800_device = {
.config = ati28800_config
};
#if defined(DEV_BRANCH) && defined(USE_XL24)
#ifdef USE_XL24
const device_t ati28800_wonderxl24_device = {
.name = "ATI-28800 (VGA Wonder XL24)",
.internal_name = "ati28800w",
@@ -865,4 +865,4 @@ const device_t ati28800_wonderxl24_device = {
.force_redraw = ati28800_force_redraw,
.config = ati28800_wonderxl_config
};
#endif
#endif /* USE_XL24 */

View File

@@ -60,9 +60,9 @@ video_cards[] = {
{ &ati18800_vga88_device },
{ &ati28800_device },
{ &compaq_ati28800_device },
#if defined(DEV_BRANCH) && defined(USE_XL24)
#ifdef USE_XL24
{ &ati28800_wonderxl24_device },
#endif
#endif /* USE_XL24 */
{ &ati18800_device },
{ &ati18800_wonder_device },
{ &cga_device },
@@ -236,7 +236,7 @@ video_cards[] = {
{ &s3_trio3d2x_agp_device },
#ifdef USE_G100
{ &productiva_g100_device, VIDEO_FLAG_TYPE_SPECIAL },
#endif
#endif /*USE_G100 */
{ &velocity_100_agp_device },
{ &velocity_200_agp_device },
{ &voodoo_3_1000_agp_device },