From 13c5a0e90620d28ab1dc9788cf796a68e47f5427 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Tue, 21 Feb 2012 17:01:57 +0000 Subject: [PATCH] -updated DML and GC video patch (fixes problems with PAL games) --- source/gc/gc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/gc/gc.c b/source/gc/gc.c index 9db78fa0..d79d7311 100644 --- a/source/gc/gc.c +++ b/source/gc/gc.c @@ -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));