From 567a1f9595cc0a0390be8d819e1e2865ebbe569d Mon Sep 17 00:00:00 2001 From: sergm Date: Thu, 6 Jul 2017 08:44:02 +0300 Subject: [PATCH] Updated DOSBox patches - Added new property mt32.niceampramp - Updated DOSBox SVN patch for r4025 along the way --- DOSBox-mt32-patch/README | 2 +- DOSBox-mt32-patch/dosbox-0.74-mt32-patch.diff | 16 ++++++++++---- ....diff => dosbox-SVN-r4025-mt32-patch.diff} | 22 +++++++++++++------ 3 files changed, 28 insertions(+), 12 deletions(-) rename DOSBox-mt32-patch/{dosbox-SVN-r4000-mt32-patch.diff => dosbox-SVN-r4025-mt32-patch.diff} (96%) diff --git a/DOSBox-mt32-patch/README b/DOSBox-mt32-patch/README index ee61ebf..75ad94f 100644 --- a/DOSBox-mt32-patch/README +++ b/DOSBox-mt32-patch/README @@ -2,5 +2,5 @@ Patches for DOSBox to add mt32emu MIDI device dosbox-0.74-mt32-patch.diff - diff file to be applied to official DOSBox release v.0.74 source distribution. -dosbox-SVN-r4000-mt32-patch.diff - diff file to be applied to official DOSBox sources SVN r4000 (and up, hopefully). +dosbox-SVN-r4025-mt32-patch.diff - diff file to be applied to official DOSBox sources SVN r4025 (and up, hopefully). It uses a bit different and clear approach introduced since SVN r3836. diff --git a/DOSBox-mt32-patch/dosbox-0.74-mt32-patch.diff b/DOSBox-mt32-patch/dosbox-0.74-mt32-patch.diff index 412ce55..7b12b54 100644 --- a/DOSBox-mt32-patch/dosbox-0.74-mt32-patch.diff +++ b/DOSBox-mt32-patch/dosbox-0.74-mt32-patch.diff @@ -59,10 +59,10 @@ index 61d15e5..0ec8ebc 100644 Bitu cmd_len; diff --git a/src/gui/midi_mt32.cpp b/src/gui/midi_mt32.cpp new file mode 100644 -index 0000000..3f66f66 +index 0000000..b036547 --- /dev/null +++ b/src/gui/midi_mt32.cpp -@@ -0,0 +1,298 @@ +@@ -0,0 +1,299 @@ +#include +#include +#include "control.h" @@ -159,6 +159,7 @@ index 0000000..3f66f66 + service->setDACInputMode((MT32Emu::DACInputMode)section->Get_int("mt32.dac")); + + service->setReversedStereoEnabled(section->Get_bool("mt32.reverse.stereo")); ++ service->setNiceAmpRampEnabled(section->Get_bool("mt32.niceampramp")); + noise = section->Get_bool("mt32.verbose"); + renderInThread = section->Get_bool("mt32.thread"); + @@ -424,10 +425,10 @@ index 0000000..eb32729 +#endif /* DOSBOX_MIDI_MT32_H */ diff --git a/src/mt32options.h b/src/mt32options.h new file mode 100644 -index 0000000..1039d03 +index 0000000..c1efa29 --- /dev/null +++ b/src/mt32options.h -@@ -0,0 +1,108 @@ +@@ -0,0 +1,115 @@ +Pstring = secprop->Add_string("mt32.romdir",Property::Changeable::WhenIdle,""); +Pstring->Set_help("Name of the directory where MT-32 Control and PCM ROM files can be found. Emulation requires these files to work.\n" + " Accepted file names are as follows:\n" @@ -536,3 +537,10 @@ index 0000000..1039d03 +Pint->Set_values(mt32srcQuality); +Pint->Set_help("MT-32 sample rate conversion quality\n" + "Value '0' is for the fastest conversion, value '3' provides for the best conversion quality. Default is 2."); ++ ++Pbool = secprop->Add_bool("mt32.niceampramp", Property::Changeable::WhenIdle, true); ++Pbool->Set_help("Toggles \"Nice Amp Ramp\" mode that improves amplitude ramp for sustaining instruments.\n" ++ "Quick changes of volume or expression on a MIDI channel may result in amp jumps on real hardware.\n" ++ "When \"Nice Amp Ramp\" mode is enabled, amp changes gradually instead.\n" ++ "Otherwise, the emulation accuracy is preserved.\n" ++ "Default is true."); diff --git a/DOSBox-mt32-patch/dosbox-SVN-r4000-mt32-patch.diff b/DOSBox-mt32-patch/dosbox-SVN-r4025-mt32-patch.diff similarity index 96% rename from DOSBox-mt32-patch/dosbox-SVN-r4000-mt32-patch.diff rename to DOSBox-mt32-patch/dosbox-SVN-r4025-mt32-patch.diff index d45fe20..0d97623 100644 --- a/DOSBox-mt32-patch/dosbox-SVN-r4000-mt32-patch.diff +++ b/DOSBox-mt32-patch/dosbox-SVN-r4025-mt32-patch.diff @@ -9,11 +9,11 @@ index 184469e..286638d 100644 - +LIBS += -lmt32emu diff --git a/src/dosbox.cpp b/src/dosbox.cpp -index 1462fae..f69eb3c 100644 +index 2f3b411..387927e 100644 --- a/src/dosbox.cpp +++ b/src/dosbox.cpp @@ -491,7 +491,7 @@ void DOSBOX_Init(void) { - + const char* mputypes[] = { "intelligent", "uart", "none",0}; // FIXME: add some way to offer the actually available choices. - const char *devices[] = { "default", "win32", "alsa", "oss", "coreaudio", "coremidi","none", 0}; @@ -42,7 +42,7 @@ index 3fed5e6..ca36a07 100644 + midi_coremidi.h midi_mt32.h midi_mt32.cpp sdl_gui.cpp dosbox_splash.h diff --git a/src/gui/midi.cpp b/src/gui/midi.cpp -index 57181e0..3bc943b 100644 +index f1d3e2f..17badd4 100644 --- a/src/gui/midi.cpp +++ b/src/gui/midi.cpp @@ -91,6 +91,9 @@ MidiHandler Midi_none; @@ -57,10 +57,10 @@ index 57181e0..3bc943b 100644 void MIDI_RawOutByte(Bit8u data) { diff --git a/src/gui/midi_mt32.cpp b/src/gui/midi_mt32.cpp new file mode 100644 -index 0000000..3f66f66 +index 0000000..b036547 --- /dev/null +++ b/src/gui/midi_mt32.cpp -@@ -0,0 +1,298 @@ +@@ -0,0 +1,299 @@ +#include +#include +#include "control.h" @@ -157,6 +157,7 @@ index 0000000..3f66f66 + service->setDACInputMode((MT32Emu::DACInputMode)section->Get_int("mt32.dac")); + + service->setReversedStereoEnabled(section->Get_bool("mt32.reverse.stereo")); ++ service->setNiceAmpRampEnabled(section->Get_bool("mt32.niceampramp")); + noise = section->Get_bool("mt32.verbose"); + renderInThread = section->Get_bool("mt32.thread"); + @@ -422,10 +423,10 @@ index 0000000..eb32729 +#endif /* DOSBOX_MIDI_MT32_H */ diff --git a/src/mt32options.h b/src/mt32options.h new file mode 100644 -index 0000000..1039d03 +index 0000000..c1efa29 --- /dev/null +++ b/src/mt32options.h -@@ -0,0 +1,108 @@ +@@ -0,0 +1,115 @@ +Pstring = secprop->Add_string("mt32.romdir",Property::Changeable::WhenIdle,""); +Pstring->Set_help("Name of the directory where MT-32 Control and PCM ROM files can be found. Emulation requires these files to work.\n" + " Accepted file names are as follows:\n" @@ -534,3 +535,10 @@ index 0000000..1039d03 +Pint->Set_values(mt32srcQuality); +Pint->Set_help("MT-32 sample rate conversion quality\n" + "Value '0' is for the fastest conversion, value '3' provides for the best conversion quality. Default is 2."); ++ ++Pbool = secprop->Add_bool("mt32.niceampramp", Property::Changeable::WhenIdle, true); ++Pbool->Set_help("Toggles \"Nice Amp Ramp\" mode that improves amplitude ramp for sustaining instruments.\n" ++ "Quick changes of volume or expression on a MIDI channel may result in amp jumps on real hardware.\n" ++ "When \"Nice Amp Ramp\" mode is enabled, amp changes gradually instead.\n" ++ "Otherwise, the emulation accuracy is preserved.\n" ++ "Default is true.");