diff options
author | notaz | 2011-12-08 01:26:37 +0200 |
---|---|---|
committer | notaz | 2011-12-09 01:29:28 +0200 |
commit | 914722b27cdd4e4373418461151e223557e70559 (patch) | |
tree | 2d3fe88957792224fc971dce7138f5791d1ba49e /libpcsxcore | |
parent | 956f312925948e46da9c3596efadc4babc666a4d (diff) | |
download | pcsx_rearmed-914722b27cdd4e4373418461151e223557e70559.tar.gz pcsx_rearmed-914722b27cdd4e4373418461151e223557e70559.tar.bz2 pcsx_rearmed-914722b27cdd4e4373418461151e223557e70559.zip |
cdrom: don't emulate seek when set to same loc
fixes C-12 (needs at least 5 sectors), let's see what this breaks..
Diffstat (limited to 'libpcsxcore')
-rw-r--r-- | libpcsxcore/cdrom.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 839e89e..a150db6 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -1225,6 +1225,7 @@ void cdrInterrupt() { /* Duke Nukem: Land of the Babes - seek then delay read for one frame - fixes cutscenes + C-12 - Final Resistance - doesn't like seek */ if (!cdr.Seeked) { @@ -1473,6 +1474,7 @@ unsigned char cdrRead1(void) { } void cdrWrite1(unsigned char rt) { + char set_loc[3]; int i; #ifdef CDR_LOG @@ -1521,9 +1523,12 @@ void cdrWrite1(unsigned char rt) { case CdlSetloc: StopReading(); - cdr.Seeked = FALSE; for (i = 0; i < 3; i++) - cdr.SetSector[i] = btoi(cdr.Param[i]); + set_loc[i] = btoi(cdr.Param[i]); + i = abs(msf2sec(cdr.SetSector) - msf2sec(set_loc)); + if (i > 16) + cdr.Seeked = FALSE; + memcpy(cdr.SetSector, set_loc, 3); cdr.SetSector[3] = 0; /* |