aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/cpu/Cpu.kt
diff options
context:
space:
mode:
authorJames Barnett <noreply@jamesbarnett.xyz>2018-06-14 21:18:14 +0100
committerJames Barnett <noreply@jamesbarnett.xyz>2018-06-14 21:18:14 +0100
commitcf0f98348c5f4df57d3adb44418cc2911e7b37b7 (patch)
tree8ee74dfcbd402e7966f8e57440a54ba34d35d899 /src/main/kotlin/cpu/Cpu.kt
parent1d66a2c79cf98970ee80cbb1fe4262fa95c885dd (diff)
downloadKGB-cf0f98348c5f4df57d3adb44418cc2911e7b37b7.tar.xz
KGB-cf0f98348c5f4df57d3adb44418cc2911e7b37b7.zip
Make a start on opcodes
Diffstat (limited to 'src/main/kotlin/cpu/Cpu.kt')
-rw-r--r--src/main/kotlin/cpu/Cpu.kt18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/kotlin/cpu/Cpu.kt b/src/main/kotlin/cpu/Cpu.kt
new file mode 100644
index 0000000..7ea34a4
--- /dev/null
+++ b/src/main/kotlin/cpu/Cpu.kt
@@ -0,0 +1,18 @@
+package cpu
+
+import cpu.opcodes.loads8Bit
+import ram.Ram
+
+class Cpu {
+
+ val registers = Registers()
+ val ram = Ram()
+
+ var opcodes: Map<Int, Operation>
+ init {
+ val commandGroups: MutableMap<Int, Operation> = mutableMapOf()
+ commandGroups.putAll(loads8Bit)
+ opcodes = commandGroups.toMap()
+ }
+
+} \ No newline at end of file