mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-04 18:27:25 +00:00
OPN: implement phase reset macro on ExtCh
This commit is contained in:
parent
82d5139197
commit
3d7079226f
5 changed files with 50 additions and 10 deletions
|
@ -468,6 +468,16 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
|
||||||
int hardResetElapsed=0;
|
int hardResetElapsed=0;
|
||||||
bool mustHardReset=false;
|
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) {
|
if (extMode) {
|
||||||
bool writeSomething=false;
|
bool writeSomething=false;
|
||||||
unsigned char writeMask=2;
|
unsigned char writeMask=2;
|
||||||
|
@ -494,8 +504,6 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
|
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
|
||||||
opChan[i].std.next();
|
|
||||||
|
|
||||||
if (opChan[i].std.vol.had) {
|
if (opChan[i].std.vol.had) {
|
||||||
opChan[i].outVol=VOL_SCALE_LOG_BROKEN(opChan[i].vol,MIN(127,opChan[i].std.vol.val),127);
|
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]];
|
unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[i]];
|
||||||
|
|
|
@ -395,6 +395,16 @@ void DivPlatformYM2203Ext::tick(bool sysTick) {
|
||||||
int hardResetElapsed=0;
|
int hardResetElapsed=0;
|
||||||
bool mustHardReset=false;
|
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) {
|
if (extMode) {
|
||||||
bool writeSomething=false;
|
bool writeSomething=false;
|
||||||
unsigned char writeMask=2;
|
unsigned char writeMask=2;
|
||||||
|
@ -421,8 +431,6 @@ void DivPlatformYM2203Ext::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
|
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
|
||||||
opChan[i].std.next();
|
|
||||||
|
|
||||||
if (opChan[i].std.vol.had) {
|
if (opChan[i].std.vol.had) {
|
||||||
opChan[i].outVol=VOL_SCALE_LOG_BROKEN(opChan[i].vol,MIN(127,opChan[i].std.vol.val),127);
|
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]];
|
unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[i]];
|
||||||
|
|
|
@ -423,6 +423,16 @@ void DivPlatformYM2608Ext::tick(bool sysTick) {
|
||||||
int hardResetElapsed=0;
|
int hardResetElapsed=0;
|
||||||
bool mustHardReset=false;
|
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) {
|
if (extMode) {
|
||||||
bool writeSomething=false;
|
bool writeSomething=false;
|
||||||
unsigned char writeMask=2;
|
unsigned char writeMask=2;
|
||||||
|
@ -449,8 +459,6 @@ void DivPlatformYM2608Ext::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
|
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
|
||||||
opChan[i].std.next();
|
|
||||||
|
|
||||||
if (opChan[i].std.vol.had) {
|
if (opChan[i].std.vol.had) {
|
||||||
opChan[i].outVol=VOL_SCALE_LOG_BROKEN(opChan[i].vol,MIN(127,opChan[i].std.vol.val),127);
|
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]];
|
unsigned short baseAddr=chanOffs[2]|opOffs[orderedOps[i]];
|
||||||
|
|
|
@ -416,6 +416,16 @@ void DivPlatformYM2610BExt::tick(bool sysTick) {
|
||||||
int hardResetElapsed=0;
|
int hardResetElapsed=0;
|
||||||
bool mustHardReset=false;
|
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) {
|
if (extMode) {
|
||||||
bool writeSomething=false;
|
bool writeSomething=false;
|
||||||
unsigned char writeMask=2;
|
unsigned char writeMask=2;
|
||||||
|
@ -442,8 +452,6 @@ void DivPlatformYM2610BExt::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
|
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
|
||||||
opChan[i].std.next();
|
|
||||||
|
|
||||||
if (opChan[i].std.vol.had) {
|
if (opChan[i].std.vol.had) {
|
||||||
opChan[i].outVol=VOL_SCALE_LOG_BROKEN(opChan[i].vol,MIN(127,opChan[i].std.vol.val),127);
|
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]];
|
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[orderedOps[i]];
|
||||||
|
|
|
@ -416,6 +416,16 @@ void DivPlatformYM2610Ext::tick(bool sysTick) {
|
||||||
int hardResetElapsed=0;
|
int hardResetElapsed=0;
|
||||||
bool mustHardReset=false;
|
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) {
|
if (extMode) {
|
||||||
bool writeSomething=false;
|
bool writeSomething=false;
|
||||||
unsigned char writeMask=2;
|
unsigned char writeMask=2;
|
||||||
|
@ -442,8 +452,6 @@ void DivPlatformYM2610Ext::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
|
if (extMode && !noExtMacros) for (int i=0; i<4; i++) {
|
||||||
opChan[i].std.next();
|
|
||||||
|
|
||||||
if (opChan[i].std.vol.had) {
|
if (opChan[i].std.vol.had) {
|
||||||
opChan[i].outVol=VOL_SCALE_LOG_BROKEN(opChan[i].vol,MIN(127,opChan[i].std.vol.val),127);
|
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]];
|
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[orderedOps[i]];
|
||||||
|
|
Loading…
Reference in a new issue