/// ------------------------------------------------------------------------------------------------- /// <summary> Updates the memory. </summary> /// /// <remarks> 09/09/2018. </remarks> /// ------------------------------------------------------------------------------------------------- public void UpdateMemory() { if (!this.Visible) { return; } if (sending) { return; } sending = true; int v; for (int i = 0; i < regs.Length; i++) { v = MainForm.myNewRegisters.GetRegisterValueint(regs[i]); ByteProvider bp = ByteProviders[i]; bp.offset = v; int bank = NextAddress.GetBankFromAddress(ref MainForm.banks, v); Program.serialport.GetMemory( delegate(byte[] response, int tag) { Invoke((MethodInvoker) delegate { UIUpdate(response, tag); }); } , v, 32, bank, i); } }
/// ------------------------------------------------------------------------------------------------- /// <summary> Updates the memory. </summary> /// /// <remarks> 09/09/2018. </remarks> /// ------------------------------------------------------------------------------------------------- public void UpdateMemory() { if (!this.Visible) { return; } int v = memaddress; ByteProvider bp = byteProvider; bp.offset = v; int bank = bankNum; if (bankNum < 0) { bank = NextAddress.GetBankFromAddress(ref MainForm.banks, v); } Program.serialport.GetMemory( delegate(byte[] response, int tag) { Invoke((MethodInvoker) delegate { UIUpdate(response, tag); }); } , v, 512, bank, 0); }
/// ------------------------------------------------------------------------------------------------- /// <summary> Updates the memory. </summary> /// /// <remarks> 09/09/2018. </remarks> /// ------------------------------------------------------------------------------------------------- public void UpdateMemory() { int v = memaddress; ByteProvider bp = byteProvider; bp.offset = v; Program.telnetConnection.SendCommand("read-memory " + v.ToString() + " 512", Callback, 0); //label1.Text = "( MEMPTR ) $" + v.ToString("X4")+" "+MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.memptr); }
public MemWatch() { InitializeComponent(); byteProvider = new ByteProvider(); byteProvider.init(512, 0); MEMPTRHexControl.Model.ByteProvider = byteProvider; MEMPTRHexControl.UpdateView(); }
/// ------------------------------------------------------------------------------------------------- /// <summary> Updates the memory. </summary> /// /// <remarks> 09/09/2018. </remarks> /// ------------------------------------------------------------------------------------------------- public void UpdateMemory() { int v = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.hl); ByteProvider bp = ByteProviders[0]; bp.offset = v; Program.telnetConnection.SendCommand("read-memory " + v.ToString() + " 32", Callback, 0); HLlabel.Text = "( HL ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.hl); v = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.de); bp = ByteProviders[1]; bp.offset = v; Program.telnetConnection.SendCommand("read-memory " + v.ToString() + " 32", Callback, 1); DElabel.Text = "( DE ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.de); v = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.bc); bp = ByteProviders[2]; bp.offset = v; Program.telnetConnection.SendCommand("read-memory " + v.ToString() + " 32", Callback, 2); BClabel.Text = "( BC ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.bc); v = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.ix); bp = ByteProviders[3]; bp.offset = v; Program.telnetConnection.SendCommand("read-memory " + v.ToString() + " 32", Callback, 3); IXlabel.Text = "( IX ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.ix); v = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.iy); bp = ByteProviders[4]; bp.offset = v; Program.telnetConnection.SendCommand("read-memory " + v.ToString() + " 32", Callback, 4); IYlabel.Text = "( IY ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.iy); v = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.memptr); bp = ByteProviders[5]; bp.offset = v; Program.telnetConnection.SendCommand("read-memory " + v.ToString() + " 32", Callback, 5); MEMlabel.Text = "( MEMPTR ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.memptr); }
// ------------------------------------------------------------------------------------------------- // Default constructor // ------------------------------------------------------------------------------------------------- public RegMemWatch() { InitializeComponent(); ByteProviders = new ByteProvider[6]; ByteProviders[0] = new ByteProvider(); ByteProviders[0].init(32, 0); HLHexControl.Model.ByteProvider = ByteProviders[0]; HLHexControl.UpdateView(); ByteProviders[1] = new ByteProvider(); ByteProviders[1].init(32, 1000); DEHexControl.Model.ByteProvider = ByteProviders[1]; DEHexControl.UpdateView(); ByteProviders[2] = new ByteProvider(); ByteProviders[2].init(32, 1000); BCHexControl.Model.ByteProvider = ByteProviders[2]; BCHexControl.UpdateView(); ByteProviders[3] = new ByteProvider(); ByteProviders[3].init(32, 1000); IXHexControl.Model.ByteProvider = ByteProviders[3]; IXHexControl.UpdateView(); ByteProviders[4] = new ByteProvider(); ByteProviders[4].init(32, 1000); IYHexControl.Model.ByteProvider = ByteProviders[4]; IYHexControl.UpdateView(); ByteProviders[5] = new ByteProvider(); ByteProviders[5].init(32, 1000); STACKHexControl.Model.ByteProvider = ByteProviders[5]; STACKHexControl.UpdateView(); }