~ubuntu-branches/debian/experimental/mednafen/experimental

« back to all changes in this revision

Viewing changes to src/snes_perf/src/snes/dsp/misc.cpp

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2014-11-08 11:36:07 UTC
  • mfrom: (1.2.18) (10.1.16 sid)
  • Revision ID: package-import@ubuntu.com-20141108113607-3lbwsamqqhrso4hp
Tags: 0.9.36.5-1
* New upstream release, uploaded to expermiental for the Jessie freeze.
* Standards-Version 3.9.6, no change required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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