public CodeWatcher(SPU spu, formspu CodeListing) { this.spu = spu; this.CodeListing = CodeListing; ls = new LoadingScreen(); InitializeComponent(); }
public SPUKnownFunction(string path) { mnemonics = path.Split(("/").ToCharArray()); name = mnemonics[mnemonics.Length - 1]; ls = new LoadingScreen(); FileStream fs = File.OpenRead(path); byte[] cmd = new byte[4]; mnemonics = new string[fs.Length / 4]; for (int i = 0; i < mnemonics.Length; i++) { fs.Read(cmd, 0, 4); mnemonics[i] = SPUOpcodeTable.Instance.getMnemonic(cmd); } fs.Close(); }
public void buildLocalStorageCommands() { LoadingScreen ls = new LoadingScreen(); ls.progressBar1.Maximum = LocalStorage.Length; ls.progressBar1.Value = 0; ls.label1.Text = "Building SPU Commands out of LocalStorage..."; ls.Show(); for (int i = 0; i < LocalStorage.Length - 3; i += 4) { LocalStorageCommands[i >> 2] = new SPUCommand(LocalStorage, i); if ((i & 0xFF) == 0) { ls.progressBar1.Value = i; ls.Refresh(); } } ls.Hide(); }
public void findYourself(SPU spu, LoadingScreen ls) { for (int i = 0; i < spu.LocalStorageCommands.Length; i++) { if (spu.LocalStorageCommands[i].mnemonics == mnemonics[0]) { int end = findYourselfCheckDeeper(spu, i); if (end != -1) { SPUDumper.Instance.FunctionFoundDump(i<<2, end<<2, name); for (; i < end; i++) spu.LocalStorageCommands[i].functionName = name; } } if ((i & 0xFF) == 0) { ls.progressBar1.Value = i; ls.Refresh(); } } }
private void button1_Click(object sender, EventArgs e) { listBox1.Items.Clear(); LoadingScreen ls = new LoadingScreen(); ls.progressBar1.Maximum = spu.LocalStorage.Length; ls.progressBar1.Value = 0; ls.label1.Text = "Process Local Storage Watcher..."; ls.Show(); string MemString = ""; string offset = "00000000"; for (int i = 0; i < spu.LocalStorage.Length; i++) { if ((i & 0xF) == 0 && i != 0) { if (MemString != "") { listBox1.Items.Add(offset + ":" + MemString); } MemString = ""; offset = "00000000" + i.ToString("X"); offset = offset.Substring(offset.Length - 8); } string val = ("00" + spu.LocalStorage[i].ToString("X")); MemString += " 0x" + val.Substring(val.Length - 2); if ((i & 0xFFF) == 0) { ls.progressBar1.Value = i; ls.Refresh(); } } if (MemString != "") { listBox1.Items.Add(offset + ":" + MemString); } ls.Hide(); MessageBox.Show("Local Storage watcher Refreshed."); }
public formspu() { InitializeComponent(); ls = new LoadingScreen(); spu = new SPU(); }