From c5303ede596be575c4729380ef95051a45090a41 Mon Sep 17 00:00:00 2001 From: CocoSimone Date: Sat, 6 Aug 2022 11:19:45 +0200 Subject: [PATCH] ditch multi-system idea --- README.md | 2 +- external/parallel-rdp/ParallelRDPWrapper.cpp | 13 +++++++-- external/parallel-rdp/ParallelRDPWrapper.hpp | 27 +++++++++++++++---- src/CMakeLists.txt | 4 +-- src/{cores => }/common.hpp | 0 src/cores/BaseCore.hpp | 17 ------------ src/cores/CMakeLists.txt | 14 ---------- src/cores/n64/Core.hpp | 18 ------------- src/frontend/imgui/CMakeLists.txt | 2 +- src/frontend/imgui/Window.cpp | 6 ++--- src/frontend/imgui/Window.hpp | 6 ++--- src/{cores => }/n64/CMakeLists.txt | 8 +++--- src/{cores => }/n64/Core.cpp | 3 --- src/n64/Core.hpp | 18 +++++++++++++ src/{cores => }/n64/core/Audio.cpp | 0 src/{cores => }/n64/core/Audio.hpp | 0 src/{cores => }/n64/core/CMakeLists.txt | 12 ++++----- src/{cores => }/n64/core/Cpu.cpp | 0 src/{cores => }/n64/core/Cpu.hpp | 0 src/{cores => }/n64/core/MMIO.cpp | 0 src/{cores => }/n64/core/MMIO.hpp | 0 src/{cores => }/n64/core/Mem.cpp | 0 src/{cores => }/n64/core/Mem.hpp | 0 src/{cores => }/n64/core/RDP.cpp | 0 src/{cores => }/n64/core/RDP.hpp | 0 src/{cores => }/n64/core/RSP.cpp | 0 src/{cores => }/n64/core/RSP.hpp | 0 src/{cores => }/n64/core/cpu/CMakeLists.txt | 6 ++--- src/{cores => }/n64/core/cpu/Registers.cpp | 0 src/{cores => }/n64/core/cpu/Registers.hpp | 0 src/{cores => }/n64/core/cpu/decode.cpp | 0 src/{cores => }/n64/core/cpu/instructions.cpp | 0 .../n64/core/cpu/registers/Cop0.cpp | 0 .../n64/core/cpu/registers/Cop0.hpp | 0 .../n64/core/cpu/registers/Cop1.cpp | 0 .../n64/core/cpu/registers/Cop1.hpp | 0 .../core/cpu/registers/cop0instructions.cpp | 0 .../core/cpu/registers/cop1instructions.cpp | 0 src/{cores => }/n64/core/mmio/AI.cpp | 0 src/{cores => }/n64/core/mmio/AI.hpp | 0 src/{cores => }/n64/core/mmio/Interrupt.cpp | 0 src/{cores => }/n64/core/mmio/Interrupt.hpp | 0 src/{cores => }/n64/core/mmio/MI.cpp | 0 src/{cores => }/n64/core/mmio/MI.hpp | 0 src/{cores => }/n64/core/mmio/PI.cpp | 0 src/{cores => }/n64/core/mmio/PI.hpp | 0 src/{cores => }/n64/core/mmio/PIF.cpp | 0 src/{cores => }/n64/core/mmio/PIF.hpp | 0 src/{cores => }/n64/core/mmio/RI.cpp | 0 src/{cores => }/n64/core/mmio/RI.hpp | 0 src/{cores => }/n64/core/mmio/SI.cpp | 0 src/{cores => }/n64/core/mmio/SI.hpp | 0 src/{cores => }/n64/core/mmio/VI.cpp | 0 src/{cores => }/n64/core/mmio/VI.hpp | 0 src/{cores => }/n64/core/rsp/decode.cpp | 0 src/{cores => }/n64/core/rsp/instructions.cpp | 0 src/{cores => }/n64/memory_regions.hpp | 0 src/{cores => }/util.hpp | 0 58 files changed, 74 insertions(+), 82 deletions(-) rename src/{cores => }/common.hpp (100%) delete mode 100644 src/cores/BaseCore.hpp delete mode 100644 src/cores/CMakeLists.txt delete mode 100644 src/cores/n64/Core.hpp rename src/{cores => }/n64/CMakeLists.txt (57%) rename src/{cores => }/n64/Core.cpp (76%) create mode 100644 src/n64/Core.hpp rename src/{cores => }/n64/core/Audio.cpp (100%) rename src/{cores => }/n64/core/Audio.hpp (100%) rename src/{cores => }/n64/core/CMakeLists.txt (71%) rename src/{cores => }/n64/core/Cpu.cpp (100%) rename src/{cores => }/n64/core/Cpu.hpp (100%) rename src/{cores => }/n64/core/MMIO.cpp (100%) rename src/{cores => }/n64/core/MMIO.hpp (100%) rename src/{cores => }/n64/core/Mem.cpp (100%) rename src/{cores => }/n64/core/Mem.hpp (100%) rename src/{cores => }/n64/core/RDP.cpp (100%) rename src/{cores => }/n64/core/RDP.hpp (100%) rename src/{cores => }/n64/core/RSP.cpp (100%) rename src/{cores => }/n64/core/RSP.hpp (100%) rename src/{cores => }/n64/core/cpu/CMakeLists.txt (74%) rename src/{cores => }/n64/core/cpu/Registers.cpp (100%) rename src/{cores => }/n64/core/cpu/Registers.hpp (100%) rename src/{cores => }/n64/core/cpu/decode.cpp (100%) rename src/{cores => }/n64/core/cpu/instructions.cpp (100%) rename src/{cores => }/n64/core/cpu/registers/Cop0.cpp (100%) rename src/{cores => }/n64/core/cpu/registers/Cop0.hpp (100%) rename src/{cores => }/n64/core/cpu/registers/Cop1.cpp (100%) rename src/{cores => }/n64/core/cpu/registers/Cop1.hpp (100%) rename src/{cores => }/n64/core/cpu/registers/cop0instructions.cpp (100%) rename src/{cores => }/n64/core/cpu/registers/cop1instructions.cpp (100%) rename src/{cores => }/n64/core/mmio/AI.cpp (100%) rename src/{cores => }/n64/core/mmio/AI.hpp (100%) rename src/{cores => }/n64/core/mmio/Interrupt.cpp (100%) rename src/{cores => }/n64/core/mmio/Interrupt.hpp (100%) rename src/{cores => }/n64/core/mmio/MI.cpp (100%) rename src/{cores => }/n64/core/mmio/MI.hpp (100%) rename src/{cores => }/n64/core/mmio/PI.cpp (100%) rename src/{cores => }/n64/core/mmio/PI.hpp (100%) rename src/{cores => }/n64/core/mmio/PIF.cpp (100%) rename src/{cores => }/n64/core/mmio/PIF.hpp (100%) rename src/{cores => }/n64/core/mmio/RI.cpp (100%) rename src/{cores => }/n64/core/mmio/RI.hpp (100%) rename src/{cores => }/n64/core/mmio/SI.cpp (100%) rename src/{cores => }/n64/core/mmio/SI.hpp (100%) rename src/{cores => }/n64/core/mmio/VI.cpp (100%) rename src/{cores => }/n64/core/mmio/VI.hpp (100%) rename src/{cores => }/n64/core/rsp/decode.cpp (100%) rename src/{cores => }/n64/core/rsp/instructions.cpp (100%) rename src/{cores => }/n64/memory_regions.hpp (100%) rename src/{cores => }/util.hpp (100%) diff --git a/README.md b/README.md index 6f42a6da..792887e4 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ [![CodeFactor](https://www.codefactor.io/repository/github/cocosimone/natsukashii/badge/master)](https://www.codefactor.io/repository/github/cocosimone/natsukashii/overview/master) [![build](https://github.com/CocoSimone/natsukashii/actions/workflows/build.yml/badge.svg)](https://github.com/CocoSimone/natsukashii/actions/workflows/build.yml) -Multi-system emulator in its infancy +Rewrite of my Nintendo 64 emulator "[shibumi](https://github.com/CocoSimone/shibumi)". diff --git a/external/parallel-rdp/ParallelRDPWrapper.cpp b/external/parallel-rdp/ParallelRDPWrapper.cpp index 762a8cea..24c4a14b 100644 --- a/external/parallel-rdp/ParallelRDPWrapper.cpp +++ b/external/parallel-rdp/ParallelRDPWrapper.cpp @@ -12,6 +12,7 @@ using namespace RDP; static CommandProcessor* command_processor; static WSI* wsi; +static std::unique_ptr windowInfo; std::vector acquire_semaphore; @@ -109,14 +110,17 @@ public: Program* fullscreen_quad_program; -void LoadWSIPlatform() { +WSI* LoadWSIPlatform(Vulkan::WSIPlatform* wsi_platform, std::unique_ptr&& newWindowInfo) { wsi = new WSI(); wsi->set_backbuffer_srgb(false); - wsi->set_platform(new SDLWSIPlatform()); + wsi->set_platform(wsi_platform); Context::SystemHandles handles; if (!wsi->init_context_from_platform(1, handles)) { util::panic("Failed to initialize WSI!"); } + + windowInfo = std::move(newWindowInfo); + return wsi; } void LoadParallelRDP(const u8* rdram) { @@ -161,6 +165,11 @@ void LoadParallelRDP(const u8* rdram) { } } +void InitParallelRDP(const u8* rdram) { + LoadWSIPlatform(new SDLWSIPlatform(), std::make_unique()); + LoadParallelRDP(rdram); +} + void DrawFullscreenTexturedQuad(Util::IntrusivePtr image, Util::IntrusivePtr cmd) { cmd->set_texture(0, 0, image->get_view(), Vulkan::StockSampler::LinearClamp); cmd->set_program(fullscreen_quad_program); diff --git a/external/parallel-rdp/ParallelRDPWrapper.hpp b/external/parallel-rdp/ParallelRDPWrapper.hpp index 7dd16ab3..ff617917 100644 --- a/external/parallel-rdp/ParallelRDPWrapper.hpp +++ b/external/parallel-rdp/ParallelRDPWrapper.hpp @@ -1,12 +1,30 @@ #pragma once -#include +#include #include #include #include struct Window; - static SDL_Window* window; + +class ParallelRdpWindowInfo { +public: + struct CoordinatePair { + int x; + int y; + }; + virtual CoordinatePair get_window_size() = 0; + virtual ~ParallelRdpWindowInfo() = default; +}; + +class SDLParallelRdpWindowInfo : public ParallelRdpWindowInfo { + CoordinatePair get_window_size() { + int width, height; + SDL_GetWindowSize(window, &width, &height); + return CoordinatePair{ width, height }; + } +}; + static u32 windowID; VkQueue GetGraphicsQueue(); VkInstance GetVkInstance(); @@ -16,11 +34,10 @@ uint32_t GetVkGraphicsQueueFamily(); VkFormat GetVkFormat(); VkCommandBuffer GetVkCommandBuffer(); void SubmitRequestedVkCommandBuffer(); -void LoadWSIPlatform(); -void LoadParallelRDP(const u8* rdram); +void InitParallelRDP(const u8* rdram); void UpdateScreenParallelRdp(Window& imguiWindow, const n64::VI& vi); void ParallelRdpEnqueueCommand(int command_length, u32* buffer); void ParallelRdpOnFullSync(); void UpdateScreenParallelRdpNoGame(Window& imguiWindow); bool IsFramerateUnlocked(); -void SetFramerateUnlocked(bool unlocked); \ No newline at end of file +void SetFramerateUnlocked(bool unlocked); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b8cae0ba..ba572693 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,10 +3,10 @@ project(natsukashii) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED true) -add_subdirectory(cores) +add_subdirectory(n64) add_subdirectory(frontend) add_executable(natsukashii main.cpp) -target_link_libraries(natsukashii PUBLIC frontend cores) +target_link_libraries(natsukashii PUBLIC frontend n64) target_include_directories(natsukashii PUBLIC . ../external) diff --git a/src/cores/common.hpp b/src/common.hpp similarity index 100% rename from src/cores/common.hpp rename to src/common.hpp diff --git a/src/cores/BaseCore.hpp b/src/cores/BaseCore.hpp deleted file mode 100644 index 138f1cd4..00000000 --- a/src/cores/BaseCore.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once -#include - -enum class System { - GameBoy, Nintendo64 -}; - -struct BaseCore { - virtual ~BaseCore() = default; - virtual void Run() {}; - virtual void PollInputs(u32) {}; - [[nodiscard]] bool& ShouldQuit() { return quit; } - bool initialized = false; - System system; -private: - bool quit = false; -}; \ No newline at end of file diff --git a/src/cores/CMakeLists.txt b/src/cores/CMakeLists.txt deleted file mode 100644 index 6bd41bef..00000000 --- a/src/cores/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.20) -project(cores CXX) - -add_subdirectory(n64) - -find_package(fmt REQUIRED) - -add_library(cores - common.hpp - util.hpp - BaseCore.hpp) - -target_link_libraries(cores PUBLIC fmt::fmt n64) -target_include_directories(cores PUBLIC . ../../external) \ No newline at end of file diff --git a/src/cores/n64/Core.hpp b/src/cores/n64/Core.hpp deleted file mode 100644 index ff5f8935..00000000 --- a/src/cores/n64/Core.hpp +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once -#include -#include -#include -#include - -namespace n64 { -struct Core : BaseCore { - ~Core() override = default; - explicit Core(const std::string&); - void Run() override; - void PollInputs(u32) override; - VI& GetVI() { return mem.mmio.vi; } -private: - Mem mem; - Cpu cpu; -}; -} diff --git a/src/frontend/imgui/CMakeLists.txt b/src/frontend/imgui/CMakeLists.txt index 9481ae5a..9dbfe1eb 100644 --- a/src/frontend/imgui/CMakeLists.txt +++ b/src/frontend/imgui/CMakeLists.txt @@ -10,7 +10,7 @@ add_library(frontend-imgui target_include_directories(frontend-imgui PUBLIC . - ../../cores + ../../n64 ../../../external ../../../external/parallel-rdp/parallel-rdp-standalone/vulkan ../../../external/parallel-rdp/parallel-rdp-standalone/util diff --git a/src/frontend/imgui/Window.cpp b/src/frontend/imgui/Window.cpp index f6dfac16..eb9b9fd8 100644 --- a/src/frontend/imgui/Window.cpp +++ b/src/frontend/imgui/Window.cpp @@ -1,14 +1,14 @@ #include #include #include -#include +#include #include #include #include -Window::Window(std::shared_ptr core) : core(std::move(core)) { +Window::Window(n64::Core& core) { InitSDL(); - LoadWSIPlatform(); + InitParallelRDP(core.GetRDRAM()); InitImgui(); } diff --git a/src/frontend/imgui/Window.hpp b/src/frontend/imgui/Window.hpp index 4cf80f99..07ac6201 100644 --- a/src/frontend/imgui/Window.hpp +++ b/src/frontend/imgui/Window.hpp @@ -6,11 +6,11 @@ #include #include #include -#include +#include #include struct Window { - explicit Window(std::shared_ptr core); + explicit Window(n64::Core& core); ~Window(); ImDrawData* Present(); @@ -20,7 +20,7 @@ struct Window { && event.window.windowID == SDL_GetWindowID(window); } private: - std::shared_ptr core; + n64::Core core; void InitSDL(); void InitImgui(); void Render(); diff --git a/src/cores/n64/CMakeLists.txt b/src/n64/CMakeLists.txt similarity index 57% rename from src/cores/n64/CMakeLists.txt rename to src/n64/CMakeLists.txt index e9845536..5065b9de 100644 --- a/src/cores/n64/CMakeLists.txt +++ b/src/n64/CMakeLists.txt @@ -8,10 +8,10 @@ add_library(n64 Core.hpp memory_regions.hpp) -target_link_libraries(n64 PUBLIC n64-core) +target_link_libraries(n64 PUBLIC core) target_include_directories(n64 PUBLIC . .. - ../../../external - ../../../external/imgui/imgui - ../../../external/imgui/imgui/backends) \ No newline at end of file + ../../external + ../../external/imgui/imgui + ../../external/imgui/imgui/backends) \ No newline at end of file diff --git a/src/cores/n64/Core.cpp b/src/n64/Core.cpp similarity index 76% rename from src/cores/n64/Core.cpp rename to src/n64/Core.cpp index e5618d5e..ecbe7ad4 100644 --- a/src/cores/n64/Core.cpp +++ b/src/n64/Core.cpp @@ -1,11 +1,9 @@ #include #include -#include "parallel-rdp/ParallelRDPWrapper.hpp" namespace n64 { Core::Core(const std::string& rom) { mem.LoadROM(rom); - LoadParallelRDP(mem.GetRDRAM()); } void Core::Run() { @@ -28,6 +26,5 @@ void Core::Run() { void Core::PollInputs(u32 windowID) { SDL_Event event; SDL_PollEvent(&event); - ShouldQuit() = event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == windowID; } } diff --git a/src/n64/Core.hpp b/src/n64/Core.hpp new file mode 100644 index 00000000..f31fd79d --- /dev/null +++ b/src/n64/Core.hpp @@ -0,0 +1,18 @@ +#pragma once +#include +#include +#include + +namespace n64 { +struct Core { + ~Core() = default; + explicit Core(const std::string&); + void Run(); + void PollInputs(u32); + VI& GetVI() { return mem.mmio.vi; } + const u8* GetRDRAM() { return mem.rdram.data(); } +private: + Mem mem; + Cpu cpu; +}; +} diff --git a/src/cores/n64/core/Audio.cpp b/src/n64/core/Audio.cpp similarity index 100% rename from src/cores/n64/core/Audio.cpp rename to src/n64/core/Audio.cpp diff --git a/src/cores/n64/core/Audio.hpp b/src/n64/core/Audio.hpp similarity index 100% rename from src/cores/n64/core/Audio.hpp rename to src/n64/core/Audio.hpp diff --git a/src/cores/n64/core/CMakeLists.txt b/src/n64/core/CMakeLists.txt similarity index 71% rename from src/cores/n64/core/CMakeLists.txt rename to src/n64/core/CMakeLists.txt index e7a27bfd..a7d96c59 100644 --- a/src/cores/n64/core/CMakeLists.txt +++ b/src/n64/core/CMakeLists.txt @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.20) -project(n64-core) +project(core) add_subdirectory(cpu) -add_subdirectory(../../../../external/parallel-rdp temp) +add_subdirectory(../../../external/parallel-rdp temp) -add_library(n64-core +add_library(core Cpu.hpp Cpu.cpp Mem.cpp @@ -37,13 +37,13 @@ add_library(n64-core rsp/decode.cpp rsp/instructions.cpp) -target_include_directories(n64-core PUBLIC +target_include_directories(core PUBLIC . .. ../.. - ../../../../external + ../../../external ../../../external/imgui/imgui ../../../external/imgui/imgui/backends mmio) -target_link_libraries(n64-core PUBLIC n64-cpu parallel-rdp) +target_link_libraries(core PUBLIC cpu parallel-rdp) diff --git a/src/cores/n64/core/Cpu.cpp b/src/n64/core/Cpu.cpp similarity index 100% rename from src/cores/n64/core/Cpu.cpp rename to src/n64/core/Cpu.cpp diff --git a/src/cores/n64/core/Cpu.hpp b/src/n64/core/Cpu.hpp similarity index 100% rename from src/cores/n64/core/Cpu.hpp rename to src/n64/core/Cpu.hpp diff --git a/src/cores/n64/core/MMIO.cpp b/src/n64/core/MMIO.cpp similarity index 100% rename from src/cores/n64/core/MMIO.cpp rename to src/n64/core/MMIO.cpp diff --git a/src/cores/n64/core/MMIO.hpp b/src/n64/core/MMIO.hpp similarity index 100% rename from src/cores/n64/core/MMIO.hpp rename to src/n64/core/MMIO.hpp diff --git a/src/cores/n64/core/Mem.cpp b/src/n64/core/Mem.cpp similarity index 100% rename from src/cores/n64/core/Mem.cpp rename to src/n64/core/Mem.cpp diff --git a/src/cores/n64/core/Mem.hpp b/src/n64/core/Mem.hpp similarity index 100% rename from src/cores/n64/core/Mem.hpp rename to src/n64/core/Mem.hpp diff --git a/src/cores/n64/core/RDP.cpp b/src/n64/core/RDP.cpp similarity index 100% rename from src/cores/n64/core/RDP.cpp rename to src/n64/core/RDP.cpp diff --git a/src/cores/n64/core/RDP.hpp b/src/n64/core/RDP.hpp similarity index 100% rename from src/cores/n64/core/RDP.hpp rename to src/n64/core/RDP.hpp diff --git a/src/cores/n64/core/RSP.cpp b/src/n64/core/RSP.cpp similarity index 100% rename from src/cores/n64/core/RSP.cpp rename to src/n64/core/RSP.cpp diff --git a/src/cores/n64/core/RSP.hpp b/src/n64/core/RSP.hpp similarity index 100% rename from src/cores/n64/core/RSP.hpp rename to src/n64/core/RSP.hpp diff --git a/src/cores/n64/core/cpu/CMakeLists.txt b/src/n64/core/cpu/CMakeLists.txt similarity index 74% rename from src/cores/n64/core/cpu/CMakeLists.txt rename to src/n64/core/cpu/CMakeLists.txt index a28293ab..8df0f3bf 100644 --- a/src/cores/n64/core/cpu/CMakeLists.txt +++ b/src/n64/core/cpu/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.20) -project(n64-cpu) +project(cpu) -add_library(n64-cpu +add_library(cpu Registers.cpp Registers.hpp registers/Cop0.cpp @@ -13,5 +13,5 @@ add_library(n64-cpu registers/cop1instructions.cpp instructions.cpp) -target_include_directories(n64-cpu PUBLIC registers . .. ../../ +target_include_directories(cpu PUBLIC registers . .. ../../ ../../../../../external ../../../) diff --git a/src/cores/n64/core/cpu/Registers.cpp b/src/n64/core/cpu/Registers.cpp similarity index 100% rename from src/cores/n64/core/cpu/Registers.cpp rename to src/n64/core/cpu/Registers.cpp diff --git a/src/cores/n64/core/cpu/Registers.hpp b/src/n64/core/cpu/Registers.hpp similarity index 100% rename from src/cores/n64/core/cpu/Registers.hpp rename to src/n64/core/cpu/Registers.hpp diff --git a/src/cores/n64/core/cpu/decode.cpp b/src/n64/core/cpu/decode.cpp similarity index 100% rename from src/cores/n64/core/cpu/decode.cpp rename to src/n64/core/cpu/decode.cpp diff --git a/src/cores/n64/core/cpu/instructions.cpp b/src/n64/core/cpu/instructions.cpp similarity index 100% rename from src/cores/n64/core/cpu/instructions.cpp rename to src/n64/core/cpu/instructions.cpp diff --git a/src/cores/n64/core/cpu/registers/Cop0.cpp b/src/n64/core/cpu/registers/Cop0.cpp similarity index 100% rename from src/cores/n64/core/cpu/registers/Cop0.cpp rename to src/n64/core/cpu/registers/Cop0.cpp diff --git a/src/cores/n64/core/cpu/registers/Cop0.hpp b/src/n64/core/cpu/registers/Cop0.hpp similarity index 100% rename from src/cores/n64/core/cpu/registers/Cop0.hpp rename to src/n64/core/cpu/registers/Cop0.hpp diff --git a/src/cores/n64/core/cpu/registers/Cop1.cpp b/src/n64/core/cpu/registers/Cop1.cpp similarity index 100% rename from src/cores/n64/core/cpu/registers/Cop1.cpp rename to src/n64/core/cpu/registers/Cop1.cpp diff --git a/src/cores/n64/core/cpu/registers/Cop1.hpp b/src/n64/core/cpu/registers/Cop1.hpp similarity index 100% rename from src/cores/n64/core/cpu/registers/Cop1.hpp rename to src/n64/core/cpu/registers/Cop1.hpp diff --git a/src/cores/n64/core/cpu/registers/cop0instructions.cpp b/src/n64/core/cpu/registers/cop0instructions.cpp similarity index 100% rename from src/cores/n64/core/cpu/registers/cop0instructions.cpp rename to src/n64/core/cpu/registers/cop0instructions.cpp diff --git a/src/cores/n64/core/cpu/registers/cop1instructions.cpp b/src/n64/core/cpu/registers/cop1instructions.cpp similarity index 100% rename from src/cores/n64/core/cpu/registers/cop1instructions.cpp rename to src/n64/core/cpu/registers/cop1instructions.cpp diff --git a/src/cores/n64/core/mmio/AI.cpp b/src/n64/core/mmio/AI.cpp similarity index 100% rename from src/cores/n64/core/mmio/AI.cpp rename to src/n64/core/mmio/AI.cpp diff --git a/src/cores/n64/core/mmio/AI.hpp b/src/n64/core/mmio/AI.hpp similarity index 100% rename from src/cores/n64/core/mmio/AI.hpp rename to src/n64/core/mmio/AI.hpp diff --git a/src/cores/n64/core/mmio/Interrupt.cpp b/src/n64/core/mmio/Interrupt.cpp similarity index 100% rename from src/cores/n64/core/mmio/Interrupt.cpp rename to src/n64/core/mmio/Interrupt.cpp diff --git a/src/cores/n64/core/mmio/Interrupt.hpp b/src/n64/core/mmio/Interrupt.hpp similarity index 100% rename from src/cores/n64/core/mmio/Interrupt.hpp rename to src/n64/core/mmio/Interrupt.hpp diff --git a/src/cores/n64/core/mmio/MI.cpp b/src/n64/core/mmio/MI.cpp similarity index 100% rename from src/cores/n64/core/mmio/MI.cpp rename to src/n64/core/mmio/MI.cpp diff --git a/src/cores/n64/core/mmio/MI.hpp b/src/n64/core/mmio/MI.hpp similarity index 100% rename from src/cores/n64/core/mmio/MI.hpp rename to src/n64/core/mmio/MI.hpp diff --git a/src/cores/n64/core/mmio/PI.cpp b/src/n64/core/mmio/PI.cpp similarity index 100% rename from src/cores/n64/core/mmio/PI.cpp rename to src/n64/core/mmio/PI.cpp diff --git a/src/cores/n64/core/mmio/PI.hpp b/src/n64/core/mmio/PI.hpp similarity index 100% rename from src/cores/n64/core/mmio/PI.hpp rename to src/n64/core/mmio/PI.hpp diff --git a/src/cores/n64/core/mmio/PIF.cpp b/src/n64/core/mmio/PIF.cpp similarity index 100% rename from src/cores/n64/core/mmio/PIF.cpp rename to src/n64/core/mmio/PIF.cpp diff --git a/src/cores/n64/core/mmio/PIF.hpp b/src/n64/core/mmio/PIF.hpp similarity index 100% rename from src/cores/n64/core/mmio/PIF.hpp rename to src/n64/core/mmio/PIF.hpp diff --git a/src/cores/n64/core/mmio/RI.cpp b/src/n64/core/mmio/RI.cpp similarity index 100% rename from src/cores/n64/core/mmio/RI.cpp rename to src/n64/core/mmio/RI.cpp diff --git a/src/cores/n64/core/mmio/RI.hpp b/src/n64/core/mmio/RI.hpp similarity index 100% rename from src/cores/n64/core/mmio/RI.hpp rename to src/n64/core/mmio/RI.hpp diff --git a/src/cores/n64/core/mmio/SI.cpp b/src/n64/core/mmio/SI.cpp similarity index 100% rename from src/cores/n64/core/mmio/SI.cpp rename to src/n64/core/mmio/SI.cpp diff --git a/src/cores/n64/core/mmio/SI.hpp b/src/n64/core/mmio/SI.hpp similarity index 100% rename from src/cores/n64/core/mmio/SI.hpp rename to src/n64/core/mmio/SI.hpp diff --git a/src/cores/n64/core/mmio/VI.cpp b/src/n64/core/mmio/VI.cpp similarity index 100% rename from src/cores/n64/core/mmio/VI.cpp rename to src/n64/core/mmio/VI.cpp diff --git a/src/cores/n64/core/mmio/VI.hpp b/src/n64/core/mmio/VI.hpp similarity index 100% rename from src/cores/n64/core/mmio/VI.hpp rename to src/n64/core/mmio/VI.hpp diff --git a/src/cores/n64/core/rsp/decode.cpp b/src/n64/core/rsp/decode.cpp similarity index 100% rename from src/cores/n64/core/rsp/decode.cpp rename to src/n64/core/rsp/decode.cpp diff --git a/src/cores/n64/core/rsp/instructions.cpp b/src/n64/core/rsp/instructions.cpp similarity index 100% rename from src/cores/n64/core/rsp/instructions.cpp rename to src/n64/core/rsp/instructions.cpp diff --git a/src/cores/n64/memory_regions.hpp b/src/n64/memory_regions.hpp similarity index 100% rename from src/cores/n64/memory_regions.hpp rename to src/n64/memory_regions.hpp diff --git a/src/cores/util.hpp b/src/util.hpp similarity index 100% rename from src/cores/util.hpp rename to src/util.hpp