X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfsound%2Fregisters.c;h=54e4000f767de70a578d7872ae790267d39abfec;hp=669c70f736004cc781b81760a4e436010669121b;hb=efce366c5b6596b9542c4fe8c69695191dab5d5a;hpb=be1cb678c445cb8d9a4d707c698f0dc600a490ea diff --git a/plugins/dfsound/registers.c b/plugins/dfsound/registers.c index 669c70f7..54e4000f 100644 --- a/plugins/dfsound/registers.c +++ b/plugins/dfsound/registers.c @@ -173,14 +173,9 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val) //------------------------------------------------// case 14: // loop? s_chan[ch].pLoop=spuMemC+((val&~1)<<3); - if(s_chan[ch].bJump) - // real machine would be most likely still doing the last block and use new value for the jump; - // but we decode ahead a bit and already did the jump part, so compensate for that now. - s_chan[ch].pCurr=s_chan[ch].pLoop; break; //------------------------------------------------// } - iSpuAsyncWait=0; return; } @@ -217,6 +212,9 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val) { rvb.StartAddr=(unsigned long)val<<2; rvb.CurrAddr=rvb.StartAddr; + // sync-with-decode-buffers hack.. + if(rvb.StartAddr==0x3ff00) + rvb.CurrAddr+=decode_pos/2; } } rvb.dirty = 1; @@ -347,8 +345,6 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val) if ((r & ~0x3f) == H_Reverb) rvb.dirty = 1; // recalculate on next update - - iSpuAsyncWait=0; } //////////////////////////////////////////////////////////////////////// @@ -359,8 +355,6 @@ unsigned short CALLBACK SPUreadRegister(unsigned long reg) { const unsigned long r=reg&0xfff; - iSpuAsyncWait=0; - if(r>=0x0c00 && r<0x0d80) { switch(r&0x0f) @@ -433,7 +427,7 @@ static void SoundOn(int start,int end,unsigned short val) s_chan[ch].bStop=0; s_chan[ch].pCurr=spuMemC+((regAreaGet(ch,6)&~1)<<3); // must be block aligned s_chan[ch].pLoop=spuMemC+((regAreaGet(ch,14)&~1)<<3); - s_chan[ch].bJump=0; + s_chan[ch].prevflags=2; dwNewChannel|=(1<