SPU: block reads from ARM7 BIOS region. fixes #1267 (and prolly whatever other stupid game tries to play sound from NULL)
This commit is contained in:
parent
c04e43702c
commit
44757a8323
|
@ -2516,7 +2516,7 @@ u32 ARM7Read32(u32 addr)
|
|||
(GBACart::SRAMRead(addr+3) << 24);
|
||||
}
|
||||
|
||||
printf("unknown arm7 read32 %08X | %08X\n", addr, ARM7->R[15]);
|
||||
//printf("unknown arm7 read32 %08X | %08X\n", addr, ARM7->R[15]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
24
src/SPU.cpp
24
src/SPU.cpp
|
@ -285,12 +285,26 @@ void Channel::FIFO_BufferData()
|
|||
if ((FIFOReadOffset + 16) > totallen)
|
||||
burstlen = totallen - FIFOReadOffset;
|
||||
|
||||
for (u32 i = 0; i < burstlen; i += 4)
|
||||
// sound DMA can't read from the ARM7 BIOS
|
||||
if ((SrcAddr + FIFOReadOffset) >= 0x00004000)
|
||||
{
|
||||
FIFO[FIFOWritePos] = BusRead32(SrcAddr + FIFOReadOffset);
|
||||
FIFOReadOffset += 4;
|
||||
FIFOWritePos++;
|
||||
FIFOWritePos &= 0x7;
|
||||
for (u32 i = 0; i < burstlen; i += 4)
|
||||
{
|
||||
FIFO[FIFOWritePos] = BusRead32(SrcAddr + FIFOReadOffset);
|
||||
FIFOReadOffset += 4;
|
||||
FIFOWritePos++;
|
||||
FIFOWritePos &= 0x7;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (u32 i = 0; i < burstlen; i += 4)
|
||||
{
|
||||
FIFO[FIFOWritePos] = 0;
|
||||
FIFOReadOffset += 4;
|
||||
FIFOWritePos++;
|
||||
FIFOWritePos &= 0x7;
|
||||
}
|
||||
}
|
||||
|
||||
FIFOLevel += burstlen;
|
||||
|
|
Loading…
Reference in New Issue