mirror of https://github.com/PCSX2/pcsx2.git
dmac: limit address to the scratch pad memory
Help dma tests
This commit is contained in:
parent
c037686a26
commit
c959424957
|
@ -374,13 +374,27 @@ __fi bool dmacWrite32( u32 mem, mem32_t& value )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
icase(fromSPR_SADR)
|
||||||
|
{
|
||||||
|
// Address must be QW aligned and fit in the 16K range of SPR
|
||||||
|
psHu32(mem) = value & 0x3FF0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
icase(toSPR_SADR)
|
||||||
|
{
|
||||||
|
// Address must be QW aligned and fit in the 16K range of SPR
|
||||||
|
psHu32(mem) = value & 0x3FF0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
icase(D9_CHCR) // dma9 - toSPR
|
icase(D9_CHCR) // dma9 - toSPR
|
||||||
{
|
{
|
||||||
DMA_LOG("SPR1dma EXECUTE (toSPR), value=0x%x", value);
|
DMA_LOG("SPR1dma EXECUTE (toSPR), value=0x%x", value);
|
||||||
DmaExec(dmaSPR1, mem, value);
|
DmaExec(dmaSPR1, mem, value);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
icase(DMAC_CTRL)
|
icase(DMAC_CTRL)
|
||||||
{
|
{
|
||||||
u32 oldvalue = psHu32(mem);
|
u32 oldvalue = psHu32(mem);
|
||||||
|
@ -420,6 +434,7 @@ __fi bool dmacWrite32( u32 mem, mem32_t& value )
|
||||||
cpuTestDMACInts();
|
cpuTestDMACInts();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
icase(DMAC_STAT)
|
icase(DMAC_STAT)
|
||||||
{
|
{
|
||||||
HW_LOG("DMAC_STAT Write 32bit %x", value);
|
HW_LOG("DMAC_STAT Write 32bit %x", value);
|
||||||
|
@ -451,8 +466,8 @@ __fi bool dmacWrite32( u32 mem, mem32_t& value )
|
||||||
// DMA Writes are invalid to everything except the STR on CHCR when it is busy
|
// DMA Writes are invalid to everything except the STR on CHCR when it is busy
|
||||||
// There's timing problems with many games. Gamefix time!
|
// There's timing problems with many games. Gamefix time!
|
||||||
if( CHECK_DMABUSYHACK && (mem & 0xf0) )
|
if( CHECK_DMABUSYHACK && (mem & 0xf0) )
|
||||||
{
|
{
|
||||||
if((psHu32(mem & ~0xff) & 0x100) && dmacRegs.ctrl.DMAE && !psHu8(DMAC_ENABLER+2))
|
if((psHu32(mem & ~0xff) & 0x100) && dmacRegs.ctrl.DMAE && !psHu8(DMAC_ENABLER+2))
|
||||||
{
|
{
|
||||||
DevCon.Warning("Gamefix: Write to DMA addr %x while STR is busy! Ignoring", mem);
|
DevCon.Warning("Gamefix: Write to DMA addr %x while STR is busy! Ignoring", mem);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue