2015-10-10 02:16:12 +00:00
|
|
|
auto DSP::misc27() -> void {
|
|
|
|
state._pmon = REG(PMON) & ~1; //voice 0 doesn't support PMON
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2015-10-10 02:16:12 +00:00
|
|
|
auto DSP::misc28() -> void {
|
|
|
|
state._non = REG(NON);
|
|
|
|
state._eon = REG(EON);
|
|
|
|
state._dir = REG(DIR);
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2015-10-10 02:16:12 +00:00
|
|
|
auto DSP::misc29() -> void {
|
|
|
|
state.everyOtherSample ^= 1;
|
|
|
|
if(state.everyOtherSample) {
|
|
|
|
state.konBuffer &= ~state.kon; //clears KON 63 clocks after it was last read
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-10 02:16:12 +00:00
|
|
|
auto DSP::misc30() -> void {
|
|
|
|
if(state.everyOtherSample) {
|
|
|
|
state.kon = state.konBuffer;
|
|
|
|
state._koff = REG(KOFF);
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2015-10-10 02:16:12 +00:00
|
|
|
counterTick();
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
//noise
|
2015-10-10 02:16:12 +00:00
|
|
|
if(counterPoll(REG(FLG) & 0x1f)) {
|
2016-03-29 09:15:01 +00:00
|
|
|
int feedback = (state.noise << 13) ^ (state.noise << 14);
|
2010-08-09 13:28:56 +00:00
|
|
|
state.noise = (feedback & 0x4000) ^ (state.noise >> 1);
|
|
|
|
}
|
|
|
|
}
|