gpulib: clear fb when display is blanked
[pcsx_rearmed.git] / plugins / dfsound / registers.c
index 669c70f..54e4000 100644 (file)
@@ -173,14 +173,9 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val)
      //------------------------------------------------//\r
      case 14:                                          // loop?\r
        s_chan[ch].pLoop=spuMemC+((val&~1)<<3);\r
-       if(s_chan[ch].bJump)\r
-        // real machine would be most likely still doing the last block and use new value for the jump;\r
-        // but we decode ahead a bit and already did the jump part, so compensate for that now.\r
-        s_chan[ch].pCurr=s_chan[ch].pLoop;\r
        break;\r
      //------------------------------------------------//\r
     }\r
-   iSpuAsyncWait=0;\r
    return;\r
   }\r
 \r
@@ -217,6 +212,9 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val)
          {\r
           rvb.StartAddr=(unsigned long)val<<2;\r
           rvb.CurrAddr=rvb.StartAddr;\r
+          // sync-with-decode-buffers hack..\r
+          if(rvb.StartAddr==0x3ff00)\r
+            rvb.CurrAddr+=decode_pos/2;\r
          }\r
        }\r
       rvb.dirty = 1;\r
@@ -347,8 +345,6 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val)
 \r
  if ((r & ~0x3f) == H_Reverb)\r
   rvb.dirty = 1; // recalculate on next update\r
-\r
- iSpuAsyncWait=0;\r
 }\r
 \r
 ////////////////////////////////////////////////////////////////////////\r
@@ -359,8 +355,6 @@ unsigned short CALLBACK SPUreadRegister(unsigned long reg)
 {\r
  const unsigned long r=reg&0xfff;\r
         \r
- iSpuAsyncWait=0;\r
-\r
  if(r>=0x0c00 && r<0x0d80)\r
   {\r
    switch(r&0x0f)\r
@@ -433,7 +427,7 @@ static void SoundOn(int start,int end,unsigned short val)
      s_chan[ch].bStop=0;\r
      s_chan[ch].pCurr=spuMemC+((regAreaGet(ch,6)&~1)<<3); // must be block aligned\r
      s_chan[ch].pLoop=spuMemC+((regAreaGet(ch,14)&~1)<<3);\r
-     s_chan[ch].bJump=0;\r
+     s_chan[ch].prevflags=2;\r
 \r
      dwNewChannel|=(1<<ch);                            // bitfield for faster testing\r
      dwChannelOn|=1<<ch;\r