update core

This commit is contained in:
Logan McNaughton committed 2022-08-11 19:41:03 -06:00
1 parent 91b261f32c
commit f735fa43df
3 files changed
+2 -5

No files matched your search

-2
View File
@@ -74,7 +74,6 @@ void poweron_cp0(struct cp0* cp0)
cp0->half_count = 0;
cp0->last_addr = UINT32_C(0xbfc00000);
cp0->latch = 0;
cp0->instruction_counter = 0;
init_interrupt(cp0);
@@ -149,7 +148,6 @@ void cp0_startup_cycles(struct r4300_core* r4300)
void cp0_base_cycle(struct r4300_core* r4300)
{
++r4300->cp0.instruction_counter;
cp0_add_cycles(r4300, 1);
}
-1
View File
@@ -206,7 +206,6 @@ struct cp0
struct tlb tlb;
uint8_t half_count;
uint32_t latch;
uint32_t instruction_counter;
};
#ifndef NEW_DYNAREC
@@ -1287,9 +1287,9 @@ static uint32_t set_random_reg(struct r4300_core* r4300)
{
uint32_t* cp0_regs = r4300_cp0_regs(&r4300->cp0);
if (cp0_regs[CP0_WIRED_REG] > 31)
return (UINT32_MAX - r4300->cp0.instruction_counter) & 0x3F;
return (UINT32_MAX - cp0_regs[CP0_COUNT_REG]) & 0x3F;
else
return (UINT32_MAX - r4300->cp0.instruction_counter) % (32 - cp0_regs[CP0_WIRED_REG]) + cp0_regs[CP0_WIRED_REG];
return (UINT32_MAX - cp0_regs[CP0_COUNT_REG]) % (32 - cp0_regs[CP0_WIRED_REG]) + cp0_regs[CP0_WIRED_REG];
}
DECLARE_INSTRUCTION(TLBWR)