From ba38f85b038b7ed1f08b60ddbe94ede235b2c132 Mon Sep 17 00:00:00 2001 From: SergioMartin86 Date: Sat, 24 Feb 2024 06:58:23 +0000 Subject: [PATCH] Creating new accessors --- source/quickerNES/core/emu.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/quickerNES/core/emu.hpp b/source/quickerNES/core/emu.hpp index a3e1cce..b11c655 100644 --- a/source/quickerNES/core/emu.hpp +++ b/source/quickerNES/core/emu.hpp @@ -235,6 +235,15 @@ class Emu uint8_t get_ppu2000() const { return emu.ppu.w2000; } + void get_regs(unsigned int *dest) const + { + dest[0] = emu.r.a; + dest[1] = emu.r.x; + dest[2] = emu.r.y; + dest[3] = emu.r.sp; + dest[4] = emu.r.pc; + dest[5] = emu.r.status; + } private: frame_t *frame_;