예제 #1
0
 public CPU()
 {
     Memory                = new byte[65536];
     Registers             = new CPURegisters();
     Flag                  = new CPUFlag();
     IO                    = new CPUIO();
     Bus                   = new CPUBus();
     Bus.InterruptInvoked += InterruptHandler;
 }
예제 #2
0
 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;
 }