Single cmakelist, because I'm done maintaining an unstable shitty build system, one is easier
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(n64)
|
||||
|
||||
add_subdirectory(core)
|
||||
|
||||
find_package(fmt REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
add_library(n64
|
||||
Core.cpp
|
||||
Core.hpp
|
||||
memory_regions.hpp)
|
||||
|
||||
target_link_libraries(n64 PUBLIC core fmt SDL2main SDL2)
|
||||
target_include_directories(n64 PUBLIC
|
||||
.
|
||||
..
|
||||
../frontend/imgui/debugger
|
||||
../../external
|
||||
../../external/capstone/include
|
||||
../../external/imgui/imgui
|
||||
../../external/imgui/imgui/backends)
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <SDL2/SDL_events.h>
|
||||
#include <SDL_events.h>
|
||||
#include <Cpu.hpp>
|
||||
#include <Mem.hpp>
|
||||
#include <string>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "Audio.hpp"
|
||||
#include <SDL2/SDL.h>
|
||||
#include "util.hpp"
|
||||
#include <Audio.hpp>
|
||||
#include <SDL_audio.h>
|
||||
#include <util.hpp>
|
||||
|
||||
namespace n64 {
|
||||
#define AUDIO_SAMPLE_RATE 48000
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(core)
|
||||
|
||||
add_subdirectory(cpu)
|
||||
|
||||
add_subdirectory(../../../external/parallel-rdp temp)
|
||||
add_subdirectory(../../../external/capstone temp1)
|
||||
|
||||
find_package(fmt REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
add_library(core
|
||||
Cpu.hpp
|
||||
Cpu.cpp
|
||||
Mem.cpp
|
||||
Mem.hpp
|
||||
RDP.cpp
|
||||
RDP.hpp
|
||||
Audio.cpp
|
||||
Audio.hpp
|
||||
mmio/AI.cpp
|
||||
mmio/AI.hpp
|
||||
mmio/Interrupt.cpp
|
||||
mmio/Interrupt.hpp
|
||||
mmio/MI.cpp
|
||||
mmio/MI.hpp
|
||||
mmio/PI.cpp
|
||||
mmio/PI.hpp
|
||||
mmio/PIF.cpp
|
||||
mmio/PIF.hpp
|
||||
mmio/RI.cpp
|
||||
mmio/RI.hpp
|
||||
mmio/SI.cpp
|
||||
mmio/SI.hpp
|
||||
mmio/VI.cpp
|
||||
mmio/VI.hpp
|
||||
MMIO.cpp
|
||||
MMIO.hpp
|
||||
RSP.cpp
|
||||
RSP.hpp
|
||||
rsp/decode.cpp
|
||||
rsp/instructions.cpp)
|
||||
|
||||
target_include_directories(core PUBLIC
|
||||
.
|
||||
..
|
||||
../..
|
||||
../../frontend/imgui/debugger
|
||||
../../../external
|
||||
../../../external/capstone/include
|
||||
../../../external/imgui/imgui
|
||||
../../../external/imgui/imgui/debugger
|
||||
../../../external/imgui/imgui/backends
|
||||
mmio)
|
||||
|
||||
target_link_libraries(core PUBLIC capstone fmt cpu parallel-rdp)
|
||||
@@ -93,7 +93,6 @@ inline void Cpu::disassembly(u32 instr) const {
|
||||
cs_insn *insn;
|
||||
|
||||
u8 code[4];
|
||||
//u32 temp = bswap_32(instr);
|
||||
memcpy(code, &instr, 4);
|
||||
|
||||
count = cs_disasm(handle, code, 4, regs.pc, 0, &insn);
|
||||
@@ -117,7 +116,7 @@ void Cpu::Step(Mem& mem) {
|
||||
|
||||
u32 instruction = mem.Read32(regs, regs.pc, regs.pc);
|
||||
|
||||
disassembly(instruction);
|
||||
//disassembly(instruction);
|
||||
|
||||
regs.oldPC = regs.pc;
|
||||
regs.pc = regs.nextPC;
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
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
|
||||
registers/cop0instructions.cpp
|
||||
registers/Cop1.cpp
|
||||
registers/Cop1.hpp
|
||||
registers/cop1instructions.cpp)
|
||||
|
||||
target_include_directories(cpu PUBLIC registers
|
||||
. ..
|
||||
../../../../external
|
||||
../../../../external/capstone/include
|
||||
../../../../src
|
||||
../../
|
||||
)
|
||||
Reference in New Issue
Block a user