OPL: and now fix the fix
This commit is contained in:
parent
f7412e5234
commit
8ac3491672
|
@ -1218,11 +1218,12 @@ void DivPlatformOPL::tick(bool sysTick) {
|
||||||
|
|
||||||
memset(weWillWriteRRLater,0,64*sizeof(bool));
|
memset(weWillWriteRRLater,0,64*sizeof(bool));
|
||||||
|
|
||||||
|
unsigned char opMask=(int)(chan[0].fourOp)|(chan[2].fourOp<<1)|(chan[4].fourOp<<2)|(chan[6].fourOp<<3)|(chan[8].fourOp<<4)|(chan[10].fourOp<<5);
|
||||||
|
|
||||||
|
// write ops which are being enabled
|
||||||
if (update4OpMask) {
|
if (update4OpMask) {
|
||||||
update4OpMask=false;
|
|
||||||
if (oplType==3) {
|
if (oplType==3) {
|
||||||
unsigned char opMask=(int)(chan[0].fourOp)|(chan[2].fourOp<<1)|(chan[4].fourOp<<2)|(chan[6].fourOp<<3)|(chan[8].fourOp<<4)|(chan[10].fourOp<<5);
|
immWrite(0x104,opMask|oldOpMask);
|
||||||
immWrite(0x104,opMask);
|
|
||||||
//printf("updating opMask to %.2x\n",opMask);
|
//printf("updating opMask to %.2x\n",opMask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1251,6 +1252,16 @@ void DivPlatformOPL::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// and now the ones being disabled
|
||||||
|
if (update4OpMask) {
|
||||||
|
update4OpMask=false;
|
||||||
|
if (oplType==3) {
|
||||||
|
immWrite(0x104,opMask);
|
||||||
|
//printf("updating opMask to %.2x\n",opMask);
|
||||||
|
}
|
||||||
|
oldOpMask=opMask;
|
||||||
|
}
|
||||||
|
|
||||||
// update drums
|
// update drums
|
||||||
if (properDrums) {
|
if (properDrums) {
|
||||||
bool updateDrums=false;
|
bool updateDrums=false;
|
||||||
|
@ -2719,6 +2730,7 @@ void DivPlatformOPL::reset() {
|
||||||
while (!writes.empty()) writes.pop();
|
while (!writes.empty()) writes.pop();
|
||||||
memset(regPool,0,768);
|
memset(regPool,0,768);
|
||||||
|
|
||||||
|
oldOpMask=0;
|
||||||
dacVal=0;
|
dacVal=0;
|
||||||
dacVal2=0;
|
dacVal2=0;
|
||||||
dacOut=0;
|
dacOut=0;
|
||||||
|
|
|
@ -115,6 +115,7 @@ class DivPlatformOPL: public DivDispatch {
|
||||||
bool lastSY;
|
bool lastSY;
|
||||||
bool waitingBusy;
|
bool waitingBusy;
|
||||||
int downsamplerStep;
|
int downsamplerStep;
|
||||||
|
unsigned char oldOpMask;
|
||||||
|
|
||||||
unsigned char* adpcmBMem;
|
unsigned char* adpcmBMem;
|
||||||
size_t adpcmBMemLen;
|
size_t adpcmBMemLen;
|
||||||
|
|
Loading…
Reference in a new issue