示例#1
0
        private void InitialiseDisplay()
        {
            ARM6CPU theCPU = _theManager.CPU;

            //Registers
            r0textBox.Text  = theCPU.Registers[0].ToString("X");
            r1textBox.Text  = theCPU.Registers[1].ToString("X");
            r2textBox.Text  = theCPU.Registers[2].ToString("X");
            r3textBox.Text  = theCPU.Registers[3].ToString("X");
            r4textBox.Text  = theCPU.Registers[4].ToString("X");
            r5textBox.Text  = theCPU.Registers[5].ToString("X");
            r6textBox.Text  = theCPU.Registers[6].ToString("X");
            r7textBox.Text  = theCPU.Registers[7].ToString("X");
            r8textBox.Text  = theCPU.Registers[8].ToString("X");
            r9textBox.Text  = theCPU.Registers[9].ToString("X");
            r10textBox.Text = theCPU.Registers[10].ToString("X");
            r11textBox.Text = theCPU.Registers[11].ToString("X");
            r12textBox.Text = theCPU.Registers[12].ToString("X");
            r13textBox.Text = theCPU.Registers[13].ToString("X");
            r14textBox.Text = theCPU.Registers[14].ToString("X");
            r15textBox.Text = theCPU.Registers[15].ToString("X");

            //CPSR
            cpsrNcheckBox.Checked = theCPU.CPSR_N;
            cpsrZcheckBox.Checked = theCPU.CPSR_Z;
            cpsrCcheckBox.Checked = theCPU.CPSR_C;
            cpsrVcheckBox.Checked = theCPU.CPSR_V;
            cpsrIcheckBox.Checked = theCPU.CPSR_I;
            cpsrFcheckBox.Checked = theCPU.CPSR_F;
            cpuModeTextBox.Text   = theCPU.CPUMode.ToString();

            //ALU
            aluRatextBox.Text    = theCPU.Alu.A.ToString("X");
            aluRbtextBox.Text    = theCPU.Alu.B.ToString("X");
            aluCmdtextBox.Text   = theCPU.Alu.Command.ToString();
            aluRtextBox.Text     = theCPU.Alu.Result.ToString("X");
            aluNcheckBox.Checked = theCPU.Alu.Flag_N;
            aluZcheckBox.Checked = theCPU.Alu.Flag_Z;
            aluCcheckBox.Checked = theCPU.Alu.Flag_C;
            aluVcheckBox.Checked = theCPU.Alu.Flag_V;

            //Booth Multiplier
            bmRatextBox.Text  = theCPU.BM.A.ToString("X");
            bmRbtextBox.Text  = theCPU.BM.B.ToString("X");
            bmRestextBox.Text = theCPU.BM.Result.ToString("X");

            //Barrel Shifter
            bsAtextBox.Text   = theCPU.BS.A.ToString();
            bsBtextBox.Text   = theCPU.BS.B.ToString();
            bsCmdtextBox.Text = theCPU.BS.Command.ToString();
            bsRtextBox.Text   = theCPU.BS.Result.ToString();

            //Memory
            martextBox.Text = theCPU.MAR;
            mbrtextBox.Text = theCPU.MBR.ToString("X");

            stepToolStripMenuItem.Enabled = false;
            runToolStripMenuItem.Enabled  = false;
        }
示例#2
0
 public Manager()
 {
     _cpu = new ARM6CPU();
 }