sysDef refactor, part 1 - PLEASE READ NOTE

THIS WILL NOT COMPILE!!!
i'm still working on it

to @cam900: DO NOT PULL TO YOUR ES5506 BRANCH YET - wait until I am done
with this refactor

to @grauw: DO NOT PULL TO YOUR OPL4 BRANCH YET - wait until I am done
with this refactor
This commit is contained in:
tildearrow 2022-04-26 18:32:33 -05:00
parent e8f29cf122
commit 351c22cb77
5 changed files with 526 additions and 44 deletions

View File

@ -197,7 +197,7 @@ size | description
| - 0xa6: Neo Geo extended (YM2610) - 17 channels
| - 0xa7: OPLL drums (YM2413) - 11 channels
| - 0xa8: Atari Lynx - 4 channels
| - 0xa9: SegaPCM (for Deflemask Compatibility) - 5 channels
| - 0xa9: SegaPCM (for DefleMask compatibility) - 5 channels
| - 0xaa: MSM6295 - 4 channels
| - 0xab: MSM6258 - 1 channel
| - 0xac: Commander X16 (VERA) - 17 channels
@ -209,6 +209,7 @@ size | description
| - 0xb2: Yamaha Y8950 - 10 channels
| - 0xb3: Yamaha Y8950 drums - 12 channels
| - 0xb4: Konami SCC+ - 5 channels
| - 0xb5: tildearrow Sound Unit - 8 channels
| - 0xde: YM2610B extended - 19 channels
| - 0xe0: QSound - 19 channels
| - (compound!) means that the system is composed of two or more chips,

View File

@ -2425,6 +2425,9 @@ bool DivEngine::deinitAudioBackend() {
#endif
bool DivEngine::init() {
// register systems
registerSystems();
// init config
#ifdef _WIN32
configPath=getWinConfigPath();

View File

@ -27,6 +27,7 @@
#include "../audio/taAudio.h"
#include "blip_buf.h"
#include <functional>
#include <initializer_list>
#include <thread>
#include <mutex>
#include <map>
@ -177,6 +178,91 @@ struct DivDispatchContainer {
dcOffCompensation(false) {}
};
typedef std::function<bool(int,unsigned char,unsigned char)> EffectProcess;
struct DivSysDef {
const char* name;
const char* nameJ;
unsigned char id;
unsigned char id_DMF;
int channels;
bool isFM, isSTD, isCompound;
unsigned char vgmVersion;
const char* chanNames[DIV_MAX_CHANS];
const char* chanShortNames[DIV_MAX_CHANS];
int chanTypes[DIV_MAX_CHANS];
// 0: primary
// 1: alternate (usually PCM)
DivInstrumentType chanInsType[DIV_MAX_CHANS][2];
EffectProcess effectFunc;
EffectProcess postEffectFunc;
DivSysDef(
const char* sysName, const char* sysNameJ, unsigned char fileID, unsigned char fileID_DMF, int chans,
bool isFMChip, bool isSTDChip, unsigned char vgmVer, bool compound,
std::initializer_list<const char*> chNames,
std::initializer_list<const char*> chShortNames,
std::initializer_list<int> chTypes,
std::initializer_list<DivInstrumentType> chInsType1,
std::initializer_list<DivInstrumentType> chInsType2={},
EffectProcess fxHandler=NULL,
EffectProcess postFxHandler=NULL):
name(sysName),
nameJ(sysNameJ),
id(fileID),
id_DMF(fileID_DMF),
channels(chans),
isFM(isFMChip),
isSTD(isSTDChip),
isCompound(compound),
vgmVersion(vgmVer),
effectFunc(fxHandler),
postEffectFunc(postFxHandler) {
memset(chanNames,0,DIV_MAX_CHANS*sizeof(void*));
memset(chanShortNames,0,DIV_MAX_CHANS*sizeof(void*));
memset(chanTypes,0,DIV_MAX_CHANS*sizeof(int));
memset(chanInsType,0,DIV_MAX_CHANS*2*sizeof(DivInstrumentType));
int index=0;
for (const char* i: chNames) {
chanNames[index++]=i;
if (index>=DIV_MAX_CHANS) break;
}
index=0;
for (const char* i: chShortNames) {
chanShortNames[index++]=i;
if (index>=DIV_MAX_CHANS) break;
}
index=0;
for (int i: chTypes) {
chanTypes[index++]=i;
if (index>=DIV_MAX_CHANS) break;
}
index=0;
for (DivInstrumentType i: chInsType1) {
chanInsType[index++][0]=i;
if (index>=DIV_MAX_CHANS) break;
}
index=0;
for (DivInstrumentType i: chInsType2) {
chanInsType[index++][1]=i;
if (index>=DIV_MAX_CHANS) break;
}
}
};
enum DivChanTypes {
DIV_CH_FM=0,
DIV_CH_PULSE=1,
DIV_CH_NOISE=2,
DIV_CH_WAVE=3,
DIV_CH_PCM=4,
DIV_CH_OP=5
};
class DivEngine {
DivDispatchContainer disCont[32];
TAAudio* output;
@ -230,6 +316,7 @@ class DivEngine {
std::vector<String> midiIns;
std::vector<String> midiOuts;
std::vector<DivCommand> cmdStream;
DivSysDef* sysDefs[256];
struct SamplePreview {
int sample;
@ -298,6 +385,8 @@ class DivEngine {
bool initAudioBackend();
bool deinitAudioBackend();
void registerSystems();
void exchangeIns(int one, int two);
public:
@ -718,7 +807,7 @@ class DivEngine {
// quit dispatch
void quitDispatch();
// initialize the engine. optionally provide an output file name.
// initialize the engine.
bool init();
// terminate the engine.
@ -828,6 +917,7 @@ class DivEngine {
memset(vibTable,0,64*sizeof(short));
memset(reversePitchTable,0,4096*sizeof(int));
memset(pitchTable,0,4096*sizeof(int));
memset(sysDefs,0,256*sizeof(void*));
}
};
#endif

View File

@ -95,7 +95,17 @@ enum DivSystem {
DIV_SYSTEM_YM2610B_EXT,
DIV_SYSTEM_SEGAPCM_COMPAT,
DIV_SYSTEM_X1_010,
DIV_SYSTEM_BUBSYS_WSG
DIV_SYSTEM_BUBSYS_WSG,
DIV_SYSTEM_OPL4,
DIV_SYSTEM_OPL4_DRUMS,
DIV_SYSTEM_ES5506,
DIV_SYSTEM_Y8950,
DIV_SYSTEM_Y8950_DRUMS,
DIV_SYSTEM_SCC_PLUS,
DIV_SYSTEM_SOUND_UNIT,
DIV_SYSTEM_MSM6295,
DIV_SYSTEM_MSM6258,
DIV_SYSTEM_DUMMY
};
struct DivSong {

View File

@ -1058,47 +1058,47 @@ const char* chanShortNames[38][32]={
};
const int chanTypes[41][32]={
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}, // YMU759
{0, 0, 0, 0, 0, 0, 1, 1, 1, 2}, // Genesis
{0, 0, 5, 5, 5, 5, 0, 0, 0, 1, 1, 1, 2}, // Genesis (extended channel 3)
{1, 1, 1, 2}, // SMS
{1, 1, 3, 2}, // GB
{3, 3, 3, 3, 3, 3}, // PCE
{1, 1, 3, 2, 4}, // NES
{2, 2, 2}, // C64
{0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4}, // Arcade
{0, 0, 0, 0, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4}, // YM2610
{0, 5, 5, 5, 5, 0, 0, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4}, // YM2610 (extended channel 2)
{1, 1, 1}, // AY-3-8910
{4, 4, 4, 4}, // Amiga
{0, 0, 0, 0, 0, 0, 0, 0}, // YM2151
{0, 0, 0, 0, 0, 0}, // YM2612
{3, 3}, // TIA
{1, 1, 1, 1, 1, 1}, // SAA1099
{1, 1, 1}, // AY8930
{1, 1, 1, 2}, // VIC-20
{1}, // PET
{4, 4, 4, 4, 4, 4, 4, 4}, // SNES/N163/RF5C68
{1, 1, 3}, // VRC6
{0, 0, 0, 0, 0, 0, 0, 0, 0}, // OPLL/OPL/OPL2/VRC7
{3}, // FDS
{1, 1, 4}, // MMC5
{0, 0, 0, 1, 1, 1}, // OPN
{0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4}, // PC-98
{5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 0, 0, 0, 0, 0, 0}, // OPL3
{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, // MultiPCM/QSound
{1}, // PC Speaker/Pokémon Mini
{3, 3, 3, 3, 3, 2}, // Virtual Boy/SCC
{0, 0, 0, 0, 0, 0, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4}, // YM2610B
{0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2}, // OPLL/OPL/OPL2 drums
{5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 0, 0, 0, 2, 2, 2, 2, 2}, // OPL3 drums
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // OPL3 4-op (UNUSED)
{0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2}, // OPL3 4-op + drums (UNUSED)
{3, 3, 3, 3}, // Lynx
{0, 0, 5, 5, 5, 5, 0, 0, 0, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4}, // YM2610B (extended channel 3)
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4}, // VERA
{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, // X1-010
{3, 4, 3, 2}, // Swan
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_PCM}, // YMU759
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_NOISE}, // Genesis
{DIV_CH_FM, DIV_CH_FM, DIV_CH_OP, DIV_CH_OP, DIV_CH_OP, DIV_CH_OP, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_NOISE}, // Genesis (extended channel 3)
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_NOISE}, // SMS
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_WAVE, DIV_CH_NOISE}, // GB
{DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE}, // PCE
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_WAVE, DIV_CH_NOISE, DIV_CH_PCM}, // NES
{DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE}, // C64
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM}, // Arcade
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM}, // YM2610
{DIV_CH_FM, DIV_CH_OP, DIV_CH_OP, DIV_CH_OP, DIV_CH_OP, DIV_CH_FM, DIV_CH_FM, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM}, // YM2610 (extended channel 2)
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE}, // AY-3-8910
{DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM}, // Amiga
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM}, // YM2151
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM}, // YM2612
{DIV_CH_WAVE, DIV_CH_WAVE}, // TIA
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE}, // SAA1099
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE}, // AY8930
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_NOISE}, // VIC-20
{DIV_CH_PULSE}, // PET
{DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM}, // SNES/N163/RF5C68
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_WAVE}, // VRC6
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM}, // OPLL/OPL/OPL2/VRC7
{DIV_CH_WAVE}, // FDS
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PCM}, // MMC5
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE}, // OPN
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_PCM}, // PC-98
{DIV_CH_OP, DIV_CH_FM, DIV_CH_OP, DIV_CH_FM, DIV_CH_OP, DIV_CH_FM, DIV_CH_OP, DIV_CH_FM, DIV_CH_OP, DIV_CH_FM, DIV_CH_OP, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM}, // OPL3
{DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM}, // MultiPCM/QSound
{DIV_CH_PULSE}, // PC Speaker/Pokémon Mini
{DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_NOISE}, // Virtual Boy/SCC
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM}, // YM2610B
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE}, // OPLL/OPL/OPL2 drums
{DIV_CH_OP, DIV_CH_FM, DIV_CH_OP, DIV_CH_FM, DIV_CH_OP, DIV_CH_FM, DIV_CH_OP, DIV_CH_FM, DIV_CH_OP, DIV_CH_FM, DIV_CH_OP, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE}, // OPL3 drums
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM}, // OPL3 4-op (UNUSED)
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE}, // OPL3 4-op + drums (UNUSED)
{DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE}, // Lynx
{DIV_CH_FM, DIV_CH_FM, DIV_CH_OP, DIV_CH_OP, DIV_CH_OP, DIV_CH_OP, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM, DIV_CH_PCM}, // YM2610B (extended channel 3)
{DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PULSE, DIV_CH_PCM}, // VERA
{DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE}, // X1-010
{DIV_CH_WAVE, DIV_CH_PCM, DIV_CH_WAVE, DIV_CH_NOISE}, // Swan
};
const DivInstrumentType chanPrefType[47][28]={
@ -1794,3 +1794,381 @@ int DivEngine::minVGMVersion(DivSystem which) {
}
return 0;
}
// define systems like:
// sysDefs[DIV_SYSTEM_ID]=new DivSysDef(
// "Name", "Name (japanese, optional)", fileID, fileID_DMF, channels, isFM, isSTD, vgmVersion,
// {"Channel Names", ...},
// {"Channel Short Names", ...},
// {chanTypes, ...},
// {chanPreferInsType, ...},
// {chanPreferInsType2, ...}, (optional)
// [this](int ch, unsigned char effect, unsigned char effectVal) -> bool {}, (effect handler, optional)
// [this](int ch, unsigned char effect, unsigned char effectVal) -> bool {} (post effect handler, optional)
// );
// TODO: EVERYTHING
void DivEngine::registerSystems() {
sysDefs[DIV_SYSTEM_YMU759]=new DivSysDef(
"Yamaha YMU759", NULL, 0x01, 0x01, 17, true, false, 0, false,
{"Channel 1", "Channel 2", "Channel 3", "Channel 4", "Channel 5", "Channel 6", "Channel 7", "Channel 8", "Channel 9", "Channel 10", "Channel 11", "Channel 12", "Channel 13", "Channel 14", "Channel 15", "Channel 16", "PCM" }, // name
{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "PCM" }, // short
{DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_PCM}, // type
{DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM, DIV_INS_FM} // ins
);
sysDefs[DIV_SYSTEM_GENESIS]=new DivSysDef(
"Sega Genesis/Mega Drive", "セガメガドライブ", 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_GENESIS_EXT]=new DivSysDef(
"Sega Genesis Extended Channel 3", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_SMS]=new DivSysDef(
"TI SN76489", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_SMS_OPLL]=new DivSysDef(
"Sega Master System + FM Expansion", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_GB]=new DivSysDef(
"Game Boy", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_PCE]=new DivSysDef(
"PC Engine/TurboGrafx-16", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_NES]=new DivSysDef(
"NES (Ricoh 2A03)", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_NES_VRC7]=new DivSysDef(
"NES + Konami VRC7", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_NES_FDS]=new DivSysDef(
"Famicom Disk System", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_C64_6581]=new DivSysDef(
"Commodore 64 (6581)", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_C64_8580]=new DivSysDef(
"Commodore 64 (8580)", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_ARCADE]=new DivSysDef(
"DefleCade", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_YM2610]=new DivSysDef(
"Neo Geo CD", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_YM2610_EXT]=new DivSysDef(
"Neo Geo CD Extended Channel 2", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_AY8910]=new DivSysDef(
"AY-3-8910", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_AMIGA]=new DivSysDef(
"Amiga", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_YM2151]=new DivSysDef(
"Yamaha YM2151", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_YM2612]=new DivSysDef(
"Yamaha YM2612", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_TIA]=new DivSysDef(
"Atari 2600", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_SAA1099]=new DivSysDef(
"Philips SAA1099", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_AY8930]=new DivSysDef(
"Microchip AY8930", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_VIC20]=new DivSysDef(
"Commodore VIC-20", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_PET]=new DivSysDef(
"Commodore PET", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_SNES]=new DivSysDef(
"SNES", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_VRC6]=new DivSysDef(
"Konami VRC6", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPLL]=new DivSysDef(
"Yamaha OPLL", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_FDS]=new DivSysDef(
"Famicom Disk System (chip)", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_MMC5]=new DivSysDef(
"MMC5", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_N163]=new DivSysDef(
"Namco 163", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPN]=new DivSysDef(
"Yamaha YM2203", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_PC98]=new DivSysDef(
"Yamaha YM2608", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPL]=new DivSysDef(
"Yamaha OPL", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPL2]=new DivSysDef(
"Yamaha OPL2", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPL3]=new DivSysDef(
"Yamaha OPL3", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_MULTIPCM]=new DivSysDef(
"MultiPCM", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_PCSPKR]=new DivSysDef(
"PC Speaker", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_POKEY]=new DivSysDef(
"POKEY", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_RF5C68]=new DivSysDef(
"Ricoh RF5C68", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_SWAN]=new DivSysDef(
"WonderSwan", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPZ]=new DivSysDef(
"Yamaha TX81Z/YS200", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_POKEMINI]=new DivSysDef(
"Pokémon Mini", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_SEGAPCM]=new DivSysDef(
"SegaPCM", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_VBOY]=new DivSysDef(
"Virtual Boy", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_VRC7]=new DivSysDef(
"Konami VRC7", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_YM2610B]=new DivSysDef(
"Yamaha YM2610B", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_SFX_BEEPER]=new DivSysDef(
"ZX Spectrum Beeper", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_YM2612_EXT]=new DivSysDef(
"Yamaha YM2612 Extended Channel 3", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_SCC]=new DivSysDef(
"Konami SCC", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPL_DRUMS]=new DivSysDef(
"Yamaha OPL with drums", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPL2_DRUMS]=new DivSysDef(
"Yamaha OPL2 with drums", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPL3_DRUMS]=new DivSysDef(
"Yamaha OPL3 with drums", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_YM2610_FULL]=new DivSysDef(
"Yamaha YM2610", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_YM2610_FULL_EXT]=new DivSysDef(
"Yamaha YM2610 Extended Channel 2", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPLL_DRUMS]=new DivSysDef(
"Yamaha OPLL with drums", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_LYNX]=new DivSysDef(
"Atari Lynx", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_QSOUND]=new DivSysDef(
"Capcom QSound", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_VERA]=new DivSysDef(
"VERA", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_YM2610B_EXT]=new DivSysDef(
"Yamaha YM2610B Extended Channel 3", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_SEGAPCM_COMPAT]=new DivSysDef(
"SegaPCM (compatible 5-channel mode)", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_X1_010]=new DivSysDef(
"Seta/Allumer X1-010", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_BUBSYS_WSG]=new DivSysDef(
"Konami Bubble System WSG", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPL4]=new DivSysDef(
"Yamaha OPL4", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_OPL4_DRUMS]=new DivSysDef(
"Yamaha OPL4 with drums", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_ES5506]=new DivSysDef(
"Ensoniq ES5506", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_Y8950]=new DivSysDef(
"Yamaha Y8950", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_Y8950_DRUMS]=new DivSysDef(
"Yamaha Y8950 with drums", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_SCC_PLUS]=new DivSysDef(
"Konami SCC+", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_SOUND_UNIT]=new DivSysDef(
"tildearrow Sound Unit", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_MSM6295]=new DivSysDef(
"OKI MSM6295", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_MSM6258]=new DivSysDef(
"OKI MSM6258", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
sysDefs[DIV_SYSTEM_DUMMY]=new DivSysDef(
"Dummy System", NULL, 0x02, 0x02, 10, true, true, 0, true,
{}, {}, {}, {}
);
}