From ecff5e58679454c947975da6edcfec724b0fe0aa Mon Sep 17 00:00:00 2001 From: "SND\\shalma_cp" Date: Thu, 2 Dec 2010 18:39:26 +0000 Subject: Redump.org SBI - cdrom.c, cdriso.c - native support (LibCrypt) ex. TOCA World Touring Cars (Europe) 1) Run CDROM - download SBI from redump.org - place in emu folder - name "redump.sbi" - run CDROM (subchannel optional) 2) Run ISO - download SBI from redump.org - place in iso folder - "toca world cars.bin", "toca world cars.cue", "toca world cars.sbi" or "toca world cars.img", "toca world cars.ccd", "toca world cars.sbi" - run ISO (subchannel file optional) git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@60534 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- libpcsxcore/cdrom.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libpcsxcore/cdrom.c') diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index b22946b1..abc431dc 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -485,6 +485,12 @@ static void ReadTrack( u8 *time ) { cdr.RErr = CDR_readTrack(cdr.Prev); } + +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; @@ -1104,6 +1110,11 @@ void cdrInterrupt() { } } + // redump.org - wipe time + if( !cdr.Play && checkSBI(cdr.Result+5) ) { + memset( cdr.Result+2, 0, 6 ); + } + cdr.Stat = Acknowledge; break; @@ -2159,6 +2170,10 @@ void cdrReset() { cdr.CurTrack = 1; cdr.File = 1; cdr.Channel = 1; + + if( !cdrIsoActive() ) { + opensbifile( "redump.sbi" ); + } } int cdrFreeze(gzFile f, int Mode) { -- cgit v1.2.3