protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.F2) { State.StateSystem.saveState("save.state"); } if (keyData == Keys.F3) { State.StateSystem.loadState("save.state"); } if (keyData == Keys.F11) { DebugFunctions.Z80Form().DoStepInto(); DebugFunctions.CodeViewForm().GotoPC(); return(true); // indicate that you handled this keystroke } if (keyData == Keys.F10) { DebugFunctions.Z80Form().DoStepOver(); DebugFunctions.CodeViewForm().GotoPC(); return(true); // indicate that you handled this keystroke } if (keyData == Keys.F5) { DebugFunctions.Z80Form().DoStart(); return(true); // indicate that you handled this keystroke } if (keyData == Keys.F6) { DebugFunctions.Z80Form().DoStop(); return(true); // indicate that you handled this keystroke } // Call the base class return(base.ProcessCmdKey(ref msg, keyData)); }
////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// private void UpdateCpu() { if (m_halted) { //m_interruptsMgr.Update(); //return; byte b = 0; byte b1 = GameBoy.Ram.ReadByteAt(0xFF0F); byte b2 = GameBoy.Ram.ReadByteAt(0xFFFF); b = (byte)(b1 & b2); if (b != 0x00) { /* * The interrupt-enable flag and its corresponding interrupt request flag are set * IME = 0 (Interrupt Master Enable flag disabled) * Starting address: address following that of the HALT instruction * IME = 1 (Interrupt Master Enable flag enabled) * Starting address: each interrupt starting address */ if (m_ImeFlag) { m_interruptsMgr.Update(); } m_halted = false; } else { return; } } if (!m_DmaTransfertStarted) { if (GameBoy.IsDebuggerEnabled()) { if (!m_IsDebbugerReady) { m_IsDebbugerReady = DebugFunctions.IsReady(); } if (m_IsDebbugerReady && DebugFunctions.CodeViewForm().DoBreakIfNeeded(GameBoy.Cpu.PC)) { GameBoy.Cpu.Stop(); } if (m_IsDebbugerReady && RunOneInstruction(true)) { ReInitDebug(); } } else { RunOneInstruction(false); } } CheckDMA(); }
private void btn_StepOver_Click(object sender, EventArgs e) { m_autoStep = true; DoStepOver(); DebugFunctions.CodeViewForm().GotoPC(); }
////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// private void btn_StepInto_Click(object sender, EventArgs e) { DoStepInto(); DebugFunctions.CodeViewForm().GotoPC(); }