summaryrefslogtreecommitdiff
path: root/bus.hpp
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2022-09-03 17:33:07 +0300
committerOxore <oxore@protonmail.com>2022-09-03 17:33:07 +0300
commitd2b615061e008c4d13a6ce0f11efd8ec337f41c6 (patch)
tree0aab1cc72db576761524267ea3594a21db14b829 /bus.hpp
parent9037b017d6519fed435eea20c3553d40d871d379 (diff)
Impl breakpoints (pretty much draft)
Breakpoints work somehow, but overstep 1 instruction. Needs to be fixed.
Diffstat (limited to 'bus.hpp')
-rw-r--r--bus.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/bus.hpp b/bus.hpp
index baa65be..1b4503d 100644
--- a/bus.hpp
+++ b/bus.hpp
@@ -3,6 +3,10 @@
#pragma once
+#include <cstdint>
+#include <vector>
+#include <algorithm>
+
#define ROM_START (0)
#define ROM_SIZE (0x400000)
#define RAM_START (0xFF0000)
@@ -12,7 +16,12 @@
#define IO2_START (0xC00000)
#define IO2_SIZE (0x20)
+struct Breakpoint {
+ uint32_t offset, length;
+};
+
extern unsigned char g_rom[ROM_SIZE];
extern unsigned char g_ram[RAM_SIZE];
extern unsigned char g_io1[IO1_SIZE];
extern unsigned char g_io2[IO2_SIZE];
+extern std::vector<Breakpoint> code_bkpts, read_bkpts, write_bkpts, access_bkpts;