aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornegativeExponent2020-08-04 08:02:35 +0800
committernegativeExponent2020-08-04 08:11:13 +0800
commita34093eb63d1645fd2de9b412efe2587df9fdb3f (patch)
treee8dd93683e1b0be27d7c58aae5864d34b3530fa5
parent996dfb25c3a7ef8a485c3ce394a532cb0ee2e5c2 (diff)
parentfbf19ce6b6c02da47a67f58e23d8294cfcd18f55 (diff)
downloadpcsx_rearmed-a34093eb63d1645fd2de9b412efe2587df9fdb3f.tar.gz
pcsx_rearmed-a34093eb63d1645fd2de9b412efe2587df9fdb3f.tar.bz2
pcsx_rearmed-a34093eb63d1645fd2de9b412efe2587df9fdb3f.zip
Sync to latest upstream
Fixed bug where MSB of a 15-bit BGR color could corrupt green value. Also added documentation. https://github.com/libretro/pcsx_rearmed/commit/92db7708f2fd2a26ea730d761a60a582a646405a Fix crash on retrying mission in driver (https://github.com/notaz/pcsx_rearmed/pull/165) https://github.com/libretro/pcsx_rearmed/commit/fbf19ce6b6c02da47a67f58e23d8294cfcd18f55
-rw-r--r--libpcsxcore/cdrom.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c
index a417a52..43d25d3 100644
--- a/libpcsxcore/cdrom.c
+++ b/libpcsxcore/cdrom.c
@@ -539,6 +539,7 @@ void cdrInterrupt() {
int start_rotating = 0;
int error = 0;
int delay;
+ unsigned int seekTime = 0;
// Reschedule IRQ
if (cdr.Stat) {
@@ -910,6 +911,8 @@ void cdrInterrupt() {
case CdlReadN:
case CdlReadS:
if (cdr.SetlocPending) {
+ seekTime = abs(msf2sec(cdr.SetSectorPlay) - msf2sec(cdr.SetSector)) * (cdReadTime / 200);
+ if(seekTime > 1000000) seekTime = 1000000;
memcpy(cdr.SetSectorPlay, cdr.SetSector, 4);
cdr.SetlocPending = 0;
}
@@ -949,7 +952,7 @@ void cdrInterrupt() {
// - fix cutscene speech (startup)
// ??? - use more accurate seek time later
- CDREAD_INT((cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime * 1);
+ CDREAD_INT(((cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime * 1) + seekTime);
} else {
cdr.StatP |= STATUS_READ;
cdr.StatP &= ~STATUS_SEEK;