summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-12-11 17:54:31 +0000
committerSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-12-11 17:54:31 +0000
commitd58b2a17cdc6e3f6ad3691bb59bd999a0b449f15 (patch)
treee6bb9ec1dcb05672095c7745292f8b7f79491083
parent2975b7e2847b0197f164a3d05233546ae15c8785 (diff)
downloadpcsxr-d58b2a17cdc6e3f6ad3691bb59bd999a0b449f15.tar.gz
wndmain.c, lnxmain.c, gtk2gui.c, emuthread.m
- Patch 7713 - (dario86) Detect PAL demos (SCED) - (dario86) Fix PAL auto-detection with root counter init git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@61080 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--gui/Gtk2Gui.c27
-rw-r--r--gui/LnxMain.c4
-rw-r--r--macosx/EmuThread.m7
-rw-r--r--win32/gui/WndMain.c25
4 files changed, 42 insertions, 21 deletions
diff --git a/gui/Gtk2Gui.c b/gui/Gtk2Gui.c
index 674d1ba4..059598bd 100644
--- a/gui/Gtk2Gui.c
+++ b/gui/Gtk2Gui.c
@@ -467,6 +467,7 @@ void OnFile_RunExe() {
g_free(file);
SysRunGui();
} else {
+ // Auto-detect: get region first, then rcnt-bios reset
SysReset();
if (Load(file) == 0) {
@@ -501,8 +502,6 @@ void OnFile_RunCd() {
return;
}
- SysReset();
-
if (CheckCdrom() == -1) {
/* Only check the CD if we are starting the console with a CD */
ClosePlugins();
@@ -511,6 +510,9 @@ void OnFile_RunCd() {
return;
}
+ // Auto-detect: get region first, then rcnt-bios reset
+ SysReset();
+
// Read main executable directly from CDRom and start it
if (LoadCdrom() == -1) {
ClosePlugins();
@@ -641,8 +643,6 @@ void OnFile_RunImage() {
return;
}
- SysReset();
-
if (CheckCdrom() == -1) {
// Only check the CD if we are starting the console with a CD
ClosePlugins();
@@ -651,6 +651,9 @@ void OnFile_RunImage() {
return;
}
+ // Auto-detect: get region first, then rcnt-bios reset
+ SysReset();
+
// Read main executable directly from CDRom and start it
if (LoadCdrom() == -1) {
ClosePlugins();
@@ -691,12 +694,13 @@ void OnEmu_Reset() {
return;
}
- SysReset();
-
if (CheckCdrom() != -1) {
LoadCdrom();
}
+ // Auto-detect: get region first, then rcnt-bios reset
+ SysReset();
+
psxCpu->Execute();
}
@@ -795,18 +799,17 @@ void state_load(gchar *state_filename) {
ret = CheckState(state_filename);
if (ret == 0) {
- SysReset();
- ret = LoadState(state_filename);
- }
-
- if (ret == 0) {
// Check the CD-ROM is valid
if (CheckCdrom() == -1) {
ClosePlugins();
SysRunGui();
return;
}
-
+
+ // Auto-detect: region first, then rcnt reset
+ SysReset();
+ ret = LoadState(state_filename);
+
sprintf(Text, _("Loaded state %s."), state_filename);
GPU_displayText(Text);
} else {
diff --git a/gui/LnxMain.c b/gui/LnxMain.c
index f64939b4..36f15464 100644
--- a/gui/LnxMain.c
+++ b/gui/LnxMain.c
@@ -424,9 +424,11 @@ int main(int argc, char *argv[]) {
return 1;
}
- SysReset();
CheckCdrom();
+ // Auto-detect: get region first, then rcnt-bios reset
+ SysReset();
+
if (file[0] != '\0') {
Load(file);
} else {
diff --git a/macosx/EmuThread.m b/macosx/EmuThread.m
index 941d77da..dfcf6141 100644
--- a/macosx/EmuThread.m
+++ b/macosx/EmuThread.m
@@ -56,15 +56,16 @@ static pthread_mutex_t eventMutex;
setjmp(restartJmp);
- EmuReset();
-
int res = CheckCdrom();
if (res == -1) {
ClosePlugins();
SysMessage(_("Could not check CD-ROM!\n"));
goto done;
}
-
+
+ // Auto-detect: region first, then rcnt reset
+ EmuReset();
+
LoadCdrom();
if (defrostPath) {
diff --git a/win32/gui/WndMain.c b/win32/gui/WndMain.c
index ac2e25f5..90f7fcb4 100644
--- a/win32/gui/WndMain.c
+++ b/win32/gui/WndMain.c
@@ -455,13 +455,16 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
RestoreWindow();
return TRUE;
}
- SysReset();
if (CheckCdrom() == -1) {
ClosePlugins();
RestoreWindow();
SysMessage(_("The CD does not appear to be a valid Playstation CD"));
return TRUE;
}
+
+ // Auto-detect: region first, then rcnt reset
+ SysReset();
+
if (LoadCdrom() == -1) {
ClosePlugins();
RestoreWindow();
@@ -504,13 +507,16 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
RestoreWindow();
return TRUE;
}
- SysReset();
if (CheckCdrom() == -1) {
ClosePlugins();
RestoreWindow();
SysMessage(_("The CD does not appear to be a valid Playstation CD"));
return TRUE;
}
+
+ // Auto-detect: region first, then rcnt reset
+ SysReset();
+
if (LoadCdrom() == -1) {
ClosePlugins();
RestoreWindow();
@@ -532,8 +538,11 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
RestoreWindow();
return TRUE;
}
- SysReset();
CheckCdrom();
+
+ // Auto-detect: region first, then rcnt reset
+ SysReset();
+
Load(File);
Running = 1;
psxCpu->Execute();
@@ -569,13 +578,16 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
RestoreWindow();
return TRUE;
}
- SysReset();
if (CheckCdrom() == -1) {
fprintf(stderr, _("The CD does not appear to be a valid Playstation CD"));
ClosePlugins();
RestoreWindow();
return TRUE;
}
+
+ // Auto-detect: region first, then rcnt reset
+ SysReset();
+
if (LoadCdrom() == -1) {
fprintf(stderr, _("Could not load CD-ROM!"));
ClosePlugins();
@@ -599,8 +611,11 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
case ID_EMULATOR_RESET:
SetMenu(hWnd, NULL);
OpenPlugins(hWnd);
- SysReset();
CheckCdrom();
+
+ // Auto-detect: region first, then rcnt reset
+ SysReset();
+
LoadCdrom();
ShowCursor(FALSE);
Running = 1;