summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-09-05 01:25:57 +0000
committerSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-09-05 01:25:57 +0000
commit57bffa52e68832d77a543436bf8a080bdc02aac5 (patch)
treede63ebbf0376315fd10a5379b5a5312a09480007
parent05a2e4099d0291dfd5fd36922aebb7129068ba25 (diff)
downloadpcsxr-57bffa52e68832d77a543436bf8a080bdc02aac5.tar.gz
GUI/Plugin + cdrom: GameShark v5. Xploder 9000 v4 - opening / closing lid generate CDR interrupts (fixes bad disc re-checking)
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@56827 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--gui/Plugin.c6
-rw-r--r--libpcsxcore/cdrom.c15
2 files changed, 21 insertions, 0 deletions
diff --git a/gui/Plugin.c b/gui/Plugin.c
index 22b6f2cf..e510aed1 100644
--- a/gui/Plugin.c
+++ b/gui/Plugin.c
@@ -35,6 +35,8 @@
void OnFile_Exit();
+extern void LidInterrupt();
+
unsigned long gpuDisp;
int StatesC = 0;
@@ -255,9 +257,13 @@ void PADhandleKey(int key) {
break;
case XK_F9:
SetCdOpenCaseTime(-1);
+
+ LidInterrupt();
break;
case XK_F10:
SetCdOpenCaseTime(0);
+
+ LidInterrupt();
break;
case XK_Escape:
// TODO
diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c
index 8ecb1d64..9771a60c 100644
--- a/libpcsxcore/cdrom.c
+++ b/libpcsxcore/cdrom.c
@@ -1147,3 +1147,18 @@ int cdrFreeze(gzFile f, int Mode) {
return 0;
}
+
+
+
+
+
+void LidInterrupt()
+{
+ // generate interrupt if none active - open or close
+ if( cdr.Irq == 0 || cdr.Irq == 0xff )
+ {
+ cdr.Ctrl |= 0x80;
+ cdr.Stat = NoIntr;
+ AddIrqQueue(CdlNop, 0x800);
+ }
+}