From 1af575d018c5a4f92fcb6334dae61023a8dde71b Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 14 Feb 2022 02:54:16 +0500 Subject: [PATCH 01/21] Remove the last remaining trace of the defunct VRAM dumping function --- src/qt/qt_progsettings.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qt/qt_progsettings.hpp b/src/qt/qt_progsettings.hpp index d0cbcc5d2..75fba149a 100644 --- a/src/qt/qt_progsettings.hpp +++ b/src/qt/qt_progsettings.hpp @@ -32,7 +32,6 @@ public: if (strcmp(sourceText, "Take s&creenshot") == 0) sourceText = "Take s&creenshot\tCtrl+F11"; if (strcmp(sourceText, "Begin trace") == 0) sourceText = "Begin trace\tCtrl+T"; if (strcmp(sourceText, "End trace") == 0) sourceText = "End trace\tCtrl+T"; - if (strcmp(sourceText, "Dump &video RAM") == 0) sourceText = "Dump &video RAM\tCtrl+F1"; if (strcmp(sourceText, "&Qt (Software)") == 0) { QString finalstr = QTranslator::translate("", "&SDL (Software)", disambiguation, n); From 4a752c05a59f2d174533fb0eeb66dff1cd0903e2 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 14 Feb 2022 05:10:50 +0500 Subject: [PATCH 02/21] Move the Tandy PSG ISA clones to the Dev branch --- CMakeLists.txt | 1 + src/include/86box/sound.h | 4 +++- src/sound/CMakeLists.txt | 4 ++++ src/sound/snd_pssj.c | 6 ++++++ src/sound/snd_sn76489.c | 6 ++++++ src/sound/sound.c | 4 +++- src/win/Makefile.mingw | 10 ++++++++++ 7 files changed, 33 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac9292376..96f3efee6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,6 +142,7 @@ cmake_dependent_option(OLIVETTI "Olivetti M290" cmake_dependent_option(OPEN_AT "OpenAT" ON "DEV_BRANCH" OFF) cmake_dependent_option(PAS16 "Pro Audio Spectrum 16" OFF "DEV_BRANCH" OFF) cmake_dependent_option(SIO_DETECT "Super I/O Detection Helper" ON "DEV_BRANCH" OFF) +cmake_dependent_option(TANDY_ISA "Tandy PSG ISA clone boards" ON "DEV_BRANCH" OFF) cmake_dependent_option(VGAWONDER "ATI VGA Wonder (ATI-18800)" ON "DEV_BRANCH" OFF) cmake_dependent_option(VNC "VNC renderer" OFF "DEV_BRANCH" OFF) cmake_dependent_option(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF) diff --git a/src/include/86box/sound.h b/src/include/86box/sound.h index cbf380901..f7b3bca0a 100644 --- a/src/include/86box/sound.h +++ b/src/include/86box/sound.h @@ -103,9 +103,11 @@ extern const device_t pas16_device; extern const device_t ps1snd_device; /* Tandy PSSJ */ -extern const device_t tndy_device; extern const device_t pssj_device; +#if defined(DEV_BRANCH) && defined(USE_TANDY_ISA) extern const device_t pssj_isa_device; +extern const device_t tndy_device; +#endif /* Creative Labs Sound Blaster */ extern const device_t sb_1_device; diff --git a/src/sound/CMakeLists.txt b/src/sound/CMakeLists.txt index e815d7329..8879b0378 100644 --- a/src/sound/CMakeLists.txt +++ b/src/sound/CMakeLists.txt @@ -55,5 +55,9 @@ if(GUSMAX) target_compile_definitions(snd PRIVATE USE_GUSMAX) endif() +if(TANDY_ISA) + target_compile_definitions(snd PRIVATE USE_TANDY_ISA) +endif() + add_subdirectory(resid-fp) target_link_libraries(86Box resid-fp) \ No newline at end of file diff --git a/src/sound/snd_pssj.c b/src/sound/snd_pssj.c index 8c93125ea..cd5f274fe 100644 --- a/src/sound/snd_pssj.c +++ b/src/sound/snd_pssj.c @@ -215,6 +215,7 @@ void *pssj_1e0_init(const device_t *info) return pssj; } +#if defined(DEV_BRANCH) && defined(USE_TANDY_ISA) void *pssj_isa_init(const device_t *info) { pssj_t *pssj = malloc(sizeof(pssj_t)); @@ -230,6 +231,7 @@ void *pssj_isa_init(const device_t *info) return pssj; } +#endif void pssj_close(void *p) { @@ -238,6 +240,7 @@ void pssj_close(void *p) free(pssj); } +#if defined(DEV_BRANCH) && defined(USE_TANDY_ISA) static const device_config_t pssj_isa_config[] = { { @@ -261,6 +264,7 @@ static const device_config_t pssj_isa_config[] = "", "", -1 } }; +#endif const device_t pssj_device = { @@ -290,6 +294,7 @@ const device_t pssj_1e0_device = NULL }; +#if defined(DEV_BRANCH) && defined(USE_TANDY_ISA) const device_t pssj_isa_device = { "Tandy PSSJ Clone", @@ -304,3 +309,4 @@ const device_t pssj_isa_device = NULL, pssj_isa_config }; +#endif diff --git a/src/sound/snd_sn76489.c b/src/sound/snd_sn76489.c index c2aa2a52d..e04ca7e5e 100644 --- a/src/sound/snd_sn76489.c +++ b/src/sound/snd_sn76489.c @@ -224,6 +224,7 @@ void *ncr8496_device_init(const device_t *info) return sn76489; } +#if defined(DEV_BRANCH) && defined(USE_TANDY_ISA) void *tndy_device_init(const device_t *info) { sn76489_t *sn76489 = malloc(sizeof(sn76489_t)); @@ -235,6 +236,7 @@ void *tndy_device_init(const device_t *info) return sn76489; } +#endif void sn76489_device_close(void *p) { @@ -243,6 +245,7 @@ void sn76489_device_close(void *p) free(sn76489); } +#if defined(DEV_BRANCH) && defined(USE_TANDY_ISA) static const device_config_t tndy_config[] = { { @@ -266,6 +269,7 @@ static const device_config_t tndy_config[] = "", "", -1 } }; +#endif const device_t sn76489_device = { @@ -291,6 +295,7 @@ const device_t ncr8496_device = NULL }; +#if defined(DEV_BRANCH) && defined(USE_TANDY_ISA) const device_t tndy_device = { "TNDY", @@ -302,3 +307,4 @@ const device_t tndy_device = NULL, { NULL }, NULL, tndy_config }; +#endif diff --git a/src/sound/sound.c b/src/sound/sound.c index b2b9c4fca..7fbbd4d1c 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -123,8 +123,10 @@ static const SOUND_CARD sound_cards[] = #if defined(DEV_BRANCH) && defined(USE_PAS16) { &pas16_device }, #endif - { &tndy_device }, +#if defined(DEV_BRANCH) && defined(USE_TANDY_ISA) { &pssj_isa_device }, + { &tndy_device }, +#endif { &wss_device }, { &adlib_mca_device }, { &ncr_business_audio_device }, diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 26d7239f3..e1a60d873 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -63,6 +63,9 @@ ifeq ($(DEV_BUILD), y) ifndef VGAWONDER VGAWONDER := y endif + ifndef TANDY_ISA + TANDY_ISA := y + endif ifndef VNC VNC := y endif @@ -121,6 +124,9 @@ else ifndef VGAWONDER VGAWONDER := n endif + ifndef TANDY_ISA + TANDY_ISA := n + endif ifndef VNC VNC := n endif @@ -456,6 +462,10 @@ OPTS += -DUSE_SIO_DETECT DEVBROBJ += sio_detect.o endif +ifeq ($(TANDY_ISA), y) +OPTS += -DUSE_TANDY_ISA +endif + ifeq ($(VGAWONDER), y) OPTS += -DUSE_VGAWONDER endif From a378e1a3005eb410e05a486e6c06cf486e9a66f7 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 14 Feb 2022 05:11:08 +0500 Subject: [PATCH 03/21] Move some options around to maintain alphabetical order --- CMakeLists.txt | 6 ++-- src/device/CMakeLists.txt | 8 +++--- src/win/Makefile.mingw | 60 +++++++++++++++++++-------------------- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 96f3efee6..56a4d446a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,9 @@ endif() cmake_dependent_option(AMD_K5 "AMD K5" ON "DEV_BRANCH" OFF) cmake_dependent_option(CYRIX_6X86 "Cyrix 6x86" ON "DEV_BRANCH" OFF) cmake_dependent_option(GUSMAX "Gravis UltraSound MAX" ON "DEV_BRANCH" OFF) +cmake_dependent_option(ISAMEM_RAMPAGE "AST Rampage" ON "DEV_BRANCH" OFF) +cmake_dependent_option(ISAMEM_IAB "Intel Above Board" ON "DEV_BRANCH" OFF) +cmake_dependent_option(ISAMEM_BRAT "BocaRAM/AT" ON "DEV_BRANCH" OFF) cmake_dependent_option(LASERXT "VTech Laser XT" ON "DEV_BRANCH" OFF) cmake_dependent_option(MGA "Matrox Mystique graphics adapters" ON "DEV_BRANCH" OFF) cmake_dependent_option(NO_SIO "Machines without emulated Super I/O chips" ON "DEV_BRANCH" OFF) @@ -146,9 +149,6 @@ cmake_dependent_option(TANDY_ISA "Tandy PSG ISA clone boards" cmake_dependent_option(VGAWONDER "ATI VGA Wonder (ATI-18800)" ON "DEV_BRANCH" OFF) cmake_dependent_option(VNC "VNC renderer" OFF "DEV_BRANCH" OFF) cmake_dependent_option(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF) -cmake_dependent_option(ISAMEM_RAMPAGE "AST Rampage" ON "DEV_BRANCH" OFF) -cmake_dependent_option(ISAMEM_IAB "Intel Above Board" ON "DEV_BRANCH" OFF) -cmake_dependent_option(ISAMEM_BRAT "BocaRAM/AT" ON "DEV_BRANCH" OFF) # Ditto but for Qt if (QT) diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt index 5d7d2d752..658da7280 100644 --- a/src/device/CMakeLists.txt +++ b/src/device/CMakeLists.txt @@ -19,10 +19,6 @@ add_library(dev OBJECT bugger.c cassette.c cartridge.c hasp.c hwm.c hwm_lm75.c h smbus_piix4.c smbus_ali7101.c keyboard.c keyboard_xt.c keyboard_at.c mouse.c mouse_bus.c mouse_serial.c mouse_ps2.c phoenix_486_jumper.c) -if(LASERXT) - target_compile_definitions(dev PRIVATE USE_LASERXT) -endif() - if(ISAMEM_RAMPAGE) target_compile_definitions(dev PRIVATE USE_ISAMEM_RAMPAGE) endif() @@ -34,3 +30,7 @@ endif() if(ISAMEM_BRAT) target_compile_definitions(dev PRIVATE USE_ISAMEM_BRAT) endif() + +if(LASERXT) + target_compile_definitions(dev PRIVATE USE_LASERXT) +endif() diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index e1a60d873..3f0b3a3b6 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -42,6 +42,15 @@ ifeq ($(DEV_BUILD), y) ifndef GUSMAX GUSMAX := y endif + ifndef ISAMEM_RAMPAGE + ISAMEM_RAMPAGE := y + endif + ifndef ISAMEM_IAB + ISAMEM_IAB := y + endif + ifndef ISAMEM_BRAT + ISAMEM_BRAT := y + endif ifndef LASERXT LASERXT := y endif @@ -72,15 +81,6 @@ ifeq ($(DEV_BUILD), y) ifndef XL24 XL24 := y endif - ifndef ISAMEM_RAMPAGE - ISAMEM_RAMPAGE := y - endif - ifndef ISAMEM_IAB - ISAMEM_IAB := y - endif - ifndef ISAMEM_BRAT - ISAMEM_BRAT := y - endif ifndef OLIVETTI OLIVETTI := y endif @@ -103,6 +103,15 @@ else ifndef GUSMAX GUSMAX := n endif + ifndef ISAMEM_RAMPAGE + ISAMEM_RAMPAGE := n + endif + ifndef ISAMEM_IAB + ISAMEM_IAB := n + endif + ifndef ISAMEM_BRAT + ISAMEM_BRAT := n + endif ifndef LASERXT LASERXT := n endif @@ -133,15 +142,6 @@ else ifndef XL24 XL24 := n endif - ifndef ISAMEM_RAMPAGE - ISAMEM_RAMPAGE := n - endif - ifndef ISAMEM_IAB - ISAMEM_IAB := n - endif - ifndef ISAMEM_BRAT - ISAMEM_BRAT := n - endif ifndef OLIVETTI OLIVETTI := n endif @@ -434,6 +434,18 @@ ifeq ($(GUSMAX), y) OPTS += -DUSE_GUSMAX endif +ifeq ($(ISAMEM_RAMPAGE), y) +OPTS += -DUSE_ISAMEM_RAMPAGE +endif + +ifeq ($(ISAMEM_IAB), y) +OPTS += -DUSE_ISAMEM_IAB +endif + +ifeq ($(ISAMEM_BRAT), y) +OPTS += -DUSE_ISAMEM_BRAT +endif + ifeq ($(LASERXT), y) OPTS += -DUSE_LASERXT DEVBROBJ += m_xt_laserxt.o @@ -474,18 +486,6 @@ ifeq ($(XL24), y) OPTS += -DUSE_XL24 endif -ifeq ($(ISAMEM_RAMPAGE), y) -OPTS += -DUSE_ISAMEM_RAMPAGE -endif - -ifeq ($(ISAMEM_IAB), y) -OPTS += -DUSE_ISAMEM_IAB -endif - -ifeq ($(ISAMEM_BRAT), y) -OPTS += -DUSE_ISAMEM_BRAT -endif - ifeq ($(OLIVETTI), y) OPTS += -DUSE_OLIVETTI DEVBROBJ += olivetti_eva.o From 743dc0f1a8b50ea608adf7be3068c20e7f655aa7 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 14 Feb 2022 05:36:12 +0500 Subject: [PATCH 04/21] Fix a warning in snd_sn76489.c --- src/sound/snd_sn76489.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/snd_sn76489.c b/src/sound/snd_sn76489.c index e04ca7e5e..e4ba68742 100644 --- a/src/sound/snd_sn76489.c +++ b/src/sound/snd_sn76489.c @@ -305,6 +305,7 @@ const device_t tndy_device = tndy_device_init, sn76489_device_close, NULL, { NULL }, NULL, + NULL, tndy_config }; #endif From d250b95a9b7296984bf028cb7c801ea6cf515046 Mon Sep 17 00:00:00 2001 From: EmpyreusX <36258024+EmpyreusX@users.noreply.github.com> Date: Mon, 14 Feb 2022 09:23:17 +0800 Subject: [PATCH 05/21] Updated Simp. Chinese translation --- src/win/languages/zh-CN.rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/win/languages/zh-CN.rc b/src/win/languages/zh-CN.rc index a1b699e41..d68877306 100644 --- a/src/win/languages/zh-CN.rc +++ b/src/win/languages/zh-CN.rc @@ -371,7 +371,7 @@ BEGIN 2048 "86Box" IDS_2049 "错误" IDS_2050 "致命错误" - IDS_2051 " - PAUSED" + IDS_2051 " - 已暂停" IDS_2052 "按 Ctrl+Alt+PgDn 组合键返回到窗口模式。" IDS_2053 "速度" IDS_2054 "ZIP %03i %i (%s): %ls" @@ -402,8 +402,8 @@ BEGIN IDS_2075 "其他外围设备" IDS_2076 "表面镜像 (*.86F)\0*.86F\0" IDS_2077 "单击窗口捕捉鼠标" - IDS_2078 "按 F8+F12 释放鼠标" - IDS_2079 "按 F8+F12 或鼠标中键释放鼠标" + IDS_2078 "按下 F8+F12 释放鼠标" + IDS_2079 "按下 F8+F12 或鼠标中键释放鼠标" END STRINGTABLE DISCARDABLE From 9c4242961c90433bd040c23684b98d8a919b14ce Mon Sep 17 00:00:00 2001 From: EmpyreusX <36258024+EmpyreusX@users.noreply.github.com> Date: Mon, 14 Feb 2022 09:24:13 +0800 Subject: [PATCH 06/21] Updated Japanese translation --- src/win/languages/ja-JP.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win/languages/ja-JP.rc b/src/win/languages/ja-JP.rc index e98ef2b45..3917f59c4 100644 --- a/src/win/languages/ja-JP.rc +++ b/src/win/languages/ja-JP.rc @@ -371,7 +371,7 @@ BEGIN 2048 "86Box" IDS_2049 "エラー" IDS_2050 "致命的なエラー" - IDS_2051 " - PAUSED" + IDS_2051 " - 一時停止" IDS_2052 "Ctrl+Alt+PgDnでウィンドウモードに戻ります。" IDS_2053 "速度" IDS_2054 "ZIP %03i %i (%s): %ls" From 695d476196c41becb8b286e8c00ba7130553cc1e Mon Sep 17 00:00:00 2001 From: EmpyreusX <36258024+EmpyreusX@users.noreply.github.com> Date: Mon, 14 Feb 2022 09:26:53 +0800 Subject: [PATCH 07/21] Updated Simp. Chinese translation --- src/qt/languages/zh-CN.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qt/languages/zh-CN.po b/src/qt/languages/zh-CN.po index 165878dec..b9c6f6c98 100644 --- a/src/qt/languages/zh-CN.po +++ b/src/qt/languages/zh-CN.po @@ -599,10 +599,10 @@ msgid "Fatal error" msgstr "致命错误" msgid " - PAUSED" -msgstr " - PAUSED" +msgstr " - 已暂停" msgid "Press Ctrl+Alt+PgDn to return to windowed mode." -msgstr "按 Ctrl+Alt+PgDn 组合键返回到窗口模式。" +msgstr "按下 Ctrl+Alt+PgDn 返回到窗口模式。" msgid "Speed" msgstr "速度" @@ -683,10 +683,10 @@ msgid "Click to capture mouse" msgstr "单击窗口捕捉鼠标" msgid "Press F8+F12 to release mouse" -msgstr "按 F8+F12 释放鼠标" +msgstr "按下 F8+F12 释放鼠标" msgid "Press F8+F12 or middle button to release mouse" -msgstr "按 F8+F12 或鼠标中键释放鼠标" +msgstr "按下 F8+F12 或鼠标中键释放鼠标" msgid "Unable to initialize FluidSynth" msgstr "无法初始化 FluidSynth" @@ -932,10 +932,10 @@ msgid "Pause execution" msgstr "暂停执行" msgid "Press Ctrl+Alt+Del" -msgstr "按 Ctrl+Alt+Del" +msgstr "按下 Ctrl+Alt+Del" msgid "Press Ctrl+Alt+Esc" -msgstr "按 Ctrl+Alt+Esc" +msgstr "按下 Ctrl+Alt+Esc" msgid "Hard reset" msgstr "硬重置" From f586727153d67fa1cd9a5cdb42bde06fe1ad8e92 Mon Sep 17 00:00:00 2001 From: EmpyreusX <36258024+EmpyreusX@users.noreply.github.com> Date: Mon, 14 Feb 2022 09:28:08 +0800 Subject: [PATCH 08/21] Small fixes to Simp. Chinese translation --- src/win/languages/zh-CN.rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/win/languages/zh-CN.rc b/src/win/languages/zh-CN.rc index d68877306..accc0dd47 100644 --- a/src/win/languages/zh-CN.rc +++ b/src/win/languages/zh-CN.rc @@ -372,7 +372,7 @@ BEGIN IDS_2049 "错误" IDS_2050 "致命错误" IDS_2051 " - 已暂停" - IDS_2052 "按 Ctrl+Alt+PgDn 组合键返回到窗口模式。" + IDS_2052 "按下 Ctrl+Alt+PgDn 返回到窗口模式。" IDS_2053 "速度" IDS_2054 "ZIP %03i %i (%s): %ls" IDS_2055 "ZIP 镜像 (*.IM?;*.ZDI)\0*.IM?;*.ZDI\0" @@ -505,8 +505,8 @@ BEGIN IDS_2153 "无法初始化 OpenGL (3.0 核心) 渲染器。请使用其他渲染器。" IDS_2154 "恢复执行" IDS_2155 "暂停执行" - IDS_2156 "按 Ctrl+Alt+Del" - IDS_2157 "按 Ctrl+Alt+Esc" + IDS_2156 "按下 Ctrl+Alt+Del" + IDS_2157 "按下 Ctrl+Alt+Esc" IDS_2158 "硬重置" IDS_2159 "ACPI 关机" IDS_2160 "设置" From 2cc7e5f9c348d1420c24ed068bfa3b5803cdb00f Mon Sep 17 00:00:00 2001 From: EmpyreusX <36258024+EmpyreusX@users.noreply.github.com> Date: Mon, 14 Feb 2022 09:29:12 +0800 Subject: [PATCH 09/21] Updated Japanese translation. --- src/qt/languages/ja-JP.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/languages/ja-JP.po b/src/qt/languages/ja-JP.po index 7a66603b4..d1da289c4 100644 --- a/src/qt/languages/ja-JP.po +++ b/src/qt/languages/ja-JP.po @@ -599,7 +599,7 @@ msgid "Fatal error" msgstr "致命的なエラー" msgid " - PAUSED" -msgstr " - PAUSED" +msgstr " - 一時停止" msgid "Press Ctrl+Alt+PgDn to return to windowed mode." msgstr "Ctrl+Alt+PgDnでウィンドウモードに戻ります。" From 6f35e670ec085de0a1c7f89839b78d5d2c9c1229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Mon, 14 Feb 2022 08:33:03 +0100 Subject: [PATCH 10/21] Fix Mac build --- src/qt/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index e246ce920..1604083d0 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -231,9 +231,6 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" DESTINATION "${INSTALL_CMAKE_DIR}") - # Note Mac specific extension .app - set(APPS "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/86Box.app") - # Directories to look for dependencies set(DIRS "${CMAKE_BINARY_DIR}") @@ -253,9 +250,10 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE) message(STATUS "QT_PLUGINS: ${QT_PLUGINS}") message(STATUS "DIRS: ${DIRS}") - install(CODE " + install(CODE " include(BundleUtilities) - fixup_bundle(\"${APPS}\" \"${QT_PLUGINS}\" \"${DIRS}\")") + get_filename_component(CMAKE_INSTALL_PREFIX_ABSOLUTE \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX} ABSOLUTE) + fixup_bundle(\"\${CMAKE_INSTALL_PREFIX_ABSOLUTE}/86Box.app\" \"${QT_PLUGINS}\" \"${DIRS}\")") endif() if (UNIX AND NOT APPLE) From c52825522ace73ab54c559e8b4e9db7c785f7648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Mon, 14 Feb 2022 09:16:14 +0100 Subject: [PATCH 11/21] Fix Mac builds, take two --- src/qt/CMakeLists.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 1604083d0..9b109ce30 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -205,7 +205,7 @@ macro(install_qt5_plugin _qt_plugin_name _qt_plugins_var _prefix) install(FILES "${_qt_plugin_path}" DESTINATION "${_qt_plugin_dest}") set(${_qt_plugins_var} - "${${_qt_plugins_var}};\$ENV{DEST_DIR}\${CMAKE_INSTALL_PREFIX}/${_qt_plugin_dest}/${_qt_plugin_file}") + "${${_qt_plugins_var}};${_qt_plugin_dest}/${_qt_plugin_file}") else() message(FATAL_ERROR "QT plugin ${_qt_plugin_name} not found") endif() @@ -250,10 +250,18 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE) message(STATUS "QT_PLUGINS: ${QT_PLUGINS}") message(STATUS "DIRS: ${DIRS}") - install(CODE " + install(CODE " include(BundleUtilities) + get_filename_component(CMAKE_INSTALL_PREFIX_ABSOLUTE \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX} ABSOLUTE) - fixup_bundle(\"\${CMAKE_INSTALL_PREFIX_ABSOLUTE}/86Box.app\" \"${QT_PLUGINS}\" \"${DIRS}\")") + + set(QT_PLUGINS_ABSOLUTE "") + foreach(PLUGIN ${QT_PLUGINS}) + get_filename_component(PLUGIN_ABSOLUTE \${PLUGIN} ABSOLUTE BASE_DIR \${CMAKE_INSTALL_PREFIX_ABSOLUTE}) + list(APPEND QT_PLUGINS_ABSOLUTE \${PLUGIN_ABSOLUTE}) + endforeach() + + fixup_bundle(\"\${CMAKE_INSTALL_PREFIX_ABSOLUTE}/86Box.app\" \"${QT_PLUGINS_ABSOLUTE}\" \"${DIRS}\")") endif() if (UNIX AND NOT APPLE) From 04e37b87719a0075e5e4abb7b5fef2c29464d4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Mon, 14 Feb 2022 09:51:13 +0100 Subject: [PATCH 12/21] Fix Mac builds, take three --- src/qt/CMakeLists.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 9b109ce30..f21e348ab 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -204,8 +204,7 @@ macro(install_qt5_plugin _qt_plugin_name _qt_plugins_var _prefix) set(_qt_plugin_dest "${_prefix}/PlugIns/${_qt_plugin_type}") install(FILES "${_qt_plugin_path}" DESTINATION "${_qt_plugin_dest}") - set(${_qt_plugins_var} - "${${_qt_plugins_var}};${_qt_plugin_dest}/${_qt_plugin_file}") + list(APPEND ${_qt_plugins_var} "${_qt_plugin_dest}/${_qt_plugin_file}") else() message(FATAL_ERROR "QT plugin ${_qt_plugin_name} not found") endif() @@ -252,15 +251,11 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE) install(CODE " include(BundleUtilities) - get_filename_component(CMAKE_INSTALL_PREFIX_ABSOLUTE \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX} ABSOLUTE) - - set(QT_PLUGINS_ABSOLUTE "") foreach(PLUGIN ${QT_PLUGINS}) get_filename_component(PLUGIN_ABSOLUTE \${PLUGIN} ABSOLUTE BASE_DIR \${CMAKE_INSTALL_PREFIX_ABSOLUTE}) list(APPEND QT_PLUGINS_ABSOLUTE \${PLUGIN_ABSOLUTE}) endforeach() - fixup_bundle(\"\${CMAKE_INSTALL_PREFIX_ABSOLUTE}/86Box.app\" \"${QT_PLUGINS_ABSOLUTE}\" \"${DIRS}\")") endif() From f24923b98893c078a5e79ae532b15aa08efdf768 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 14 Feb 2022 03:18:56 +0500 Subject: [PATCH 13/21] qt: hide machine types with no available machines --- src/qt/qt_settingsmachine.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/qt/qt_settingsmachine.cpp b/src/qt/qt_settingsmachine.cpp index 7f402de1b..56456000b 100644 --- a/src/qt/qt_settingsmachine.cpp +++ b/src/qt/qt_settingsmachine.cpp @@ -74,12 +74,21 @@ SettingsMachine::SettingsMachine(QWidget *parent) : int selectedMachineType = 0; auto* machineTypesModel = ui->comboBoxMachineType->model(); - for (int i = 0; i < MACHINE_TYPE_MAX; ++i) { - Models::AddEntry(machineTypesModel, machine_types[i].name, machine_types[i].id); - if (machine_types[i].id == machine_get_type(machine)) { - selectedMachineType = i; + for (int i = 1; i < MACHINE_TYPE_MAX; ++i) { + int j = 0; + while (machine_get_internal_name_ex(j) != nullptr) { + if (machine_available(j) && (machine_get_type(j) == i)) { + int row = Models::AddEntry(machineTypesModel, machine_types[i].name, machine_types[i].id); + if (machine_types[i].id == machine_get_type(machine)) { + selectedMachineType = row; + } + break; + } + j++; } } + + ui->comboBoxMachineType->setCurrentIndex(-1); ui->comboBoxMachineType->setCurrentIndex(selectedMachineType); } @@ -124,12 +133,16 @@ void SettingsMachine::save() { } void SettingsMachine::on_comboBoxMachineType_currentIndexChanged(int index) { + if (index < 0) { + return; + } + auto* model = ui->comboBoxMachine->model(); int removeRows = model->rowCount(); int selectedMachineRow = 0; for (int i = 0; i < machine_count(); ++i) { - if ((machine_get_type(i) == index) && machine_available(i)) { + if ((machine_get_type(i) == ui->comboBoxMachineType->currentData().toInt()) && machine_available(i)) { int row = Models::AddEntry(model, machines[i].name, i); if (i == machine) { selectedMachineRow = row - removeRows; From 4fcd9186e9c274f5357ee1619420f45ee4eda2d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Mon, 14 Feb 2022 13:04:05 +0100 Subject: [PATCH 14/21] Infer WIN32 and MACOSX_BUNDLE from respective variables --- src/CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 27cbad661..704024067 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,14 +11,13 @@ # Authors: David Hrdlička, # dob205 # -# Copyright 2020,2021 David Hrdlička. +# Copyright 2020-2022 David Hrdlička. # Copyright 2021 dob205. # -# WIN32 marks us as a GUI app on Windows -add_executable(86Box WIN32 MACOSX_BUNDLE 86box.c config.c log.c random.c timer.c io.c acpi.c apm.c - dma.c ddma.c discord.c nmi.c pic.c pit.c port_6x.c port_92.c ppi.c pci.c mca.c usb.c fifo8.c - device.c nvr.c nvr_at.c nvr_ps2.c) +add_executable(86Box 86box.c config.c log.c random.c timer.c io.c acpi.c apm.c + dma.c ddma.c discord.c nmi.c pic.c pit.c port_6x.c port_92.c ppi.c pci.c + mca.c usb.c fifo8.c device.c nvr.c nvr_at.c nvr_ps2.c) if(CPPTHREADS) target_sources(86Box PRIVATE thread.cpp) From c554ba0fdfef29abc09d7098571f9134f6126dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Mon, 14 Feb 2022 13:14:57 +0100 Subject: [PATCH 15/21] Remove some debug code --- src/qt/CMakeLists.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index f21e348ab..a69464a1e 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -230,9 +230,6 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" DESTINATION "${INSTALL_CMAKE_DIR}") - # Directories to look for dependencies - set(DIRS "${CMAKE_BINARY_DIR}") - # Path used for searching by FIND_XXX(), with appropriate suffixes added if(CMAKE_PREFIX_PATH) foreach(dir ${CMAKE_PREFIX_PATH}) @@ -245,10 +242,6 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE) include(InstallRequiredSystemLibraries) - message(STATUS "APPS: ${APPS}") - message(STATUS "QT_PLUGINS: ${QT_PLUGINS}") - message(STATUS "DIRS: ${DIRS}") - install(CODE " include(BundleUtilities) get_filename_component(CMAKE_INSTALL_PREFIX_ABSOLUTE \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX} ABSOLUTE) From 70219ec6a22f2b24bdbb285a6577199afb602a3b Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 14 Feb 2022 11:54:26 -0300 Subject: [PATCH 16/21] midi_fluidsynth: Also look for libfluidsynth2 on Linux --- src/sound/midi_fluidsynth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sound/midi_fluidsynth.c b/src/sound/midi_fluidsynth.c index 06250c2bf..ed3e2d535 100644 --- a/src/sound/midi_fluidsynth.c +++ b/src/sound/midi_fluidsynth.c @@ -239,6 +239,8 @@ void* fluidsynth_init(const device_t *info) fluidsynth_handle = dynld_module("libfluidsynth.dylib", fluidsynth_imports); #else fluidsynth_handle = dynld_module("libfluidsynth.so.3", fluidsynth_imports); + if (fluidsynth_handle == NULL) + fluidsynth_handle = dynld_module("libfluidsynth.so.2", fluidsynth_imports); #endif if (fluidsynth_handle == NULL) { From fa08971ddcde8f9b147649c07e5ed40823829b02 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 14 Feb 2022 11:57:12 -0300 Subject: [PATCH 17/21] Jenkins: Move archive_tmp creation further down for logging coherency purposes --- .ci/build.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.ci/build.sh b/.ci/build.sh index a29e0ebba..91ce79ca3 100644 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -356,16 +356,6 @@ then exit 4 fi -# Create temporary directory for archival. -echo [-] Gathering archive files -rm -rf archive_tmp -mkdir archive_tmp -if [ ! -d "archive_tmp" ] -then - echo [!] Archive directory creation failed - exit 5 -fi - # Download Discord Game SDK from their CDN if necessary. if [ ! -e "discord_game_sdk.zip" ] then @@ -386,6 +376,16 @@ case $arch in *) arch_discord="$arch";; esac +# Create temporary directory for archival. +echo [-] Gathering archive files +rm -rf archive_tmp +mkdir archive_tmp +if [ ! -d "archive_tmp" ] +then + echo [!] Archive directory creation failed + exit 5 +fi + # Archive the executable and its dependencies. # The executable should always be archived last for the check after this block. status=0 From e85c76b226c54888b601a51c8446d2ce4cf2fe5b Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 14 Feb 2022 12:52:14 -0300 Subject: [PATCH 18/21] Jenkins: Include ghostscript/freetype/fluidsynth on the AppImage --- .ci/AppImageBuilder.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.ci/AppImageBuilder.yml b/.ci/AppImageBuilder.yml index 43e7225cc..60b491bd1 100644 --- a/.ci/AppImageBuilder.yml +++ b/.ci/AppImageBuilder.yml @@ -38,11 +38,14 @@ AppDir: include: - libdrm2 - libevdev2 + - libfluidsynth2 + - libfreetype6 - libgbm1 - libgl1 - libgles2 - libglvnd0 - libglx0 + - libgs9 - libopenal-data=1:1.17* - libopenal1=1:1.17* - libpng16-16 @@ -64,21 +67,33 @@ AppDir: exclude: - etc - lib/udev + - opt/libc/usr/share - usr/bin - usr/sbin - usr/share/alsa - usr/share/apport - usr/share/bug + - usr/share/color - usr/share/doc - usr/share/doc-base + - usr/share/fontconfig + - usr/share/fonts + - usr/share/ghostscript - usr/share/glib-2.0 + - usr/share/info - usr/share/libinput - usr/share/libwacom - usr/share/lintian - usr/share/locale - usr/share/man + - usr/share/metainfo - usr/share/openal - usr/share/pkgconfig + - usr/share/poppler + - usr/share/readline + - usr/share/sounds - usr/share/X11 + - usr/share/xml + - var AppImage: arch: !ENV '${arch_appimage}' From 32941b3c5b0a181f5f7b644c77f69c3df3eb827c Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 14 Feb 2022 13:41:52 -0300 Subject: [PATCH 19/21] Jenkins: Temporarily compile a newer version of openal-soft to fix audio issues --- .ci/AppImageBuilder.yml | 7 +++---- .ci/build.sh | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.ci/AppImageBuilder.yml b/.ci/AppImageBuilder.yml index 60b491bd1..6085c5605 100644 --- a/.ci/AppImageBuilder.yml +++ b/.ci/AppImageBuilder.yml @@ -33,8 +33,6 @@ AppDir: key_url: 'https://ftp-master.debian.org/keys/archive-key-11.asc' - sourceline: 'deb http://deb.debian.org/debian bullseye-updates main' key_url: 'https://ftp-master.debian.org/keys/archive-key-11-security.asc' - - sourceline: 'deb http://deb.debian.org/debian stretch main' - key_url: 'https://ftp-master.debian.org/keys/archive-key-9.asc' include: - libdrm2 - libevdev2 @@ -46,8 +44,6 @@ AppDir: - libglvnd0 - libglx0 - libgs9 - - libopenal-data=1:1.17* - - libopenal1=1:1.17* - libpng16-16 - libqt5core5a - libqt5gui5 @@ -69,6 +65,9 @@ AppDir: - lib/udev - opt/libc/usr/share - usr/bin + - usr/include + - usr/lib/cmake + - usr/lib/pkgconfig - usr/sbin - usr/share/alsa - usr/share/apport diff --git a/.ci/build.sh b/.ci/build.sh index 91ce79ca3..a9777e014 100644 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -227,7 +227,7 @@ else esac # Establish general dependencies. - pkgs="cmake pkg-config git imagemagick wget p7zip-full wayland-protocols" + pkgs="cmake pkg-config git imagemagick wget p7zip-full wayland-protocols tar gzip" if [ "$(dpkg --print-architecture)" = "$arch_deb" ] then pkgs="$pkgs build-essential" @@ -427,6 +427,20 @@ then # TBD : else + # Build openal-soft 1.21.1 manually to fix audio issues. This is a temporary + # workaround until a newer version of openal-soft trickles down to Debian repos. + if [ -d "openal-soft-1.21.1" ] + then + rm -rf openal-soft-1.21.1/build/* + else + wget -qO - https://github.com/kcat/openal-soft/archive/refs/tags/1.21.1.tar.gz | tar zxf - + fi + cwd_root=$(pwd) + cd openal-soft-1.21.1/build + cmake -G "Unix Makefiles" -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" .. + make -j$(nproc) install + cd ../.. + # Archive Discord Game SDK library. 7z e -y -o"archive_tmp/usr/lib/$libdir" discord_game_sdk.zip "lib/$arch_discord/discord_game_sdk.so" [ ! -e "archive_tmp/usr/lib/$libdir/discord_game_sdk.so" ] && echo [!] No Discord Game SDK for architecture [$arch_discord] From 9b512cfccf188e858f3241d0edeb4bce055c01b2 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 14 Feb 2022 14:45:49 -0300 Subject: [PATCH 20/21] Jenkins: Add dependency for the locally-compiled openal-soft --- .ci/AppImageBuilder.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/AppImageBuilder.yml b/.ci/AppImageBuilder.yml index 6085c5605..1fdff69ad 100644 --- a/.ci/AppImageBuilder.yml +++ b/.ci/AppImageBuilder.yml @@ -51,6 +51,7 @@ AppDir: - librtmidi5 - libsdl2-2.0-0 - libslirp0 + - libsndio7.0 - libwayland-client0 - libx11-6 - libx11-xcb1 From 8fa75131fa0bb984feb444214e072969b72fe4e4 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 14 Feb 2022 14:46:17 -0300 Subject: [PATCH 21/21] Jenkins: Change location of discord_game_sdk on Linux --- .ci/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/build.sh b/.ci/build.sh index a9777e014..53c25a0b2 100644 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -442,8 +442,8 @@ else cd ../.. # Archive Discord Game SDK library. - 7z e -y -o"archive_tmp/usr/lib/$libdir" discord_game_sdk.zip "lib/$arch_discord/discord_game_sdk.so" - [ ! -e "archive_tmp/usr/lib/$libdir/discord_game_sdk.so" ] && echo [!] No Discord Game SDK for architecture [$arch_discord] + 7z e -y -o"archive_tmp/usr/lib" discord_game_sdk.zip "lib/$arch_discord/discord_game_sdk.so" + [ ! -e "archive_tmp/usr/lib/discord_game_sdk.so" ] && echo [!] No Discord Game SDK for architecture [$arch_discord] # Archive readme with library package versions. echo Libraries used to compile this $arch build of $project: > archive_tmp/README