summaryrefslogtreecommitdiff
path: root/src/cpu/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/core.h')
-rw-r--r--src/cpu/core.h31
1 files changed, 9 insertions, 22 deletions
diff --git a/src/cpu/core.h b/src/cpu/core.h
index 7c0f284..f83002f 100644
--- a/src/cpu/core.h
+++ b/src/cpu/core.h
@@ -1,12 +1,9 @@
#pragma once
-typedef
-unsigned char
-byte;
+#include <stdint.h>
-typedef
-unsigned short
-address;
+typedef uint8_t byte;
+typedef uint16_t address;
extern byte acc;
extern byte X;
@@ -17,7 +14,6 @@ extern address PC;
extern byte* Memory;
extern byte ROM[];
-
enum Addressing
{
eImmediate,
@@ -34,28 +30,19 @@ enum Addressing
eIndirectAbsolute,
eRelative
};
+
typedef
int
Addressing;
-typedef
-struct AddData
+struct State
{
int cycles;
int length;
- address add;
+ address address;
byte value;
-}
-AddData;
-
-
-
-// GetMemory and SetMemory are declared here, but defined in apple.c
-// This is because memory access of particular memory locations is influenced by the Apple I's specific setup, not by the CPU alone.
-byte GetMemory(address x);
-void SetMemory(address x, byte y);
+};
-extern void *current_instruction;
-extern AddData idata;
-extern void (*func)(Addressing);
+extern struct State state;
+extern void (*Instruction)(Addressing);