mirror of
https://github.com/simple64/simple64.git
synced 2026-11-16 11:43:15 +01:00
update parallel rsp
This commit is contained in:
1 parent
5a8a72036a
commit
ed433f95a5
4 files changed
+1
-10
No files matched your search
@@ -85,7 +85,6 @@ extern "C"
|
||||
// Run CPU until we either break or we need to fire an IRQ.
|
||||
RSP::cpu.get_state().pc = *RSP::rsp.SP_PC_REG & 0xfff;
|
||||
RSP::cpu.get_state().instruction_count = 0;
|
||||
RSP::cpu.get_state().did_mfc0 = 0;
|
||||
|
||||
#ifdef INTENSE_DEBUG
|
||||
fprintf(stderr, "RUN TASK: %u\n", RSP::cpu.get_state().pc);
|
||||
|
||||
@@ -26,18 +26,14 @@ extern "C"
|
||||
rsp->sr[rt] = res;
|
||||
|
||||
#ifdef PARALLEL_INTEGRATION
|
||||
// WAIT_FOR_CPU_HOST. From CXD4.
|
||||
if (rd == CP0_REGISTER_SP_RESERVED)
|
||||
{
|
||||
rsp->instruction_count += 4; // Needed for DK64
|
||||
*rsp->cp0.cr[CP0_REGISTER_SP_RESERVED] = 1;
|
||||
rsp->did_mfc0 = 1;
|
||||
return MODE_EXIT;
|
||||
}
|
||||
// We don't return control to the CPU if the RDP FREEZE bit is set, doing so seems to cause flickering
|
||||
else if (rd == CP0_REGISTER_SP_STATUS && (*rsp->cp0.cr[CP0_REGISTER_CMD_STATUS] & DPC_STATUS_FREEZE) == 0)
|
||||
{
|
||||
rsp->did_mfc0 = 1;
|
||||
return MODE_EXIT;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1996,10 +1996,7 @@ ReturnMode CPU::run()
|
||||
return static_cast<ReturnMode>(ret);
|
||||
|
||||
default:
|
||||
if (state.did_mfc0)
|
||||
return static_cast<ReturnMode>(MODE_EXIT);
|
||||
else
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,6 @@ struct CPUState
|
||||
uint32_t instruction_count = 0;
|
||||
uint32_t last_instruction_type = 0;
|
||||
uint32_t instruction_pipeline = 0;
|
||||
uint32_t did_mfc0 = 0;
|
||||
uint32_t dirty_blocks = 0;
|
||||
static_assert(CODE_BLOCKS <= 32, "Code blocks must fit in 32-bit register.");
|
||||
|
||||
|
||||
Reference in new issue
Block a user