/[pcsx2_0.9.7]/trunk/tools/GSDumpGUI/Library/GSDXWrapper.cs
ViewVC logotype

Diff of /trunk/tools/GSDumpGUI/Library/GSDXWrapper.cs

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

--- trunk/tools/GSDumpGUI/Library/GSDXWrapper.cs	2010/12/26 10:27:29	312
+++ trunk/tools/GSDumpGUI/Library/GSDXWrapper.cs	2010/12/26 16:21:07	313
@@ -401,7 +401,7 @@
             switch (dump.Data[i].id)
             {
                 case GSType.Transfer:
-                    GIFTag tag = ExtractGifTag(dump.Data[i].data);
+                    GIFTag tag = GIFTag.ExtractGifTag(dump.Data[i].data);
                     val += "Transfer Path " + ((GSTransfer)dump.Data[i]).Path.ToString() + "|";
                     val += "NLoop = " + tag.nloop + "|";
                     //val += "Pad1 = " + tag._pad1 + "|";
@@ -412,9 +412,11 @@
                     val += "prim~Prim Class = " + ((GS_PRIM)tag.prim.Prim).ToString() + "~IIP = " + tag.prim.IIP + "~TME = "+ tag.prim.TME + "~FGE = "+ tag.prim.FGE + "~ABE = "+ 
                             tag.prim.ABE + "~AA1 = "+ tag.prim.AA1 + "~FST = "+ tag.prim.FST + "~CTXT = " + tag.prim.CTXT + "~FIX = " + tag.prim.FIX + "|";
                     val += "nreg = " + (tag.nreg == 0 ? 16 : tag.nreg) + "|";
-                    val += "regs~ ";
+                    val += "regs~";
                     foreach (var itm in tag.regs)
-                        val += itm.Descriptor.ToString() + "~";
+                    {
+                        val += itm.ToString() + "~";
+                    }
                     break;
                 case GSType.VSync:
                     val += "Field = " + dump.Data[i].data[0].ToString();
@@ -431,50 +433,5 @@
 
             return val;
         }
-
-        internal GIFTag ExtractGifTag(byte[] data)
-        {
-            Int16 nloopEOP = 0;
-            Int16 pad1 = 0;
-            Int32 pad2PrePrimFlgNReg = 0;
-            Int64 regs = 0;
-
-            nloopEOP = BitConverter.ToInt16(data, 0);
-            pad1 = BitConverter.ToInt16(data, 2);
-            pad2PrePrimFlgNReg = BitConverter.ToInt32(data, 4);
-            regs = BitConverter.ToInt64(data, 8);
-
-            GIFTag t = new GIFTag();
-            t.nloop = (nloopEOP & 0x7FFF);
-            t.eop = (nloopEOP & 0x8000) >> 15;
-            t._pad1 = pad1;
-            t._pad2 = (pad2PrePrimFlgNReg & 0x00003FFF);
-            t.pre = (pad2PrePrimFlgNReg & 0x00004000) >> 14;
-
-            int prim = (pad2PrePrimFlgNReg & 0x03FF8000) >> 15;
-            GIFPrim pri = new GIFPrim();
-            pri.Prim = (prim & 0x007);
-            pri.IIP = (prim & 0x008) >> 3;
-            pri.TME = (prim & 0x010) >> 4;
-            pri.FGE = (prim & 0x020) >> 5;
-            pri.ABE = (prim & 0x040) >> 6;
-            pri.AA1 = (prim & 0x080) >> 7;
-            pri.FST = (prim & 0x100) >> 8;
-            pri.CTXT = (prim & 0x200) >> 9;
-            pri.FIX = (prim & 0x400) >> 10;
-            t.prim = pri;
-
-            t.flg = (pad2PrePrimFlgNReg & 0xC000000) >> 26;
-            t.nreg = (int)(pad2PrePrimFlgNReg & 0xF0000000) >> 28;
-
-            t.regs = new List<GIFReg>();
-            for (int i = 0; i < t.nreg; i++)
-            {
-                GIFReg reg = new GIFReg();
-                reg.Descriptor = (GIFRegDescriptor)((regs & (Convert.ToInt32(Math.Pow(16, i + 1)) - 1)) >> i*4);
-                t.regs.Add(reg);
-            }
-            return t;
-        }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22