update to 1.24.2

This commit is contained in:
zeromus 2020-05-01 17:15:53 -04:00
parent 50ee8ecf1e
commit 1d0dd4d258
2 changed files with 39 additions and 3 deletions

View File

@ -223,4 +223,11 @@
[OK] psx/spu : casts on volumes
[NO] types : nothing important
[NO] video/Deinterlacer : IGNORE. we may have weak deinterlacing, but so be it
[NO] tests : intrinsic macros changes, threading API changes, stream tests
[NO] tests : intrinsic macros changes, threading API changes, stream tests
1.24.0-UNSTABLE -> 1.24.1
[OK] psx/spu : some basic emulation fixes
[NO] tests : thread stuff
1.24.1 -> 1.24.2
-nothing-

View File

@ -394,7 +394,7 @@ void PS_SPU::RunDecoder(SPU_Voice *voice)
}
else
{
if(voice->LoopAddr != voice->CurAddr)
if((voice->LoopAddr ^ voice->CurAddr) & ~0x7)
{
PSX_DBG(PSX_DBG_FLOOD, "[SPU] Ignore: LoopAddr=0x%08x, SampLA=0x%08x\n", voice->LoopAddr, voice->CurAddr);
}
@ -680,6 +680,11 @@ int32 PS_SPU::UpdateFromCDC(int32 clocks)
//PSX_WARNING("[SPU] Voice %d CurPhase=%08x, pitch=%04x, CurAddr=%08x", voice_num, voice->CurPhase, voice->Pitch, voice->CurAddr);
if(voice->DecodePlayDelay)
{
voice->IgnoreSampLA = false;
}
//
// Decode new samples if necessary.
//
@ -767,7 +772,26 @@ int32 PS_SPU::UpdateFromCDC(int32 clocks)
{
if(voice->ADSR.Phase != ADSR_RELEASE)
{
ReleaseEnvelope(voice);
// TODO/FIXME:
// To fix all the missing notes in "Dragon Ball GT: Final Bout" music, !voice->DecodePlayDelay instead of
// voice->DecodePlayDelay < 3 is necessary, but that would cause the length of time for which the voice off is
// effectively ignored to be too long by about half a sample(rough test measurement). That, combined with current
// CPU and DMA emulation timing inaccuracies(execution generally too fast), creates a significant risk of regressions
// in other games, so be very conservative for now.
//
// Also, voice on should be ignored during the delay as well, but comprehensive tests are needed before implementing that
// due to some effects that appear to occur repeatedly during the delay on a PS1 but are currently only emulated as
// performed when the voice on is processed(e.g. curaddr = startaddr).
//
if(voice->DecodePlayDelay < 3)
{
if(voice->DecodePlayDelay)
PSX_DBG(PSX_DBG_WARNING, "[SPU] Voice %u off maybe should be ignored, but isn't due to current emulation code limitations; dpd=%u\n", voice_num, voice->DecodePlayDelay);
ReleaseEnvelope(voice);
}
else
PSX_DBG(PSX_DBG_WARNING, "[SPU] Voice %u off ignored.\n", voice_num);
}
}
@ -964,6 +988,11 @@ void PS_SPU::Write(pscpu_timestamp_t timestamp, uint32 A, uint16 V)
case 0x0E: voice->LoopAddr = (V << 2) & 0x3FFFF;
voice->IgnoreSampLA = true;
if(voice->DecodePlayDelay || (VoiceOn & (1U << (voice - Voices))))
{
PSX_WARNING("[SPU] Loop address for voice %u written during voice on delay.", (unsigned)(voice - Voices));
}
//if((voice - Voices) == 22)
//{
// SPUIRQ_DBG("Manual loop address setting for voice %d: %04x", (int)(voice - Voices), V);