Beispiel #1
0
        /// -------------------------------------------------------------------------------------------------
        /// <summary> Updates this object. </summary>
        ///
        /// <remarks> 09/09/2018. </remarks>
        ///
        /// <param name="response"> The response. </param>
        /// <param name="tag">	    The tag. </param>
        /// -------------------------------------------------------------------------------------------------
        private void UIUpdate(string[] response, int tag)
        {
            ByteProviders[tag].parseData(response[0]);

            switch (tag)
            {
            case 0:
                HLHexControl.UpdateView();
                break;

            case 1:
                DEHexControl.UpdateView();
                break;

            case 2:
                BCHexControl.UpdateView();
                break;

            case 3:
                IXHexControl.UpdateView();
                break;

            case 4:
                IYHexControl.UpdateView();
                break;

            case 5:
                MEMHexControl.UpdateView();
                break;
            }
        }
Beispiel #2
0
        /// -------------------------------------------------------------------------------------------------
        /// <summary> Updates this object. </summary>
        ///
        /// <remarks> 09/09/2018. </remarks>
        ///
        /// <param name="response"> The response. </param>
        /// <param name="tag">	    The tag. </param>
        /// -------------------------------------------------------------------------------------------------
        private void UIUpdate(byte[] response, int tag)
        {
            int v = 0;


            byte[] arraycopy = new byte[response.Length - 5];
            Array.Copy(response, 5, arraycopy, 0, arraycopy.Length);

            ByteProviders[tag].bytes = arraycopy;// parseData(response[0]);

            switch (tag)
            {
            case 0:
                v            = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.hl);
                HLlabel.Text = "( HL ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.hl);
                HLHexControl.UpdateView();
                break;

            case 1:
                v            = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.de);
                DElabel.Text = "( DE ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.de);
                DEHexControl.UpdateView();
                break;

            case 2:
                v            = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.bc);
                BClabel.Text = "( BC ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.bc);
                BCHexControl.UpdateView();
                break;

            case 3:
                v            = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.ix);
                IXlabel.Text = "( IX ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.hl);
                IXHexControl.UpdateView();
                break;

            case 4:
                v            = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.iy);
                IYlabel.Text = "( IY ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.hl);
                IYHexControl.UpdateView();
                sending = false;

                break;

            case 5:
                v            = MainForm.myNewRegisters.GetRegisterValueint(Registers.Z80Register.sp);
                SPlabel.Text = "( STACK ) $" + v.ToString("X4") + " " + MainForm.myNewRegisters.GetRegisterLabelString(Registers.Z80Register.sp);
                STACKHexControl.UpdateView();
                sending = false;

                break;
            }
        }
Beispiel #3
0
        // -------------------------------------------------------------------------------------------------
        // 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();
        }