Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/snes/dsp/misc.cpp
2 views
1
#ifdef DSP_CPP
2
3
void DSP::misc_27() {
4
state.t_pmon = REG(pmon) & ~1; //voice 0 doesn't support PMON
5
}
6
7
void DSP::misc_28() {
8
state.t_non = REG(non);
9
state.t_eon = REG(eon);
10
state.t_dir = REG(dir);
11
}
12
13
void DSP::misc_29() {
14
state.every_other_sample ^= 1;
15
if(state.every_other_sample) {
16
state.new_kon &= ~state.kon; //clears KON 63 clocks after it was last read
17
}
18
}
19
20
void DSP::misc_30() {
21
if(state.every_other_sample) {
22
state.kon = state.new_kon;
23
state.t_koff = REG(koff);
24
}
25
26
counter_tick();
27
28
//noise
29
if(counter_poll(REG(flg) & 0x1f) == true) {
30
int feedback = (state.noise << 13) ^ (state.noise << 14);
31
state.noise = (feedback & 0x4000) ^ (state.noise >> 1);
32
}
33
}
34
35
#endif
36
37