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
+4 -4
View File
@@ -10,6 +10,7 @@
#include "QtSFML.hpp"
#include "../../Exceptions/InvalidOpcode.hpp"
#include "../../Exceptions/InvalidAddress.hpp"
#include "../../Exceptions/InvalidAction.hpp"
#ifdef Q_WS_X11
#include <Qt/qx11info_x11.h>
@@ -86,10 +87,9 @@ namespace ComSquare::Renderer
{
try {
this->_snes.update();
} catch (InvalidOpcode &e) {
this->_snes.enableCPUDebugging();
} catch (InvalidAddress &e) {
this->_snes.enableCPUDebugging();
} catch (DebuggableError &e) {
std::cout << "Invalid rom's instruction: " << e.what() << std::endl;
this->_snes.enableCPUDebugging(true);
} catch (std::exception &e) {
std::cerr << "An error occurred: " << e.what() << std::endl;
QApplication::quit();