Refactor so parallel-rdp is in charge of polling inputs and not the EmuThread

This commit is contained in:
SimoneN64
2024-09-25 22:09:44 +02:00
parent 56b9d69861
commit 2744de8d3e
14 changed files with 174 additions and 151 deletions

View File

@@ -2,7 +2,6 @@
#include <capstone/capstone.h>
#include <utils/log.hpp>
#include <utils/MemoryHelpers.hpp>
#include <portable_endian_bswap.h>
#include <array>
struct Disassembler {
@@ -19,7 +18,7 @@ struct Disassembler {
return ret;
}
DisassemblyResult Disassemble(u32 address, u32 instruction) {
DisassemblyResult Disassemble(const u32 address, const u32 instruction) {
return details ? DisassembleDetailed(address, instruction) : DisassembleSimple(address, instruction);
}
@@ -29,7 +28,7 @@ private:
DisassemblyResult DisassembleDetailed(u32 address, u32 instruction);
DisassemblyResult DisassembleSimple(u32 address, u32 instruction);
Disassembler(bool rsp) : rsp(rsp) {
explicit Disassembler(const bool rsp) : rsp(rsp) {
if (cs_open(CS_ARCH_MIPS, static_cast<cs_mode>((rsp ? CS_MODE_32 : CS_MODE_64) | CS_MODE_BIG_ENDIAN), &handle) !=
CS_ERR_OK) {
Util::panic("Could not initialize {} disassembler!", rsp ? "RSP" : "CPU");
@@ -43,5 +42,5 @@ private:
bool rsp = false;
bool details = true;
csh handle;
csh handle{};
};

View File

@@ -2,6 +2,7 @@
#include <core/RSP.hpp>
#include <log.hpp>
#include <parallel-rdp/ParallelRDPWrapper.hpp>
#include <core/Mem.hpp>
namespace n64 {
RDP::RDP(Mem &mem, ParallelRDP &parallel) : mem(mem), parallel(parallel) {