-updated DML and GC video patch

(fixes problems with PAL games)
This commit is contained in:
fix94.1 2012-02-21 17:01:57 +00:00
parent af423ce6ad
commit 13c5a0e906

View File

@ -46,19 +46,25 @@ void set_video_mode(int i)
if (i == VIDEO_MODE_NTSC)
{
rmode = &TVNtsc480IntDf;
sram->flags = sram->flags & ~(1 << 0); // Clear bit 0 to set the video mode to NTSC
sram->flags &= 0xFE; // Clear bit 0 to set the video mode to NTSC
//sram->flags |= 0x80; //set progressive flag
sram->ntd &= 0xBF; //clear pal60 flag
}
else
{
rmode = &TVPal528IntDf;
sram->flags = sram->flags | (1 << 0); // Set bit 0 to set the video mode to PAL
sram->flags |= 0x01; // Set bit 0 to set the video mode to PAL
sram->flags &= 0x7F; //clear progressive flag
sram->ntd |= 0x40; //set pal60 flag
}
__SYS_UnlockSram(1); // 1 -> write changes
while(!__SYS_SyncSram());
/* Set video mode to PAL or NTSC */
*(u32*)0x800000CC = i;
*(vu32*)0x800000CC = i;
DCFlushRange((void *)(0x800000CC), 1);
ICInvalidateRange((void *)(0x800000CC), 1);
VIDEO_Configure(rmode);
m_frameBuf = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));