/[pcsx2_0.9.7]/trunk/tools/GSDumpGUI/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegTEX0.cs
ViewVC logotype

Contents of /trunk/tools/GSDumpGUI/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegTEX0.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 313 - (show annotations) (download)
Sun Dec 26 16:21:07 2010 UTC (9 years, 9 months ago) by william
File size: 2843 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.4151 local: v0.9.7.293-latest) in ./trunk
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4
5 namespace GSDumpGUI
6 {
7 public class GIFRegTEX0 : GIFReg
8 {
9 public int TBP0;
10 public int TBW;
11 public TEXPSM PSM;
12 public int TW;
13 public int TH;
14 public TEXTCC TCC;
15 public TEXTFX TFX;
16 public int CBP;
17 public TEXCPSM CPSM;
18 public TEXCSM CSM;
19 public int CSA;
20 public int CLD;
21
22 public GIFRegTEX0(int addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
23
24 static public GIFReg Unpack(GIFTag tag, int addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
25 {
26 GIFRegTEX0 tex0 = new GIFRegTEX0(addr, LowData, HighData, PackedFormat);
27 tex0.Descriptor = (GIFRegDescriptor)addr;
28 tex0.TBP0 = (int)GetBit(LowData, 0, 14);
29 tex0.TBW = (int)GetBit(LowData, 14, 6);
30 tex0.PSM = (TEXPSM)(int)GetBit(LowData, 20, 6);
31 tex0.TW = (int)GetBit(LowData, 26, 4);
32 tex0.TH = (int)GetBit(LowData, 30, 4);
33 tex0.TCC = (TEXTCC)(int)GetBit(LowData, 34, 1);
34 tex0.TFX = (TEXTFX)(int)GetBit(LowData, 35, 2);
35 tex0.CBP = (int)GetBit(LowData, 37, 14);
36 tex0.CPSM = (TEXCPSM)(int)GetBit(LowData, 51, 4);
37 tex0.CSM = (TEXCSM)(int)GetBit(LowData, 55, 1);
38 tex0.CSA = (int)GetBit(LowData, 56, 5);
39 tex0.CLD = (int)GetBit(LowData, 61, 3);
40 return tex0;
41 }
42
43 public override string ToString()
44 {
45 return Descriptor.ToString() + "@TBP0 : " + TBP0.ToString() + "@TBW : " + TBW.ToString() + "@PSM : " + PSM.ToString() + "@TW : " + TW.ToString() + "@TH : " + TH.ToString()
46 + "@TCC : " + TCC.ToString() + "@TFX : " + TFX.ToString() + "@CBP : " + CBP.ToString() + "@CPSM : " + CPSM.ToString() + "@CSM : " + CSM.ToString()
47 + "@CSA : " + CSA.ToString() + "@CLD : " + CLD.ToString();
48 }
49 }
50
51 public enum TEXPSM
52 {
53 PSMCT32 = 0,
54 PSMCT24 = 1,
55 PSMCT16 = 2,
56 PSMCT16S = 10,
57 PSMT8 = 19,
58 PSMT4 = 20,
59 PSMT8H = 27,
60 PSMT4HL = 36,
61 PSMT4HH = 44,
62 PSMZ32 = 48,
63 PSMZ24 = 49,
64 PSMZ16 = 50,
65 PSMZ16S = 58
66 }
67
68 public enum TEXTCC
69 {
70 RGB = 0,
71 RGBA = 1
72 }
73
74 public enum TEXTFX
75 {
76 MODULATE = 0,
77 DECAL = 1,
78 HIGHLIGHT = 2,
79 HIGHLIGHT2 = 3
80 }
81
82 public enum TEXCPSM
83 {
84 PSMCT32 = 0,
85 PSMCT16 = 2,
86 PSMCT16S = 10
87 }
88
89 public enum TEXCSM
90 {
91 CSM1 = 0,
92 CSM2 = 1
93 }
94 }

  ViewVC Help
Powered by ViewVC 1.1.22