CPU: Restore faster IPS

This commit is contained in:
Connor McLaughlin 2019-10-03 16:45:54 +10:00
parent 40dceacc7c
commit 1f6130f04a
4 changed files with 9 additions and 12 deletions

View File

@ -6,7 +6,7 @@
Log_SetChannel(CPU::Core); Log_SetChannel(CPU::Core);
namespace CPU { namespace CPU {
u32 TRACE_EXECUTION = 0; bool TRACE_EXECUTION = false;
Core::Core() = default; Core::Core() = default;
@ -456,8 +456,8 @@ void Core::Execute()
{ {
while (m_downcount >= 0) while (m_downcount >= 0)
{ {
m_pending_ticks += 3; m_pending_ticks += 2;
m_downcount -= 3; m_downcount -= 2;
// now executing the instruction we previously fetched // now executing the instruction we previously fetched
const Instruction inst = m_next_instruction; const Instruction inst = m_next_instruction;
@ -512,8 +512,8 @@ void Core::ExecuteInstruction(Instruction inst)
} }
#endif #endif
if (TRACE_EXECUTION == 1) if (TRACE_EXECUTION)
PrintInstruction(inst.bits, m_current_instruction_pc, nullptr); PrintInstruction(inst.bits, m_current_instruction_pc, this);
switch (inst.op) switch (inst.op)
{ {
@ -1109,9 +1109,6 @@ void Core::ExecuteInstruction(Instruction inst)
UnreachableCode(); UnreachableCode();
break; break;
} }
if (TRACE_EXECUTION == 2)
PrintInstruction(inst.bits, m_current_instruction_pc, this);
} }
void Core::ExecuteCop0Instruction(Instruction inst) void Core::ExecuteCop0Instruction(Instruction inst)

View File

@ -137,7 +137,7 @@ private:
GTE::Core m_cop2; GTE::Core m_cop2;
}; };
extern u32 TRACE_EXECUTION; extern bool TRACE_EXECUTION;
} // namespace CPU } // namespace CPU

View File

@ -222,7 +222,7 @@ void MDEC::HandleDecodeMacroblockCommand()
while (src != src_end) while (src != src_end)
{ {
src = DecodeMonoMacroblock(src, src_end); src = DecodeMonoMacroblock(src, src_end);
Log_InfoPrint("Decoded mono macroblock"); Log_DevPrintf("Decoded mono macroblock");
} }
} }
else else
@ -231,7 +231,7 @@ void MDEC::HandleDecodeMacroblockCommand()
{ {
u32 old_offs = static_cast<u32>(src - temp.data()); u32 old_offs = static_cast<u32>(src - temp.data());
src = DecodeColoredMacroblock(src, src_end); src = DecodeColoredMacroblock(src, src_end);
Log_InfoPrintf("Decoded colour macroblock, ptr was %u, now %u", old_offs, static_cast<u32>(src - temp.data())); Log_DevPrintf("Decoded colour macroblock, ptr was %u, now %u", old_offs, static_cast<u32>(src - temp.data()));
} }
} }
} }

View File

@ -34,7 +34,7 @@ public:
private: private:
static constexpr u32 NUM_SLOTS = 2; static constexpr u32 NUM_SLOTS = 2;
static constexpr u32 TRANSFER_TICKS = 550; static constexpr u32 TRANSFER_TICKS = 750;
enum class State : u32 enum class State : u32
{ {