Refactor Cop1 pt.2 + fix build
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
file(GLOB_RECURSE SOURCES *.cpp)
|
file(GLOB_RECURSE SOURCES *.cpp)
|
||||||
file(GLOB_RECURSE HEADERS *.hpp)
|
file(GLOB_RECURSE HEADERS *.hpp)
|
||||||
|
|
||||||
find_package(SDL2 REQUIRED)
|
|
||||||
|
|
||||||
add_library(mmio ${SOURCES} ${HEADERS} ../../../../external/cic_nus_6105/n64_cic_nus_6105.cpp)
|
add_library(mmio ${SOURCES} ${HEADERS} ../../../../external/cic_nus_6105/n64_cic_nus_6105.cpp)
|
||||||
|
|
||||||
target_link_libraries(mmio PRIVATE SDL2::SDL2)
|
|
||||||
@@ -915,9 +915,8 @@ void Cop1::truncld(u32 instr) {
|
|||||||
template<class T>
|
template<class T>
|
||||||
void Cop1::lwc1(T &cpu, Mem &mem, u32 instr) {
|
void Cop1::lwc1(T &cpu, Mem &mem, u32 instr) {
|
||||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
||||||
Registers& regs = cpu.regs;
|
|
||||||
CheckFPUUsable_PreserveCause();
|
CheckFPUUsable_PreserveCause();
|
||||||
lwc1Interp(cpu.regs, mem, instr);
|
lwc1Interp(mem, instr);
|
||||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||||
lwc1JIT(cpu, mem, instr);
|
lwc1JIT(cpu, mem, instr);
|
||||||
} else {
|
} else {
|
||||||
@@ -931,9 +930,8 @@ template void Cop1::lwc1<JIT>(JIT&, Mem&, u32);
|
|||||||
template<class T>
|
template<class T>
|
||||||
void Cop1::swc1(T &cpu, Mem &mem, u32 instr) {
|
void Cop1::swc1(T &cpu, Mem &mem, u32 instr) {
|
||||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
||||||
Registers& regs = cpu.regs;
|
|
||||||
CheckFPUUsable_PreserveCause();
|
CheckFPUUsable_PreserveCause();
|
||||||
swc1Interp(cpu.regs, mem, instr);
|
swc1Interp(mem, instr);
|
||||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||||
swc1JIT(cpu, mem, instr);
|
swc1JIT(cpu, mem, instr);
|
||||||
} else {
|
} else {
|
||||||
@@ -947,9 +945,8 @@ template void Cop1::swc1<JIT>(JIT&, Mem&, u32);
|
|||||||
template<class T>
|
template<class T>
|
||||||
void Cop1::ldc1(T &cpu, Mem &mem, u32 instr) {
|
void Cop1::ldc1(T &cpu, Mem &mem, u32 instr) {
|
||||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
||||||
Registers& regs = cpu.regs;
|
|
||||||
CheckFPUUsable_PreserveCause();
|
CheckFPUUsable_PreserveCause();
|
||||||
ldc1Interp(cpu.regs, mem, instr);
|
ldc1Interp(mem, instr);
|
||||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||||
ldc1JIT(cpu, mem, instr);
|
ldc1JIT(cpu, mem, instr);
|
||||||
} else {
|
} else {
|
||||||
@@ -963,9 +960,8 @@ template void Cop1::ldc1<JIT>(JIT&, Mem&, u32);
|
|||||||
template<class T>
|
template<class T>
|
||||||
void Cop1::sdc1(T &cpu, Mem &mem, u32 instr) {
|
void Cop1::sdc1(T &cpu, Mem &mem, u32 instr) {
|
||||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
||||||
Registers& regs = cpu.regs;
|
|
||||||
CheckFPUUsable_PreserveCause();
|
CheckFPUUsable_PreserveCause();
|
||||||
sdc1Interp(cpu.regs, mem, instr);
|
sdc1Interp(mem, instr);
|
||||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||||
sdc1JIT(cpu, mem, instr);
|
sdc1JIT(cpu, mem, instr);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ project(kaizen-qt)
|
|||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
|
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
|
||||||
|
find_package(SDL2 REQUIRED)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
.
|
.
|
||||||
@@ -31,6 +32,7 @@ include_directories(
|
|||||||
../../external/imgui/imgui
|
../../external/imgui/imgui
|
||||||
../../external/imgui/imgui/backends
|
../../external/imgui/imgui/backends
|
||||||
../../external/unarr
|
../../external/unarr
|
||||||
|
${SDL2_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." OFF)
|
option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." OFF)
|
||||||
@@ -70,7 +72,8 @@ add_executable(kaizen-qt
|
|||||||
InputSettings.hpp
|
InputSettings.hpp
|
||||||
InputSettings.cpp)
|
InputSettings.cpp)
|
||||||
|
|
||||||
target_link_libraries(kaizen-qt PUBLIC Qt6::Core Qt6::Gui Qt6::Widgets fmt mio nlohmann_json nfd parallel-rdp backend)
|
target_link_libraries(kaizen-qt PUBLIC Qt6::Core Qt6::Gui Qt6::Widgets fmt mio nlohmann_json nfd SDL2::SDL2 parallel-rdp backend)
|
||||||
|
target_compile_definitions(kaizen-qt PUBLIC SDL_MAIN_HANDLED)
|
||||||
|
|
||||||
file(COPY ../../resources/ DESTINATION ${PROJECT_BINARY_DIR}/resources/)
|
file(COPY ../../resources/ DESTINATION ${PROJECT_BINARY_DIR}/resources/)
|
||||||
file(REMOVE
|
file(REMOVE
|
||||||
|
|||||||
Reference in New Issue
Block a user