notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2d724e2
)
cdrom: adjust timing
author
notaz
<notasas@gmail.com>
Thu, 15 Sep 2022 23:31:37 +0000
(
02:31
+0300)
committer
notaz
<notasas@gmail.com>
Thu, 15 Sep 2022 23:32:52 +0000
(
02:32
+0300)
libpcsxcore/cdrom.c
patch
|
blob
|
blame
|
history
diff --git
a/libpcsxcore/cdrom.c
b/libpcsxcore/cdrom.c
index
ca1c92a
..
2319085
100644
(file)
--- a/
libpcsxcore/cdrom.c
+++ b/
libpcsxcore/cdrom.c
@@
-295,8
+295,8
@@
static void setIrq(int log_cmd)
if (cdr.Stat)
{
int i;
if (cdr.Stat)
{
int i;
- SysPrintf("CDR IRQ=%d cmd %02x stat %02x: ",
- !!(cdr.Stat & cdr.Reg2), log_cmd, cdr.Stat);
+ SysPrintf("
%u cdrom:
CDR IRQ=%d cmd %02x stat %02x: ",
+
psxRegs.cycle,
!!(cdr.Stat & cdr.Reg2), log_cmd, cdr.Stat);
for (i = 0; i < cdr.ResultC; i++)
SysPrintf("%02x ", cdr.Result[i]);
SysPrintf("\n");
for (i = 0; i < cdr.ResultC; i++)
SysPrintf("%02x ", cdr.Result[i]);
SysPrintf("\n");
@@
-651,7
+651,8
@@
void cdrInterrupt(void) {
int i;
if (cdr.Stat) {
int i;
if (cdr.Stat) {
- CDR_LOG_I("cdrom: cmd %02x with irqstat %x\n", cdr.CmdInProgress, cdr.Stat);
+ CDR_LOG_I("%u cdrom: cmd %02x with irqstat %x\n",
+ psxRegs.cycle, cdr.CmdInProgress, cdr.Stat);
return;
}
if (cdr.Irq1Pending) {
return;
}
if (cdr.Irq1Pending) {
@@
-1118,7
+1119,8
@@
void cdrInterrupt(void) {
}
else if (cdr.Cmd && cdr.Cmd != (Cmd & 0xff)) {
cdr.CmdInProgress = cdr.Cmd;
}
else if (cdr.Cmd && cdr.Cmd != (Cmd & 0xff)) {
cdr.CmdInProgress = cdr.Cmd;
- CDR_LOG_I("cdrom: cmd %02x came before %02x finished\n", cdr.Cmd, Cmd);
+ CDR_LOG_I("%u cdrom: cmd %02x came before %02x finished\n",
+ psxRegs.cycle, cdr.Cmd, Cmd);
}
setIrq(Cmd);
}
setIrq(Cmd);
@@
-1344,7
+1346,7
@@
void cdrWrite1(unsigned char rt) {
}
#ifdef CDR_LOG_CMD_IRQ
}
#ifdef CDR_LOG_CMD_IRQ
- SysPrintf("
CD1 write: %x (%s)"
, rt, CmdName[rt]);
+ SysPrintf("
%u cdrom: CD1 write: %x (%s)", psxRegs.cycle
, rt, CmdName[rt]);
if (cdr.ParamC) {
int i;
SysPrintf(" Param[%d] = {", cdr.ParamC);
if (cdr.ParamC) {
int i;
SysPrintf(" Param[%d] = {", cdr.ParamC);
@@
-1365,8
+1367,8
@@
void cdrWrite1(unsigned char rt) {
CDR_INT(5000);
}
else {
CDR_INT(5000);
}
else {
- CDR_LOG_I("
cdr
: cmd while busy: %02x, prev %02x, busy %02x\n",
- rt, cdr.Cmd, cdr.CmdInProgress);
+ CDR_LOG_I("
%u cdrom
: cmd while busy: %02x, prev %02x, busy %02x\n",
+
psxRegs.cycle,
rt, cdr.Cmd, cdr.CmdInProgress);
if (cdr.CmdInProgress < 0x100) // no pending 2nd response
cdr.CmdInProgress = rt;
}
if (cdr.CmdInProgress < 0x100) // no pending 2nd response
cdr.CmdInProgress = rt;
}
@@
-1428,11
+1430,13
@@
void cdrWrite3(unsigned char rt) {
case 1:
if (cdr.Stat & rt) {
#ifdef CDR_LOG_CMD_IRQ
case 1:
if (cdr.Stat & rt) {
#ifdef CDR_LOG_CMD_IRQ
- SysPrintf("ack %02x (w %02x)\n", cdr.Stat & rt, rt);
+ SysPrintf("%u cdrom: ack %02x (w %02x)\n",
+ psxRegs.cycle, cdr.Stat & rt, rt);
#endif
#endif
+ // note: Croc vs Discworld Noir
if (!(psxRegs.interrupt & (1 << PSXINT_CDR)) &&
(cdr.CmdInProgress || cdr.Irq1Pending))
if (!(psxRegs.interrupt & (1 << PSXINT_CDR)) &&
(cdr.CmdInProgress || cdr.Irq1Pending))
- CDR_INT(
2000); // 710+
+ CDR_INT(
850); // 711-993
}
cdr.Stat &= ~rt;
}
cdr.Stat &= ~rt;