Пример #1
0
        public Form1()
        {
            InitializeComponent();
            cpu = new CPU();
            bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height);
            g   = Graphics.FromImage(bmp);

            cpu.InitMemory();
            cpu.LoadProgram(File.ReadAllBytes("minimal.ch8"));

            Thread t = new Thread(() => { while (true)
                                          {
                                              cpu.RunCycle(); Thread.Sleep(new TimeSpan(1000));
                                          }
                                  });
            //t.Start();
        }