diff --git a/src/engine/engine.h b/src/engine/engine.h index 43af4127f2..583ca7a852 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -294,6 +294,9 @@ struct DivSysDef { unsigned char id_DMF; int channels; bool isFM, isSTD, isCompound; + // width 0: variable + // height 0: no wavetable support + unsigned short waveWidth, waveHeight; unsigned int vgmVersion; unsigned int sampleFormatMask; const char* chanNames[DIV_MAX_CHANS]; @@ -307,7 +310,8 @@ struct DivSysDef { const EffectHandlerMap preEffectHandlers; DivSysDef( const char* sysName, const char* sysNameJ, unsigned char fileID, unsigned char fileID_DMF, int chans, - bool isFMChip, bool isSTDChip, unsigned int vgmVer, bool compound, unsigned int formatMask, const char* desc, + 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, std::initializer_list chShortNames, std::initializer_list chTypes, @@ -325,6 +329,8 @@ struct DivSysDef { isFM(isFMChip), isSTD(isSTDChip), isCompound(compound), + waveWidth(waveWid), + waveHeight(waveHei), vgmVersion(vgmVer), sampleFormatMask(formatMask), effectHandlers(fxHandlers_), diff --git a/src/engine/sysDef.cpp b/src/engine/sysDef.cpp index 5c044afc50..56c814c527 100644 --- a/src/engine/sysDef.cpp +++ b/src/engine/sysDef.cpp @@ -370,7 +370,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, +// "Name", "Name (japanese, optional)", fileID, fileID_DMF, channels, isFM, isSTD, vgmVersion, waveWidth, waveHeight, +// "Description", // {"Channel Names", ...}, // {"Channel Short Names", ...}, // {chanTypes, ...}, @@ -618,7 +619,7 @@ 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, + "Sega Genesis Extended Channel 3", NULL, 0x42, 0x42, 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, + "TI SN76489", NULL, 0x03, 0x03, 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"}, @@ -652,13 +653,13 @@ void DivEngine::registerSystems() { ); sysDefs[DIV_SYSTEM_SMS_OPLL]=new DivSysDef( - "Sega Master System + FM Expansion", NULL, 0x43, 0x43, 13, true, true, 0, true, 0, + "Sega Master System + FM Expansion", NULL, 0x43, 0x43, 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, + "Game Boy", NULL, 0x04, 0x04, 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"}, @@ -675,7 +676,7 @@ 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, + "Famicom Disk System", NULL, 0, 0x86, 6, false, true, 0, true, 0, 0, 0, "", {}, {}, {}, {} ); sysDefs[DIV_SYSTEM_C64_6581]=new DivSysDef( - "Commodore 64 (6581)", NULL, 0x47, 0x47, 3, false, true, 0, false, 0, + "Commodore 64 (6581)", NULL, 0x47, 0x47, 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"}, @@ -738,7 +739,7 @@ void DivEngine::registerSystems() { ); sysDefs[DIV_SYSTEM_C64_8580]=new DivSysDef( - "Commodore 64 (8580)", NULL, 0x07, 0x07, 3, false, true, 0, false, 0, + "Commodore 64 (8580)", NULL, 0x07, 0x07, 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"}, @@ -750,13 +751,13 @@ void DivEngine::registerSystems() { ); sysDefs[DIV_SYSTEM_ARCADE]=new DivSysDef( - "DefleCade", NULL, 0x08, 0x08, 13, true, false, 0, true, 0, + "DefleCade", NULL, 0x08, 0x08, 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<