diff --git a/Boxer.xcodeproj/project.pbxproj b/Boxer.xcodeproj/project.pbxproj index b1d9c677..9f9ea804 100644 --- a/Boxer.xcodeproj/project.pbxproj +++ b/Boxer.xcodeproj/project.pbxproj @@ -105,6 +105,8 @@ 55E6A0C71C00C88A00285593 /* DDHidLib.framework in Copy Bundled Frameworks */ = {isa = PBXBuildFile; fileRef = 55E6A0AC1C00C80A00285593 /* DDHidLib.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 55E6A0CA1C00C88A00285593 /* BGHUDAppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55E6A09C1C00C7F900285593 /* BGHUDAppKit.framework */; }; 55E6A0CB1C00C88A00285593 /* BGHUDAppKit.framework in Copy Bundled Frameworks */ = {isa = PBXBuildFile; fileRef = 55E6A09C1C00C7F900285593 /* BGHUDAppKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 55EA6CF625D4919E00945236 /* BXMIDIConfig.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55EA6CF425D4919E00945236 /* BXMIDIConfig.cpp */; }; + 55EA6CF725D4919E00945236 /* BXMIDIConfig.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55EA6CF425D4919E00945236 /* BXMIDIConfig.cpp */; }; 55F4A93D256315FD00410099 /* program_ls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55F4A93B256315FD00410099 /* program_ls.cpp */; }; 55F4A93E256315FD00410099 /* program_ls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55F4A93B256315FD00410099 /* program_ls.cpp */; }; 55F8BC23201F9940004057D2 /* pci_bus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55DEBB21201E875500F1092F /* pci_bus.cpp */; }; @@ -1135,6 +1137,8 @@ 55E6A0971C00C7F900285593 /* BGHUDAppKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = BGHUDAppKit.xcodeproj; path = Vendor/BGHUDAppKit/BGHUDAppKit.xcodeproj; sourceTree = SOURCE_ROOT; }; 55E6A09D1C00C80A00285593 /* DDHidLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = DDHidLib.xcodeproj; path = Vendor/DDHidLib/DDHidLib.xcodeproj; sourceTree = SOURCE_ROOT; }; 55E6A0AD1C00C81D00285593 /* Boxer-MT32Emu.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "Boxer-MT32Emu.xcodeproj"; path = "Vendor/MT32Emu/Boxer-MT32Emu.xcodeproj"; sourceTree = SOURCE_ROOT; }; + 55EA6CF425D4919E00945236 /* BXMIDIConfig.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = BXMIDIConfig.cpp; sourceTree = ""; }; + 55EA6CF525D4919E00945236 /* BXMIDIConfig.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = BXMIDIConfig.hpp; sourceTree = ""; }; 55F4A9302563157300410099 /* gui_msgs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = gui_msgs.h; sourceTree = ""; }; 55F4A93A2563159F00410099 /* string_utils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = string_utils.h; sourceTree = ""; }; 55F4A93B256315FD00410099 /* program_ls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = program_ls.cpp; sourceTree = ""; }; @@ -3230,6 +3234,8 @@ 9FD8BEE314FFF7660073B4EC /* BXExternalMIDIDevice+BXGeneralMIDISysexes.m */, 9F6C1CD814373AF600601ACB /* BXDummyMIDIDevice.h */, 9F6C1CD914373AF600601ACB /* BXDummyMIDIDevice.m */, + 55EA6CF525D4919E00945236 /* BXMIDIConfig.hpp */, + 55EA6CF425D4919E00945236 /* BXMIDIConfig.cpp */, ); name = MIDI; sourceTree = ""; @@ -4175,6 +4181,7 @@ 9F77219712B38C4400072AE8 /* drive_cache.cpp in Sources */, 55574805208FA8040045E635 /* ymdeltat.cpp in Sources */, 9F77219812B38C4400072AE8 /* drive_fat.cpp in Sources */, + 55EA6CF625D4919E00945236 /* BXMIDIConfig.cpp in Sources */, 9F77219912B38C4400072AE8 /* drive_iso.cpp in Sources */, 9F77219A12B38C4400072AE8 /* drive_local.cpp in Sources */, 9F77219C12B38C4400072AE8 /* drive_virtual.cpp in Sources */, @@ -4538,6 +4545,7 @@ 9FD6AA0F16314A5B002B774E /* directlpt_linux.cpp in Sources */, 9FD6AA1116314A5B002B774E /* directlpt_win32.cpp in Sources */, 9FD6AA1316314A5B002B774E /* filelpt.cpp in Sources */, + 55EA6CF725D4919E00945236 /* BXMIDIConfig.cpp in Sources */, 9FD6AA1516314A5B002B774E /* parport.cpp in Sources */, 9FD6AA1916314A5B002B774E /* printer_charmaps.cpp in Sources */, 9FD6AA1B16314A5B002B774E /* printer_redir.cpp in Sources */, diff --git a/Boxer/BXMIDIConfig.cpp b/Boxer/BXMIDIConfig.cpp new file mode 100644 index 00000000..2ef48f66 --- /dev/null +++ b/Boxer/BXMIDIConfig.cpp @@ -0,0 +1,70 @@ +// +// BXMIDIConfig.cpp +// Boxer +// +// Created by C.W. Betts on 2/10/21. +// Copyright © 2021 Alun Bestor and contributors. All rights reserved. +// + +#include "BXMIDIConfig.hpp" +#include "string_utils.h" + + +static void mt32_init(MAYBE_UNUSED Section *secprop) +{} + +static void init_mt32_dosbox_settings(Section_prop &sec_prop) +{ + const char *mt32ReverseStereo[] = {"off", "on",0}; + Prop_string *Pstring = sec_prop.Add_string("ReverseStereo",Property::Changeable::WhenIdle,"off"); + Pstring->Set_values(mt32ReverseStereo); + Pstring->Set_help("Reverse stereo channels for MT-32 output"); + + const char *mt32DACModes[] = {"0", "1", "2", "3", "auto",0}; + Pstring = sec_prop.Add_string("DAC",Property::Changeable::WhenIdle,"auto"); + Pstring->Set_values(mt32DACModes); + Pstring->Set_help("MT-32 DAC input mode\n" + "Nice = 0 - default\n" + "Produces samples at double the volume, without tricks.\n" + "Higher quality than the real devices\n\n" + + "Pure = 1\n" + "Produces samples that exactly match the bits output from the emulated LA32.\n" + "Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)\n" + "Much less likely to overdrive than any other mode.\n" + "Half the volume of any of the other modes, meaning its volume relative to the reverb\n" + "output when mixed together directly will sound wrong. So, reverb level must be lowered.\n" + "Perfect for developers while debugging :)\n\n" + + "GENERATION1 = 2\n" + "Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).\n" + "Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):\n" + "15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX\n\n" + + "GENERATION2 = 3\n" + "Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).\n" + "Bit order at DAC (where each number represents the original LA32 output bit number):\n" + "15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14\n\n"); + const char *mt32reverbModes[] = {"0", "1", "2", "3", "auto",0}; + Pstring = sec_prop.Add_string("reverbmode",Property::Changeable::WhenIdle,"auto"); + Pstring->Set_values(mt32reverbModes); + Pstring->Set_help("MT-32 reverb mode"); + + const char *mt32reverbTimes[] = {"0", "1", "2", "3", "4", "5", "6", "7",0}; + Prop_int *Pint = sec_prop.Add_int("reverbtime",Property::Changeable::WhenIdle,5); + Pint->Set_values(mt32reverbTimes); + Pint->Set_help("MT-32 reverb time"); + + const char *mt32reverbLevels[] = {"0", "1", "2", "3", "4", "5", "6", "7",0}; + Pint = sec_prop.Add_int("reverblevel",Property::Changeable::WhenIdle,3); + Pint->Set_values(mt32reverbLevels); + Pint->Set_help("MT-32 reverb level"); +} + +void BXMIDIMT32_AddConfigSection(Config *conf) +{ + assert(conf); + Section_prop *sec_prop = conf->AddSection_prop("mt32", &mt32_init); + assert(sec_prop); + init_mt32_dosbox_settings(*sec_prop); +} diff --git a/Boxer/BXMIDIConfig.hpp b/Boxer/BXMIDIConfig.hpp new file mode 100644 index 00000000..47891312 --- /dev/null +++ b/Boxer/BXMIDIConfig.hpp @@ -0,0 +1,17 @@ +// +// BXMIDIConfig.hpp +// Boxer +// +// Created by C.W. Betts on 2/10/21. +// Copyright © 2021 Alun Bestor and contributors. All rights reserved. +// + +#ifndef BXMIDIConfig_hpp +#define BXMIDIConfig_hpp + +#include "control.h" +#include "midi.h" + +extern void BXMIDIMT32_AddConfigSection(Config *conf); + +#endif /* BXMIDIConfig_hpp */ diff --git a/DOSBox-Staging b/DOSBox-Staging index 33f2fbae..da6ea8ad 160000 --- a/DOSBox-Staging +++ b/DOSBox-Staging @@ -1 +1 @@ -Subproject commit 33f2fbaef5c3cb0f633ffb18b2d90d0fba0d1632 +Subproject commit da6ea8adc6d9d697a9e154cd2b08c1186cd0d3b7