Example #1
0
        private static void CreateTest(string name, byte[] program)
        {
            var cpu = new B33Cpu.B33Cpu {
                Name = name
            };

            cpu.Hardware.Add(new B33Cpu.Hardware.B33Sound());

            cpu.B33Stopped += B33Stopped;
            cpu.LoadProgram(program, 0x1000, 0x1000);
            cpu.Start();
            _testCounter++;
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ////B33MainScreen.Poke(40960, 65);
            ////B33MainScreen.Poke(40960 + 2, 66);
            ////B33MainScreen.Poke(40961, 31);
            ////B33MainScreen.Poke(40961+2, 31);
            ////B33MainScreen.Poke(40961+80, 31);
            //int num = 49;

            //for (int i = 0; i < 1000; i += 2)
            //{
            //    B33MainScreen.Poke((ushort) (40960+i), (byte) num);
            //    B33MainScreen.Poke((ushort) (40961 + i), (byte) 31);
            //    num++;
            //    if (num > 57)
            //        num = 48;

            //}

            //B33MainScreen.Poke(40961+80, 63);
            _cpu.Start();
        }