mirror of https://github.com/PCSX2/pcsx2.git
Attempted fix to get gust games and fatal frame working w/o a gamefix hack.
I was only able to test Ar Tonelico which worked with this fix, comment if this breaks fatal frame (or a gust game or anything else...) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2706 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
3f36d66116
commit
ef33b22114
|
@ -30,9 +30,10 @@ static __forceinline void DmaExec8( void (*func)(), u32 mem, u8 value )
|
|||
u32 qwcRegister = (mem | 0x20) & ~0x1; //Need to remove the lower bit else we end up clearing TADR
|
||||
|
||||
//It's invalid for the hardware to write a DMA while it is active, not without Suspending the DMAC
|
||||
if ((value & 0x1) && ((psHu8(mem) & 0x1) == 0x1) && dmacRegs->ctrl.DMAE)
|
||||
{
|
||||
DevCon.Warning( L"DMAExec8 Attempt to run DMA while one is already active in %s(%x)", ChcrName(mem), mem );
|
||||
if ((value & 0x1) && ((psHu8(mem) & 0x1) == 0x1) && dmacRegs->ctrl.DMAE) {
|
||||
DevCon.Warning(L"DMAExec8 Attempt to run DMA while one is already active in %s(%x)", ChcrName(mem), mem);
|
||||
func();
|
||||
return;
|
||||
}
|
||||
|
||||
// Upper 16bits of QWC should not be written since QWC is 16bits in size.
|
||||
|
@ -56,9 +57,10 @@ static __forceinline void DmaExec16( void (*func)(), u32 mem, u16 value )
|
|||
tDMA_CHCR chcr(value);
|
||||
|
||||
//It's invalid for the hardware to write a DMA while it is active, not without Suspending the DMAC
|
||||
if (chcr.STR && reg->chcr.STR && dmacRegs->ctrl.DMAE)
|
||||
{
|
||||
DevCon.Warning( L"DMAExec16 Attempt to run DMA while one is already active in %s(%x)", ChcrName(mem), mem );
|
||||
if (chcr.STR && reg->chcr.STR && dmacRegs->ctrl.DMAE) {
|
||||
DevCon.Warning(L"DMAExec16 Attempt to run DMA while one is already active in %s(%x)", ChcrName(mem), mem );
|
||||
func();
|
||||
return;
|
||||
}
|
||||
|
||||
// Note: pad is the padding right above qwc, so we're testing whether qwc
|
||||
|
@ -84,13 +86,12 @@ static void DmaExec( void (*func)(), u32 mem, u32 value )
|
|||
tDMA_CHCR chcr(value);
|
||||
|
||||
//It's invalid for the hardware to write a DMA while it is active, not without Suspending the DMAC
|
||||
if (chcr.STR && reg->chcr.STR && dmacRegs->ctrl.DMAE)
|
||||
{
|
||||
DevCon.Warning( L"DMAExec32 Attempt to run DMA while one is already active in %s(%x)", ChcrName(mem), mem );
|
||||
//DevCon.Warning( L"DMAExec32: chcr value = 0x%x", value);
|
||||
// Returning here breaks every single Gust game written. :(
|
||||
// Not returning here breaks Fatal Frame. Gamefix time.
|
||||
if (CHECK_DMAEXECHACK) return;
|
||||
if (chcr.STR && reg->chcr.STR && dmacRegs->ctrl.DMAE) {
|
||||
DevCon.Warning(L"DMAExec32 Attempt to run DMA while one is already active in %s(%x)", ChcrName(mem), mem);
|
||||
// When DMA is active only STR field is writable, so we just
|
||||
// call the dma transfer function w/o modifying CHCR contents...
|
||||
func();
|
||||
return; // Test with Gust games and fatal frame
|
||||
}
|
||||
|
||||
// Note: pad is the padding right above qwc, so we're testing whether qwc
|
||||
|
|
|
@ -249,11 +249,7 @@ _mVUt _f void* mVUsearchProg(u32 startPC, uptr pState) {
|
|||
microProgramQuick& quick = mVU->prog.quick[startPC/8];
|
||||
microProgramList& list = mVU->prog.prog [startPC/8];
|
||||
if(!quick.prog) { // If null, we need to search for new program
|
||||
#ifdef __LINUX__
|
||||
deque<microProgram*>::iterator it = list.list->begin();
|
||||
#else
|
||||
deque<microProgram*>::const_iterator it = list.list->begin();
|
||||
#endif
|
||||
for ( ; it != list.list->end(); it++) {
|
||||
if (mVUcmpProg<vuIndex>(*it[0], 0)) {
|
||||
quick.block = it[0]->block[startPC/8];
|
||||
|
|
Loading…
Reference in New Issue