OPLL: add setting to not write freq of top/hi-hat

issue #249
This commit is contained in:
tildearrow 2022-11-15 16:53:05 -05:00
parent c167066296
commit 1f6c25643b
3 changed files with 11 additions and 2 deletions

View file

@ -247,7 +247,7 @@ void DivPlatformOPLL::tick(bool sysTick) {
if (chan[i].freq>65535) chan[i].freq=65535;
int freqt=toFreq(chan[i].freq);
chan[i].freqL=freqt&0xff;
if (i>=6 && properDrums) {
if (i>=6 && properDrums && (i<9 || !noTopHatFreq)) {
immWrite(0x10+drumSlot[i],freqt&0xff);
immWrite(0x20+drumSlot[i],freqt>>8);
} else if (i<6 || !drums) {
@ -963,6 +963,7 @@ void DivPlatformOPLL::setFlags(const DivConfig& flags) {
for (int i=0; i<11; i++) {
oscBuf[i]->rate=rate/2;
}
noTopHatFreq=flags.getBool("noTopHatFreq",false);
}
int DivPlatformOPLL::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {

View file

@ -82,7 +82,7 @@ class DivPlatformOPLL: public DivDispatch {
bool useYMFM;
bool drums;
bool properDrums, properDrumsSys;
bool properDrums, properDrumsSys, noTopHatFreq;
bool vrc7;
unsigned char patchSet;