/[pcsx2_0.9.7]/branch/debug/0.X/0.9.X/0.9.7/ramdump-lateset/plugins/zzogl-pg/opengl/ZZHacks.cpp
ViewVC logotype

Contents of /branch/debug/0.X/0.9.X/0.9.7/ramdump-lateset/plugins/zzogl-pg/opengl/ZZHacks.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 314 - (show annotations) (download)
Sun Dec 26 18:56:19 2010 UTC (9 years, 1 month ago) by william
File size: 6004 byte(s)
** merged upstream r4049 (re-integration of GregMiscellaneous branch)
** applied patched to GigTranser.cpp in ZZOgl from r4140 to change 'static int count = 0;' to 'static int path1_count = 0;')
1 /* ZZ Open GL graphics plugin
2 * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com
3 * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20 #include "Util.h"
21 #include "ZZHacks.h"
22 #include "ZZLog.h"
23
24 int CurrentHack = 0;
25
26 // A list of what bit controls each of the current hacks.
27 u32 hackList[HACK_NUMBER] =
28 {
29 0, // No hack
30 1, //GAME_TEXTURETARGS,
31 2, //GAME_AUTORESET,
32 3, //GAME_INTERLACE2X,
33 4, //GAME_TEXAHACK,
34 5, //GAME_NOTARGETRESOLVE,
35 6, //GAME_EXACTCOLOR,
36 //7 //GAME_NOCOLORCLAMP,
37 //8 //GAME_FFXHACK,
38 9, //GAME_NOALPHAFAIL,
39 10, //GAME_NODEPTHUPDATE,
40 11, //GAME_QUICKRESOLVE1,
41 12, //GAME_NOQUICKRESOLVE,
42 13, //GAME_NOTARGETCLUT,
43 14, //GAME_NOSTENCIL,
44 15, //GAME_NODEPTHRESOLVE,
45 16, //GAME_FULL16BITRES,
46 17, //GAME_RESOLVEPROMOTED,
47 18, //GAME_FASTUPDATE,
48 19, //GAME_NOALPHATEST,
49 20, //GAME_DISABLEMRTDEPTH,
50 //21 //GAME_32BITTARGS,
51 //22 //GAME_PATH3HACK,
52 //23 //GAME_DOPARALLELCTX,
53 24, //GAME_XENOSPECHACK,
54 //25 //GAME_PARTIALPOINTERS,
55 26, //GAME_PARTIALDEPTH,
56 27, //GAME_REGETHACK,
57 28, //GAME_GUSTHACK,
58 29, //GAME_NOLOGZ,
59 30, //GAME_AUTOSKIPDRAW
60 };
61
62
63 char hackDesc[32][64] =
64 {
65 "No hack",
66 "Texture targs",
67 "Auto reset",
68 "Interlace 2x",
69 "Texa",
70 "No target resolve",
71 "Exact color",
72 "No color clamp",
73 "Final Fantasy X",
74 "No alpha fail",
75 "No depth update",
76 "Quick resolve 1",
77 "No Quick resolve",
78 "No target clut",
79 "No stencil",
80 "VSS",
81 "No depth resolve",
82 "Full 16 bit resolution",
83 "Resolve promoted",
84 "Fast update",
85 "No alpha test",
86 "Disable mrt depth",
87 "Args 32 bit",
88 "",
89 "Parallel context",
90 "Xenosaga spec",
91 "Partial pointers",
92 "Partial depth",
93 "Reget",
94 "Gust",
95 "No logz",
96 "Automatic skip draw"
97 };
98
99 struct hacks
100 {
101 bool enabled;
102 char shortDesc[64];
103 char longDesc[256];
104 };
105
106 hacks hack_list[32] =
107 {
108 { true, "No hack", "No hack" },
109 { true, "Texture targs", "Tex Target checking - 00000001\nLego Racers" },
110 { true, "Auto reset", "Auto reset targs - 00000002\nUse when game is slow and toggling AA fixes it. Samurai Warriors. (Automatically on for Shadow Hearts)" },
111 { true, "Interlace 2x", "Interlace 2X - 00000004\nFixes 2x bigger screen. Gradius 3." },
112 { false, "Texa", "" },
113 { true, "No target resolve", "No target resolves - 00000010\nStops all resolving of targets. Try this first for really slow games. (Automatically on for Dark Cloud 1.)" },
114 { true, "Exact color", "Exact color testing - 00000020\nFixes overbright or shadow/black artifacts. Crash 'n Burn." },
115 { false, "No color clamp", "No color clamping - 00000040\nSpeeds up games, but might be too bright or too dim." },
116 { false, "Final Fantasy X", "" },
117 { false, "No alpha fail", "Alpha Fail hack - 00000100\nRemove vertical stripes or other coloring artifacts. Breaks Persona 4 and MGS3. (Automatically on for Sonic Unleashed, Shadow the Hedgehog, & Ghost in the Shell.)" },
118 { true, "No depth update", "Disable depth updates - 00000200" },
119 { true, "Quick resolve 1", "Resolve Hack #1 - 00000400\n Speeds some games. Kingdom Hearts."},
120 { true, "No Quick resolve", "Resolve Hack #2 - 00000800\nShadow Hearts, Urbz. Destroys FFX."},
121 { true, "No target clut", "No target CLUT - 00001000\nResident Evil 4, or foggy scenes." },
122 { true, "No stencil", "Disable stencil buffer - 00002000\nUsually safe to do for simple scenes. Harvest Moon." },
123 { false, "VSS", "" },
124 { true, "No depth resolve", "No depth resolve - 00008000\nMight give z buffer artifacts." },
125 { true, "Full 16 bit resolution", "Full 16 bit resolution - 00010000\nUse when half the screen is missing." },
126 { true, "Resolve promoted", "Resolve Hack #3 - 00020000\nNeopets" },
127 { true, "Fast update", "Fast Update - 00040000\n Speeds some games. Needed for Sonic Unleashed. Okami." },
128 { true, "No alpha test", "Disable alpha testing - 00080000" },
129 { true, "Disable mrt depth", "Enable Multiple RTs - 00100000" },
130 { false, "Args 32 bit", "" },
131 { false, "Path3", "" },
132 { false, "Parallel context", "" },
133 { true, "Xenosaga spec", "Specular Highlights - 01000000\nMakes graphics faster by removing highlights. (Automatically on for Xenosaga, Okami, & Okage.)" },
134 { false, "Partial pointers", "Partial targets - 02000000" },
135 { true, "Partial depth", "Partial depth - 04000000" },
136 { false, "Reget", "" },
137 { true, "Gust", "Gust fix - 10000000. Makes gust games cleaner and faster. (Automatically on for most Gust games)" },
138 { true, "No logz", "No logarithmic Z - 20000000. Could decrease number of Z-artifacts." },
139 { true, "Automatic skip draw", "Remove blur effect on some games\nSlow games." }
140 };
141
142 void ReportHacks(gameHacks hacks)
143 {
144 for(int i = 0; i < 32; i++)
145 {
146 if (hacks._u32 & (1 << i))
147 {
148 ZZLog::WriteLn("'%s' hack enabled.", hackDesc[i+1]);
149 }
150 }
151 }
152
153 void ListHacks()
154 {
155 if ((!conf.disableHacks) && (conf.def_hacks._u32 != 0))
156 {
157 ZZLog::WriteLn("Auto-enabling these hacks:");
158 ReportHacks(conf.def_hacks);
159 }
160
161 if (conf.hacks._u32 != 0)
162 {
163 ZZLog::WriteLn("You've manually enabled these hacks:");
164 ReportHacks(conf.hacks);
165 }
166 }
167
168 void DisplayHack(int hack)
169 {
170 ZZLog::WriteToScreen2("***%d %s", hack, hackDesc[hackList[hack]]);
171 }
172
173 void ChangeCurrentHack(int hack)
174 {
175 FUNCLOG
176
177 conf.hacks._u32 &= !(hackList[CurrentHack]);
178 conf.hacks._u32 |= hackList[hack];
179
180 DisplayHack(hack);
181
182 CurrentHack = hack;
183 SaveConfig();
184
185 }
186

  ViewVC Help
Powered by ViewVC 1.1.22