bsnes/higan/sfc/dsp/misc.cpp
Tim Allen 25eaaa82f4 Update to v097r31 release.
byuu says:

Changelog:
- WS: fixed sprite window clipping (again)
- WS: don't set IRQ status bits of IRQ enable bits are clear
- SFC: signed/unsigned -> int/uint for DSP core
- SFC: removed eBoot
- SFC: added 21fx (not the same as the old precursor to MSU1; just
  reusing the name)

Note: XI Little doesn't seem to be fixed after all ... but the other
three are. So I guess we're at 13 bugs :( And holy shit that music when
you choose a menu option is one of the worst sounds I've ever heard in
my life >_<
2016-03-29 20:15:01 +11:00

32 lines
703 B
C++

auto DSP::misc27() -> void {
state._pmon = REG(PMON) & ~1; //voice 0 doesn't support PMON
}
auto DSP::misc28() -> void {
state._non = REG(NON);
state._eon = REG(EON);
state._dir = REG(DIR);
}
auto DSP::misc29() -> void {
state.everyOtherSample ^= 1;
if(state.everyOtherSample) {
state.konBuffer &= ~state.kon; //clears KON 63 clocks after it was last read
}
}
auto DSP::misc30() -> void {
if(state.everyOtherSample) {
state.kon = state.konBuffer;
state._koff = REG(KOFF);
}
counterTick();
//noise
if(counterPoll(REG(FLG) & 0x1f)) {
int feedback = (state.noise << 13) ^ (state.noise << 14);
state.noise = (feedback & 0x4000) ^ (state.noise >> 1);
}
}