Atari 2600 Debugger - implement Step Into button
This commit is contained in:
parent
af60a42003
commit
e68e691e3c
|
@ -141,7 +141,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public bool UpdateBefore
|
||||
{
|
||||
get { return false; } // TODO: think about this
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public void UpdateValues()
|
||||
|
@ -242,39 +242,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
#region Events
|
||||
private void BreakpointCallback()
|
||||
{
|
||||
GlobalWin.MainForm.PauseEmulator();
|
||||
UpdateValues();
|
||||
}
|
||||
|
||||
#region Menu
|
||||
|
||||
private void ExitMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void StepBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_core.CycleAdvance();
|
||||
UpdateValues();
|
||||
|
||||
}
|
||||
|
||||
private void ScanlineAdvanceBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_core.ScanlineAdvance();
|
||||
UpdateValues();
|
||||
}
|
||||
|
||||
private void FrameAdvButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
_core.FrameAdvance(true, true);
|
||||
UpdateValues();
|
||||
}
|
||||
|
||||
private void RefreshFloatingWindowControl()
|
||||
{
|
||||
Owner = Global.Config.RamSearchSettings.FloatingWindow ? null : GlobalWin.MainForm;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void OptionsSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
AutoloadMenuItem.Checked = Global.Config.Atari2600DebuggerAutoload;
|
||||
|
@ -312,12 +292,59 @@ namespace BizHawk.Client.EmuHawk
|
|||
RefreshFloatingWindowControl();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Dialog Events
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
RefreshFloatingWindowControl();
|
||||
base.OnShown(e);
|
||||
}
|
||||
|
||||
private void StepBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
var size = opsize[_core.Op];
|
||||
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
_core.CycleAdvance();
|
||||
}
|
||||
|
||||
UpdateValues();
|
||||
|
||||
}
|
||||
|
||||
private void ScanlineAdvanceBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_core.ScanlineAdvance();
|
||||
UpdateValues();
|
||||
}
|
||||
|
||||
private void FrameAdvButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
_core.FrameAdvance(true, true);
|
||||
UpdateValues();
|
||||
}
|
||||
|
||||
private void AddBreakpointButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
var b = new AddBreakpointDialog();
|
||||
if (b.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Breakpoints.Add(b.Address, b.BreakType);
|
||||
}
|
||||
|
||||
BreakpointView.ItemCount = Breakpoints.Count;
|
||||
}
|
||||
|
||||
private void RefreshFloatingWindowControl()
|
||||
{
|
||||
Owner = Global.Config.RamSearchSettings.FloatingWindow ? null : GlobalWin.MainForm;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
// TODO: these can be generic to any debugger
|
||||
#region Breakpoint Classes
|
||||
|
@ -397,23 +424,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void AddBreakpointButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
var b = new AddBreakpointDialog();
|
||||
if (b.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Breakpoints.Add(b.Address, b.BreakType);
|
||||
}
|
||||
|
||||
BreakpointView.ItemCount = Breakpoints.Count;
|
||||
}
|
||||
|
||||
private void BreakpointCallback()
|
||||
{
|
||||
GlobalWin.MainForm.PauseEmulator();
|
||||
UpdateValues();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,6 +193,14 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
};
|
||||
}
|
||||
|
||||
public byte Op
|
||||
{
|
||||
get
|
||||
{
|
||||
return Cpu.PeekMemory(Cpu.PC);
|
||||
}
|
||||
}
|
||||
|
||||
public bool StartAsyncSound() { return true; }
|
||||
|
||||
public void EndAsyncSound() { }
|
||||
|
|
Loading…
Reference in New Issue