From 5dfa7e1e981ef0c7c2876c4eb01e418cde348cf2 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 23 Dec 2024 14:21:16 +0200 Subject: [PATCH 1/2] cdrom: some cleanup --- libpcsxcore/cdrom.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index a8eb6d9b..e6ea22b2 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -1304,16 +1304,6 @@ void cdrInterrupt(void) { setIrq(IrqStat, Cmd); } -#ifdef HAVE_ARMV7 - #define ssat32_to_16(v) \ - asm("ssat %0,#16,%1" : "=r" (v) : "r" (v)) -#else - #define ssat32_to_16(v) do { \ - if (v < -32768) v = -32768; \ - else if (v > 32767) v = 32767; \ - } while (0) -#endif - static void cdrPrepCdda(s16 *buf, int samples) { #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ From 5082c6c70d3a866e27eecc30969c3c2b31f79d68 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 23 Dec 2024 14:21:47 +0200 Subject: [PATCH 2/2] cdrom: yet another timing hack libretro/pcsx_rearmed#858 --- libpcsxcore/cdrom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index e6ea22b2..5c7e7649 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -1322,6 +1322,8 @@ static void cdrReadInterruptSetResult(unsigned char result) cdr.SetSectorPlay[0], cdr.SetSectorPlay[1], cdr.SetSectorPlay[2], cdr.CmdInProgress, cdr.IrqStat); cdr.Irq1Pending = result; + // F1 2000 timing hack :( + psxRegs.intCycle[PSXINT_CDREAD].sCycle += cdReadTime / 10; return; } SetResultSize(1);