Exemple #1
0
 private void Cpu_OnMemoryUpdate(object sender, CPUEventArgs e)
 {
     if (InvokeRequired)
     {
         CpuEventCallback cb = new CpuEventCallback(Cpu_OnMemoryUpdate);
         this.Invoke(cb, new object[] { sender, e });
     }
     else
     {
     }
 }
Exemple #2
0
 private void Cpu_onFlagsUpdate(object sender, CPUEventArgs e)
 {
     if (InvokeRequired)
     {
         CpuEventCallback cb = new CpuEventCallback(Cpu_onFlagsUpdate);
         this.Invoke(cb, new object[] { sender, e });
     }
     else
     {
         DisplayFlags(e.Flags);
     }
 }
Exemple #3
0
        private void Cpu_OnStackPointerUpdate(object sender, CPUEventArgs e)
        {
            if (InvokeRequired)
            {
                CpuEventCallback cb = new CpuEventCallback(Cpu_OnStackPointerUpdate);
                this.Invoke(cb, new object[] { sender, e });
            }
            else
            {
                textBoxSP.Text       = e.SP.ToString("X4");
                sevenSegmentSP.Value = e.SP.ToString("X4");

                textBoxStackValue.Text    = e.Memory[e.SP].ToString("X2");
                sevenSegmentSPvalue.Value = e.Memory[e.SP].ToString("X2");
            }
        }
Exemple #4
0
        private void Cpu_OnProgramCounterUpdate(object sender, CPUEventArgs e)
        {
            if (InvokeRequired)
            {
                CpuEventCallback cb = new CpuEventCallback(Cpu_OnProgramCounterUpdate);
                this.Invoke(cb, new object[] { sender, e });
            }
            else
            {
                textBoxPC.Text          = e.PC.ToString("X4");
                textBoxInstruction.Text = e.Memory[e.PC].ToString("X2");

                sevenSegmentPC.Value      = e.PC.ToString("X4");
                sevenSegmentPCvalue.Value = e.Memory[e.PC].ToString("X2");
            }
        }
Exemple #5
0
        private void Cpu_OnRegisterUpdate(object sender, CPUEventArgs e)
        {
            if (InvokeRequired)
            {
                CpuEventCallback cb = new CpuEventCallback(Cpu_OnRegisterUpdate);
                this.Invoke(cb, new object[] { sender, e });
            }
            else
            {
                textBoxRegA.Text       = e.A.ToString("X2");
                sevenSegmentRegA.Value = e.A.ToString("X2");

                textBoxRegX.Text       = e.X.ToString("X2");
                sevenSegmentRegX.Value = e.X.ToString("X2");

                textBoxRegY.Text       = e.Y.ToString("X2");
                sevenSegmentRegY.Value = e.Y.ToString("X2");
            }
        }
Exemple #6
0
 private void Cpu_OnRefreshGraphics(object sender, CPUEventArgs e)
 {
     this.Refresh();
 }
Exemple #7
0
 private void Cpu_OnPCgtThenMaxMem(object sender, CPUEventArgs e)
 {
     throw new NotImplementedException();
 }