OPN: implement phase reset macro on ExtCh

This commit is contained in:
tildearrow 2024-11-08 02:47:51 -05:00
parent 82d5139197
commit 3d7079226f
5 changed files with 50 additions and 10 deletions

View file

@ -468,6 +468,16 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
int hardResetElapsed=0;
bool mustHardReset=false;
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
opChan[i].std.next();
if (opChan[i].std.phaseReset.had) {
if (opChan[i].std.phaseReset.val==1 && opChan[i].active) {
opChan[i].keyOn=true;
}
}
}
if (extMode) {
bool writeSomething=false;
unsigned char writeMask=2;
@ -494,8 +504,6 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
}
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
opChan[i].std.next();
if (opChan[i].std.vol.had) {
opChan[i].outVol=VOL_SCALE_LOG_BROKEN(opChan[i].vol,MIN(127,opChan[i].std.vol.val),127);
unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[i]];

View file

@ -395,6 +395,16 @@ void DivPlatformYM2203Ext::tick(bool sysTick) {
int hardResetElapsed=0;
bool mustHardReset=false;
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
opChan[i].std.next();
if (opChan[i].std.phaseReset.had) {
if (opChan[i].std.phaseReset.val==1 && opChan[i].active) {
opChan[i].keyOn=true;
}
}
}
if (extMode) {
bool writeSomething=false;
unsigned char writeMask=2;
@ -421,8 +431,6 @@ void DivPlatformYM2203Ext::tick(bool sysTick) {
}
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
opChan[i].std.next();
if (opChan[i].std.vol.had) {
opChan[i].outVol=VOL_SCALE_LOG_BROKEN(opChan[i].vol,MIN(127,opChan[i].std.vol.val),127);
unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[i]];

View file

@ -423,6 +423,16 @@ void DivPlatformYM2608Ext::tick(bool sysTick) {
int hardResetElapsed=0;
bool mustHardReset=false;
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
opChan[i].std.next();
if (opChan[i].std.phaseReset.had) {
if (opChan[i].std.phaseReset.val==1 && opChan[i].active) {
opChan[i].keyOn=true;
}
}
}
if (extMode) {
bool writeSomething=false;
unsigned char writeMask=2;
@ -449,8 +459,6 @@ void DivPlatformYM2608Ext::tick(bool sysTick) {
}
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
opChan[i].std.next();
if (opChan[i].std.vol.had) {
opChan[i].outVol=VOL_SCALE_LOG_BROKEN(opChan[i].vol,MIN(127,opChan[i].std.vol.val),127);
unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[i]];

View file

@ -416,6 +416,16 @@ void DivPlatformYM2610BExt::tick(bool sysTick) {
int hardResetElapsed=0;
bool mustHardReset=false;
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
opChan[i].std.next();
if (opChan[i].std.phaseReset.had) {
if (opChan[i].std.phaseReset.val==1 && opChan[i].active) {
opChan[i].keyOn=true;
}
}
}
if (extMode) {
bool writeSomething=false;
unsigned char writeMask=2;
@ -442,8 +452,6 @@ void DivPlatformYM2610BExt::tick(bool sysTick) {
}
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
opChan[i].std.next();
if (opChan[i].std.vol.had) {
opChan[i].outVol=VOL_SCALE_LOG_BROKEN(opChan[i].vol,MIN(127,opChan[i].std.vol.val),127);
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[orderedOps[i]];

View file

@ -416,6 +416,16 @@ void DivPlatformYM2610Ext::tick(bool sysTick) {
int hardResetElapsed=0;
bool mustHardReset=false;
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
opChan[i].std.next();
if (opChan[i].std.phaseReset.had) {
if (opChan[i].std.phaseReset.val==1 && opChan[i].active) {
opChan[i].keyOn=true;
}
}
}
if (extMode) {
bool writeSomething=false;
unsigned char writeMask=2;
@ -442,8 +452,6 @@ void DivPlatformYM2610Ext::tick(bool sysTick) {
}
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
opChan[i].std.next();
if (opChan[i].std.vol.had) {
opChan[i].outVol=VOL_SCALE_LOG_BROKEN(opChan[i].vol,MIN(127,opChan[i].std.vol.val),127);
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[orderedOps[i]];