GS: Fix CSR.FIELD for progressive mode

This commit is contained in:
refractionpcsx2 2022-05-29 02:45:59 +01:00
parent 98947c10bb
commit 7717450044
2 changed files with 15 additions and 1 deletions

View File

@ -73,6 +73,11 @@ static bool IsInterlacedVideoMode()
return (gsVideoMode == GS_VideoMode::PAL || gsVideoMode == GS_VideoMode::NTSC || gsVideoMode == GS_VideoMode::DVD_NTSC || gsVideoMode == GS_VideoMode::DVD_PAL || gsVideoMode == GS_VideoMode::HDTV_1080I); return (gsVideoMode == GS_VideoMode::PAL || gsVideoMode == GS_VideoMode::NTSC || gsVideoMode == GS_VideoMode::DVD_NTSC || gsVideoMode == GS_VideoMode::DVD_PAL || gsVideoMode == GS_VideoMode::HDTV_1080I);
} }
static bool IsProgressiveVideoMode()
{
return (gsVideoMode == GS_VideoMode::VESA || gsVideoMode == GS_VideoMode::SDTV_480P || gsVideoMode == GS_VideoMode::SDTV_576P || gsVideoMode == GS_VideoMode::HDTV_720P || gsVideoMode == GS_VideoMode::HDTV_1080P);
}
void rcntReset(int index) { void rcntReset(int index) {
counters[index].count = 0; counters[index].count = 0;
counters[index].sCycleT = cpuRegs.cycle; counters[index].sCycleT = cpuRegs.cycle;
@ -604,7 +609,11 @@ static __fi void VSyncStart(u32 sCycle)
static __fi void GSVSync() static __fi void GSVSync()
{ {
// CSR is swapped and GS vBlank IRQ is triggered roughly 3.5 hblanks after VSync Start // CSR is swapped and GS vBlank IRQ is triggered roughly 3.5 hblanks after VSync Start
CSRreg.SwapField();
if (IsProgressiveVideoMode())
CSRreg.SetField();
else
CSRreg.SwapField();
if (!CSRreg.VSINT) if (!CSRreg.VSINT)
{ {

View File

@ -145,6 +145,11 @@ union tGS_CSR
_u32 ^= 0x2000; _u32 ^= 0x2000;
} }
void SetField()
{
_u32 |= 0x2000;
}
void Reset() void Reset()
{ {
_u64 = 0; _u64 = 0;