diff --git a/src/engine/engine.h b/src/engine/engine.h index 6b5611eb0..7d9a2378e 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -362,7 +362,7 @@ struct DivSysDef { const char* description; unsigned char id; unsigned char id_DMF; - int channels; + int channels, minChans, maxChans; bool isFM, isSTD, isCompound; // width 0: variable // height 0: no wavetable support @@ -379,7 +379,7 @@ struct DivSysDef { const EffectHandlerMap postEffectHandlers; const EffectHandlerMap preEffectHandlers; DivSysDef( - const char* sysName, const char* sysNameJ, unsigned char fileID, unsigned char fileID_DMF, int chans, + const char* sysName, const char* sysNameJ, unsigned char fileID, unsigned char fileID_DMF, int chans, int minCh, int maxCh, bool isFMChip, bool isSTDChip, unsigned int vgmVer, bool compound, unsigned int formatMask, unsigned short waveWid, unsigned short waveHei, const char* desc, std::initializer_list chNames, @@ -396,6 +396,8 @@ struct DivSysDef { id(fileID), id_DMF(fileID_DMF), channels(chans), + minChans(minCh), + maxChans(maxCh), isFM(isFMChip), isSTD(isSTDChip), isCompound(compound), diff --git a/src/engine/sysDef.cpp b/src/engine/sysDef.cpp index 2baaee2c6..24fd6246b 100644 --- a/src/engine/sysDef.cpp +++ b/src/engine/sysDef.cpp @@ -367,7 +367,8 @@ int DivEngine::minVGMVersion(DivSystem which) { // define systems like: // sysDefs[DIV_SYSTEM_ID]=new DivSysDef( -// "Name", "Name (japanese, optional)", fileID, fileID_DMF, channels, isFM, isSTD, vgmVersion, waveWidth, waveHeight, +// "Name", "Name (japanese, optional)", fileID, fileID_DMF, channels, minChans, maxChans, +// isFM, isSTD, vgmVersion, waveWidth, waveHeight, // "Description", // {"Channel Names", ...}, // {"Channel Short Names", ...}, @@ -814,7 +815,8 @@ void DivEngine::registerSystems() { // this chip uses YMZ ADPCM, but the emulator uses ADPCM-B because I got it wrong back then. sysDefs[DIV_SYSTEM_YMU759]=new DivSysDef( - _("Yamaha YMU759 (MA-2)"), NULL, 0x01, 0x01, 17, true, false, 0, false, (1U<", {}, {}, {}, {} ); sysDefs[DIV_SYSTEM_GENESIS_EXT]=new DivSysDef( - _("Sega Genesis Extended Channel 3"), NULL, 0x42, 0x42, 13, true, true, 0, true, 0, 0, 0, + _("Sega Genesis Extended Channel 3"), NULL, 0x42, 0x42, 13, 13, 13, + true, true, 0, true, 0, 0, 0, "", {}, {}, {}, {} ); sysDefs[DIV_SYSTEM_SMS]=new DivSysDef( - _("TI SN76489"), NULL, 0x03, 0x03, 4, false, true, 0x150, false, 0, 0, 0, + _("TI SN76489"), NULL, 0x03, 0x03, 4, 4, 4, + false, true, 0x150, false, 0, 0, 0, _("a square/noise sound chip found on the Sega Master System, ColecoVision, Tandy, TI's own 99/4A and a few other places."), {_("Square 1"), _("Square 2"), _("Square 3"), _("Noise")}, {"S1", "S2", "S3", "NO"}, @@ -848,13 +853,15 @@ void DivEngine::registerSystems() { ); sysDefs[DIV_SYSTEM_SMS_OPLL]=new DivSysDef( - _("Sega Master System + FM Expansion"), NULL, 0x43, 0x43, 13, true, true, 0, true, 0, 0, 0, + _("Sega Master System + FM Expansion"), NULL, 0x43, 0x43, 13, 13, 13, + true, true, 0, true, 0, 0, 0, "", {}, {}, {}, {} ); sysDefs[DIV_SYSTEM_GB]=new DivSysDef( - _("Game Boy"), NULL, 0x04, 0x04, 4, false, true, 0x161, false, 0, 32, 16, + _("Game Boy"), NULL, 0x04, 0x04, 4, 4, 4, + false, true, 0x161, false, 0, 32, 16, _("the most popular portable game console of the era."), {_("Pulse 1"), _("Pulse 2"), _("Wavetable"), _("Noise")}, {"S1", "S2", "WA", "NO"}, @@ -871,7 +878,8 @@ void DivEngine::registerSystems() { ); sysDefs[DIV_SYSTEM_PCE]=new DivSysDef( - _("PC Engine/TurboGrafx-16"), NULL, 0x05, 0x05, 6, false, true, 0x161, false, 1U<", {}, {}, {}, {} ); sysDefs[DIV_SYSTEM_NES_FDS]=new DivSysDef( - _("Famicom Disk System"), NULL, 0, 0x86, 6, false, true, 0, true, 0, 0, 0, + _("Famicom Disk System"), NULL, 0, 0x86, 6, 6, 6, + false, true, 0, true, 0, 0, 0, "", {}, {}, {}, {} ); sysDefs[DIV_SYSTEM_C64_6581]=new DivSysDef( - _("Commodore 64 (SID 6581)"), NULL, 0x47, 0x47, 3, false, true, 0, false, 0, 0, 0, + _("Commodore 64 (SID 6581)"), NULL, 0x47, 0x47, 3, 3, 3, + false, true, 0, false, 0, 0, 0, _("this computer is powered by the SID chip, which had synthesizer features like a filter and ADSR."), {_("Channel 1"), _("Channel 2"), _("Channel 3")}, {"CH1", "CH2", "CH3"}, @@ -933,7 +945,8 @@ void DivEngine::registerSystems() { ); sysDefs[DIV_SYSTEM_C64_8580]=new DivSysDef( - _("Commodore 64 (SID 8580)"), NULL, 0x07, 0x07, 3, false, true, 0, false, 0, 0, 0, + _("Commodore 64 (SID 8580)"), NULL, 0x07, 0x07, 3, 3, 3, + false, true, 0, false, 0, 0, 0, _("this computer is powered by the SID chip, which had synthesizer features like a filter and ADSR.\nthis is the newer revision of the chip."), {_("Channel 1"), _("Channel 2"), _("Channel 3")}, {"CH1", "CH2", "CH3"}, @@ -945,13 +958,15 @@ void DivEngine::registerSystems() { ); sysDefs[DIV_SYSTEM_ARCADE]=new DivSysDef( - _("DefleCade"), NULL, 0x08, 0x08, 13, true, false, 0, true, 0, 0, 0, + _("DefleCade"), NULL, 0x08, 0x08, 13, 13, 13, + true, false, 0, true, 0, 0, 0, "", {}, {}, {}, {} ); sysDefs[DIV_SYSTEM_YM2610]=new DivSysDef( - _("Neo Geo CD"), NULL, 0x09, 0x09, 13, true, true, 0x151, false, (1U<", {}, {}, {}, {} ); sysDefs[DIV_SYSTEM_AY8910]=new DivSysDef( - _("AY-3-8910"), NULL, 0x80, 0, 3, false, true, 0x151, false, 1U<