From: anzz1 Date: Wed, 12 Jul 2023 16:32:07 +0000 (+0300) Subject: cdrom: rename mode constants to defineds X-Git-Tag: r24l~313 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfd4f48e351935fee0ad4d4d1af95198aa064de2;p=pcsx_rearmed.git cdrom: rename mode constants to defineds --- diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 098b77d0..921e3daa 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -928,7 +928,7 @@ void cdrInterrupt(void) { SetPlaySeekRead(cdr.StatP, 0); cdr.LocL[0] = LOCL_INVALID; cdr.Muted = FALSE; - cdr.Mode = 0x20; /* This fixes This is Football 2, Pooh's Party lockups */ + cdr.Mode = MODE_SIZE_2340; /* This fixes This is Football 2, Pooh's Party lockups */ second_resp_time = not_ready ? 70000 : 4100000; start_rotating = 1; break; @@ -1159,7 +1159,7 @@ void cdrInterrupt(void) { cdr.LocL[0] = LOCL_INVALID; cdr.SubqForwardSectors = 1; - cycles = (cdr.Mode & 0x80) ? cdReadTime : cdReadTime * 2; + cycles = (cdr.Mode & MODE_SPEED) ? cdReadTime : cdReadTime * 2; cycles += seekTime; if (Config.hacks.cdr_read_timing) cycles = cdrAlignTimingHack(cycles); @@ -1543,7 +1543,7 @@ void cdrWrite3(unsigned char rt) { CDR_LOG("cdrom: FifoOffset(2) %d/%d\n", cdr.FifoOffset, cdr.FifoSize); } else if (rt & 0x80) { - switch (cdr.Mode & 0x30) { + switch (cdr.Mode & (MODE_SIZE_2328|MODE_SIZE_2340)) { case MODE_SIZE_2328: case 0x00: cdr.FifoOffset = 12; @@ -1687,7 +1687,7 @@ int cdrFreeze(void *f, int Mode) { getCdInfo(); cdr.FifoOffset = tmp < DATA_SIZE ? tmp : DATA_SIZE; - cdr.FifoSize = (cdr.Mode & 0x20) ? 2340 : 2048 + 12; + cdr.FifoSize = (cdr.Mode & MODE_SIZE_2340) ? 2340 : 2048 + 12; if (cdr.SubqForwardSectors > SUBQ_FORWARD_SECTORS) cdr.SubqForwardSectors = SUBQ_FORWARD_SECTORS; @@ -1706,7 +1706,7 @@ int cdrFreeze(void *f, int Mode) { if (!Config.Cdda) CDR_play(cdr.SetSectorPlay); if (psxRegs.interrupt & (1 << PSXINT_CDRPLAY_OLD)) - CDRPLAYREAD_INT((cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime, 1); + CDRPLAYREAD_INT((cdr.Mode & MODE_SPEED) ? (cdReadTime / 2) : cdReadTime, 1); } if ((cdr.freeze_ver & 0xffffff00) != 0x63647200) {