Example #1
0
        public SPUCommand(byte[] cmd, int offset)
        {
            string key = ConversionUtil.byteToBinString(cmd, offset);

            key         += ConversionUtil.byteToBinString(cmd, offset + 1);
            key         += ConversionUtil.byteToBinString(cmd, offset + 2);
            key         += ConversionUtil.byteToBinString(cmd, offset + 3);
            node         = SPUOpcodeTable.Instance.Opcodes.getTreeNodeFirstLeafByKey(key);
            rt           = ra = rb = rc = idx = 0;
            functionName = "";

            try
            {
                fullCommand = node.data.getParameterString(key, offset);
                mnemonics   = node.data.mnemonic;
                type        = node.data.type;
                parseParameter(key);
            }
            catch (Exception)
            {
                mnemonics   = ".byte";
                fullCommand = "";
                type        = SPUOpcodeType.FAIL;
            }
        }
Example #2
0
 public SPUCommand(string key)
 {
     node = SPUOpcodeTable.Instance.Opcodes.getTreeNodeFirstLeafByKey(key);
     rt = ra = rb = rc = idx = 0;
     try
     {
         mnemonics = node.data.mnemonic;
         type = node.data.type;
         parseParameter(key);
     }
     catch (Exception)
     {
         mnemonics = ".byte";
         type = SPUOpcodeType.Special;
     }
 }
Example #3
0
 public SPUCommand(string key)
 {
     node = SPUOpcodeTable.Instance.Opcodes.getTreeNodeFirstLeafByKey(key);
     rt   = ra = rb = rc = idx = 0;
     try
     {
         mnemonics = node.data.mnemonic;
         type      = node.data.type;
         parseParameter(key);
     }
     catch (Exception)
     {
         mnemonics = ".byte";
         type      = SPUOpcodeType.Special;
     }
 }
Example #4
0
        public SPUCommand(byte[] cmd, int offset)
        {
            string key = ConversionUtil.byteToBinString(cmd, offset);
            key += ConversionUtil.byteToBinString(cmd, offset + 1);
            key += ConversionUtil.byteToBinString(cmd, offset + 2);
            key += ConversionUtil.byteToBinString(cmd, offset + 3);
            node = SPUOpcodeTable.Instance.Opcodes.getTreeNodeFirstLeafByKey(key);
            rt = ra = rb = rc = idx = 0;
            functionName = "";

            try
            {
                fullCommand = node.data.getParameterString(key, offset);
                mnemonics = node.data.mnemonic;
                type = node.data.type;
                parseParameter(key);
            }
            catch (Exception)
            {
                mnemonics = ".byte";
                fullCommand = "";
                type = SPUOpcodeType.FAIL;
            }
        }