diff --git a/CMakeLists.txt b/CMakeLists.txt index 77bbd3a..1e1f96a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ add_executable(unit_tests sources/APU/DSP/DSP.hpp sources/Memory/RectangleShadow.cpp sources/Memory/RectangleShadow.hpp -) + sources/CPU/CommonCpu.cpp sources/CPU/CommonCpu.hpp) # include criterion & coverage target_link_libraries(unit_tests criterion -lgcov) @@ -84,7 +84,7 @@ add_executable(ComSquare sources/Cartridge/InterruptVectors.hpp sources/Memory/RectangleShadow.cpp sources/Memory/RectangleShadow.hpp -) + sources/CPU/CommonCpu.cpp sources/CPU/CommonCpu.hpp) target_link_libraries(ComSquare sfml-graphics diff --git a/sources/CPU/CPU.hpp b/sources/CPU/CPU.hpp index 18660e2..0c8d9ee 100644 --- a/sources/CPU/CPU.hpp +++ b/sources/CPU/CPU.hpp @@ -8,6 +8,7 @@ #include "../Memory/IMemory.hpp" #include "../Memory/MemoryBus.hpp" #include "../Models/Ints.hpp" +#include "CommonCpu.hpp" namespace ComSquare::CPU { @@ -174,7 +175,7 @@ namespace ComSquare::CPU }; //! @brief The main CPU - class CPU : public Memory::IMemory { + class CPU : public CommonCPU, public Memory::IMemory { private: //! @brief All the registers of the CPU Registers _registers{}; diff --git a/sources/CPU/CommonCpu.cpp b/sources/CPU/CommonCpu.cpp new file mode 100644 index 0000000..732c482 --- /dev/null +++ b/sources/CPU/CommonCpu.cpp @@ -0,0 +1,10 @@ +// +// Created by anonymus-raccoon on 2/5/20. +// + +#include "CommonCpu.hpp" + +namespace ComSquare::CPU +{ + +} \ No newline at end of file diff --git a/sources/CPU/CommonCpu.hpp b/sources/CPU/CommonCpu.hpp new file mode 100644 index 0000000..03ba660 --- /dev/null +++ b/sources/CPU/CommonCpu.hpp @@ -0,0 +1,16 @@ +// +// Created by anonymus-raccoon on 2/5/20. +// + +#ifndef COMSQUARE_COMMONCPU_HPP +#define COMSQUARE_COMMONCPU_HPP + +namespace ComSquare::CPU +{ + //! @brief The shared states of the Main's CPU and the APU's CPU. + class CommonCPU { + + }; +} + +#endif //COMSQUARE_COMMONCPU_HPP