Mother 3 fix, refined to not break Metroid Fusion or hopefully anything else
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1225 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
c276ccd7ce
commit
a4c133210f
|
@ -183,11 +183,15 @@ void Gba_Pcm_Fifo::timer_overflowed( int which_timer )
|
|||
{
|
||||
if ( which_timer == timer && enabled )
|
||||
{
|
||||
if ( count <= 16 )
|
||||
/* Mother 3 fix, refined to not break Metroid Fusion */
|
||||
if ( count == 16 || count == 0 )
|
||||
{
|
||||
// Need to fill FIFO
|
||||
int saved_count = count;
|
||||
CPUCheckDMA( 3, which ? 4 : 2 );
|
||||
if ( count == 0 ) // Fixes Mother 3
|
||||
if ( saved_count == 0 && count == 16 )
|
||||
CPUCheckDMA( 3, which ? 4 : 2 );
|
||||
if ( count == 0 )
|
||||
{
|
||||
// Not filled by DMA, so fill with 16 bytes of silence
|
||||
int reg = which ? FIFOB_L : FIFOA_L;
|
||||
|
|
Loading…
Reference in New Issue