コード例 #1
0
ファイル: formspu.cs プロジェクト: pink1stools/PS3Tools-1
        public void updateUI()
        {
            string ip = "00000000" + spu.IP.ToString("X");

            toolStripStatusLabel1.Text = "IP: 0x" + ip.Substring(ip.Length - 8);
            int i   = (int)(spu.IP >> 2);
            int len = i + 100;

            listbox1.Items.Clear();
            for (; i < len; i++)
            {
                int  offset     = i << 2;
                bool breakPoint = SPUBreakpoints.Instance.isBreakPoint(offset);

                string offsetString = ("00000000" + offset.ToString("X"));
                offsetString = offsetString.Substring(offsetString.Length - 8);
                this.listbox1.Items.Add(((breakPoint) ? "[B]0x" : "[-]0x") + offsetString + ": " + spu.LocalStorageCommands[i].fullCommand + "\t\t" + spu.LocalStorageCommands[i].functionName);
            }

            listbox2.Items.Clear();
            for (int r = 0; r < 128; r++)
            {
                for (int rb = 0; rb < 4; rb++)
                {
                    string registerString = "00000000" + spu.Register[r, rb].ToString("X");
                    this.listbox2.Items.Add(SPUOpcodeTreeNodeData.getRegisterString(r) + "[" + rb + "]: 0x" + registerString.Substring(registerString.Length - 8));
                }
            }
            Refresh();
        }
コード例 #2
0
ファイル: SPUOpcodeTree.cs プロジェクト: Inviction/PS3Tools
        public void setTreeNodeData(string key, string[] data)
        {
            SPUOpcodeTreeNode node = getTreeNodeByKey(key);
            SPUOpcodeTreeNodeData treeData = new SPUOpcodeTreeNodeData();
            treeData.opcode = data[0];
            treeData.mnemonic = data[2];
            treeData.shift = 0;
            treeData.signed = false;
            treeData.size = 128;
            treeData.stop = false;
            treeData.trap = false;
            treeData.type = SPUOpcodeTreeNodeData.typeByString(data[1]);

            for (int i = 3; i < data.Length; i++)
            {
                switch (data[i])
                {
                    case "signed":
                        treeData.signed = true;
                        break;
                    case "shift2":
                        treeData.shift = 2;
                        break;
                    case "shift4":
                        treeData.shift = 4;
                        break;
                    case "stop":
                        treeData.stop = true;
                        break;
                    case "trap":
                        treeData.trap = true;
                        break;
                    case "Bits":
                        treeData.size = 1;
                        break;
                    case "byte":
                        treeData.size = 8;
                        break;
                    case "half":
                        treeData.size = 16;
                        break;
                    case "float":
                        treeData.size = 32;
                        break;
                    case "double":
                        treeData.size = 64;
                        break;
                }
            }

            node.data = treeData;
            node.leaf = true;
        }
コード例 #3
0
        public void setTreeNodeData(string key, string[] data)
        {
            SPUOpcodeTreeNode     node     = getTreeNodeByKey(key);
            SPUOpcodeTreeNodeData treeData = new SPUOpcodeTreeNodeData();

            treeData.opcode   = data[0];
            treeData.mnemonic = data[2];
            treeData.shift    = 0;
            treeData.signed   = false;
            treeData.size     = 128;
            treeData.stop     = false;
            treeData.trap     = false;
            treeData.type     = SPUOpcodeTreeNodeData.typeByString(data[1]);

            for (int i = 3; i < data.Length; i++)
            {
                switch (data[i])
                {
                case "signed":
                    treeData.signed = true;
                    break;

                case "shift2":
                    treeData.shift = 2;
                    break;

                case "shift4":
                    treeData.shift = 4;
                    break;

                case "stop":
                    treeData.stop = true;
                    break;

                case "trap":
                    treeData.trap = true;
                    break;

                case "Bits":
                    treeData.size = 1;
                    break;

                case "byte":
                    treeData.size = 8;
                    break;

                case "half":
                    treeData.size = 16;
                    break;

                case "float":
                    treeData.size = 32;
                    break;

                case "double":
                    treeData.size = 64;
                    break;
                }
            }

            node.data = treeData;
            node.leaf = true;
        }