From 53b5c56465c23b8070515e4191232a83d634ea3b Mon Sep 17 00:00:00 2001 From: nick-less Date: Sun, 16 Dec 2018 18:24:04 +0100 Subject: [PATCH] add method to set Registers and retrieve PC --- include/Cpu65816.hpp | 3 +++ src/Cpu65816.cpp | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/include/Cpu65816.hpp b/include/Cpu65816.hpp index a782555..a635240 100644 --- a/include/Cpu65816.hpp +++ b/include/Cpu65816.hpp @@ -47,6 +47,9 @@ class Cpu65816 { // Temporary bool executeNextInstruction(); + void setXL(uint8_t x); + void setYL(uint8_t y); + Address getProgramAddress(); private: SystemBus &mSystemBus; diff --git a/src/Cpu65816.cpp b/src/Cpu65816.cpp index 2b9d4a8..b7c0334 100644 --- a/src/Cpu65816.cpp +++ b/src/Cpu65816.cpp @@ -34,6 +34,19 @@ Cpu65816::Cpu65816(SystemBus &systemBus, EmulationModeInterrupts *emulationInter mStack(&mSystemBus) { } + +void Cpu65816::setXL(uint8_t x) { + mX = x; +} +void Cpu65816::setYL(uint8_t y) { + mY = y; + +} +Address Cpu65816::getProgramAddress() { + return mProgramAddress; +} + + /** * Resets the cpu to its initial state. * */