From 27e8b5744ddab50cc9ef50b6ee1f3a94010a8cea Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Wed, 12 Jan 2011 02:51:29 +0000 Subject: - 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 --- libpcsxcore/cdrom.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'libpcsxcore/cdrom.c') 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) { -- cgit v1.2.3