SPU2: Set sample rate correctly for PS1 mode (#3532)

* Moved ps1 init. Added Sample Rate change for SPU that gets set but not applied
* SPU: misc fixes on SPU ps1 mode init
* Init the soundbuffer to apply sample rate. Actually set the correct sample rate for the ps1 though it still won't apply

Co-authored-by: Gauvain 'GovanifY' Roussel-Tarbouriech <gauvain@govanify.com>
Co-authored-by: kenshen112 <obarrtimothy@gmail.com>
This commit is contained in:
Timothy O'Barr
2020-09-21 01:04:40 +01:00
committed by GitHub
co-authored by Gauvain 'GovanifY' Roussel-Tarbouriech kenshen112
parent 551847411f
commit 73b02c204b
13 changed files with 92 additions and 28 deletions
+12 -9
View File
@@ -177,15 +177,18 @@ void __fastcall _hwWrite32( u32 mem, u32 value )
return;
mcase(SBUS_F240) :
//if (value & (1 << 19)) // switch hardware into psx mode. Doesn't work for some reason, still needs this to be in cdvdWrite14?
//{
// u32 cycle = psxRegs.cycle;
// //pgifInit();
// psxHwReset();
// psxHu32(0x1f801450) = 0x8;
// psxHu32(0x1f801078) = 1;
// psxRegs.cycle = cycle;
//}
if (value & (1 << 19))
{
u32 cycle = psxRegs.cycle;
//pgifInit();
psxReset();
PSXCLK = 33868800;
SPU2ps1reset();
setPsxSpeed();
psxHu32(0x1f801450) = 0x8;
psxHu32(0x1f801078) = 1;
psxRegs.cycle = cycle;
}
if(!(value & 0x100))
psHu32(mem) &= ~0x100;
else