Implementing an array of instructions with method's pointer for the CPU (it does not work well for now

This commit is contained in:
Anonymus Raccoon
2020-03-26 03:39:55 +01:00
parent 4b9f8002b9
commit bd948b520c
25 changed files with 924 additions and 724 deletions
+15
View File
@@ -0,0 +1,15 @@
//
// Created by anonymus-raccoon on 3/26/20.
//
#ifndef COMSQUARE_DEBUGGABLEERROR_HPP
#define COMSQUARE_DEBUGGABLEERROR_HPP
#include <bits/exception.h>
namespace ComSquare
{
class DebuggableError : public std::exception {};
}
#endif //COMSQUARE_DEBUGGABLEERROR_HPP
+2 -1
View File
@@ -7,11 +7,12 @@
#include <exception>
#include <string>
#include "DebuggableError.hpp"
namespace ComSquare
{
//! @brief Exception thrown when someone tries to load an invalid rom.
class InvalidAction : public std::exception {
class InvalidAction : public DebuggableError {
private:
std::string _msg;
public:
+2 -1
View File
@@ -9,11 +9,12 @@
#include <string>
#include <ios>
#include <sstream>
#include "DebuggableError.hpp"
namespace ComSquare
{
//! @brief Exception thrown when trying to read/write to an invalid address.
class InvalidAddress : public std::exception {
class InvalidAddress : public DebuggableError {
private:
std::string _msg;
public:
+2 -1
View File
@@ -8,11 +8,12 @@
#include <exception>
#include <string>
#include <sstream>
#include "DebuggableError.hpp"
namespace ComSquare
{
//! @brief Exception thrown when someone tries to load an invalid rom.
class InvalidOpcode : public std::exception {
class InvalidOpcode : public DebuggableError {
private:
std::string _msg;
public:
+2 -1
View File
@@ -7,11 +7,12 @@
#include <exception>
#include <string>
#include "DebuggableError.hpp"
namespace ComSquare
{
//! @brief Exception thrown when someone tries to load an invalid rom.
class InvalidRomException : public std::exception {
class InvalidRomException : public DebuggableError {
private:
std::string _msg;
public: