ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.CorePlugins/Config/PCSX2Config.cs
(Generate patch)

Comparing trunk/RomCheater.CorePlugins/Config/PCSX2Config.cs (file contents):
Revision 97 by william, Wed May 9 22:31:56 2012 UTC vs.
Revision 98 by william, Wed May 9 23:10:12 2012 UTC

# Line 5 | Line 5 | using System.Text;
5   using RomCheater.PluginFramework.Core;
6   using System.IO;
7   using System.Diagnostics;
8 + using RomCheater.Logging;
9  
10   namespace RomCheater.CorePlugins.Config
11   {
# Line 26 | Line 27 | namespace RomCheater.CorePlugins.Config
27          {
28              bool isDebug = false;
29              uint VTLB_RELEASE_OFFSET = 0;
30 <            return !IsValidPSX2Process(p.ProcessInfo.Id, out isDebug, out VTLB_RELEASE_OFFSET);
30 >            bool notvalid = !IsValidPSX2Process(p.ProcessInfo.Id, out isDebug, out VTLB_RELEASE_OFFSET);
31 >            if (notvalid)
32 >            {
33 >                logger.Debug.WriteLine("    Not Allowing process {0} to be added because it was filterd out", p.Name);
34 >            }
35 >            else
36 >            {
37 >                logger.Debug.WriteLine("    Allowing process {0} to be added", p.Name);
38 >            }
39 >            return notvalid;
40          }
41          #region IPluginBase Members
42          public override Guid ID
# Line 76 | Line 86 | namespace RomCheater.CorePlugins.Config
86                  r.Close();
87                  if (!isExe)
88                  {
89 +                    logger.Debug.WriteLine("  Process: {0} is not a valid executable file", filename);
90                      isValid = false;
91                  }
92                  else
# Line 87 | Line 98 | namespace RomCheater.CorePlugins.Config
98                      if (found_string.ToLower().Contains(PCXS2_LOOKUP_MAGIC_001.ToLower()) && found_string.ToLower().Contains(PCXS2_LOOKUP_MAGIC_002.ToLower()))
99                      {
100                          isValid = true;
101 +                        logger.Debug.WriteLine("  Process: {0} found MAGIC LOOKUP {1} and {2}", filename, PCXS2_LOOKUP_MAGIC_001.ToLower(), PCXS2_LOOKUP_MAGIC_002.ToLower());
102                      }
103                      sr.Close();
104  
# Line 98 | Line 110 | namespace RomCheater.CorePlugins.Config
110                      if (found_string.ToLower().Contains("DebugBreak".ToLower()))
111                      {
112                          isDebug = true;
113 +                        logger.Debug.WriteLine("  Process: {0} found DebugBreak", filename);
114                      }
115                      sr.Close();
116                  }
# Line 121 | Line 134 | namespace RomCheater.CorePlugins.Config
134                  byte[] check_data = reader.ReadProcessMemory((IntPtr)VTLB_VADDR_OFFSET_DEBUG, (uint)entrypoint_data.Length, out bytesReadSize);
135  
136                  isDebug = check_data.SequenceEqual(entrypoint_data);
137 +                logger.Debug.WriteLine("  Process: {0} isDebug: {1}", filename, isDebug.ToString());
138                  //List<uint> addresses = new List<uint>();
139                  if (!isDebug)
140                  {
# Line 136 | Line 150 | namespace RomCheater.CorePlugins.Config
150                              {
151                                  //addresses.Add(t);
152                                  VTLB_RELEASE_OFFSET = t;
153 +                                logger.Debug.WriteLine("  Process: {0} found release build entrypoint at 0x{1:x8}", filename, t);
154                                  break; //use only the first valid value
155                              }
156                          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines