/[pcsx2_0.9.7]/trunk/tools/GSDumpGUI/Core/Program.cs
ViewVC logotype

Diff of /trunk/tools/GSDumpGUI/Core/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/tools/GSDumpGUI/Core/Program.cs	2010/12/25 02:47:42	289
+++ trunk/tools/GSDumpGUI/Core/Program.cs	2010/12/25 02:51:30	290
@@ -176,6 +176,7 @@
                         frmMain.btnStep.Enabled = frmMain.chkDebugMode.Checked;
                         frmMain.cmdGoToStart.Enabled = frmMain.chkDebugMode.Checked;
                         frmMain.cmdGoToNextVSync.Enabled = frmMain.chkDebugMode.Checked;
+                        frmMain.treeGifPacketContent.Enabled = frmMain.chkDebugMode.Checked;
                         if (frmMain.chkDebugMode.Checked == false)
                             frmMain.treTreeView.Nodes.Clear();
 
@@ -195,19 +196,19 @@
                                 case "Transfer":
                                     TreeNode tn2 = new TreeNode();
                                     tn2.Name = parts[0];
-                                    tn2.Text = parts[0] + " - " + parts[1] + " - " + parts[2];
+                                    tn2.Text = parts[0] + " - " + parts[1] + " - " + parts[2] + " - " + parts[3] + " byte";
                                     nodes.Add(tn2);
                                     break;
                                 case "ReadFIFO2":
                                     TreeNode tn3 = new TreeNode();
                                     tn3.Name = parts[0];
-                                    tn3.Text = parts[0] + " - " + parts[1];
+                                    tn3.Text = parts[0] + " - " + parts[1] + " - " + parts[2] + " byte";
                                     nodes.Add(tn3);
                                     break;
                                 case "VSync":
                                     TreeNode tn = new TreeNode();
                                     tn.Name = parts[0];
-                                    tn.Text = parts[0] + " - " + parts[1];
+                                    tn.Text = parts[0] + " - " + parts[1] + " - " + parts[2] + " byte";
                                     tn.Nodes.AddRange(nodes.ToArray());
                                     parents.Add(tn);
 
@@ -216,7 +217,7 @@
                                 case "Registers":
                                     TreeNode tn4 = new TreeNode();
                                     tn4.Name = parts[0];
-                                    tn4.Text = parts[0] + " - " + parts[1];
+                                    tn4.Text = parts[0] + " - " + parts[1] + " - " + parts[2] + " byte";
                                     nodes.Add(tn4);
                                     break;
                             }
@@ -240,6 +241,53 @@
                         }
                     }), new object[] { null });
                     break;
+                case MessageType.PacketInfo:
+                    frmMain.Invoke(new Action<object>(delegate(object e)
+                    {
+                        if (Mess.Parameters[0].ToString() != "No Data Available")
+                        {
+                            string[] vals = Mess.Parameters[0].ToString().Split('|');
+                            frmMain.txtGifPacketSize.Text = vals[0] + " bytes";
+
+                            frmMain.treeGifPacketContent.Nodes.Clear();
+
+                            frmMain.treeGifPacketContent.Nodes.Add(vals[1]);
+
+                            if (vals.Length > 2)
+                            {
+                                frmMain.treeGifPacketContent.Nodes[0].Nodes.Add(vals[2]);
+                                frmMain.treeGifPacketContent.Nodes[0].Nodes.Add(vals[3]);
+                                frmMain.treeGifPacketContent.Nodes[0].Nodes.Add(vals[4]);
+                                frmMain.treeGifPacketContent.Nodes[0].Nodes.Add(vals[5]);
+
+                                TreeNode nodePrim = new TreeNode("Prim");
+                                string[] prim = vals[6].Split('~');
+                                for (int j = 1; j < prim.Length; j++)
+                                {
+                                    nodePrim.Nodes.Add(prim[j]);
+                                }
+                                frmMain.treeGifPacketContent.Nodes[0].Nodes.Add(nodePrim);
+
+                                frmMain.treeGifPacketContent.Nodes[0].Nodes.Add(vals[7]);
+
+                                TreeNode nodeReg = new TreeNode("reg");
+                                string[] reg = vals[8].Split(new char[]{'~'}, StringSplitOptions.RemoveEmptyEntries);
+                                for (int j = 1; j < reg.Length; j++)
+                                {
+                                    nodeReg.Nodes.Add(reg[j]);
+                                }
+                                frmMain.treeGifPacketContent.Nodes[0].Nodes.Add(nodeReg);
+                            }
+                            frmMain.treeGifPacketContent.Nodes[0].ExpandAll();
+                        }
+                        else
+                        {
+                            frmMain.treeGifPacketContent.Nodes.Clear();
+
+                            frmMain.treeGifPacketContent.Nodes.Add(Mess.Parameters[0].ToString());
+                        }
+                    }), new object[] { null });
+                    break;
                 default:
                     break;
             }
@@ -300,6 +348,14 @@
                         Client.Send(msg);
                     }
                     break;
+
+                case MessageType.PacketInfo:
+                    int id = (int)Mess.Parameters[0];
+                    msg = new TCPMessage();
+                    msg.MessageType = MessageType.PacketInfo;
+                    msg.Parameters.Add(wrap.GetGifPacketInfo(dump, id));
+                    Client.Send(msg);
+                    break;
                 case MessageType.Step:
                 case MessageType.RunToCursor:
                 case MessageType.RunToNextVSync:
@@ -381,6 +437,7 @@
                     frmMain.cmdGoToStart.Enabled = frmMain.chkDebugMode.Checked;
                     frmMain.cmdGoToNextVSync.Enabled = frmMain.chkDebugMode.Checked;
                     frmMain.treTreeView.Nodes.Clear();
+                    frmMain.treeGifPacketContent.Nodes.Clear();
                 }
             }), new object[] { null});
         }

 

  ViewVC Help
Powered by ViewVC 1.1.22