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