From 4a752c05a59f2d174533fb0eeb66dff1cd0903e2 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 14 Feb 2022 05:10:50 +0500 Subject: [PATCH 1/3] 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 2/3] 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 3/3] 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