mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 18:08:20 -07:00
Merge branch 'master' into pc98x1
This commit is contained in:
@@ -151,6 +151,7 @@ endif()
|
||||
# ------ ----------- ---- --------- ---------
|
||||
cmake_dependent_option(AMD_K5 "AMD K5" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(AN430TX "Intel AN430TX" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(CDROM_MITSUMI "Mitsumi CDROM" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(CYRIX_6X86 "Cyrix 6x86" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(G100 "Matrox Productiva G100" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(GUSMAX "Gravis UltraSound MAX" ON "DEV_BRANCH" OFF)
|
||||
@@ -163,6 +164,7 @@ cmake_dependent_option(OPEN_AT "OpenAT"
|
||||
cmake_dependent_option(OPL4ML "OPL4-ML daughterboard" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(PCL "Generic PCL5e Printer" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(SIO_DETECT "Super I/O Detection Helper" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(WACOM "Wacom Input Devices" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF)
|
||||
|
||||
# Ditto but for Qt
|
||||
|
||||
@@ -27,10 +27,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
add_compile_definitions(_FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE=1 _LARGEFILE64_SOURCE=1)
|
||||
endif()
|
||||
|
||||
if(PCL)
|
||||
target_compile_definitions(86Box PRIVATE USE_PCL)
|
||||
endif()
|
||||
|
||||
if(CPPTHREADS)
|
||||
target_sources(86Box PRIVATE thread.cpp)
|
||||
endif()
|
||||
@@ -52,10 +48,6 @@ if(DYNAREC)
|
||||
add_compile_definitions(USE_DYNAREC)
|
||||
endif()
|
||||
|
||||
if(DEV_BRANCH)
|
||||
add_compile_definitions(DEV_BRANCH)
|
||||
endif()
|
||||
|
||||
if(DISCORD)
|
||||
add_compile_definitions(DISCORD)
|
||||
target_sources(86Box PRIVATE discord.c)
|
||||
|
||||
@@ -17,8 +17,14 @@ find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_check_modules(SNDFILE REQUIRED IMPORTED_TARGET sndfile)
|
||||
|
||||
add_library(cdrom OBJECT cdrom.c cdrom_image_backend.c cdrom_image_viso.c cdrom_image.c cdrom_ioctl.c cdrom_mitsumi.c)
|
||||
add_library(cdrom OBJECT cdrom.c cdrom_image_backend.c cdrom_image_viso.c cdrom_image.c cdrom_ioctl.c)
|
||||
target_link_libraries(86Box PkgConfig::SNDFILE)
|
||||
|
||||
if(CDROM_MITSUMI)
|
||||
target_compile_definitions(cdrom PRIVATE USE_CDROM_MITSUMI)
|
||||
target_sources(cdrom PRIVATE cdrom_mitsumi.c)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
# MSYS2
|
||||
target_link_libraries(86Box -static ${SNDFILE_STATIC_LIBRARIES})
|
||||
|
||||
@@ -1384,7 +1384,7 @@ const OpFn OP_TABLE(pentium_0f)[1024] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
# if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
|
||||
# ifdef USE_CYRIX_6X86
|
||||
const OpFn OP_TABLE(c6x86_0f)[1024] = {
|
||||
// clang-format off
|
||||
/*16-bit data, 16-bit addr*/
|
||||
@@ -1476,7 +1476,7 @@ const OpFn OP_TABLE(c6x86_0f)[1024] = {
|
||||
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||
// clang-format on
|
||||
};
|
||||
# endif
|
||||
# endif /* USE_CYRIX_6X86 */
|
||||
|
||||
const OpFn OP_TABLE(pentiummmx_0f)[1024] = {
|
||||
// clang-format off
|
||||
@@ -1754,7 +1754,7 @@ const OpFn OP_TABLE(k62_0f)[1024] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
# if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
|
||||
# ifdef USE_CYRIX_6X86
|
||||
const OpFn OP_TABLE(c6x86mx_0f)[1024] = {
|
||||
// clang-format off
|
||||
/*16-bit data, 16-bit addr*/
|
||||
@@ -1846,7 +1846,7 @@ const OpFn OP_TABLE(c6x86mx_0f)[1024] = {
|
||||
/*f0*/ ILLEGAL, opPSLLW_a32, opPSLLD_a32, opPSLLQ_a32, ILLEGAL, opPMADDWD_a32, ILLEGAL, ILLEGAL, opPSUBB_a32, opPSUBW_a32, opPSUBD_a32, ILLEGAL, opPADDB_a32, opPADDW_a32, opPADDD_a32, ILLEGAL,
|
||||
// clang-format on
|
||||
};
|
||||
# endif
|
||||
# endif /* USE_CYRIX_6X86 */
|
||||
|
||||
const OpFn OP_TABLE(pentiumpro_0f)[1024] = {
|
||||
// clang-format off
|
||||
|
||||
120
src/cpu/cpu.c
120
src/cpu/cpu.c
@@ -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;
|
||||
@@ -505,7 +505,7 @@ cpu_set(void)
|
||||
|
||||
#ifdef USE_ACYCS
|
||||
acycs = 0;
|
||||
#endif
|
||||
#endif /* USE_ACYCS */
|
||||
|
||||
soft_reset_pci = 0;
|
||||
cpu_init = 0;
|
||||
@@ -577,7 +577,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;
|
||||
@@ -588,7 +588,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
|
||||
@@ -627,7 +627,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;
|
||||
@@ -715,7 +715,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;
|
||||
@@ -753,7 +753,7 @@ cpu_set(void)
|
||||
|
||||
#ifdef USE_DYNAREC
|
||||
codegen_timing_set(&codegen_timing_486);
|
||||
#endif
|
||||
#endif /* USE_DYNAREC */
|
||||
|
||||
memset(&msr, 0, sizeof(msr));
|
||||
|
||||
@@ -775,7 +775,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;
|
||||
|
||||
@@ -784,7 +784,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) {
|
||||
@@ -820,7 +820,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;
|
||||
@@ -922,7 +922,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;
|
||||
@@ -962,7 +962,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;
|
||||
@@ -1068,7 +1068,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 */
|
||||
@@ -1108,7 +1108,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 */
|
||||
@@ -1161,7 +1161,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 */
|
||||
@@ -1210,7 +1210,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 */
|
||||
@@ -1253,7 +1253,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 */
|
||||
@@ -1302,7 +1302,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 */
|
||||
@@ -1351,7 +1351,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:
|
||||
@@ -1367,7 +1367,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 */
|
||||
@@ -1410,10 +1410,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:
|
||||
@@ -1435,7 +1435,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;
|
||||
@@ -1473,7 +1473,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 */
|
||||
@@ -1525,19 +1525,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:
|
||||
@@ -1547,7 +1547,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
|
||||
@@ -1555,11 +1555,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
|
||||
@@ -1567,14 +1567,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 */
|
||||
@@ -1614,7 +1614,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);
|
||||
@@ -1630,11 +1630,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:
|
||||
@@ -1669,7 +1669,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;
|
||||
@@ -1727,7 +1727,7 @@ cpu_set(void)
|
||||
|
||||
#ifdef USE_DYNAREC
|
||||
codegen_timing_set(&codegen_timing_p6);
|
||||
#endif
|
||||
#endif /* USE_DYNAREC */
|
||||
break;
|
||||
|
||||
case CPU_CYRIX3S:
|
||||
@@ -1735,7 +1735,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 */
|
||||
@@ -1775,7 +1775,7 @@ cpu_set(void)
|
||||
|
||||
#ifdef USE_DYNAREC
|
||||
codegen_timing_set(&codegen_timing_winchip);
|
||||
#endif
|
||||
#endif /* USE_DYNAREC */
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1813,7 +1813,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) {
|
||||
@@ -2066,7 +2066,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;
|
||||
@@ -2124,7 +2124,7 @@ cpu_CPUID(void)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#endif /* USE_AMD_K5 */
|
||||
|
||||
case CPU_K6:
|
||||
switch (EAX) {
|
||||
@@ -2355,7 +2355,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;
|
||||
@@ -2411,7 +2411,7 @@ cpu_CPUID(void)
|
||||
} else
|
||||
EAX = EBX = ECX = EDX = 0;
|
||||
break;
|
||||
#endif
|
||||
#endif /* USE_CYRIX_6X86 */
|
||||
|
||||
case CPU_PENTIUMPRO:
|
||||
if (!EAX) {
|
||||
@@ -2566,10 +2566,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;
|
||||
@@ -2790,10 +2790,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:
|
||||
@@ -3076,7 +3076,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:
|
||||
@@ -3116,7 +3116,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:
|
||||
@@ -3639,10 +3639,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:
|
||||
@@ -3903,7 +3903,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:
|
||||
@@ -3937,7 +3937,7 @@ pentium_invalid_wrmsr:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#endif /* USE_CYRIX_6X86 */
|
||||
|
||||
case CPU_PENTIUMPRO:
|
||||
case CPU_PENTIUM2:
|
||||
@@ -4250,14 +4250,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 */
|
||||
@@ -4331,7 +4331,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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -45,3 +45,12 @@ endif()
|
||||
if(LASERXT)
|
||||
target_compile_definitions(dev PRIVATE USE_LASERXT)
|
||||
endif()
|
||||
|
||||
if(PCL)
|
||||
target_compile_definitions(dev PRIVATE USE_PCL)
|
||||
endif()
|
||||
|
||||
if(WACOM)
|
||||
target_compile_definitions(dev PRIVATE USE_WACOM)
|
||||
target_sources(dev PRIVATE mouse_wacom_tablet.c)
|
||||
endif()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -98,7 +98,7 @@ static mouse_t mouse_devices[] = {
|
||||
{ &mouse_wacom_device },
|
||||
{ &mouse_wacom_artpad_device },
|
||||
#endif
|
||||
{ &mouse_mtouch_device },
|
||||
{ &mouse_mtouch_device },
|
||||
{ NULL }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -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*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -447,9 +447,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 *);
|
||||
@@ -478,9 +478,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 *);
|
||||
@@ -736,9 +736,9 @@ extern int machine_at_i430vx_init(const machine_t *);
|
||||
extern int machine_at_ma23c_init(const machine_t *);
|
||||
extern int machine_at_nupro592_init(const machine_t *);
|
||||
extern int machine_at_tx97_init(const machine_t *);
|
||||
#if defined(DEV_BRANCH) && defined(USE_AN430TX)
|
||||
#ifdef USE_AN430TX
|
||||
extern int machine_at_an430tx_init(const machine_t *);
|
||||
#endif
|
||||
#endif /* USE_AN430TX */
|
||||
extern int machine_at_ym430tx_init(const machine_t *);
|
||||
extern int machine_at_thunderbolt_init(const machine_t *);
|
||||
extern int machine_at_mb540n_init(const machine_t *);
|
||||
@@ -951,10 +951,10 @@ 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)
|
||||
#ifdef USE_LASERXT
|
||||
extern int machine_xt_laserxt_init(const machine_t *);
|
||||
extern int machine_xt_lxt3_init(const machine_t *);
|
||||
#endif
|
||||
#endif /* USE_LASERXT */
|
||||
|
||||
/* m_xt_philips.c */
|
||||
extern int machine_xt_p3105_init(const machine_t *);
|
||||
|
||||
@@ -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*/
|
||||
|
||||
@@ -71,8 +71,10 @@ extern const device_t mouse_mssystems_device;
|
||||
extern const device_t mouse_msserial_device;
|
||||
extern const device_t mouse_ltserial_device;
|
||||
extern const device_t mouse_ps2_device;
|
||||
# ifdef USE_WACOM
|
||||
extern const device_t mouse_wacom_device;
|
||||
extern const device_t mouse_wacom_artpad_device;
|
||||
# endif
|
||||
extern const device_t mouse_mtouch_device;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1654,7 +1654,7 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
#if defined(DEV_BRANCH) && defined(USE_LASERXT)
|
||||
#ifdef USE_LASERXT
|
||||
{
|
||||
.name = "[8088] VTech Laser Turbo XT",
|
||||
.internal_name = "ltxt",
|
||||
@@ -1694,7 +1694,7 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
#endif /* defined(DEV_BRANCH) && defined(USE_LASERXT) */
|
||||
#endif /* USE_LASERXT */
|
||||
/* Has a standard PS/2 KBC (so, use IBM PS/2 Type 1). */
|
||||
{
|
||||
.name = "[8088] Xi8088",
|
||||
@@ -2519,7 +2519,7 @@ const machine_t machines[] = {
|
||||
.net_device = NULL
|
||||
},
|
||||
|
||||
#if defined(DEV_BRANCH) && defined(USE_LASERXT)
|
||||
#ifdef USE_LASERXT
|
||||
{
|
||||
.name = "[8086] VTech Laser XT3",
|
||||
.internal_name = "lxt3",
|
||||
@@ -2559,7 +2559,7 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
#endif /* defined(DEV_BRANCH) && defined(USE_LASERXT) */
|
||||
#endif /* USE_LASERXT */
|
||||
|
||||
/* 286 AT machines */
|
||||
/* Has IBM AT KBC firmware. */
|
||||
@@ -3003,7 +3003,7 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
#if defined(DEV_BRANCH) && defined(USE_OLIVETTI)
|
||||
#ifdef USE_OLIVETTI
|
||||
/* Has Olivetti KBC firmware. */
|
||||
{
|
||||
.name = "[ISA] Olivetti M290",
|
||||
@@ -3044,8 +3044,8 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
#endif /* defined(DEV_BRANCH) && defined(USE_OLIVETTI) */
|
||||
#if defined(DEV_BRANCH) && defined(USE_OPEN_AT)
|
||||
#endif /* USE_OLIVETTI */
|
||||
#ifdef USE_OPEN_AT
|
||||
/* Has IBM AT KBC firmware. */
|
||||
{
|
||||
.name = "[ISA] OpenAT",
|
||||
@@ -3086,7 +3086,7 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
#endif /* defined(DEV_BRANCH) && defined(USE_OPEN_AT) */
|
||||
#endif /* USE_OPEN_AT */
|
||||
/* Has IBM AT KBC firmware. */
|
||||
{
|
||||
.name = "[ISA] Phoenix IBM AT",
|
||||
@@ -12105,11 +12105,9 @@ const machine_t machines[] = {
|
||||
.ram = {
|
||||
.min = 8192,
|
||||
.max = 262144,
|
||||
.max = 786432,
|
||||
.step = 8192
|
||||
},
|
||||
.nvrmask = 127,
|
||||
.nvrmask = 255,
|
||||
.kbc_device = NULL,
|
||||
.kbc_p1 = 0xff,
|
||||
.gpio = 0xffffffff,
|
||||
@@ -12284,7 +12282,7 @@ const machine_t machines[] = {
|
||||
.snd_device = &cs4236b_device,
|
||||
.net_device = &pcnet_am79c973_onboard_device
|
||||
},
|
||||
#if defined(DEV_BRANCH) && defined(USE_AN430TX)
|
||||
#ifdef USE_AN430TX
|
||||
/* This has the Phoenix MultiKey KBC firmware. */
|
||||
{
|
||||
.name = "[i430TX] Intel AN430TX",
|
||||
@@ -12325,7 +12323,7 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
#endif /* defined(DEV_BRANCH) && defined(USE_AN430TX) */
|
||||
#endif /* USE_AN430TX */
|
||||
/* This has the AMIKey KBC firmware, which is an updated 'F' type. */
|
||||
{
|
||||
.name = "[i430TX] Intel YM430TX",
|
||||
|
||||
@@ -396,7 +396,7 @@ dp8390_rx_common(void *priv, uint8_t *buf, int io_len)
|
||||
} else {
|
||||
endbytes = (dev->page_stop - dev->curr_page) * 256;
|
||||
memcpy(startptr + sizeof(pkthdr), buf, endbytes - sizeof(pkthdr));
|
||||
startptr = &dev->mem[((dev->tx_page_start * 256) - dev->mem_start) & dev->mem_wrap];
|
||||
startptr = &dev->mem[((dev->page_start * 256) - dev->mem_start) & dev->mem_wrap];
|
||||
memcpy(startptr, buf + endbytes - sizeof(pkthdr), io_len - endbytes + 8);
|
||||
}
|
||||
dev->curr_page = nextpage;
|
||||
|
||||
@@ -452,7 +452,9 @@ tulip_copy_rx_bytes(TULIPState *s, struct tulip_descriptor *desc)
|
||||
static bool
|
||||
tulip_filter_address(TULIPState *s, const uint8_t *addr)
|
||||
{
|
||||
#ifdef BLOCK_BROADCAST
|
||||
static const char broadcast[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
#endif
|
||||
bool ret = false;
|
||||
|
||||
for (uint8_t i = 0; i < 16 && ret == false; i++) {
|
||||
@@ -461,9 +463,15 @@ tulip_filter_address(TULIPState *s, const uint8_t *addr)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Do not block broadcast packets - needed for connections to the guest
|
||||
to succeed when using SLiRP.
|
||||
*/
|
||||
#ifdef BLOCK_BROADCAST
|
||||
if (!memcmp(addr, broadcast, ETH_ALEN)) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (s->csr[6] & (CSR6_PR | CSR6_RA)) {
|
||||
/* Promiscuous mode enabled */
|
||||
@@ -488,7 +496,7 @@ tulip_receive(void *priv, uint8_t *buf, int size)
|
||||
{
|
||||
struct tulip_descriptor desc;
|
||||
TULIPState *s = (TULIPState *) priv;
|
||||
|
||||
int first = 1;
|
||||
|
||||
if (size < 14 || size > sizeof(s->rx_frame) - 4
|
||||
|| s->rx_frame_len || tulip_rx_stopped(s))
|
||||
@@ -506,7 +514,11 @@ tulip_receive(void *priv, uint8_t *buf, int size)
|
||||
if (!(desc.status & RDES0_OWN)) {
|
||||
s->csr[5] |= CSR5_RU;
|
||||
tulip_update_int(s);
|
||||
return s->rx_frame_size - s->rx_frame_len;
|
||||
if (first)
|
||||
/* Stop at the very beginning, tell the host 0 bytes have been received. */
|
||||
return 0;
|
||||
else
|
||||
return (s->rx_frame_size - s->rx_frame_len) % s->rx_frame_size;
|
||||
}
|
||||
desc.status = 0;
|
||||
|
||||
@@ -527,6 +539,7 @@ tulip_receive(void *priv, uint8_t *buf, int size)
|
||||
}
|
||||
tulip_desc_write(s, s->current_rx_desc, &desc);
|
||||
tulip_next_rx_descriptor(s, &desc);
|
||||
first = 0;
|
||||
} while (s->rx_frame_len);
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -190,6 +190,10 @@ if(RTMIDI)
|
||||
target_compile_definitions(ui PRIVATE USE_RTMIDI)
|
||||
endif()
|
||||
|
||||
if(WACOM)
|
||||
target_compile_definitions(ui PRIVATE USE_WACOM)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
enable_language(RC)
|
||||
target_sources(86Box PUBLIC 86Box-qt.rc)
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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 }
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -156,7 +156,7 @@ ega_out(uint16_t addr, uint8_t val, void *priv)
|
||||
if (!(val & 1))
|
||||
io_sethandler(0x03a0, 0x0020, ega_in, NULL, NULL, ega_out, NULL, NULL, ega);
|
||||
ega_recalctimings(ega);
|
||||
if ((ega_type == 2) && !(val & 0x02))
|
||||
if ((ega_type == EGA_TYPE_COMPAQ) && !(val & 0x02))
|
||||
mem_mapping_disable(&ega->mapping);
|
||||
else switch (ega->gdcreg[6] & 0xc) {
|
||||
case 0x0: /*128k at A0000*/
|
||||
@@ -227,7 +227,7 @@ ega_out(uint16_t addr, uint8_t val, void *priv)
|
||||
ega->chain2_read = val & 0x10;
|
||||
break;
|
||||
case 6:
|
||||
if ((ega_type == 2) && !(ega->miscout & 0x02))
|
||||
if ((ega_type == EGA_TYPE_COMPAQ) && !(ega->miscout & 0x02))
|
||||
mem_mapping_disable(&ega->mapping);
|
||||
else switch (val & 0xc) {
|
||||
case 0x0: /*128k at A0000*/
|
||||
@@ -615,7 +615,7 @@ ega_recalctimings(ega_t *ega)
|
||||
if (ega->dispofftime < TIMER_USEC)
|
||||
ega->dispofftime = TIMER_USEC;
|
||||
|
||||
if (ega_type == 2) {
|
||||
if (ega_type == EGA_TYPE_COMPAQ) {
|
||||
ega->dot_time = (uint64_t) (ega->dot_clock);
|
||||
if (ega->dot_time < TIMER_USEC)
|
||||
ega->dot_time = TIMER_USEC;
|
||||
@@ -1313,7 +1313,7 @@ ega_read(uint32_t addr, void *priv)
|
||||
return ~(temp | temp2 | temp3 | temp4);
|
||||
}
|
||||
|
||||
if ((ega_type == 2) && (ega->gdcreg[4] & 0x04))
|
||||
if ((ega_type == EGA_TYPE_COMPAQ) && (ega->gdcreg[4] & 0x04))
|
||||
return 0xff;
|
||||
|
||||
return ega->vram[addr | readplane];
|
||||
@@ -1504,7 +1504,7 @@ ega_standalone_init(const device_t *info)
|
||||
ega->vrammask = ega->vram_limit - 1;
|
||||
|
||||
mem_mapping_add(&ega->mapping, 0xa0000, 0x20000, ega_read, NULL, NULL, ega_write, NULL, NULL, NULL, MEM_MAPPING_EXTERNAL, ega);
|
||||
if (ega_type == 2)
|
||||
if (ega_type == EGA_TYPE_COMPAQ)
|
||||
mem_mapping_disable(&ega->mapping);
|
||||
io_sethandler(0x03c0, 0x0020, ega_in, NULL, NULL, ega_out, NULL, NULL, ega);
|
||||
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -482,8 +482,11 @@ tgui_out(uint16_t addr, uint8_t val, void *priv)
|
||||
svga->hwcursor.y = (svga->crtc[0x42] | (svga->crtc[0x43] << 8)) & 0x7ff;
|
||||
|
||||
if ((tgui->accel.ger22 & 0xff) == 8) {
|
||||
if (svga->bpp != 24)
|
||||
if (svga->bpp != 24) {
|
||||
svga->hwcursor.x <<= 1;
|
||||
if ((tgui->type == TGUI_9440) && (svga->crtc[0x1e] & 4))
|
||||
svga->hwcursor.x >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
svga->hwcursor.xoff = svga->crtc[0x46] & 0x3f;
|
||||
@@ -788,6 +791,9 @@ tgui_recalctimings(svga_t *svga)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if ((svga->hdisp == 1280) && (svga->dispend == (1020 >> 1)) && svga->interlace)
|
||||
svga->dispend++;
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
|
||||
@@ -513,7 +513,7 @@ banshee_render_16bpp_tiled(svga_t *svga)
|
||||
if (addr >= svga->vram_max)
|
||||
return;
|
||||
|
||||
for (int x = 0; x <= svga->hdisp; x += 64) {
|
||||
for (int x = 0; x < svga->hdisp; x += 64) {
|
||||
if (svga->hwcursor_on || svga->overlay_on)
|
||||
svga->changedvram[addr >> 12] = 2;
|
||||
if (svga->changedvram[addr >> 12] || svga->fullchange) {
|
||||
|
||||
Reference in New Issue
Block a user