summaryrefslogtreecommitdiff
path: root/src/CPUContext.h
diff options
context:
space:
mode:
author0x221E <0x221E@0xinfinity.dev>2026-04-12 16:59:40 +0200
committer0x221E <0x221E@0xinfinity.dev>2026-04-12 16:59:40 +0200
commita66c7433c2c11b8b6c99142277ed4e16b1a2a465 (patch)
treee54bcfb59c303acf6118fd11f06d5c0bd5f24e5d /src/CPUContext.h
initial commitHEADmaster
Diffstat (limited to 'src/CPUContext.h')
-rw-r--r--src/CPUContext.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/CPUContext.h b/src/CPUContext.h
new file mode 100644
index 0000000..a1402e6
--- /dev/null
+++ b/src/CPUContext.h
@@ -0,0 +1,19 @@
+#pragma once
+
+struct Instruction;
+struct Bus;
+
+#include <cstdint>
+#include <memory>
+
+struct CPUContext {
+ Instruction& m_Instruction;
+ uint32_t& m_InstructionPointer;
+ uint32_t& m_Flags;
+ uint32_t* m_Registers;
+ std::shared_ptr<Bus> m_Bus;
+ bool& m_IsHalted;
+
+ CPUContext(Instruction& i, uint32_t& ip, uint32_t& flags, uint32_t* reg, std::shared_ptr<Bus>& bus, bool& isHalted);
+ ~CPUContext();
+};