public frmDebugger(Emulation.Core C) { SpecDrawing = System.Drawing.Graphics.FromHwnd(this.Handle); MyCore = C; InitializeComponent(); vlbRAM.Count = 0x10000; vlbROM.Count = MyCore.MyMemory.ROM.Length - 1; RefreshData(); }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { if (ofdGetROM.ShowDialog() == DialogResult.OK) { byte[] tmpbuf; using (System.IO.FileStream fs = new System.IO.FileStream(ofdGetROM.FileName, System.IO.FileMode.Open)) { tmpbuf = new byte[fs.Length]; fs.Read(tmpbuf, 0, (int)fs.Length); fs.Close(); } MyCore = new Emulation.Core(scDisplay); MyCore.LoadROM(tmpbuf); MyCore.Reset(); this.KeyDown += new KeyEventHandler(MyCore.frmMain_KeyDown); this.KeyUp += new KeyEventHandler(MyCore.frmMain_KeyUp); debugToolStripMenuItem.Enabled = true; resetAndDebugToolStripMenuItem.Enabled = true; Debugger = new frmDebugger(MyCore); Debugger.Disposed += new EventHandler(Debugger_Disposed); } }