C64: relative cutoff and duty macros are fine
This commit is contained in:
parent
f05d1693f8
commit
e2278d3688
5 changed files with 27 additions and 12 deletions
|
|
@ -1062,10 +1062,11 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
|
|||
ds.systemFlags[0].set("dpcmMode",false);
|
||||
}
|
||||
|
||||
// C64 no key priority and reset time
|
||||
// C64 no key priority, reset time and multiply relative
|
||||
if (ds.system[0]==DIV_SYSTEM_C64_8580 || ds.system[0]==DIV_SYSTEM_C64_6581) {
|
||||
ds.systemFlags[0].set("keyPriority",false);
|
||||
ds.systemFlags[0].set("initResetTime",1);
|
||||
ds.systemFlags[0].set("multiplyRel",true);
|
||||
}
|
||||
|
||||
// OPM broken pitch
|
||||
|
|
@ -3034,11 +3035,12 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
|||
}
|
||||
}
|
||||
|
||||
// C64 original reset time
|
||||
// C64 original reset time and multiply relative
|
||||
if (ds.version<187) {
|
||||
for (int i=0; i<ds.systemLen; i++) {
|
||||
if (ds.system[i]==DIV_SYSTEM_C64_8580 || ds.system[i]==DIV_SYSTEM_C64_6581) {
|
||||
ds.systemFlags[i].set("initResetTime",1);
|
||||
ds.systemFlags[i].set("multiplyRel",true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,11 @@ void DivPlatformC64::tick(bool sysTick) {
|
|||
if (ins->c64.dutyIsAbs) {
|
||||
chan[i].duty=chan[i].std.duty.val;
|
||||
} else {
|
||||
chan[i].duty-=((signed char)chan[i].std.duty.val)*4;
|
||||
if (multiplyRel) {
|
||||
chan[i].duty-=((signed char)chan[i].std.duty.val)*4;
|
||||
} else {
|
||||
chan[i].duty-=chan[i].std.duty.val;
|
||||
}
|
||||
}
|
||||
rWrite(i*7+2,chan[i].duty&0xff);
|
||||
rWrite(i*7+3,chan[i].duty>>8);
|
||||
|
|
@ -199,10 +203,11 @@ void DivPlatformC64::tick(bool sysTick) {
|
|||
if (ins->c64.filterIsAbs) {
|
||||
filtCut=MIN(2047,chan[i].std.alg.val);
|
||||
} else {
|
||||
// TODO:
|
||||
// - why signed char?
|
||||
// - add a mode in where it's not multiplied by 7 - dang it Delek
|
||||
filtCut+=((signed char)chan[i].std.alg.val)*7;
|
||||
if (multiplyRel) {
|
||||
filtCut+=((signed char)chan[i].std.alg.val)*7;
|
||||
} else {
|
||||
filtCut+=chan[i].std.alg.val;
|
||||
}
|
||||
if (filtCut>2047) filtCut=2047;
|
||||
if (filtCut<0) filtCut=0;
|
||||
}
|
||||
|
|
@ -726,6 +731,7 @@ void DivPlatformC64::setFlags(const DivConfig& flags) {
|
|||
}
|
||||
keyPriority=flags.getBool("keyPriority",true);
|
||||
no1EUpdate=flags.getBool("no1EUpdate",false);
|
||||
multiplyRel=flags.getBool("multiplyRel",false);
|
||||
testAD=((flags.getInt("testAttack",0)&15)<<4)|(flags.getInt("testDecay",0)&15);
|
||||
testSR=((flags.getInt("testSustain",0)&15)<<4)|(flags.getInt("testRelease",0)&15);
|
||||
initResetTime=flags.getInt("initResetTime",2);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class DivPlatformC64: public DivDispatch {
|
|||
unsigned char sidCore;
|
||||
int filtCut, resetTime, initResetTime;
|
||||
|
||||
bool keyPriority, sidIs6581, needInitTables, no1EUpdate;
|
||||
bool keyPriority, sidIs6581, needInitTables, no1EUpdate, multiplyRel;
|
||||
unsigned char chanOrder[3];
|
||||
unsigned char testAD, testSR;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue