/[pcsx2_0.9.7]/trunk/pcsx2/Patch_Obsolete.h
ViewVC logotype

Contents of /trunk/pcsx2/Patch_Obsolete.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 3145 byte(s)
committing r3113 initial commit again...
1 /* PCSX2 - PS2 Emulator for PCs
2 * Copyright (C) 2002-2010 PCSX2 Dev Team
3 *
4 * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5 * of the GNU Lesser General Public License as published by the Free Software Found-
6 * ation, either version 3 of the License, or (at your option) any later version.
7 *
8 * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * PURPOSE. See the GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License along with PCSX2.
13 * If not, see <http://www.gnu.org/licenses/>.
14 */
15
16 // Old Patching functions that are currently not used
17 // so out-sourced them to this header file that isn't referenced...
18
19 // Obsolete code used by old cheats-gui code...
20 int AddPatch(int Mode, int Place, int Address, int Size, u64 data)
21 {
22 if ( patchnumber >= MAX_PATCH )
23 {
24 Console.Error( "Patch ERROR: Maximum number of patches reached.");
25 return -1;
26 }
27
28 Patch[patchnumber].placetopatch = Mode;
29 Patch[patchnumber].cpu = (patch_cpu_type)Place;
30 Patch[patchnumber].addr = Address;
31 Patch[patchnumber].type = (patch_data_type)Size;
32 Patch[patchnumber].data = data;
33 return patchnumber++;
34 }
35
36 void PrintPatch(int i)
37 {
38 Console.WriteLn("Patch[%d]:", i);
39 if (Patch[i].enabled == 0)
40 Console.WriteLn("Disabled.");
41 else
42 Console.WriteLn("Enabled.");
43
44 Console.WriteLn("PlaceToPatch:%d", Patch[i].placetopatch);
45
46 switch(Patch[i].cpu)
47 {
48 case CPU_EE: Console.WriteLn("Cpu: EE"); break;
49 case CPU_IOP: Console.WriteLn("Cpu: IOP"); break;
50 default: Console.WriteLn("Cpu: None"); break;
51 }
52
53 Console.WriteLn("Address: %X", Patch[i].addr);
54
55 switch (Patch[i].type)
56 {
57 case BYTE_T: Console.WriteLn("Type: Byte"); break;
58 case SHORT_T: Console.WriteLn("Type: Short"); break;
59 case WORD_T: Console.WriteLn("Type: Word"); break;
60 case DOUBLE_T: Console.WriteLn("Type: Double"); break;
61 case EXTENDED_T: Console.WriteLn("Type: Extended"); break;
62
63 default: Console.WriteLn("Type: None"); break;
64 }
65
66 Console.WriteLn("Data: %I64X", Patch[i].data);
67 }
68
69 void ResetPatch( void )
70 {
71 patchnumber = 0;
72 }
73
74 void PrintRoundMode(SSE_RoundMode ee, SSE_RoundMode vu)
75 {
76 switch(ee)
77 {
78 case SSEround_Nearest: DevCon.WriteLn("EE: Near"); break;
79 case SSEround_NegInf: DevCon.WriteLn("EE: Down"); break;
80 case SSEround_PosInf: DevCon.WriteLn("EE: Up"); break;
81 case SSEround_Chop: DevCon.WriteLn("EE: Chop"); break;
82 default: DevCon.WriteLn("EE: ?"); break;
83 }
84
85 switch(vu)
86 {
87 case SSEround_Nearest: DevCon.WriteLn("VU: Near"); break;
88 case SSEround_NegInf: DevCon.WriteLn("VU: Down"); break;
89 case SSEround_PosInf: DevCon.WriteLn("VU: Up"); break;
90 case SSEround_Chop: DevCon.WriteLn("VU: Chop"); break;
91 default: DevCon.WriteLn("VU: ?"); break;
92 }
93 }

  ViewVC Help
Powered by ViewVC 1.1.22