From 314f6629f0f6f0bed5143d3e8cf816c3dc3d4cf2 Mon Sep 17 00:00:00 2001 From: CocoSimone Date: Thu, 8 Sep 2022 00:06:35 +0200 Subject: [PATCH] update prdp --- external/parallel-rdp/CMakeLists.txt | 1 + external/parallel-rdp/parallel-rdp-standalone | 2 +- src/frontend/CMakeLists.txt | 1 + src/frontend/imgui/CMakeLists.txt | 1 + src/n64/CMakeLists.txt | 1 + src/n64/core/CMakeLists.txt | 2 +- src/n64/core/Cpu.hpp | 3 ++- src/n64/core/cpu/CMakeLists.txt | 7 ++++--- src/n64/core/cpu/instructions.cpp | 2 +- 9 files changed, 13 insertions(+), 7 deletions(-) diff --git a/external/parallel-rdp/CMakeLists.txt b/external/parallel-rdp/CMakeLists.txt index a7232cb8..37ea87af 100644 --- a/external/parallel-rdp/CMakeLists.txt +++ b/external/parallel-rdp/CMakeLists.txt @@ -67,6 +67,7 @@ target_include_directories(parallel-rdp PUBLIC ../../src/frontend/imgui ../../src/frontend/imgui/debugger ../../src + ../capstone/include ../imgui ../imgui/imgui ../imgui/imgui/backends diff --git a/external/parallel-rdp/parallel-rdp-standalone b/external/parallel-rdp/parallel-rdp-standalone index 482a41de..e60b4d51 160000 --- a/external/parallel-rdp/parallel-rdp-standalone +++ b/external/parallel-rdp/parallel-rdp-standalone @@ -1 +1 @@ -Subproject commit 482a41deb66fa4b55aef5f2738357584738441af +Subproject commit e60b4d51ac109f53ab4510b474024aee95f42d96 diff --git a/src/frontend/CMakeLists.txt b/src/frontend/CMakeLists.txt index 6a5e8fe9..c31ce6c2 100644 --- a/src/frontend/CMakeLists.txt +++ b/src/frontend/CMakeLists.txt @@ -11,6 +11,7 @@ target_include_directories(frontend PUBLIC . .. ../../external + ../../external/capstone/include ../../external/parallel-rdp ../../external/parallel-rdp/parallel-rdp-standalone/vulkan ../../external/parallel-rdp/parallel-rdp-standalone/util diff --git a/src/frontend/imgui/CMakeLists.txt b/src/frontend/imgui/CMakeLists.txt index 402eb0e6..4f4b3c0d 100644 --- a/src/frontend/imgui/CMakeLists.txt +++ b/src/frontend/imgui/CMakeLists.txt @@ -21,6 +21,7 @@ target_include_directories(frontend-imgui PUBLIC ../../n64/core/cpu ../../n64/core/cpu/registers ../../../external + ../../../external/capstone/include ../../../external/parallel-rdp/parallel-rdp-standalone ../../../external/parallel-rdp/parallel-rdp-standalone/vulkan ../../../external/parallel-rdp/parallel-rdp-standalone/util diff --git a/src/n64/CMakeLists.txt b/src/n64/CMakeLists.txt index e772f8ba..4bb07903 100644 --- a/src/n64/CMakeLists.txt +++ b/src/n64/CMakeLists.txt @@ -14,5 +14,6 @@ target_include_directories(n64 PUBLIC .. ../frontend/imgui/debugger ../../external + ../../external/capstone/include ../../external/imgui/imgui ../../external/imgui/imgui/backends) diff --git a/src/n64/core/CMakeLists.txt b/src/n64/core/CMakeLists.txt index 6bf69058..bec6fca3 100644 --- a/src/n64/core/CMakeLists.txt +++ b/src/n64/core/CMakeLists.txt @@ -47,7 +47,7 @@ target_include_directories(core PUBLIC ../.. ../../frontend/imgui/debugger ../../../external - ../../../external/capstone + ../../../external/capstone/include ../../../external/imgui/imgui ../../../external/imgui/imgui/debugger ../../../external/imgui/imgui/backends diff --git a/src/n64/core/Cpu.hpp b/src/n64/core/Cpu.hpp index 2def49e4..0222d93a 100644 --- a/src/n64/core/Cpu.hpp +++ b/src/n64/core/Cpu.hpp @@ -2,10 +2,11 @@ #include #include #include +#include namespace n64 { struct Cpu { - Cpu() = default; + Cpu() { Reset(); } ~Cpu() = default; void Reset(); void Step(Mem&); diff --git a/src/n64/core/cpu/CMakeLists.txt b/src/n64/core/cpu/CMakeLists.txt index e8065672..80633929 100644 --- a/src/n64/core/cpu/CMakeLists.txt +++ b/src/n64/core/cpu/CMakeLists.txt @@ -2,20 +2,21 @@ cmake_minimum_required(VERSION 3.20) project(cpu) add_library(cpu + decode.cpp + instructions.cpp Registers.cpp Registers.hpp registers/Cop0.cpp registers/Cop0.hpp - decode.cpp registers/cop0instructions.cpp registers/Cop1.cpp registers/Cop1.hpp - registers/cop1instructions.cpp - instructions.cpp) + registers/cop1instructions.cpp) target_include_directories(cpu PUBLIC registers . .. ../../../../external + ../../../../external/capstone/include ../../../../src ../../ ) diff --git a/src/n64/core/cpu/instructions.cpp b/src/n64/core/cpu/instructions.cpp index 44c5ed05..07c602f0 100644 --- a/src/n64/core/cpu/instructions.cpp +++ b/src/n64/core/cpu/instructions.cpp @@ -578,7 +578,7 @@ void Cpu::dsra32(u32 instr) { } void Cpu::jr(u32 instr) { - u32 address = regs.gpr[RS(instr)]; + s32 address = regs.gpr[RS(instr)]; if ((address & 3) != 0) { HandleTLBException(regs, (s64)((s32)address)); FireException(regs, ExceptionCode::AddressErrorStore, 0, regs.oldPC);