diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2018-07-10 20:22:45 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2018-07-10 20:22:45 +0100 |
| commit | d12c7fdd3860ae3a901e0f26627eab5f47af96d4 (patch) | |
| tree | 5cd4e857f5fb20ab8a0f2b3586dcc8df21357c67 /src/main/kotlin/cpu/Cpu.kt | |
| parent | 1193b3a6707e0a6a5626d8a3238252dd2eeaa31b (diff) | |
| download | KGB-d12c7fdd3860ae3a901e0f26627eab5f47af96d4.tar.xz KGB-d12c7fdd3860ae3a901e0f26627eab5f47af96d4.zip | |
Move SWAP ops into the extended CB prefixed set
Diffstat (limited to 'src/main/kotlin/cpu/Cpu.kt')
| -rw-r--r-- | src/main/kotlin/cpu/Cpu.kt | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/main/kotlin/cpu/Cpu.kt b/src/main/kotlin/cpu/Cpu.kt index 3180aeb..ad006d9 100644 --- a/src/main/kotlin/cpu/Cpu.kt +++ b/src/main/kotlin/cpu/Cpu.kt @@ -8,15 +8,22 @@ class Cpu { val registers = Registers() val ram = Ram() - var opcodes: Map<Int, Operation> + var standardOpcodes: Map<Int, Operation> + var extendedOpcodes: Map<Int, Operation> init { - val commandGroups: MutableMap<Int, Operation> = mutableMapOf() - commandGroups.putAll(loads8Bit) - commandGroups.putAll(loads16Bit) - commandGroups.putAll(arithmetic8Bit) - commandGroups.putAll(arithmetic16Bit) - commandGroups.putAll(misc) - opcodes = commandGroups.toMap() + val stdCommandGroup: MutableMap<Int, Operation> = mutableMapOf() + stdCommandGroup.putAll(loads8Bit) + stdCommandGroup.putAll(loads16Bit) + stdCommandGroup.putAll(arithmetic8Bit) + stdCommandGroup.putAll(arithmetic16Bit) + stdCommandGroup.putAll(misc) + standardOpcodes = stdCommandGroup.toMap() + + val extCommandGroup: MutableMap<Int, Operation> = mutableMapOf() + extCommandGroup.putAll(miscExtended) + extendedOpcodes = extCommandGroup.toMap() + + } }
\ No newline at end of file |