Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
@@ -62,14 +62,18 @@ find_package(PNG REQUIRED)
|
||||
include_directories(${PNG_INCLUDE_DIRS})
|
||||
target_link_libraries(86Box PNG::PNG)
|
||||
|
||||
if(CMAKE_TARGET_ARCHITECTURES STREQUAL "i386")
|
||||
if(ARCH STREQUAL "i386")
|
||||
if(MSVC)
|
||||
set_target_properties(86Box PROPERTIES LINK_FLAGS "/LARGEADDRESSAWARE")
|
||||
elseif(MINGW)
|
||||
set_target_properties(86Box PROPERTIES LINK_FLAGS "-Wl,--large-address-aware")
|
||||
target_link_options(86Box PRIVATE "/LARGEADDRESSAWARE")
|
||||
else()
|
||||
target_link_options(86Box PRIVATE "LINKER:--large-address-aware")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
target_link_options(86Box PRIVATE "-static")
|
||||
endif()
|
||||
|
||||
configure_file(include/86box/version.h.in include/86box/version.h @ONLY)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
|
||||
|
||||
|
||||
27
src/arch_detect.c
Normal file
27
src/arch_detect.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Configure-time architecture detection for the CMake build.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: David Hrdlička, <hrdlickadavid@outlook.com>
|
||||
*
|
||||
* Copyright 2020-2021 David Hrdlička.
|
||||
*/
|
||||
|
||||
#if defined(__arm__) || defined(__TARGET_ARCH_ARM)
|
||||
#error ARCH arm
|
||||
#elif defined(__aarch64__) || defined(_M_ARM64)
|
||||
#error ARCH arm64
|
||||
#elif defined(__i386) || defined(__i386__) || defined(_M_IX86)
|
||||
#error ARCH i386
|
||||
#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64)
|
||||
#error ARCH x86_64
|
||||
#endif
|
||||
#error ARCH unknown
|
||||
@@ -16,16 +16,15 @@
|
||||
if(DYNAREC)
|
||||
add_library(dynarec OBJECT codegen.c codegen_ops.c)
|
||||
|
||||
if(CMAKE_TARGET_ARCHITECTURES STREQUAL "i386")
|
||||
if(ARCH STREQUAL "i386")
|
||||
target_sources(dynarec PRIVATE codegen_x86.c
|
||||
codegen_accumulate_x86.c)
|
||||
elseif(CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
|
||||
elseif(ARCH STREQUAL "x86_64")
|
||||
target_sources(dynarec PRIVATE codegen_x86-64.c
|
||||
codegen_accumulate_x86-64.c)
|
||||
else()
|
||||
message(SEND_ERROR
|
||||
"Dynarec is incompatible with target platform "
|
||||
${CMAKE_TARGET_ARCHITECTURES})
|
||||
"Dynarec is incompatible with target platform ${ARCH}")
|
||||
endif()
|
||||
|
||||
target_link_libraries(86Box dynarec cgt)
|
||||
|
||||
@@ -25,27 +25,26 @@ if(DYNAREC)
|
||||
codegen_ops_mmx_pack.c codegen_ops_mmx_shift.c codegen_ops_mov.c
|
||||
codegen_ops_shift.c codegen_ops_stack.c codegen_reg.c)
|
||||
|
||||
if(CMAKE_TARGET_ARCHITECTURES STREQUAL "i386")
|
||||
if(ARCH STREQUAL "i386")
|
||||
target_sources(dynarec PRIVATE codegen_backend_x86.c
|
||||
codegen_backend_x86_ops.c codegen_backend_x86_ops_fpu.c
|
||||
codegen_backend_x86_ops_sse.c
|
||||
codegen_backend_x86_uops.c)
|
||||
elseif(CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
|
||||
elseif(ARCH STREQUAL "x86_64")
|
||||
target_sources(dynarec PRIVATE codegen_backend_x86-64.c
|
||||
codegen_backend_x86-64_ops.c
|
||||
codegen_backend_x86-64_ops_sse.c
|
||||
codegen_backend_x86-64_uops.c)
|
||||
elseif(CMAKE_TARGET_ARCHITECTURES STREQUAL "armv8")
|
||||
elseif(ARCH STREQUAL "arm64")
|
||||
target_sources(dynarec PRIVATE codegen_backend_arm64.c
|
||||
codegen_backend_arm64_ops.c codegen_backend_arm64_uops.c
|
||||
codegen_backend_arm64_imm.c)
|
||||
elseif(CMAKE_TARGET_ARCHITECTURES MATCHES "arm")
|
||||
elseif(ARCH STREQUAL "arm")
|
||||
target_sources(dynarec PRIVATE codegen_backend_arm.c
|
||||
codegen_backend_arm_ops.c codegen_backend_arm_uops.c)
|
||||
else()
|
||||
message(SEND_ERROR
|
||||
"Dynarec is incompatible with target platform "
|
||||
${CMAKE_TARGET_ARCHITECTURES})
|
||||
"Dynarec is incompatible with target platform ${ARCH}")
|
||||
endif()
|
||||
|
||||
target_link_libraries(86Box dynarec cgt)
|
||||
|
||||
@@ -164,6 +164,7 @@
|
||||
#define IDC_CONFIGURE_GUS 1049
|
||||
#define IDC_COMBO_MIDI_IN 1050
|
||||
#define IDC_CONFIGURE_CMS 1051
|
||||
#define IDC_CONFIGURE_SSI 1052
|
||||
|
||||
#define IDC_COMBO_NET_TYPE 1060 /* network config */
|
||||
#define IDC_COMBO_PCAP 1061
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <86box/timer.h>
|
||||
#include <86box/sound.h>
|
||||
#include <86box/midi.h>
|
||||
#include <86box/snd_mpu401.h>
|
||||
#include <86box/snd_ac97.h>
|
||||
|
||||
|
||||
@@ -27,8 +26,6 @@
|
||||
static float low_fir_es1371_coef[ES1371_NCoef];
|
||||
|
||||
typedef struct {
|
||||
mpu_t mpu;
|
||||
|
||||
uint8_t pci_command, pci_serr;
|
||||
|
||||
uint32_t base_addr;
|
||||
@@ -897,7 +894,7 @@ static uint8_t es1371_pci_read(int func, int addr, void *p)
|
||||
case 0x04: return es1371->pci_command;
|
||||
case 0x05: return es1371->pci_serr;
|
||||
|
||||
case 0x06: return 0x10; /* Supports support ACPI */
|
||||
case 0x06: return 0x10; /* Supports ACPI */
|
||||
case 0x07: return 0x00;
|
||||
|
||||
case 0x08: return 0x02; /* Revision ID */
|
||||
|
||||
@@ -65,7 +65,8 @@ void *ssi2001_init(const device_t *info)
|
||||
|
||||
ssi2001->psid = sid_init();
|
||||
sid_reset(ssi2001->psid);
|
||||
io_sethandler(0x0280, 0x0020, ssi2001_read, NULL, NULL, ssi2001_write, NULL, NULL, ssi2001);
|
||||
uint16_t addr = device_get_config_hex16("base");
|
||||
io_sethandler(addr, 0x0020, ssi2001_read, NULL, NULL, ssi2001_write, NULL, NULL, ssi2001);
|
||||
sound_add_handler(ssi2001_get_buffer, ssi2001);
|
||||
return ssi2001;
|
||||
}
|
||||
@@ -79,11 +80,38 @@ void ssi2001_close(void *p)
|
||||
free(ssi2001);
|
||||
}
|
||||
|
||||
static const device_config_t ssi2001_config[] =
|
||||
{
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x280, "", { 0 },
|
||||
{
|
||||
{
|
||||
"0x280", 0x280
|
||||
},
|
||||
{
|
||||
"0x2A0", 0x2A0
|
||||
},
|
||||
{
|
||||
"0x2C0", 0x2C0
|
||||
},
|
||||
{
|
||||
"0x2E0", 0x2E0
|
||||
},
|
||||
{
|
||||
""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"", "", -1
|
||||
}
|
||||
};
|
||||
|
||||
const device_t ssi2001_device =
|
||||
{
|
||||
"Innovation SSI-2001",
|
||||
0, 0,
|
||||
ssi2001_init, ssi2001_close, NULL,
|
||||
{ NULL }, NULL, NULL,
|
||||
NULL
|
||||
ssi2001_config
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@ add_library(voodoo OBJECT vid_voodoo.c vid_voodoo_banshee.c
|
||||
vid_voodoo_fb.c vid_voodoo_fifo.c vid_voodoo_reg.c vid_voodoo_render.c
|
||||
vid_voodoo_setup.c vid_voodoo_texture.c)
|
||||
|
||||
if(NOT MSVC)
|
||||
if(NOT MSVC AND (ARCH STREQUAL "i386" OR ARCH STREQUAL "x86_64"))
|
||||
target_compile_options(voodoo PRIVATE "-msse2")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -519,6 +519,7 @@ BEGIN
|
||||
|
||||
CONTROL "Innovation SSI-2001",IDC_CHECK_SSI,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,84,95,10
|
||||
PUSHBUTTON "Configure",IDC_CONFIGURE_SSI,214,82,46,12
|
||||
|
||||
CONTROL "CMS / Game Blaster",IDC_CHECK_CMS,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,102,95,10
|
||||
@@ -1295,7 +1296,7 @@ BEGIN
|
||||
VALUE "FileDescription", EMU_NAME "\0"
|
||||
VALUE "FileVersion", EMU_VERSION "\0"
|
||||
VALUE "InternalName", EMU_NAME "\0"
|
||||
VALUE "LegalCopyright", "Copyright © 2007-2020 " EMU_NAME " contributors\0"
|
||||
VALUE "LegalCopyright", "Copyright \xc2\xa9 2007-2020 " EMU_NAME " contributors\0"
|
||||
VALUE "OriginalFilename", "86box.exe\0"
|
||||
VALUE "ProductName", EMU_NAME "\0"
|
||||
VALUE "ProductVersion", EMU_VERSION "\0"
|
||||
|
||||
@@ -29,12 +29,14 @@ if(MSVC)
|
||||
target_compile_definitions(ui PRIVATE NO_INCLUDE_MANIFEST)
|
||||
target_sources(86Box PRIVATE 86Box.manifest)
|
||||
|
||||
target_sources(plat PRIVATE win_opendir.c)
|
||||
|
||||
# Append null to resource strings (fixes file dialogs)
|
||||
set_property(SOURCE 86Box.rc PROPERTY COMPILE_FLAGS -n)
|
||||
endif()
|
||||
|
||||
if(NOT MINGW)
|
||||
target_sources(plat PRIVATE win_opendir.c)
|
||||
endif()
|
||||
|
||||
if(DINPUT)
|
||||
target_sources(plat PRIVATE win_joystick.cpp)
|
||||
target_link_libraries(86Box dinput8)
|
||||
|
||||
@@ -1380,6 +1380,7 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
settings_set_check(hdlg, IDC_CHECK_GUS, temp_GUS);
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_GUS, temp_GUS);
|
||||
settings_set_check(hdlg, IDC_CHECK_SSI, temp_SSI2001);
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_SSI, temp_SSI2001);
|
||||
settings_set_check(hdlg, IDC_CHECK_FLOAT, temp_float);
|
||||
|
||||
free(lptsTemp);
|
||||
@@ -1456,6 +1457,16 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case IDC_CONFIGURE_GUS:
|
||||
temp_deviceconfig |= deviceconfig_open(hdlg, (void *)&gus_device);
|
||||
break;
|
||||
|
||||
case IDC_CHECK_SSI:
|
||||
temp_SSI2001 = settings_get_check(hdlg, IDC_CHECK_SSI);
|
||||
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_SSI, temp_SSI2001);
|
||||
break;
|
||||
|
||||
case IDC_CONFIGURE_SSI:
|
||||
temp_deviceconfig |= deviceconfig_open(hdlg, &ssi2001_device);
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user