psxmode: disabled a PGIF ringbuffer memset, added comments

This commit is contained in:
Robert Neumann 2016-09-28 16:18:59 +02:00
parent c272359f20
commit fd58ee6289
2 changed files with 11 additions and 6 deletions

View File

@ -49,9 +49,6 @@ void __fastcall _hwWrite32( u32 mem, u32 value )
#if PSX_EXTRALOGS
if ((mem & 0x1000ff00) == 0x1000f300) DevCon.Warning("32bit Write to SIF Register %x value %x", mem, value);
//if ((mem & 0x1000ff00) == 0x1000f200) DevCon.Warning("Write to SIF Register %x value %x", mem, value);
// todo: psx mode: this is new
if (((mem & 0x1FFFFFF0) == 0x1000f010) || ((mem & 0x1FFFFFF0) == 0x1000f010)) Console.WriteLn("EE ###INTC hwWR 0x%08X = 0x%08X PC=%08X ", mem, value, cpuRegs.pc);
#endif
switch (page)

View File

@ -204,7 +204,8 @@ void ringBufPut(struct ringBuf_t *rb, u32 *data)
rb->head = 0; //wrap back when the end is reached
rb->count++;
} else {
Console.WriteLn("############################# PGIF FIFO overflow! sz= %X", rb->size);
// This should never happen. If it does, the code is bad somewhere.
Console.WriteLn("############################# PGIF FIFO overflow! sz= %X", rb->size);
}
}
@ -216,6 +217,7 @@ void ringBufGet(struct ringBuf_t *rb, u32 *data)
rb->tail = 0; //wrap back when the end is reached
rb->count--;
} else {
// This should never happen. If it does, the code is bad somewhere.
Console.WriteLn("############################# PGIF FIFO underflow! sz= %X", rb->size);
}
}
@ -225,7 +227,10 @@ void ringBufClear(struct ringBuf_t *rb)
rb->head = 0;
rb->tail = 0;
rb->count = 0;
memset(rb->buf, 0, rb->size * sizeof(u32));
// wisi comment:
// Yes, the memset should be commented-out. The reason is that it shouldn't really be necessary (but I am not sure).
// It is better not to be enabled, because clearing the new huge PGIF FIFO, can waste significant time.
//memset(rb->buf, 0, rb->size * sizeof(u32));
return;
}
@ -611,7 +616,10 @@ u32 psxGPUr(int addr)
void PGIFw(int addr, u32 data)
{
#if REG_LOG == 1
Console.WriteLn("PGIF write 0x%08X = 0x%08X 0x%08X EEpc= %08X IOPpc= %08X ", addr, data, getUpdPgifCtrlReg(), cpuRegs.pc, psxRegs.pc);
if (addr != PGIF_CTRL)
if ((addr != PGIF_CTRL) || ((addr == PGIF_CTRL) && (getUpdPgifCtrlReg() != data)))
if (addr != PGPU_STAT)
Console.WriteLn("PGIF write 0x%08X = 0x%08X 0x%08X EEpc= %08X IOPpc= %08X ", addr, data, getUpdPgifCtrlReg(), cpuRegs.pc, psxRegs.pc);
#endif
if (addr == PGPU_CMD_FIFO) {