allow invalid VRAM access (fixes some homebrew games), menu disabled when loading a game, video mode changes

This commit is contained in:
dborth 2009-04-21 21:48:22 +00:00
parent 3655de118c
commit 958e159845
4 changed files with 9 additions and 16 deletions

View File

@ -190,10 +190,6 @@ bool MountFAT(int method)
mounted = false; mounted = false;
else if(!fatMountSimple(name, disc)) else if(!fatMountSimple(name, disc))
mounted = false; mounted = false;
#ifdef HW_RVL
else
fatSetReadAhead(rootdir, 6, 64);
#endif
} }
isMounted[method] = mounted; isMounted[method] = mounted;

View File

@ -400,6 +400,7 @@ ProgressWindow(char *title, char *msg)
return; return;
HaltGui(); HaltGui();
int oldState = mainWindow->GetState();
mainWindow->SetState(STATE_DISABLED); mainWindow->SetState(STATE_DISABLED);
mainWindow->Append(&promptWindow); mainWindow->Append(&promptWindow);
mainWindow->ChangeFocus(&promptWindow); mainWindow->ChangeFocus(&promptWindow);
@ -431,7 +432,7 @@ ProgressWindow(char *title, char *msg)
HaltGui(); HaltGui();
mainWindow->Remove(&promptWindow); mainWindow->Remove(&promptWindow);
mainWindow->SetState(STATE_DEFAULT); mainWindow->SetState(oldState);
ResumeGui(); ResumeGui();
} }
@ -1009,7 +1010,8 @@ static int MenuGameSelection()
mainWindow->SetState(STATE_DISABLED); mainWindow->SetState(STATE_DISABLED);
if(BrowserLoadFile(GCSettings.LoadMethod)) if(BrowserLoadFile(GCSettings.LoadMethod))
menu = MENU_EXIT; menu = MENU_EXIT;
mainWindow->SetState(STATE_DEFAULT); else
mainWindow->SetState(STATE_DEFAULT);
} }
} }
} }

View File

@ -106,7 +106,7 @@ DefaultSettings ()
Settings.ShutdownMaster = true; // needs to be on for ActRaiser 2 Settings.ShutdownMaster = true; // needs to be on for ActRaiser 2
Settings.ApplyCheats = true; Settings.ApplyCheats = true;
Settings.BlockInvalidVRAMAccess = true; Settings.BlockInvalidVRAMAccess = false;
Settings.HDMATimingHack = 100; Settings.HDMATimingHack = 100;
// Sound defaults. On GC this is 32Khz/16bit/Stereo/InterpolatedSound // Sound defaults. On GC this is 32Khz/16bit/Stereo/InterpolatedSound

View File

@ -516,14 +516,9 @@ InitGCVideo ()
{ {
case VI_PAL: case VI_PAL:
// 576 lines (PAL 50Hz) // 576 lines (PAL 50Hz)
// display should be centered vertically (borders)
vmode = &TVPal574IntDfScale;
vmode->xfbHeight = 480;
vmode->viYOrigin = (VI_MAX_HEIGHT_PAL - 480)/2;
vmode->viHeight = 480;
vmode_60hz = 0; vmode_60hz = 0;
// Original Video modes (forced to PAL 50hz) // Original Video modes (forced to PAL 50Hz)
// set video signal mode // set video signal mode
TV_224p.viTVMode = VI_TVMODE_PAL_DS; TV_224p.viTVMode = VI_TVMODE_PAL_DS;
TV_448i.viTVMode = VI_TVMODE_PAL_INT; TV_448i.viTVMode = VI_TVMODE_PAL_INT;
@ -533,7 +528,7 @@ InitGCVideo ()
break; break;
case VI_NTSC: case VI_NTSC:
// 480 lines (NTSC 60hz) // 480 lines (NTSC 60Hz)
vmode_60hz = 1; vmode_60hz = 1;
// Original Video modes (forced to NTSC 60hz) // Original Video modes (forced to NTSC 60hz)
@ -591,7 +586,7 @@ InitGCVideo ()
VIDEO_Configure (vmode); VIDEO_Configure (vmode);
screenheight = 480; screenheight = 480;
screenwidth = vmode->fbWidth; screenwidth = 640;
// Allocate the video buffers // Allocate the video buffers
xfb[0] = (u32 *) MEM_K0_TO_K1 (SYS_AllocateFramebuffer (vmode)); xfb[0] = (u32 *) MEM_K0_TO_K1 (SYS_AllocateFramebuffer (vmode));
@ -696,7 +691,7 @@ ResetVideo_Emu ()
GX_SetZMode (GX_TRUE, GX_LEQUAL, GX_TRUE); GX_SetZMode (GX_TRUE, GX_LEQUAL, GX_TRUE);
GX_SetColorUpdate (GX_TRUE); GX_SetColorUpdate (GX_TRUE);
guOrtho(p, 480/2, -(480/2), -(640/2), 640/2, 100, 1000); // matrix, t, b, l, r, n, f guOrtho(p, rmode->efbHeight/2, -(rmode->efbHeight/2), -(rmode->fbWidth/2), rmode->fbWidth/2, 100, 1000); // matrix, t, b, l, r, n, f
GX_LoadProjectionMtx (p, GX_ORTHOGRAPHIC); GX_LoadProjectionMtx (p, GX_ORTHOGRAPHIC);
draw_init (); draw_init ();