示例#1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            for (int i = 0; i < 50; i++)
            {
                _chip8.Cycle();
            }

            _chip8.Tick();
            _chip8.Chip8Display.UpdateDisplay();
        }
示例#2
0
    protected override void OnUpdateFrame(FrameEventArgs e)
    {
        chip.Cycle();
        KeyboardState input = Keyboard.GetState();

        HandleKey(input, Key.Keypad0, 0x0);
        HandleKey(input, Key.Keypad1, 0x1);
        HandleKey(input, Key.Keypad2, 0x2);
        HandleKey(input, Key.Keypad3, 0x3);
        HandleKey(input, Key.Keypad4, 0x4);
        HandleKey(input, Key.Keypad5, 0x5);
        HandleKey(input, Key.Keypad6, 0x6);
        HandleKey(input, Key.Keypad7, 0x7);
        HandleKey(input, Key.Keypad8, 0x8);
        HandleKey(input, Key.Keypad9, 0x9);
        HandleKey(input, Key.A, 0xA);
        HandleKey(input, Key.S, 0xB);
        HandleKey(input, Key.D, 0xC);
        HandleKey(input, Key.F, 0xD);
        HandleKey(input, Key.G, 0xE);
        HandleKey(input, Key.H, 0xF);
        base.OnUpdateFrame(e);
    }
示例#3
0
 /// <summary>
 ///
 ///        The systems memory map:
 ///
 ///    0x000-0x1FF - Chip 8 interpreter (contains font set in emu)
 ///    0x050-0x0A0 - Used for the built in 4x5 pixel font set (0-F)
 ///    0x200-0xFFF - Program ROM and work RAM
 ///
 ///
 /// </summary>
 public void Run()
 {
     chip8.Cycle();
 }