Creating a common CPU class

This commit is contained in:
AnonymusRaccoon
2020-02-05 16:15:45 +01:00
parent 52f1d9fe6e
commit d86b09dbb6
4 changed files with 30 additions and 3 deletions
+2 -2
View File
@@ -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
+2 -1
View File
@@ -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{};
+10
View File
@@ -0,0 +1,10 @@
//
// Created by anonymus-raccoon on 2/5/20.
//
#include "CommonCpu.hpp"
namespace ComSquare::CPU
{
}
+16
View File
@@ -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