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; } }
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; } }