summaryrefslogtreecommitdiff
path: root/libpcsxcore/cdrom.c
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-01-12 02:51:29 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-01-12 02:51:29 +0000
commit27e8b5744ddab50cc9ef50b6ee1f3a94010a8cea (patch)
treec38e3e5475e499b769368cb34129c70f1e2a36f8 /libpcsxcore/cdrom.c
parent9bbb363c552598dcec7d17c7e6386a6f405edcab (diff)
downloadpcsxr-27e8b5744ddab50cc9ef50b6ee1f3a94010a8cea.tar.gz
- Added -slowboot parameter.
- Load SBI file from patches/SLUS_xxx.xx.sbi instead. - Inlined the I-cache code for performance improvement. - Fixed endianness issue (not tested). git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@62024 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/cdrom.c')
-rw-r--r--libpcsxcore/cdrom.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c
index 3759dd65..7c3a1eb1 100644
--- a/libpcsxcore/cdrom.c
+++ b/libpcsxcore/cdrom.c
@@ -480,11 +480,6 @@ static void ReadTrack( u8 *time ) {
}
-extern int opensbifile(const char *isoname);
-extern int cdrIsoActive(void);
-extern int checkSBI(u8 *time);
-
-
void AddIrqQueue(unsigned char irq, unsigned long ecycle) {
cdr.Irq = irq;
cdr.eCycle = ecycle;
@@ -1215,7 +1210,7 @@ void cdrInterrupt() {
}
// redump.org - wipe time
- if( !cdr.Play && checkSBI(cdr.Result+5) ) {
+ if( !cdr.Play && CheckSBI(cdr.Result+5) ) {
memset( cdr.Result+2, 0, 6 );
}
@@ -1351,7 +1346,7 @@ void cdrInterrupt() {
if (CDR_getStatus(&stat) == -1) {
cdr.Result[0] = 0x00; // 0x08 and cdr.Result[1]|0x10 : audio cd, enters cd player
- cdr.Result[1] = 0x00; // 0x80 leads to the menu in the bios, else loads CD
+ cdr.Result[1] = 0x80; // 0x80 leads to the menu in the bios, else loads CD
}
else {
if (stat.Type == 2) {
@@ -1363,12 +1358,17 @@ void cdrInterrupt() {
}
else {
// Data CD
- cdr.Result[0] = 0x08;
- cdr.Result[1] = 0x00;
+ if (CdromId[0] == '\0') {
+ cdr.Result[0] = 0x00;
+ cdr.Result[1] = 0x80;
+ }
+ else {
+ cdr.Result[0] = 0x08;
+ cdr.Result[1] = 0x00;
+ }
}
}
- if (CdromId[0] == '\0') cdr.Result[1] |= 0x80;
cdr.Result[2] = 0x00;
cdr.Result[3] = 0x00;
strncpy((char *)&cdr.Result[4], "PCSX", 4);
@@ -2299,11 +2299,7 @@ void cdrReset() {
memset(&cdr, 0, sizeof(cdr));
cdr.CurTrack = 1;
cdr.File = 1;
- cdr.Channel = 1;
-
- if( !cdrIsoActive() ) {
- opensbifile( "redump.sbi" );
- }
+ cdr.Channel = 1;
}
int cdrFreeze(gzFile f, int Mode) {