mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-05-23 06:48:25 +00:00
Creating a common CPU class
This commit is contained in:
+2
-2
@@ -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
@@ -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{};
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// Created by anonymus-raccoon on 2/5/20.
|
||||
//
|
||||
|
||||
#include "CommonCpu.hpp"
|
||||
|
||||
namespace ComSquare::CPU
|
||||
{
|
||||
|
||||
}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user