Skip to content

Commit

Permalink
OPL: ymfm core, part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
tildearrow committed Nov 23, 2023
1 parent 1bcdedd commit 955682b
Show file tree
Hide file tree
Showing 9 changed files with 467 additions and 29 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@ extern/Nuked-PSG/ympsg.c
extern/opm/opm.c
extern/Nuked-OPLL/opll.c
extern/opl/opl3.c
extern/YM3812-LLE/fmopl2.c
extern/YMF262-LLE/fmopl3.c

src/pch.cpp

Expand Down
40 changes: 40 additions & 0 deletions src/engine/dispatchContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,34 +427,74 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do
case DIV_SYSTEM_OPL:
dispatch=new DivPlatformOPL;
((DivPlatformOPL*)dispatch)->setOPLType(1,false);
if (isRender) {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2CoreRender",0));
} else {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2Core",0));
}
break;
case DIV_SYSTEM_OPL_DRUMS:
dispatch=new DivPlatformOPL;
((DivPlatformOPL*)dispatch)->setOPLType(1,true);
if (isRender) {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2CoreRender",0));
} else {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2Core",0));
}
break;
case DIV_SYSTEM_OPL2:
dispatch=new DivPlatformOPL;
((DivPlatformOPL*)dispatch)->setOPLType(2,false);
if (isRender) {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2CoreRender",0));
} else {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2Core",0));
}
break;
case DIV_SYSTEM_OPL2_DRUMS:
dispatch=new DivPlatformOPL;
((DivPlatformOPL*)dispatch)->setOPLType(2,true);
if (isRender) {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2CoreRender",0));
} else {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2Core",0));
}
break;
case DIV_SYSTEM_OPL3:
dispatch=new DivPlatformOPL;
((DivPlatformOPL*)dispatch)->setOPLType(3,false);
if (isRender) {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl3CoreRender",0));
} else {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl3Core",0));
}
break;
case DIV_SYSTEM_OPL3_DRUMS:
dispatch=new DivPlatformOPL;
((DivPlatformOPL*)dispatch)->setOPLType(3,true);
if (isRender) {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl3CoreRender",0));
} else {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl3Core",0));
}
break;
case DIV_SYSTEM_Y8950:
dispatch=new DivPlatformOPL;
((DivPlatformOPL*)dispatch)->setOPLType(8950,false);
if (isRender) {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2CoreRender",0));
} else {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2Core",0));
}
break;
case DIV_SYSTEM_Y8950_DRUMS:
dispatch=new DivPlatformOPL;
((DivPlatformOPL*)dispatch)->setOPLType(8950,true);
if (isRender) {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2CoreRender",0));
} else {
((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl2Core",0));
}
break;
case DIV_SYSTEM_OPZ:
dispatch=new DivPlatformTX81Z;
Expand Down
Loading

0 comments on commit 955682b

Please sign in to comment.