package cpu import cpu.opcodes.* import ram.Ram class Cpu { val registers = Registers() val ram = Ram() var standardOpcodes: Map var extendedOpcodes: Map init { val stdCommandGroup: MutableMap = mutableMapOf() stdCommandGroup.putAll(loads8Bit) stdCommandGroup.putAll(loads16Bit) stdCommandGroup.putAll(arithmetic8Bit) stdCommandGroup.putAll(arithmetic16Bit) stdCommandGroup.putAll(misc) standardOpcodes = stdCommandGroup.toMap() val extCommandGroup: MutableMap = mutableMapOf() extCommandGroup.putAll(miscExtended) extendedOpcodes = extCommandGroup.toMap() } }