Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added configuration needed to choose between Modern, OPL and Mark I engines #443

Merged
merged 32 commits into from Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
79eac09
Added Engines Mark I and OPL
donluca Feb 25, 2023
2589628
Added Engine selection
donluca Feb 25, 2023
5c050a2
Update config.cpp
donluca Feb 25, 2023
657910f
Added selection for Engine Type
donluca Feb 25, 2023
cd54898
Added Engine Type selection
donluca Feb 25, 2023
46bd334
Update build.yml
donluca Feb 25, 2023
c2deb77
Fixes
donluca Feb 25, 2023
e27a4ea
Reverting to an old commit (I screwed up)
donluca Feb 26, 2023
74cbbda
Small fix
donluca Feb 26, 2023
981cc06
Small Fixes
donluca Feb 26, 2023
8cf1826
Fix for error when compiling on 64-bit platforms
donluca Feb 26, 2023
f2d85b6
Casting of the engine variable corrected
donluca Feb 27, 2023
be06ff0
Changed the way we parse and set the engine type from the config file…
donluca Feb 28, 2023
9f0df24
Fixed a typo
donluca Feb 28, 2023
6ba57bc
Update Synth_Dexed commit
probonopd Mar 3, 2023
09af1e3
Moved blocks of code around
donluca Mar 3, 2023
20e26d9
Update Synth_Dexed to 8c67f73
probonopd Mar 5, 2023
21d21ca
Update Synth_Dexed to a908f78
probonopd Mar 19, 2023
07b9b15
Synth_Dexed deb0905
probonopd Mar 21, 2023
9f97c41
Add EngineMsfa.o to Makefile
probonopd Mar 21, 2023
9df651e
Don't add EngineMsfa.o here...
probonopd Mar 21, 2023
d4f7043
...but add EngineMsfa.o here
probonopd Mar 21, 2023
c14f34d
Fix missing \
probonopd Mar 21, 2023
483092e
Merge branch 'probonopd:main' into main
donluca Mar 29, 2023
44f3e68
Update build.yml
donluca Apr 18, 2023
b13dd88
Merge branch 'probonopd:main' into main
donluca Apr 18, 2023
18effd0
Add Synth_Dexed to the submodules update
donluca Apr 18, 2023
2442950
Merge branch 'main' into main
donluca Apr 30, 2023
f9cd2ac
Update Synth_Dexed
probonopd May 4, 2023
9e8be2b
Merge branch 'main' into main
probonopd May 29, 2023
780dce1
Update Synth_Dexed to c9f5274
probonopd Aug 8, 2023
0d3e4c6
Merge branch 'main' into main
probonopd Aug 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Synth_Dexed.mk
Expand Up @@ -22,6 +22,9 @@ OBJS += \
$(SYNTH_DEXED_DIR)/pitchenv.o \
$(SYNTH_DEXED_DIR)/porta.o \
$(SYNTH_DEXED_DIR)/sin.o \
$(SYNTH_DEXED_DIR)/EngineMkI.o\
$(SYNTH_DEXED_DIR)/EngineOpl.o\
$(SYNTH_DEXED_DIR)/EngineMsfa.o\
$(CMSIS_DSP_SOURCE_DIR)/SupportFunctions/SupportFunctions.o \
$(CMSIS_DSP_SOURCE_DIR)/BasicMathFunctions/BasicMathFunctions.o \
$(CMSIS_DSP_SOURCE_DIR)/FastMathFunctions/FastMathFunctions.o \
Expand Down
17 changes: 17 additions & 0 deletions src/config.cpp
Expand Up @@ -21,6 +21,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#include "config.h"
#include "../Synth_Dexed/src/dexed.h"

CConfig::CConfig (FATFS *pFileSystem)
: m_Properties ("minidexed.ini", pFileSystem)
Expand All @@ -46,6 +47,15 @@ void CConfig::Load (void)
m_nDACI2CAddress = m_Properties.GetNumber ("DACI2CAddress", 0);
m_bChannelsSwapped = m_Properties.GetNumber ("ChannelsSwapped", 0) != 0;

unsigned newEngineType = m_Properties.GetNumber ("EngineType", 1);
if (newEngineType == 2) {
m_EngineType = MKI;
} else if (newEngineType == 3) {
m_EngineType = OPL;
} else {
m_EngineType = MSFA;
}

m_nMIDIBaudRate = m_Properties.GetNumber ("MIDIBaudRate", 31250);

const char *pMIDIThru = m_Properties.GetString ("MIDIThru");
Expand Down Expand Up @@ -151,6 +161,11 @@ bool CConfig::GetChannelsSwapped (void) const
return m_bChannelsSwapped;
}

unsigned CConfig::GetEngineType (void) const
{
return m_EngineType;
}

unsigned CConfig::GetMIDIBaudRate (void) const
{
return m_nMIDIBaudRate;
Expand Down Expand Up @@ -400,3 +415,5 @@ bool CConfig::GetPerformanceSelectToLoad (void) const
{
return m_bPerformanceSelectToLoad;
}


4 changes: 4 additions & 0 deletions src/config.h
Expand Up @@ -69,6 +69,7 @@ class CConfig // Configuration for MiniDexed
unsigned GetChunkSize (void) const;
unsigned GetDACI2CAddress (void) const; // 0 for auto probing
bool GetChannelsSwapped (void) const;
unsigned GetEngineType (void) const;

// MIDI
unsigned GetMIDIBaudRate (void) const;
Expand Down Expand Up @@ -152,6 +153,7 @@ class CConfig // Configuration for MiniDexed
unsigned m_nChunkSize;
unsigned m_nDACI2CAddress;
bool m_bChannelsSwapped;
unsigned m_EngineType;

unsigned m_nMIDIBaudRate;
std::string m_MIDIThruIn;
Expand Down Expand Up @@ -212,6 +214,8 @@ class CConfig // Configuration for MiniDexed
bool m_bMIDIDumpEnabled;
bool m_bProfileEnabled;
bool m_bPerformanceSelectToLoad;


};

#endif
3 changes: 2 additions & 1 deletion src/minidexed.cpp
Expand Up @@ -93,7 +93,8 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,

m_pTG[i] = new CDexedAdapter (CConfig::MaxNotes, pConfig->GetSampleRate ());
assert (m_pTG[i]);


m_pTG[i]->setEngineType(pConfig->GetEngineType ());
m_pTG[i]->activate ();
}

Expand Down
2 changes: 2 additions & 0 deletions src/minidexed.ini
Expand Up @@ -10,6 +10,8 @@ SampleRate=48000
#ChunkSize=256
DACI2CAddress=0
ChannelsSwapped=0
# Engine Type ( 1=Modern ; 2=Mark I ; 3=OPL )
EngineType=1

# MIDI
MIDIBaudRate=31250
Expand Down
4 changes: 3 additions & 1 deletion submod.sh
Expand Up @@ -10,4 +10,6 @@ cd -
cd circle-stdlib/libs/circle-newlib
git checkout 48bf91d # needed for circle ec09d7e
cd -

cd Synth_Dexed/
git checkout c9f5274
cd -