mirror of https://github.com/PCSX2/pcsx2.git
A few dmacReg & gifReg changes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1870 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
ca8437dd0a
commit
2d6d370cf6
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
<CodeBlocks_workspace_file>
|
<CodeBlocks_workspace_file>
|
||||||
<Workspace title="pcsx2_suite_2008 workspace">
|
<Workspace title="pcsx2_suite_2008 workspace">
|
||||||
<Project filename="pcsx2/Linux/pcsx2.cbp">
|
<Project filename="pcsx2/Linux/pcsx2.cbp" active="1">
|
||||||
<Depends filename="common/build/x86emitter/x86emitter.cbp" />
|
<Depends filename="common/build/x86emitter/x86emitter.cbp" />
|
||||||
<Depends filename="common/build/Utilities/Utilities.cbp" />
|
<Depends filename="common/build/Utilities/Utilities.cbp" />
|
||||||
<Depends filename="3rdparty/zlib/zlib.cbp" />
|
<Depends filename="3rdparty/zlib/zlib.cbp" />
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<Project filename="plugins/onepad/Linux/OnePad.cbp" />
|
<Project filename="plugins/onepad/Linux/OnePad.cbp" />
|
||||||
<Project filename="plugins/zerogs/opengl/Linux/ZeroGS.cbp" />
|
<Project filename="plugins/zerogs/opengl/Linux/ZeroGS.cbp" />
|
||||||
<Project filename="tools/bin2cpp/bin2cpp.cbp" />
|
<Project filename="tools/bin2cpp/bin2cpp.cbp" />
|
||||||
<Project filename="plugins/spu2-x/src/Linux/SPU2-X.cbp" active="1">
|
<Project filename="plugins/spu2-x/src/Linux/SPU2-X.cbp">
|
||||||
<Depends filename="3rdparty/SoundTouch/SoundTouch.cbp" />
|
<Depends filename="3rdparty/SoundTouch/SoundTouch.cbp" />
|
||||||
</Project>
|
</Project>
|
||||||
<Project filename="plugins/zerospu2/Linux/ZeroSPU2.cbp">
|
<Project filename="plugins/zerospu2/Linux/ZeroSPU2.cbp">
|
||||||
|
|
|
@ -65,7 +65,7 @@ __forceinline void gsInterrupt()
|
||||||
if (Path3progress != IMAGE_MODE) vif1Regs->stat &= ~VIF1_STAT_VGW;
|
if (Path3progress != IMAGE_MODE) vif1Regs->stat &= ~VIF1_STAT_VGW;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Path3progress == STOPPED_MODE) psHu32(GIF_STAT) &= ~(GIF_STAT_APATH3 | GIF_STAT_OPH); // OPH=0 | APATH=0
|
if (Path3progress == STOPPED_MODE) gifRegs->stat._u32 &= ~(GIF_STAT_APATH3 | GIF_STAT_OPH); // OPH=0 | APATH=0
|
||||||
|
|
||||||
if ((gif->qwc > 0) || (gspath3done == 0))
|
if ((gif->qwc > 0) || (gspath3done == 0))
|
||||||
{
|
{
|
||||||
|
@ -119,7 +119,7 @@ int _GIFchain()
|
||||||
gsGIFSoftReset(4);
|
gsGIFSoftReset(4);
|
||||||
|
|
||||||
//must increment madr and clear qwc, else it loops
|
//must increment madr and clear qwc, else it loops
|
||||||
gif->madr+= gif->qwc*16;
|
gif->madr += gif->qwc * 16;
|
||||||
gif->qwc = 0;
|
gif->qwc = 0;
|
||||||
Console::Notice( "Hackfix - NULL GIFchain" );
|
Console::Notice( "Hackfix - NULL GIFchain" );
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -151,12 +151,11 @@ static __forceinline bool ReadTag(u32* &ptag, u32 &id)
|
||||||
{
|
{
|
||||||
ptag = (u32*)dmaGetAddr(gif->tadr); //Set memory pointer to TADR
|
ptag = (u32*)dmaGetAddr(gif->tadr); //Set memory pointer to TADR
|
||||||
|
|
||||||
// If this messes things up, uncommenting the "Safe" will set it back to the way it was.
|
if (!(Tag::Transfer("Gif", gif, ptag))) return false;
|
||||||
if (!(Tag::/*Safe*/Transfer("Gif", gif, ptag))) return false;
|
|
||||||
gif->madr = ptag[1]; //MADR = ADDR field
|
gif->madr = ptag[1]; //MADR = ADDR field
|
||||||
|
|
||||||
id = Tag::Id(ptag); //ID for DmaChain copied from bit 28 of the tag
|
id = Tag::Id(ptag); //ID for DmaChain copied from bit 28 of the tag
|
||||||
gscycles+=2; // Add 1 cycles from the QW read for the tag
|
gscycles += 2; // Add 1 cycles from the QW read for the tag
|
||||||
|
|
||||||
gspath3done = hwDmacSrcChainWithStack(gif, id);
|
gspath3done = hwDmacSrcChainWithStack(gif, id);
|
||||||
return true;
|
return true;
|
||||||
|
@ -201,7 +200,8 @@ void GIFdma()
|
||||||
}
|
}
|
||||||
|
|
||||||
clearFIFOstuff(true);
|
clearFIFOstuff(true);
|
||||||
psHu32(GIF_STAT) |= 0x10000000; // FQC=31, hack ;) [ used to be 0xE00; // OPH=1 | APATH=3]
|
gifRegs->stat.FQC |= 0x10;// FQC=31, hack ;) (for values of 31 that equal 16) [ used to be 0xE00; // OPH=1 | APATH=3]
|
||||||
|
//psHu32(GIF_STAT) |= 0x10000000;
|
||||||
|
|
||||||
//Path2 gets priority in intermittent mode
|
//Path2 gets priority in intermittent mode
|
||||||
if ((gifRegs->stat.P1Q || (vif1.cmd & 0x7f) == 0x50) && gifRegs->mode.IMT && (Path3progress == IMAGE_MODE))
|
if ((gifRegs->stat.P1Q || (vif1.cmd & 0x7f) == 0x50) && gifRegs->mode.IMT && (Path3progress == IMAGE_MODE))
|
||||||
|
@ -308,7 +308,9 @@ void dmaGIF()
|
||||||
Path3progress = STOPPED_MODE;
|
Path3progress = STOPPED_MODE;
|
||||||
gspath3done = 0; // For some reason this doesn't clear? So when the system starts the thread, we will clear it :)
|
gspath3done = 0; // For some reason this doesn't clear? So when the system starts the thread, we will clear it :)
|
||||||
psHu32(GIF_STAT) |= GIF_STAT_P3Q;
|
psHu32(GIF_STAT) |= GIF_STAT_P3Q;
|
||||||
psHu32(GIF_STAT) |= 0x10000000; // FQC=31, hack ;) [used to be 0xE00; // OPH=1 | APATH=3]
|
gifRegs->stat.P3Q = 1;
|
||||||
|
gifRegs->stat.FQC |= 0x10;// FQC=31, hack ;) ( 31? 16! arcum42) [used to be 0xE00; // OPH=1 | APATH=3]
|
||||||
|
//psHu32(GIF_STAT) |= 0x10000000;
|
||||||
clearFIFOstuff(true);
|
clearFIFOstuff(true);
|
||||||
|
|
||||||
if (dmacRegs->ctrl.MFD == MFD_GIF) // GIF MFIFO
|
if (dmacRegs->ctrl.MFD == MFD_GIF) // GIF MFIFO
|
||||||
|
|
|
@ -168,6 +168,7 @@
|
||||||
<Unit filename="../GS.h" />
|
<Unit filename="../GS.h" />
|
||||||
<Unit filename="../GSState.cpp" />
|
<Unit filename="../GSState.cpp" />
|
||||||
<Unit filename="../Gif.cpp" />
|
<Unit filename="../Gif.cpp" />
|
||||||
|
<Unit filename="../Gif.h" />
|
||||||
<Unit filename="../HostGui.h" />
|
<Unit filename="../HostGui.h" />
|
||||||
<Unit filename="../Hw.cpp" />
|
<Unit filename="../Hw.cpp" />
|
||||||
<Unit filename="../Hw.h" />
|
<Unit filename="../Hw.h" />
|
||||||
|
|
|
@ -137,7 +137,7 @@ void _SPR0interleave()
|
||||||
|
|
||||||
static __forceinline void _dmaSPR0()
|
static __forceinline void _dmaSPR0()
|
||||||
{
|
{
|
||||||
if (dmacRegs->ctrl.STS == STS_fromSPR) // STS == fromSPR
|
if (dmacRegs->ctrl.STS == STS_fromSPR)
|
||||||
{
|
{
|
||||||
Console::WriteLn("SPR0 stall %d", (psHu32(DMAC_CTRL) >> 6)&3);
|
Console::WriteLn("SPR0 stall %d", (psHu32(DMAC_CTRL) >> 6)&3);
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ static __forceinline void _dmaSPR0()
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case TAG_CNTS: // CNTS - Transfer QWC following the tag (Stall Control)
|
case TAG_CNTS: // CNTS - Transfer QWC following the tag (Stall Control)
|
||||||
if ((psHu32(DMAC_CTRL) & 0x30) == 0x20) psHu32(DMAC_STADR) = spr0->madr + (spr0->qwc * 16); //Copy MADR to DMAC_STADR stall addr register
|
if (dmacRegs->ctrl.STS == STS_fromSPR) psHu32(DMAC_STADR) = spr0->madr + (spr0->qwc * 16); //Copy MADR to DMAC_STADR stall addr register
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAG_CNT: // CNT - Transfer QWC following the tag.
|
case TAG_CNT: // CNT - Transfer QWC following the tag.
|
||||||
|
@ -444,4 +444,4 @@ void SaveStateBase::sprFreeze()
|
||||||
Freeze(spr0finished);
|
Freeze(spr0finished);
|
||||||
Freeze(spr1finished);
|
Freeze(spr1finished);
|
||||||
Freeze(mfifotransferred);
|
Freeze(mfifotransferred);
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,7 @@ __forceinline void SIF0Dma()
|
||||||
if (eesifbusy[0] == 1) // If EE SIF enabled and there's something to transfer
|
if (eesifbusy[0] == 1) // If EE SIF enabled and there's something to transfer
|
||||||
{
|
{
|
||||||
int size = sif0dma->qwc;
|
int size = sif0dma->qwc;
|
||||||
if ((psHu32(DMAC_CTRL) & 0x30) == 0x10) // STS == fromSIF0
|
if (dmacRegs->ctrl.STS == STS_SIF0) // STS == fromSIF0
|
||||||
{
|
{
|
||||||
SIF_LOG("SIF0 stall control");
|
SIF_LOG("SIF0 stall control");
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ __forceinline void SIF0Dma()
|
||||||
SIF_LOG(" EE SIF dest chain tag madr:%08X qwc:%04X id:%X irq:%d(%08X_%08X)", sif0dma->madr, sif0dma->qwc, (tag[0] >> 28)&3, (tag[0] >> 31)&1, tag[1], tag[0]);
|
SIF_LOG(" EE SIF dest chain tag madr:%08X qwc:%04X id:%X irq:%d(%08X_%08X)", sif0dma->madr, sif0dma->qwc, (tag[0] >> 28)&3, (tag[0] >> 31)&1, tag[1], tag[0]);
|
||||||
|
|
||||||
// (tag[0] >> 28) & 3? Surely this is supposed to be (tag[0] >> 28) & 7? --arcum42
|
// (tag[0] >> 28) & 3? Surely this is supposed to be (tag[0] >> 28) & 7? --arcum42
|
||||||
if ((psHu32(DMAC_CTRL) & 0x30) != 0 && ((tag[0] >> 28) & 3) == 0)
|
if ((dmacRegs->ctrl.STS != NO_STS) && ((tag[0] >> 28) & 3) == 0)
|
||||||
psHu32(DMAC_STADR) = sif0dma->madr + (sif0dma->qwc * 16);
|
psHu32(DMAC_STADR) = sif0dma->madr + (sif0dma->qwc * 16);
|
||||||
sif0.chain = 1;
|
sif0.chain = 1;
|
||||||
if (tag[0] & 0x40000000) sif0.end = 1;
|
if (tag[0] & 0x40000000) sif0.end = 1;
|
||||||
|
@ -266,8 +266,8 @@ __forceinline void SIF1Dma()
|
||||||
if (eesifbusy[1] == 1) // If EE SIF1 is enabled
|
if (eesifbusy[1] == 1) // If EE SIF1 is enabled
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((psHu32(DMAC_CTRL) & 0xC0) == 0xC0)
|
if (dmacRegs->ctrl.STD == STD_SIF1)
|
||||||
SIF_LOG("SIF1 stall control"); // STS == fromSIF1
|
SIF_LOG("SIF1 stall control"); // STD == fromSIF1
|
||||||
|
|
||||||
if (sif1dma->qwc == 0) // If there's no more to transfer
|
if (sif1dma->qwc == 0) // If there's no more to transfer
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,8 +26,6 @@ StartupParams g_Startup;
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Save Slot Detection System
|
// Save Slot Detection System
|
||||||
|
|
||||||
static int Slots[5] = { -1, -1, -1, -1, -1 };
|
|
||||||
|
|
||||||
bool States_isSlotUsed(int num)
|
bool States_isSlotUsed(int num)
|
||||||
{
|
{
|
||||||
if (ElfCRC == 0)
|
if (ElfCRC == 0)
|
||||||
|
|
Loading…
Reference in New Issue