From: negativeExponent Date: Tue, 4 Aug 2020 00:02:35 +0000 (+0800) Subject: Sync to latest upstream X-Git-Tag: r24l~630^2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a34093eb63d1645fd2de9b412efe2587df9fdb3f;hp=-c;p=pcsx_rearmed.git 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 --- a34093eb63d1645fd2de9b412efe2587df9fdb3f diff --combined libpcsxcore/cdrom.c index a417a528,a725efad..43d25d38 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@@ -539,6 -539,7 +539,7 @@@ void cdrInterrupt() int start_rotating = 0; int error = 0; int delay; + unsigned int seekTime = 0; // Reschedule IRQ if (cdr.Stat) { @@@ -877,8 -878,7 +878,8 @@@ } cdr.Result[0] |= (cdr.Result[1] >> 4) & 0x08; - strncpy((char *)&cdr.Result[4], "PCSX", 4); + /* This adds the string "PCSX" in Playstation bios boot screen */ + memcpy((char *)&cdr.Result[4], "PCSX", 4); cdr.Stat = Complete; break; @@@ -910,6 -910,8 +911,8 @@@ 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 -951,7 +952,7 @@@ // - 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;