Changed the FFX speedhack to also set all EE timed events to happen near instantly.

This is now a multi purpose hack, which could potentially fix / break a lot of games.
It mostly affects FMV and PATH3 masking issues, but also stops games from booting, or makes them boot.
Use with caution :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2965 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2010-05-07 22:10:36 +00:00
parent d6eeb6a438
commit 575a56dc5c
4 changed files with 13 additions and 32 deletions

View File

@ -20,38 +20,17 @@
#include "coroutine.h"
#include "IPU_Fifo.h"
// IPU_INLINE_IRQS
// Scheduling ints into the future is a purist approach to emulation, and
// is mostly cosmetic since the emulator itself performs all actions instantly
// (as far as the emulated CPU is concerned). In some cases this can actually
// cause more sync problems than it supposedly solves, due to accumulated
// delays incurred by the recompiler's low cycle update rate and also Pcsx2
// failing to properly handle pre-emptive DMA/IRQs or cpu exceptions.
// Uncomment the following line to enable inline IRQs for the IPU. Tests show
// that it doesn't have any effect on compatibility or audio/video sync, and it
// speeds up movie playback by some 6-8%. But it lacks the purist touch, so it's
// not enabled by default.
//#define IPU_INLINE_IRQS
#ifdef _MSC_VER
#pragma pack(1)
#endif
#define ipumsk( src ) ( (src) & 0xff )
#define ipucase( src ) case ipumsk(src)
#ifdef IPU_INLINE_IRQS
# define IPU_INT_TO( cycles ) ipu1Interrupt()
# define IPU_INT_FROM( cycles ) ipu0Interrupt()
# define IPU_FORCEINLINE
#else
# define IPU_INT_TO( cycles ) if(!(cpuRegs.interrupt & (1<<4))) CPU_INT( DMAC_TO_IPU, cycles )
# define IPU_INT_FROM( cycles ) CPU_INT( DMAC_FROM_IPU, cycles )
# define IPU_FORCEINLINE __forceinline
#endif
#define IPU_INT_TO( cycles ) if(!(cpuRegs.interrupt & (1<<4))) CPU_INT( DMAC_TO_IPU, cycles )
#define IPU_INT_FROM( cycles ) CPU_INT( DMAC_FROM_IPU, cycles )
#define IPU_FORCEINLINE __forceinline
struct IPUStatus {
bool InProgress;

View File

@ -305,10 +305,10 @@ static __forceinline void _cpuTestInterrupts()
if( cpuRegs.interrupt & 0xF19 ) // Bits 0 3 4 8 9 10 11 ( 111100011001 )
{
TESTINT(0, vif0Interrupt);
#ifndef IPU_INLINE_IRQS
TESTINT(3, ipu0Interrupt);
TESTINT(4, ipu1Interrupt);
#endif
TESTINT(8, SPRFROMinterrupt);
TESTINT(9, SPRTOinterrupt);
@ -550,9 +550,10 @@ __forceinline void CPU_INT( u32 n, s32 ecycle)
DevCon.Warning( "***** EE > Twice-thrown int on IRQ %d", n );
}
//if (ecycle > 8192 && n != DMAC_TO_IPU && n != DMAC_FROM_IPU) {
// DevCon.Warning( "EE cycles high: %d, n %d", ecycle, n );
//}
// Abusing the IPU hack to also fix EE events to happen 1 cycle in the future.
// This can be used on games with PATH3 masking issues for example, or when
// some FMV look bad.
if(CHECK_IPUWAITHACK) ecycle = 1;
cpuRegs.interrupt|= 1 << n;
cpuRegs.sCycle[n] = cpuRegs.cycle;

View File

@ -59,8 +59,8 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) :
wxEmptyString
},
{
_("IPU Wait Hack - Fix Ripping/Corrupted videos (FFX, Digital Devil Saga), Causes others to cut short"),
wxEmptyString
_("EE timing hack / FFX videos fix - Multi purpose hack. Try if all else fails."),
_("Known to affect following games:\n * Final Fantasy 10 (Fixes FMV)\n * Digital Devil Saga (Fixes FMV and crashes)\n * SSX (Fixes bad graphics and crashes)\n * Resident Evil: Dead Aim (Causes garbled textures)")
}
};

View File

@ -154,6 +154,7 @@ CRC::Game CRC::m_games[] =
{0x47B9B2FD, RadiataStories, US, 0},
{0xE8FCF8EC, SMTNocturne, US, ZWriteMustNotClear}, // saves/reloads z buffer around shadow drawing, same issue with all the SMT games following
{0xF0A31EE3, SMTNocturne, EU, ZWriteMustNotClear}, // SMTNocturne (Lucifers Call in EU)
{0xAE0DE7B7, SMTNocturne, EU, ZWriteMustNotClear}, // SMTNocturne (Lucifers Call in EU)
{0xD60DA6D4, SMTNocturne, JP, ZWriteMustNotClear}, // SMTNocturne
{0x0e762e8d, SMTNocturne, JP, ZWriteMustNotClear}, // SMTNocturne Maniacs
{0x47BA9034, SMTNocturne, JP, ZWriteMustNotClear}, // SMTNocturne Maniacs Chronicle