OPLL: VRC7
This commit is contained in:
parent
6dc01159ee
commit
14749e165e
|
@ -198,6 +198,7 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do
|
||||||
case DIV_SYSTEM_OPLL_DRUMS:
|
case DIV_SYSTEM_OPLL_DRUMS:
|
||||||
case DIV_SYSTEM_VRC7:
|
case DIV_SYSTEM_VRC7:
|
||||||
dispatch=new DivPlatformOPLL;
|
dispatch=new DivPlatformOPLL;
|
||||||
|
((DivPlatformOPLL*)dispatch)->setVRC7(sys==DIV_SYSTEM_VRC7);
|
||||||
break;
|
break;
|
||||||
case DIV_SYSTEM_SAA1099: {
|
case DIV_SYSTEM_SAA1099: {
|
||||||
int saaCore=eng->getConfInt("saaCore",0);
|
int saaCore=eng->getConfInt("saaCore",0);
|
||||||
|
|
|
@ -610,6 +610,10 @@ void DivPlatformOPLL::toggleRegisterDump(bool enable) {
|
||||||
DivDispatch::toggleRegisterDump(enable);
|
DivDispatch::toggleRegisterDump(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DivPlatformOPLL::setVRC7(bool vrc) {
|
||||||
|
vrc7=vrc;
|
||||||
|
}
|
||||||
|
|
||||||
void* DivPlatformOPLL::getChanState(int ch) {
|
void* DivPlatformOPLL::getChanState(int ch) {
|
||||||
return &chan[ch];
|
return &chan[ch];
|
||||||
}
|
}
|
||||||
|
@ -625,7 +629,11 @@ int DivPlatformOPLL::getRegisterPoolSize() {
|
||||||
void DivPlatformOPLL::reset() {
|
void DivPlatformOPLL::reset() {
|
||||||
while (!writes.empty()) writes.pop();
|
while (!writes.empty()) writes.pop();
|
||||||
memset(regPool,0,256);
|
memset(regPool,0,256);
|
||||||
|
if (vrc7) {
|
||||||
|
OPLL_Reset(&fm,opll_type_ds1001);
|
||||||
|
} else {
|
||||||
OPLL_Reset(&fm,opll_type_ym2413);
|
OPLL_Reset(&fm,opll_type_ym2413);
|
||||||
|
}
|
||||||
if (dumpWrites) {
|
if (dumpWrites) {
|
||||||
addWrite(0xffffffff,0);
|
addWrite(0xffffffff,0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,7 @@ class DivPlatformOPLL: public DivDispatch {
|
||||||
|
|
||||||
bool useYMFM;
|
bool useYMFM;
|
||||||
bool drums;
|
bool drums;
|
||||||
|
bool vrc7;
|
||||||
|
|
||||||
short oldWrites[256];
|
short oldWrites[256];
|
||||||
short pendingWrites[256];
|
short pendingWrites[256];
|
||||||
|
@ -102,6 +103,7 @@ class DivPlatformOPLL: public DivDispatch {
|
||||||
bool keyOffAffectsArp(int ch);
|
bool keyOffAffectsArp(int ch);
|
||||||
bool keyOffAffectsPorta(int ch);
|
bool keyOffAffectsPorta(int ch);
|
||||||
void toggleRegisterDump(bool enable);
|
void toggleRegisterDump(bool enable);
|
||||||
|
void setVRC7(bool vrc);
|
||||||
void setFlags(unsigned int flags);
|
void setFlags(unsigned int flags);
|
||||||
void notifyInsChange(int ins);
|
void notifyInsChange(int ins);
|
||||||
void notifyInsDeletion(void* ins);
|
void notifyInsDeletion(void* ins);
|
||||||
|
|
Loading…
Reference in a new issue