예제 #1
0
파일: Form1.cs 프로젝트: DualBrain/Chip8
        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();
        }