summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-12-06 23:17:10 +0000
committerSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-12-06 23:17:10 +0000
commit87b1b43e2827bf45f57fe6463cfbfb6b64c485a0 (patch)
treee14be4087b473ecff41c67b6e744b919dc011b55 /plugins
parent9fb1810aac7510024fc5133a2ecb7ac11c714333 (diff)
downloadpcsxr-87b1b43e2827bf45f57fe6463cfbfb6b64c485a0.tar.gz
dfsound - registers.c, spu.c
- VAG flag fixes - fixes missing Xenogears sounds (menu, Franz library, doors, etc.) - fixes Jungle Book - Rhythm 'n Groove (music + play) - SoundOff prevents new channel from starting - fixes Jungle Book (buzzing loop hangs) git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@60742 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfsound/registers.c12
-rw-r--r--plugins/dfsound/spu.c49
2 files changed, 44 insertions, 17 deletions
diff --git a/plugins/dfsound/registers.c b/plugins/dfsound/registers.c
index 0a9485e2..a6d2869f 100644
--- a/plugins/dfsound/registers.c
+++ b/plugins/dfsound/registers.c
@@ -428,6 +428,11 @@ void SoundOn(int start,int end,unsigned short val) // SOUND ON PSX COMAND
{
s_chan[ch].bIgnoreLoop=0;
s_chan[ch].bNew=1;
+
+ // ..?
+ //s_chan[ch].bStop=0;
+ //s_chan[ch].pLoop=0;
+
dwNewChannel|=(1<<ch); // bitfield for faster testing
}
}
@@ -445,7 +450,12 @@ void SoundOff(int start,int end,unsigned short val) // SOUND OFF PSX COMMAND
if(val&1) // && s_chan[i].bOn) mmm...
{
s_chan[ch].bStop=1;
- }
+
+ // Jungle Book - Rhythm 'n Groove
+ // - turns off buzzing sound (loop hangs)
+ s_chan[ch].bNew=0;
+ dwNewChannel &= ~(1<<ch);
+ }
}
}
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c
index 2517ced5..85e6e715 100644
--- a/plugins/dfsound/spu.c
+++ b/plugins/dfsound/spu.c
@@ -604,22 +604,39 @@ static void *MAINThread(void *arg)
//////////////////////////////////////////// flag handler
- if((flags&4) && (!s_chan[ch].bIgnoreLoop))
- s_chan[ch].pLoop=start-16; // loop adress
-
- if(flags&1) // 1: stop/loop
- {
- // We play this block out first...
- //if(!(flags&2)) // 1+2: do loop... otherwise: stop
- if(flags!=3 || s_chan[ch].pLoop==NULL) // PETE: if we don't check exactly for 3, loop hang ups will happen (DQ4, for example)
- { // and checking if pLoop is set avoids crashes, yeah
- start = (unsigned char*)-1;
- }
- else
- {
- start = s_chan[ch].pLoop;
- }
- }
+ /*
+ SPU2-X:
+ $4 = set loop to current block
+ $2 = keep envelope on (no mute)
+ $1 = jump to loop address
+
+ silence means no volume (ADSR keeps playing!!)
+ */
+
+ // Jungle Book - Rhythm 'n Groove - use external loop address
+ // - fixes music player (+IRQ generate)
+ if((flags&4) && (pChannel->bIgnoreLoop == 0))
+ pChannel->pLoop=start-16;
+
+ // Jungle Book - Rhythm 'n Groove - don't reset ignore status
+ // - fixes gameplay speed (IRQ hits)
+ //pChannel->bIgnoreLoop = 0;
+
+
+ if(flags&1)
+ {
+ start = pChannel->pLoop;
+
+ // Xenogears - 7 = menu sound + other missing sounds
+ // TODO: SILENCE flag + DQ4 check (loop hangs?)
+ if( (flags&2) == 0 )
+ start = (unsigned char *) -1;
+
+ // stop check?
+ if( pChannel->pLoop == 0 )
+ start = (unsigned char *) -1;
+ }
+
s_chan[ch].pCurr=start; // store values for next cycle
s_chan[ch].s_1=s_1;