protected override void Update(GameTime gameTime) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) { Exit(); } chip.EmulateCycle(); chip.SetKeys(chipInput.GetPressedKeys()); if (chip.PlaySound) { chipSound.Play(); } else { chipSound.Pause(); } UserInterface.Active.Update(gameTime); base.Update(gameTime); }
public void Op00E0() { // set the first instruction to 0x00E0 chip8.Memory[0x0200] = 0x00; chip8.Memory[0x0201] = 0xE0; // change the graphics memory chip8.Graphics[0] = 0xF; chip8.EmulateCycle(); // check that it got cleared Assert.AreEqual(0, chip8.Graphics[0]); }