public CPU() { Memory = new byte[65536]; Registers = new CPURegisters(); Flag = new CPUFlag(); IO = new CPUIO(); Bus = new CPUBus(); Bus.InterruptInvoked += InterruptHandler; }
public void Reset(byte[] rom) { Memory = new byte[65536]; Registers = new CPURegisters(); Flag = new CPUFlag(); IO = new CPUIO(); Bus = new CPUBus(); Bus.InterruptInvoked += InterruptHandler; Array.Copy(rom, 0, Memory, 0, rom.Length); ROMSize = (ushort)rom.Length; }