Compare commits

..

77 Commits
1.0 ... v1.0

Author SHA1 Message Date
ramapcsx2
68121cefcf Re-added prafull to the beta testers list, he got lost somehow.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5350 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-01 00:48:00 +00:00
sudonim1@gmail.com
134ac6a160 GUI: Closing the GS window didn't update the structure telling plugins about the window. Decided that just hiding the window has less race potential.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5347 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-24 03:48:38 +00:00
sudonim1@gmail.com
5f28d08286 GSDX: New interpretation of destination alpha testing to improve effect rendering as an optional hack. Known to make shadows in the persona games (and thus probably shin megami tensei) better, not sure what else it accomplishes without destroying other effects.
Now, a note about the actual issue.  Destination alpha tests can be used on the GS as one of the workarounds for a lack of stencils.  If you use a destination alpha test and leave alpha writing on, the GS will only write each pixel until you write an alpha value which would fail the test.  This works to a point in gsdx without further hacking, but that point is when within a single batch of primitives the same pixels are written multiple times and the destination alpha test is expected to update.  I did experimentally make a tight loop updating the stencil with a draw then drawing for one primitive at a time, but it was prohibitively slow (over 80% fps loss, you really don't want to know).

Destination alpha testing cannot be directly implemented in D3D9 or D3D10, but (probably) can in D3D11 (with a speed hit for sure, but I doubt it'll be 80%).  I'll be getting a new graphics card and looking into that.

And before some idiot says it, the answer is no.  OpenGL does not help.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5346 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-24 02:20:07 +00:00
sudonim1@gmail.com
96c8c13ead GSDX: don't unnecessarily create and use a render target for the DATE setup stage, D3D10+ supports not having a render target set. (D3D9 doesn't, so that's untouched.)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5345 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-23 22:55:06 +00:00
sudonim1@gmail.com
8a20e5af90 GSDX: Quick ugly fix (major work on this function might be done soon) for a bug with colclamp I noticed. Unknown impact, might make some effects work.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5344 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-23 20:24:09 +00:00
sudonim1@gmail.com
8a8d3c67d4 GSDX: Removed the collapsing of ge/g and le/l alpha tests in the shader code and the supporting code in the C++. This was presumably intended to reduce the number of shaders needed but a) this was never actually implemented, b) a single developer will generally not mix the functionally equivalent (with a different AREF) greater/less than with greater/less than or equal to in GS techniques, c) it really wouldn't make much of a difference to performance anyway and d) it would make an experimental change I'm working with more complicated and slower.
No change in functionality expected.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5343 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-23 16:39:56 +00:00
sudonim1@gmail.com
1f8c4ddc22 GSDx: Just slapping some consts on methods I needed to use with const references in testing.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5342 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-21 03:45:40 +00:00
sudonim1@gmail.com
546adf52c9 GSDx: ATI strikes again. Workaround for ATI sampler bug, the same bug I found in palette sampling earlier.
This may make gsdx slightly slower for everyone (I don't know an easy way to restrict this to affected systems), especially if using 8-bit textures.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5341 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-19 20:40:42 +00:00
gregory.hainaut
0aeb9afcc0 1.0.0 & trunk: add new language th_TH
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5339 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-11 19:48:37 +00:00
gregory.hainaut
214487a467 1.0.0 & trunk:i18n update sv_SE
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5337 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-08 07:25:25 +00:00
ramapcsx2
180b57b9cf GSdx: 2 more crcs for GoW and GoW2.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5336 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-07 20:46:03 +00:00
gregory.hainaut
5fc77e8646 trunk/branch: i18n: update zh_TW and de_DE
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5335 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-07 08:44:50 +00:00
ramapcsx2
e4a4e607c9 A couple installer fixes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5331 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-03 10:30:26 +00:00
ramapcsx2
1e70895118 GSdx: Removed the CRC hack for Drakengard 2 as per issue 1303.
Thanks for reporting.
(Also replaced broken Chinese characters in comments.)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5330 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-27 16:06:25 +00:00
sudonim1@gmail.com
80ba8ff16a GSDX: Fix splinter cell double agent (and others) regression. Texture cache hits no longer depend on TEXA ever, GPU load however is increased. The last regression I think?
So, in the end I only properly understood the old code after finding all the problems with my version.  I'm not sure whether any changes I've made are improvements any more, I'll need to review it with what I've learned in mind.  This effort might've been a big waste of time.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5329 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-27 00:57:44 +00:00
shadowladyngemu
540d098794 GameDB: Status updates, games that require new gamefixes or don't anymore, etc etc...
GSdx Hackfixes: Lego Batman changed to aggressive list, doesn't really fix ingame and breaks the title screens.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5328 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-26 11:57:44 +00:00
refraction
64447dd23a Path3 Masking: Optimization got missed during r5277 revert. Outrun, GTA:SA, Burnout 2 and others all speed boosted again ;p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5326 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-25 20:55:31 +00:00
refraction
7b8d99a69f GIF/1.0.0: Fix some condition bitching from my sloppy coding in r5277 and integrated the change in to the 1.0.0 branch as it will stop the emulator complaining about double interrupts.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5325 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-25 12:15:39 +00:00
gregory.hainaut
040e6c509b linux launcher:
* play with LD_LIBRARY_PATH variable to allow to ship 3rd party library with pcsx2 binary build
* Add a basic check to catch missing depencencies of plugins


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5323 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-21 19:39:26 +00:00
gregory.hainaut
3af930c555 gsdx ogl: nvidia compiler is not happy with implicit cast...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5322 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-21 17:31:53 +00:00
avihal
3b2944fe45 GSdx: Disable CRC hacks: Yet cleaner, better and more generic. Thx to sudonim.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5321 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-20 20:45:24 +00:00
avihal
ae9c7791c2 GSdx: Disable CRC hacks - cleanups:
- Removed the #define DISABLE_CRC_HACKS (since it's at the GUI now).
- reverted r5315 and r5319 (which prevented gs dumps to have a correct CRC).
- Restored the functionality of these revisions via simple skip of the other hack calls.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5320 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-20 18:51:30 +00:00
gregory.hainaut
35d381cd11 linux compilation fix (introduce in r5306)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5319 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-20 18:00:08 +00:00
ramapcsx2
48284746d6 GSdx: Better CRC disable value, using -2.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5318 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-20 13:23:35 +00:00
sudonim1@gmail.com
179246a4eb SPU2-X: Tweak the quick fix in the previous rev a little: also select the default device if a GUID is specified but not present in the enumeration.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5317 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-20 12:28:13 +00:00
sudonim1@gmail.com
aa54e28add SPU2-X: Quick fix for an issue with dsound configuration dialog where if the default device is selected, nothing is initially selected in the combo box and on writing the configuration uninitialised memory is used for the GUID.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5316 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-20 12:21:44 +00:00
ramapcsx2
ef0377b0e9 GSdx: Fully disable CRC based hacks when the option is set (by setting the CRC to 0). Some GSRendererHW::OI_* functions were still active before.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5315 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 16:10:24 +00:00
sudonim1@gmail.com
4f6a842dca Fix SPU2-X linking issues (I sincerely hope).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5314 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 03:09:59 +00:00
sudonim1@gmail.com
f2ca45ad46 GSDX: Put palette checking for alpha min/max calculation back in because of gabest's concerns about the software renderer's performance. Added a one line fix instead (m_clut.Read32(TEX0, TEXA))
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5313 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 01:57:13 +00:00
sudonim1@gmail.com
f5f5074172 GSDX: Put the sprite hack back in because apparently it wasn't fixed.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5312 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 01:12:01 +00:00
sudonim1@gmail.com
21522e71b2 GSDX: Skip checking each palette entry's expanded alpha when deciding whether a texture is fully opaque. Textures are probably almost never determined to be opaque by this and doing it is problematic. (Skipping the check might even be a performance gain for hardware, you never know.)
Also remove some (probably mangled) chinese comments from the cutie merge.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5311 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 01:02:52 +00:00
sudonim1@gmail.com
0d9eca8668 88GSDX: Removed the "sprite hack" as it should be obsolete, fixed the vertex shader selector key function (the pixel shader was broken in the same way but with the "sprite hack" removed it doesn't matter now).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5310 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 00:35:42 +00:00
sudonim1@gmail.com
c755435eeb GSDX: Do not interpret TEXA while filling the gsdx internal temporary CLUT buffer used in texture creation and updating (I didn't realise this was happening and it's incompatible with my approach). Probably generally fixes stuff in combination with the other changes in palette handling, at the very least I know it fixes lines in sprites in Ar Tonelico 2 (currently needs the "sprite hack"), a bug which I spent a long time trying to fix after it was pointed out to me before.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5309 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 00:12:35 +00:00
gregory.hainaut
27a4110256 zzogl glsl: remove a bad optimization that lost track of some textures. Fix potential black-screen
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5308 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-18 22:13:22 +00:00
gregory.hainaut
d72a64b9cf zzogl: autocompletion typo. Interlace texture was attached to the wrong shader program
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5307 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-18 21:38:41 +00:00
refraction
ff6b79085d Null Plugins: Now report an SVN revision as well as a version.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5306 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-18 21:16:25 +00:00
gregory.hainaut
91ad246b46 i18n:
* update it_IT and pt_BR
* remove bad character in id_ID


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5305 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-18 18:26:49 +00:00
sudonim1@gmail.com
e13c58812d GSDX: Add a comment explaining something which doesn't matter.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5304 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 18:39:18 +00:00
sudonim1@gmail.com
323ac81a7d GSDX: use a GPU side palette for high byte indexed format copies from framebuffers again (including all the buggy cases because of the revert). I think this is how it used to be but I've lost track a little.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5303 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 18:26:42 +00:00
sudonim1@gmail.com
c9194b185a GSDX: Ignore this commit, just deleting lines of code.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5302 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 17:54:09 +00:00
sudonim1@gmail.com
0e9a4c1663 GSDX: Missed this in d3d9 code while fiddling with the shader. Can't be bothered to do the maths to determine whether doing this twice would have a visible effect.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5301 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 17:49:50 +00:00
sudonim1@gmail.com
a617a6c983 GSDX: partially revert texture cache changes for now. Compat probably back to normal, some glitchy textures are probably differently glitchy, the other changes might improve some games, performance probably much the same as ever.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5300 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 14:33:34 +00:00
sudonim1@gmail.com
14acb81553 GSDX: CT32 -> T8H, need to use a 32 bit D3D format for the texture so that they have compatible D3D types for the copy (don't have to if using StretchRect but might as well).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5299 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 14:07:03 +00:00
gigaherz
b769a79d22 portaudio (SPU2-X): Last merge from portaudio svn I forgot to include this change (or tell rama to include it), which breaks debug builds of SPU2-X.
Also, "omfg a commit by gigaherz!"

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5295 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 01:32:04 +00:00
avihal
999ff5c457 GSdx: Add GUI for disabling all CRC hacks (for testing purposes only, disabled by default). The new checkbox is at the "HW Hacks" section, and is only relevant when the global "Enable HW Hacks" box is checked.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5294 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 23:53:08 +00:00
sudonim1@gmail.com
1ed80f320e GSDX: Clear Target::m_valid after a full Read() for performance (and accuracy?) Probably doesn't match the original intent but it matches the current usage.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5293 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 18:14:58 +00:00
sudonim1@gmail.com
6bb9339223 GSDX: (New bug?) If "8 bit textures" is disabled format conversion has already happened and we need PS_FMT=0 in the shader for indexed textures.
GSDX: (Old bug) When looking up a texture in the cache, the check didn't take into account CLUT formats, nor did it skip this check when "8 bit textures" is enabled.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5292 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 17:44:24 +00:00
sudonim1@gmail.com
0bf64fdffd GSDX: fixed an oversight in my shader change gregory caught which removed alpha expansion for the direct sampling case, should probably fix the remaining bugs. Also set the texture sampler to point sampling when the shader will be performing its own bilinear filtering (effect on games unknown but should be an improvement).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5291 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 15:36:10 +00:00
gregory.hainaut
b8b451340c zzogl: use the EXT version of fbo (fix the build on windows)
gsdx:
* add some parenthesis to shup up very verbose gcc warning
* adapt ogl to latest sudonim change


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5290 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 10:43:04 +00:00
gregory.hainaut
3b22f0fb0c zzogl glsl4:
* properly delete program and vertex array. Avoid a crash on plugin reload
* reset shader state. Avoid to reuse invalid data on plugin reload
gsdx:
* add an hack to unattach/attach the gl context from different thread. Help to solve some crashes. The best will be to move gpu operation out of gsreadfifo but it would need more works
* implement logz for test purpose (don't seem to help)
gsdx replay:
* use default xdg location


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5289 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-12 18:14:01 +00:00
sudonim1@gmail.com
b722dfd013 GSDX: Added a compatibility check to the framebuffer handling for the texture cache and made it preferred and added a writeback as a fallback. Compat should be back to normal?
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5288 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 10:57:32 +00:00
sudonim1@gmail.com
e8257df98d GSDX: made the paletted texture handling in the cache a bit more sensible to my eyes and implemented interpolation of palette entries for pixels in paletted textures when using the 8 bit textures option. Regressions in some games I think, such as Virtual On (which is very broken anyway), need to investigate what made them work (to some degree) before. Seems to change some performance characteristics favourably to my surprise, but I might just be bad at remembering framerates.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5287 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 03:27:16 +00:00
sudonim1@gmail.com
8ab8b4592d GSDX: Err, and another file, I should be asleep.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5286 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 02:57:28 +00:00
sudonim1@gmail.com
adfa7f1579 GSDX: Forgot a file.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5285 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 02:56:44 +00:00
sudonim1@gmail.com
08d8287d3e GSDX: Added some exceptions on shader compilation failure (with handlers in entry points because people seem to like the plugin struggling on even when nothing works any more) because I am not keen crashing Windows via my graphics driver.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5284 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 02:31:44 +00:00
sudonim1@gmail.com
17f28b24b3 GSDX: Prodded some offensive code, this isn't meant to affect emulation of any games and it probably won't.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5283 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 00:00:18 +00:00
sudonim1@gmail.com
1711a26bbb GSDX: put all paletted texture samples through the same transformation from the UNORM 0-1 256 step mapping to a 0.5/256-255.5/256 mapping after seeing potential bugs with FMT_4HL and changed FMT_4HH because it seemed to be completely wrong. Nothing but 8 bit textures tested because I can't find a single game which uses 4 bit textures.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5281 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-10 16:04:47 +00:00
sudonim1@gmail.com
4f79c4d1cb GSDX: Fixed my inability to remember or look up (I swear that page was hiding) coordinate systems in r5279 and assumed that it was a rounding error instead. The symptom was that palette indices above around 250 were being rounded up to the next palette entry causing visible glitches (only in D3D10 for some reason). Changed the code to keep the fractional part after multiplication by 256 around 0.5 and the steps around 1.0. Should be very safe against small errors.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5280 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-09 08:03:27 +00:00
sudonim1@gmail.com
1df5b7ef7a GSDX: Probably fix D3D10 and maybe D3D9 (might be working anyway but I think I have it addressing texel centres now) palette lookups. I noticed that this was broken in D3D10 while fixing the Realta Nua issue in r5273.
Explanation, because this gives me a headache and this might save someone else one (or I might be wrong and they might see why): in D3D10, 0.0 points to the centre of the leftmost texel and 1.0 points one texel to the right of the rightmost texel, so to map a UNORM uniformly across a texel we need to multiply the input by (w-1)/w.  In D3D9 0.0 points to the left edge of the leftmost texel and 1.0 to the right edge of the rightmost texel so after the multiplication we add 1/2w.

Actual texture sampling is probably not right for at least one of D3D9 and D3D10, but this headache is killing me.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5279 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-08 21:36:44 +00:00
gregory.hainaut
b534fcc1bc zzogl:
* add a script to run cg compiler on glsl file:
  + handy to check the syntax
  + output the asm of the shader
  - unfortunately don't support latest glsl construct but better than nothing
* really delete resources before context destruction
* wanted to play with opengl3 timer for profiling but not conclusive, just keeping code around for future use


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5278 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-08 18:14:47 +00:00
refraction
cb7f27cd76 Revert original fix for Realta Nua as Pseudonym found the proper fix. This should get rid of the regression on Agressive Inline and one of the Matt Hoffman games having textureless graphics.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5277 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-07 21:41:00 +00:00
avihal
faa463b95c GSdx: CRC hacks: ICO: moved the cutie extra hack from r5214 to "Aggressive mode".
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5276 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-07 15:22:12 +00:00
ramapcsx2
a74b8e2c7f GSdx: Removed Rogue Galaxy from the GSdx crc hacks. Fixes issue 1290.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5275 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-07 11:53:53 +00:00
ramapcsx2
c7b1423a83 Game database: 2 games have the ee timing hack enabled now, one game disabled.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5274 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-07 11:45:16 +00:00
sudonim1@gmail.com
22bdd1fbec GS/GIF: only raise interrupts on IMR writes on falling edges, i.e. if the interrupt was previously masked. Also remove a block about queued signals from IMR writes which makes no sense to me given that the CSR write to clear the previous SIGNAL should be setting CSR.SIGNAL already, which will trigger the interrupt by the standard mechanism. tl;dr: fixes realta nua and probably other stuff.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5273 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-06 22:04:39 +00:00
avihal
1628ab154e Games DB: add support for controlling mvuFlagSpeedHack. Disabling this hack for all Katamari games (otherwise enabled by default now) since it has a weird speed bug with it enabled.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5272 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-06 20:38:24 +00:00
avihal
6d691b63f5 NSIS Un/Installer: updates (for both full/web installers):
- Removed vcredist 2008-sp1 and 2010, added vcredist 2010 sp1.
- GSdx DLLs rename (+"32"), added avx.
- Version to 1.0.0.
- Uninstaller: bios removal now has own checkbox (can now remove everything and keep bios).
- Uninstaller: registry is cleaned first (better for next install in case uninstall fails for some reason).

TODO/ToTest:
- Test upgrade from 0.98, 0.97.
- Got few crashes and/or errors if files/folders were in use while uninstalling. Look into that.
- First install on a clean system: test that first-time-wizard appears (i didn't get the ftw, I possibly had stuff from previous incomplete uninstall).
- Add an option to run pcsx2 when the installer completes?
- readme/faq have "0.9.8" in filename, but the installer refers to <version>, check if/when it's used.
- Cheats folder created at program files. consider at mydocs?
- Cheats folder contains what appears to be a valid pnach file for personas 4 (inf health etc). do we want that packaged?
- Do we want to mirror vcredist 2010sp1 on pcsx2.code.google/files? (older redists are mirrored).
- Change the installer logo to the one used everywhere else?
- See if we can use the best gsdx version selected initially (my system supports sse4, but it selects the sse2 dll by default at ftw).
- Default KB config for lilypad? all other plugins can work without configuring manually, but without a controller configured, it's very meh. See what we can do about it.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5271 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-06 14:55:15 +00:00
ramapcsx2
3321b327a9 Changed the defaults for GSdx to native resolution (for emulation accuracy's sake) and made the recommended speedhacks enabled by default in PCSX2.
Also set the auto deinterlace mode in GSdx when the .ini isn't present (instead of "none").

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5270 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-06 10:08:08 +00:00
gregory.hainaut
d79186fafe zzogl replayer:
* I miss some ending bit. 
* Use a full int for GSvsync
* fix a small memory link


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5269 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-05 06:46:52 +00:00
gregory.hainaut
55ba4477ca gsdx: remove sdl and ogl from the win32 dialogs
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5268 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-04 18:45:54 +00:00
gregory.hainaut
b751aa855e i18n:
* new language fi_FI
* update cs_CZ


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5267 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-03 11:29:13 +00:00
refraction
b2932414e8 Path3 Regression Fix: Turns out part of the optimization in r5245 didn't work so well with SSX3, plus it didn't create much benefit.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5265 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-02 21:52:23 +00:00
gregory.hainaut
0fff99f4f3 zzogl: gl resources must be deleted before the destruction of the GL context
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5264 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-02 09:33:40 +00:00
gregory.hainaut
ef976706f6 debian: don't ship null plugins
build.sh: fix shell bug & update the help


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5263 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-02 08:01:04 +00:00
refraction
77f0422e7d Gif Unit: Bugfix for Path3 Masking. Fast and the Furious did some channel swapping which freaks it out. Now remembers if it was called by Path 3 for the DMA rewinding to work correctly.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5260 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-01 22:23:43 +00:00
refraction
c6d820ff4e SPU-2X Project too for VS2010
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5259 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-01 18:24:37 +00:00
refraction
cabcc83ac5 Not sure if it was just me who had this issue but Lilypad didn't have the Directx SDK lib/include paths in the VC Directories, causing it not to build. Now it has :P
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5258 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-01 18:18:14 +00:00
64 changed files with 664 additions and 628 deletions

View File

@@ -95,7 +95,7 @@ if(PACKAGE_MODE)
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/GameIndex.dbf" DESTINATION "${GAMEINDEX_DIR}")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/linux_various/pcsx2.desktop" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/linux_various/pcsx2.xpm" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/pixmaps")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/docs/PCSX2_FAQ_1.0.0.pdf" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/pcsx2")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/docs/PCSX2_Readme_1.0.0.pdf" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/pcsx2")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/docs/PCSX2_FAQ_0.9.8.pdf" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/pcsx2")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/docs/PCSX2_Readme_0.9.8.pdf" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/pcsx2")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/docs/pcsx2.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1/")
endif(PACKAGE_MODE)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -157,7 +157,7 @@ FixedInt<Precision>& FixedInt<Precision>::SetFraction( u32 fracpart )
template< int Precision >
wxString FixedInt<Precision>::ToString() const
{
return wxsFormat( L"%d.%02d", GetWhole(), (GetFraction() * 100) / Precision );
return wxsFormat( L"%d.%d", GetWhole(), (GetFraction() * 100) / Precision );
}
template< int Precision >
@@ -167,8 +167,7 @@ wxString FixedInt<Precision>::ToString( int fracDigits ) const
pxAssert( fracDigits <= 7 ); // higher numbers would just cause overflows and bad mojo.
int mulby = (int)pow( 10.0, fracDigits );
wxString fmt=wxsFormat(L"%%d.%%0%dd", fracDigits);
return wxsFormat( fmt, GetWhole(), (GetFraction() * mulby) / Precision );
return wxsFormat( L"%d.%d", GetWhole(), (GetFraction() * mulby) / Precision );
}
template< int Precision >

View File

@@ -32,7 +32,7 @@ EOF
# Default value
SVN_CO_VERSION=0;
BRANCH="1.0"
BRANCH="trunk"
LOCAL=0
while [ -n "$1" ]; do
case $1 in
@@ -57,8 +57,8 @@ else
fi
# Debian name of package and tarball
PKG_NAME="pcsx2-1.0.0"
TAR_NAME="pcsx2_1.0.0.orig.tar"
PKG_NAME="pcsx2.snapshot-${SVN_CO_VERSION}"
TAR_NAME="pcsx2.snapshot_${SVN_CO_VERSION}.orig.tar"
# Directory
TMP_DIR=/tmp
@@ -130,6 +130,15 @@ mkdir -p $ROOT_DIR/plugins
echo "Note: some plugins are more or less deprecated CDVDisoEFP, CDVDlinuz, Zerogs, Zeropad ...";
echo "Done")
## Download the internal sdl 1.3 for gsdx
# echo "Downloading 3rdpary SDL 1.3 (need by gsdx) revision ${SVN_CO_VERSION}"
# mkdir -p $ROOT_DIR/3rdparty
# (cd $ROOT_DIR/3rdparty/;
# get_svn_file 3rdparty/CMakeLists.txt;
# get_svn_dir 3rdparty/SDL-1.3.0-5387;)
# echo "Done"
## Installation
echo "Copy the subversion repository to a temporary directory"
# Copy the dir
@@ -147,6 +156,7 @@ echo "Remove useless files (copyright issues)"
rm -fr "${NEW_DIR}/plugins/zzogl-pg/opengl/ZeroGSShaders"
rm -fr "${NEW_DIR}/common/src/Utilities/x86/MemcpyFast.cpp"
rm -fr "${NEW_DIR}/plugins/GSdx/baseclasses"
rm -fr "${NEW_DIR}/plugins/GSdx/vtune"
## BUILD
echo "Build the tar.gz file"

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PCSX2 0.9.7\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/pcsx2/\n"
"POT-Creation-Date: 2012-04-07 11:42+0200\n"
"PO-Revision-Date: 2011-09-28 21:51+0100\n"
"POT-Creation-Date: 2012-06-01 10:29+0200\n"
"PO-Revision-Date: 2012-05-21 12:58+0100\n"
"Last-Translator: Víctor González <pajaroloco_2@hotmail.com>\n"
"Language-Team: \n"
"Language: \n"

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PCSX2 0.9.9\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/pcsx2/\n"
"POT-Creation-Date: 2012-06-25 22:57+0200\n"
"POT-Creation-Date: 2012-05-27 12:20+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PCSX2 0.9.9\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/pcsx2/\n"
"POT-Creation-Date: 2012-06-25 22:57+0200\n"
"POT-Creation-Date: 2012-05-27 12:20+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -1,14 +0,0 @@
Bug fix release 1.0.1:
System:
Fixed incorrect handling of framerate adjustment percentage settings.
Fixed cases in which GS window settings do not apply until the PCSX2 is restarted.
Hidden disable GS output option as isn't currently stable and is only meant for testing.
Core:
Fixed crash on startup when virtual memory for SuperVU cannot be allocated.
Fixed scratchpad DMA access to VU1 memory.
SPU2-X:
Fixed out of bounds array access in ADPCM decoding causing bad audio. (Multiple Crash Bandicoot games.)
Disable digital effects when the effects buffer has an illegal address until we know what to do with it. Prevents crash / memory corruption.

View File

@@ -61,8 +61,10 @@ Section "!${APP_NAME} (required)" SEC_CORE
File /nonfatal /oname=gsdx32-ssse3-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-ssse3.dll
File /nonfatal /oname=gsdx32-sse4-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-sse4.dll
File /nonfatal /oname=gsdx32-avx-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-avx.dll
File /nonfatal /oname=zerogs-r${SVNREV_ZEROGS}.dll ..\bin\Plugins\zerogs.dll
File /nonfatal /oname=spu2-x-r${SVNREV_SPU2X}.dll ..\bin\Plugins\spu2-x.dll
File /nonfatal /oname=zerospu2-r${SVNREV_ZEROSPU2}.dll ..\bin\Plugins\zerospu2.dll
File /nonfatal /oname=cdvdiso-r${SVNREV_CDVDISO}.dll ..\bin\Plugins\cdvdiso.dll
File ..\bin\Plugins\cdvdGigaherz.dll

View File

@@ -57,8 +57,10 @@ Section "!${APP_NAME} (required)" SEC_CORE
File /nonfatal /oname=gsdx32-ssse3-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-ssse3.dll
File /nonfatal /oname=gsdx32-sse4-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-sse4.dll
File /nonfatal /oname=gsdx32-avx-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-avx.dll
File /nonfatal /oname=zerogs-r${SVNREV_ZEROGS}.dll ..\bin\Plugins\zerogs.dll
File /nonfatal /oname=spu2-x-r${SVNREV_SPU2X}.dll ..\bin\Plugins\spu2-x.dll
File /nonfatal /oname=zerospu2-r${SVNREV_ZEROSPU2}.dll ..\bin\Plugins\zerospu2.dll
File /nonfatal /oname=cdvdiso-r${SVNREV_CDVDISO}.dll ..\bin\Plugins\cdvdiso.dll
File ..\bin\Plugins\cdvdGigaherz.dll

Binary file not shown.

Binary file not shown.

View File

@@ -121,23 +121,12 @@ static __fi void gsCSRwrite( const tGS_CSR& csr )
static __fi void IMRwrite(u32 value)
{
GSIMR = (value & 0x1f00)|0x6000;
if(CSRreg.GetInterruptMask() & (~(GSIMR >> 8) & 0x1f))
gsIrq();
GUNIT_LOG("IMRwrite()");
if (gifUnit.gsSIGNAL.queued && !(GSIMR & 0x100)) {
// Note: PS2 apps are expected to write a successive 1 and 0 to the IMR in order to
// trigger the gsInt and clear the second pending SIGNAL interrupt -- if they fail
// to do so, the GS will freeze again upon the very next SIGNAL).
//
// What's not known here is whether or not the SIGID register should be updated
// here or when the GS is resumed during CSR write (above).
CSRreg.SIGNAL = true;
if (CSRreg.GetInterruptMask() & (~value & GSIMR) >> 8)
gsIrq();
}
GSIMR = (value & 0x1f00)|0x6000;
}
__fi void gsWrite8(u32 mem, u8 value)

View File

@@ -15,10 +15,9 @@
#pragma once
static const int PCSX2_VersionHi = 1;
static const int PCSX2_VersionMid = 0;
static const int PCSX2_VersionLo = 0;
static const bool PCSX2_isReleaseVersion = 0;
static const int PCSX2_VersionHi = 0;
static const int PCSX2_VersionMid = 9;
static const int PCSX2_VersionLo = 9;
class SysCoreThread;
class CpuInitializerSet;

View File

@@ -71,7 +71,7 @@ void vif1TransferToMemory()
pMem += size;
if(pMem < pMemEnd) {
DevCon.Warning("GS Transfer < VIF QWC, Clearing end of space");
//DevCon.Warning("GS Transfer < VIF QWC, Clearing end of space");
__m128 zeroreg = _mm_setzero_ps();
do {
@@ -313,41 +313,34 @@ __fi void vif1Interrupt()
vif1Regs.stat.VPS = VPS_IDLE;
}
if (!vif1.done)
{
if (!(dmacRegs.ctrl.DMAE))
{
Console.WriteLn("vif1 dma masked");
return;
}
if ((vif1.inprogress & 0x1) == 0) vif1SetupTransfer();
if (vif1ch.chcr.DIR) vif1Regs.stat.FQC = min(vif1ch.qwc, (u16)16);
if(vif1.waitforvu == true)
{
//DevCon.Warning("Waiting on VU1");
return;
}
}
if (vif1.inprogress & 0x1)
{
_VIF1chain();
// VIF_NORMAL_FROM_MEM_MODE is a very slow operation.
// Timesplitters 2 depends on this being a bit higher than 128.
if (vif1ch.chcr.DIR) vif1Regs.stat.FQC = min(vif1ch.qwc, (u16)16);
}
{
_VIF1chain();
// VIF_NORMAL_FROM_MEM_MODE is a very slow operation.
// Timesplitters 2 depends on this beeing a bit higher than 128.
if (vif1ch.chcr.DIR) vif1Regs.stat.FQC = min(vif1ch.qwc, (u16)16);
if(!(vif1Regs.stat.VGW && gifUnit.gifPath[GIF_PATH_3].state != GIF_PATH_IDLE)) //If we're waiting on GIF, stop looping, (can be over 1000 loops!)
CPU_INT(DMAC_VIF1, g_vif1Cycles);
return;
}
if(g_vif1Cycles > 0 || vif1ch.qwc)
{
if(!(vif1Regs.stat.VGW && gifUnit.gifPath[GIF_PATH_3].state != GIF_PATH_IDLE)) //If we're waiting on GIF, stop looping, (can be over 1000 loops!)
CPU_INT(DMAC_VIF1, max((int)g_vif1Cycles, 8));
if (!vif1.done)
{
return;
if (!(dmacRegs.ctrl.DMAE))
{
Console.WriteLn("vif1 dma masked");
return;
}
if ((vif1.inprogress & 0x1) == 0) vif1SetupTransfer();
if (vif1ch.chcr.DIR) vif1Regs.stat.FQC = min(vif1ch.qwc, (u16)16);
if(!(vif1Regs.stat.VGW && gifUnit.gifPath[GIF_PATH_3].state != GIF_PATH_IDLE)) //If we're waiting on GIF, stop looping, (can be over 1000 loops!)
CPU_INT(DMAC_VIF1, g_vif1Cycles);
return;
}
else if(vif1Regs.stat.VPS == VPS_TRANSFERRING) DevCon.Warning("Cycles %x, cmd %x, qwc %x, waitonvu %x", g_vif1Cycles, vif1.cmd, vif1ch.qwc, vif1.waitforvu);
if (vif1.vifstalled && vif1.irq)
{

View File

@@ -370,18 +370,22 @@ static const uint TitleBarUpdateMs = 333;
GSFrame::GSFrame(wxWindow* parent, const wxString& title)
: wxFrame(parent, wxID_ANY, title, g_Conf->GSWindow.WindowPos)
: wxFrame(parent, wxID_ANY, title,
g_Conf->GSWindow.WindowPos, wxSize( 640, 480 ),
(g_Conf->GSWindow.DisableResizeBorders ? 0 : wxRESIZE_BORDER) | wxCAPTION | wxCLIP_CHILDREN |
wxSYSTEM_MENU | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX
)
, m_timer_UpdateTitle( this )
{
SetIcons( wxGetApp().GetIconBundle() );
SetClientSize( g_Conf->GSWindow.WindowSize );
SetBackgroundColour( *wxBLACK );
wxStaticText* label = new wxStaticText( this, wxID_ANY, _("GS Output is Disabled!") );
m_id_OutputDisabled = label->GetId();
label->SetFont( wxFont( 20, wxDEFAULT, wxNORMAL, wxBOLD ) );
label->SetForegroundColour( *wxWHITE );
AppStatusEvent_OnSettingsApplied();
label->Show( EmuConfig.GS.DisableOutput );
GSPanel* gsPanel = new GSPanel( this );
gsPanel->Show( !EmuConfig.GS.DisableOutput );
@@ -494,12 +498,6 @@ void GSFrame::AppStatusEvent_OnSettingsApplied()
{
if( IsBeingDeleted() ) return;
SetWindowStyle((g_Conf->GSWindow.DisableResizeBorders ? 0 : wxRESIZE_BORDER) | wxCAPTION | wxCLIP_CHILDREN |
wxSYSTEM_MENU | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX);
if (!IsFullScreen() && !IsMaximized())
SetClientSize(g_Conf->GSWindow.WindowSize);
Refresh();
if( g_Conf->GSWindow.CloseOnEsc )
{
if( IsShown() && !CorePlugins.IsOpen(PluginId_GS) )

View File

@@ -349,18 +349,18 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
wxSize backsize( m_background.GetSize() );
wxString wintitle;
if( PCSX2_isReleaseVersion )
if( PCSX2_VersionLo & 1 )
{
// stable releases, with a simple title.
wintitle.Printf( _("%s %d.%d.%d %s"), pxGetAppName().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
SVN_MODS ? _("(modded)") : wxEmptyString
);
// Odd versions: beta / development editions, which feature revision number and compile date.
wintitle.Printf( _("%s %d.%d.%d.%d%s (svn) %s"), pxGetAppName().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
SVN_REV, SVN_MODS ? L"m" : wxEmptyString, fromUTF8(__DATE__).c_str() );
}
else
{
// beta / development editions, which feature revision number and compile date.
wintitle.Printf( _("%s %d.%d.%d.%d%s (svn) %s"), pxGetAppName().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
SVN_REV, SVN_MODS ? L"m" : wxEmptyString, fromUTF8(__DATE__).c_str() );
// evens: stable releases, with a simpler title.
wintitle.Printf( _("%s %d.%d.%d %s"), pxGetAppName().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
SVN_MODS ? _("(modded)") : wxEmptyString
);
}
SetTitle( wintitle );

View File

@@ -313,8 +313,6 @@ Panels::VideoPanel::VideoPanel( wxWindow* parent ) :
L"Warning: This option can be enabled on-the-fly but typically cannot be disabled on-the-fly (video will typically be garbage)."
) );
m_check_DisableOutput->Hide(); // Band-aid fix since currently broken
//GSWindowSettingsPanel* winpan = new GSWindowSettingsPanel( left );
//winpan->AddFrame(_("Display/Window"));

View File

@@ -120,20 +120,7 @@ __fi tDMA_TAG* SPRdmaGetAddr(u32 addr, bool write)
vu1Thread.WaitVU();
}
//Access for VU Memory
if((addr >= 0x1100c000) && (addr < 0x11010000))
return (tDMA_TAG*)VU1.Mem + (addr & 0x3ff0);
//Possibly not needed but the manual doesn't say SPR cannot access it.
if((addr >= 0x11008000) && (addr < 0x1100c000))
return (tDMA_TAG*)VU1.Micro + (addr & 0x3ff0);
if ((addr >= 0x11000000) && (addr < 0x11004000))
return (tDMA_TAG*)VU0.Micro + (addr & 0xff0);
if ((addr >= 0x11004000) && (addr < 0x11008000))
return (tDMA_TAG*)VU0.Mem + (addr & 0xff0);
return (tDMA_TAG*)vtlb_GetPhyPtr(addr & 0x1FFFFFF0);
}
else
{

View File

@@ -350,8 +350,7 @@ static void SuperVUAlloc(int vuindex)
{
if (s_recVUMem[vuindex]) return;
wxString mem_name = pxsFmt("SuperVU%u Recompiler Cache", vuindex);
s_recVUMem[vuindex] = new RecompiledCodeReserve( mem_name, 0 );
s_recVUMem[vuindex] = new RecompiledCodeReserve( pxsFmt("SuperVU%u Recompiler Cache", vuindex), 0 );
s_recVUMem[vuindex]->Reserve( sVU_EXESIZE, vuindex ? HostMemoryMap::sVU1rec : HostMemoryMap::sVU0rec, _256mb );
s_recVUMem[vuindex]->SetProfilerName(pxsFmt("sVU%urec",vuindex));
@@ -359,7 +358,7 @@ static void SuperVUAlloc(int vuindex)
if (!s_recVUMem[vuindex]->IsOk())
{
safe_delete(s_recVUMem[vuindex]);
throw Exception::VirtualMemoryMapConflict(mem_name)
throw Exception::VirtualMemoryMapConflict( s_recVUMem[vuindex]->GetName() )
.SetDiagMsg(pxsFmt( L"SuperVU failed to allocate virtual memory below 256MB." ))
.SetUserMsg(pxE( "!Notice:superVU:VirtualMemoryAlloc",
L"Out of Memory (sorta): The SuperVU recompiler was unable to reserve the specific memory "

View File

@@ -16,8 +16,11 @@
#include <stdio.h>
#include "CDVD.h"
#ifdef _MSC_VER
# include "svnrev.h"
#endif
const char *LibName = "CDVDnull Driver";
static char libraryName[256];
const unsigned char version = PS2E_CDVD_VERSION;
const unsigned char revision = 0;
@@ -25,7 +28,12 @@ const unsigned char build = 6;
EXPORT_C_(char*) PS2EgetLibName()
{
return (char *)LibName;
#ifdef _MSC_VER
sprintf_s( libraryName, "CDVDnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "CDVDnull Driver";
#endif
}
EXPORT_C_(u32) PS2EgetLibType()
@@ -114,7 +122,7 @@ EXPORT_C_(void) CDVDconfigure()
EXPORT_C_(void) CDVDabout()
{
SysMessage("%s %d.%d", LibName, revision, build);
SysMessage("%s %d.%d", "CDVDnull Driver", revision, build);
}
EXPORT_C_(s32) CDVDtest()

View File

@@ -46,7 +46,6 @@ extern const unsigned char version;
extern const unsigned char revision;
extern const unsigned char build;
extern const unsigned int minor;
extern const char *LibName;
extern void SysMessage(const char *fmt, ...);
#endif /* __CDVD_H__ */

View File

@@ -21,12 +21,15 @@
using namespace std;
#include "FW.h"
#ifdef _MSC_VER
# include "svnrev.h"
#endif
const u8 version = PS2E_FW_VERSION;
const u8 revision = 0;
const u8 build = 7; // increase that with each version
static char *libraryName = "FWnull Driver";
static char libraryName[256];
string s_strIniPath="inis";
string s_strLogPath = "logs";
@@ -62,7 +65,12 @@ EXPORT_C_(u32) PS2EgetLibType()
EXPORT_C_(char*) PS2EgetLibName()
{
return libraryName;
#ifdef _MSC_VER
sprintf_s( libraryName, "FWnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "FWnull Driver";
#endif
}
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)

View File

@@ -426,131 +426,206 @@ EXPORT_C_(int) GSopen(void** dsp, char* title, int mt)
EXPORT_C GSreset()
{
s_gs->Reset();
try
{
s_gs->Reset();
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C GSgifSoftReset(uint32 mask)
{
s_gs->SoftReset(mask);
try
{
s_gs->SoftReset(mask);
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C GSwriteCSR(uint32 csr)
{
s_gs->WriteCSR(csr);
try
{
s_gs->WriteCSR(csr);
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C GSreadFIFO(uint8* mem)
{
try
{
#ifdef OGL_MT_HACK
// FIXME: double check which thread call this function
// See fifo2 issue below
// FIXME: double check which thread call this function
// See fifo2 issue below
#ifdef OGL_DEBUG
if (theApp.GetConfig("renderer", 0) / 3 == 4) fprintf(stderr, "Disable FIFO1 on opengl\n");
if (theApp.GetConfig("renderer", 0) / 3 == 4) fprintf(stderr, "Disable FIFO1 on opengl\n");
#endif
s_gs->m_wnd.AttachContext();
s_gs->m_wnd.AttachContext();
#endif
s_gs->ReadFIFO(mem, 1);
s_gs->ReadFIFO(mem, 1);
#ifdef OGL_MT_HACK
s_gs->m_wnd.DetachContext();
s_gs->m_wnd.DetachContext();
#endif
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C GSreadFIFO2(uint8* mem, uint32 size)
{
try
{
#ifdef OGL_MT_HACK
// FIXME called from EE core thread not MTGS which cause
// invalidate data for opengl
// FIXME called from EE core thread not MTGS which cause
// invalidate data for opengl
#ifdef OGL_DEBUG
if (theApp.GetConfig("renderer", 0) / 3 == 4) fprintf(stderr, "Disable FIFO2(%d) on opengl\n", size);
if (theApp.GetConfig("renderer", 0) / 3 == 4) fprintf(stderr, "Disable FIFO2(%d) on opengl\n", size);
#endif
s_gs->m_wnd.AttachContext();
s_gs->m_wnd.AttachContext();
#endif
s_gs->ReadFIFO(mem, size);
s_gs->ReadFIFO(mem, size);
#ifdef OGL_MT_HACK
s_gs->m_wnd.DetachContext();
s_gs->m_wnd.DetachContext();
#endif
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C GSgifTransfer(const uint8* mem, uint32 size)
{
s_gs->Transfer<3>(mem, size);
try
{
s_gs->Transfer<3>(mem, size);
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C GSgifTransfer1(uint8* mem, uint32 addr)
{
s_gs->Transfer<0>(const_cast<uint8*>(mem) + addr, (0x4000 - addr) / 16);
try
{
s_gs->Transfer<0>(const_cast<uint8*>(mem) + addr, (0x4000 - addr) / 16);
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C GSgifTransfer2(uint8* mem, uint32 size)
{
s_gs->Transfer<1>(const_cast<uint8*>(mem), size);
try
{
s_gs->Transfer<1>(const_cast<uint8*>(mem), size);
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C GSgifTransfer3(uint8* mem, uint32 size)
{
s_gs->Transfer<2>(const_cast<uint8*>(mem), size);
try
{
s_gs->Transfer<2>(const_cast<uint8*>(mem), size);
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C GSvsync(int field)
{
try
{
#ifdef _WINDOWS
if(s_gs->m_wnd.IsManaged())
{
MSG msg;
memset(&msg, 0, sizeof(msg));
while(msg.message != WM_QUIT && PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
if(s_gs->m_wnd.IsManaged())
{
TranslateMessage(&msg);
DispatchMessage(&msg);
MSG msg;
memset(&msg, 0, sizeof(msg));
while(msg.message != WM_QUIT && PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
#endif
s_gs->VSync(field);
}
catch (GSDXRecoverableError)
{
}
#endif
#ifdef OGL_MT_HACK
s_gs->m_wnd.AttachContext();
#endif
s_gs->VSync(field);
}
EXPORT_C_(uint32) GSmakeSnapshot(char* path)
{
string s(path);
if(!s.empty() && s[s.length() - 1] != DIRECTORY_SEPARATOR)
try
{
s = s + DIRECTORY_SEPARATOR;
}
string s(path);
return s_gs->MakeSnapshot(s + "gsdx");
if(!s.empty() && s[s.length() - 1] != DIRECTORY_SEPARATOR)
{
s = s + DIRECTORY_SEPARATOR;
}
return s_gs->MakeSnapshot(s + "gsdx");
}
catch (GSDXRecoverableError)
{
return false;
}
}
EXPORT_C GSkeyEvent(GSKeyEventData* e)
{
s_gs->KeyEvent(e);
try
{
s_gs->KeyEvent(e);
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C_(int) GSfreeze(int mode, GSFreezeData* data)
{
if(mode == FREEZE_SAVE)
try
{
return s_gs->Freeze(data, false);
if(mode == FREEZE_SAVE)
{
return s_gs->Freeze(data, false);
}
else if(mode == FREEZE_SIZE)
{
return s_gs->Freeze(data, true);
}
else if(mode == FREEZE_LOAD)
{
return s_gs->Defrost(data);
}
}
else if(mode == FREEZE_SIZE)
catch (GSDXRecoverableError)
{
return s_gs->Freeze(data, true);
}
else if(mode == FREEZE_LOAD)
{
return s_gs->Defrost(data);
}
return 0;
@@ -558,32 +633,37 @@ EXPORT_C_(int) GSfreeze(int mode, GSFreezeData* data)
EXPORT_C GSconfigure()
{
if(!GSUtil::CheckSSE()) return;
try
{
if(!GSUtil::CheckSSE()) return;
#ifdef _WINDOWS
if(GSSettingsDlg(s_isgsopen2).DoModal() == IDOK)
{
if(s_gs != NULL && s_gs->m_wnd.IsManaged())
if(GSSettingsDlg(s_isgsopen2).DoModal() == IDOK)
{
// Legacy apps like gsdxgui expect this...
if(s_gs != NULL && s_gs->m_wnd.IsManaged())
{
// Legacy apps like gsdxgui expect this...
GSshutdown();
GSshutdown();
}
}
}
#else
// TODO: linux
// TODO: linux
if (RunLinuxDialog())
{
if(s_gs != NULL && s_gs->m_wnd.IsManaged())
if (RunLinuxDialog())
{
GSshutdown();
if(s_gs != NULL && s_gs->m_wnd.IsManaged())
{
GSshutdown();
}
}
}
#endif
} catch (GSDXRecoverableError)
{
}
}
EXPORT_C_(int) GStest()
@@ -1440,7 +1520,7 @@ EXPORT_C GSReplay(char* lpszCmdLine, int renderer)
}
}
unsigned long end = timeGetTime();
fprintf(stderr, "The %d frames of the scene was render on %dms\n", frame_number, end - start);
fprintf(stderr, "The %ld frames of the scene was render on %ldms\n", frame_number, end - start);
fprintf(stderr, "A means of %fms by frame\n", (float)(end - start)/(float)frame_number);
sleep(1);

View File

@@ -521,8 +521,8 @@ REG64_(GIFReg, ALPHA)
uint8 _PAD2[3];
REG_END2
// opaque => output will be Cs/As
__forceinline bool IsOpaque() const {return (A == B || C == 2 && FIX == 0) && D == 0 || (A == 0 && B == D && C == 2 && FIX == 0x80);}
__forceinline bool IsOpaque(int amin, int amax) const {return (A == B || amax == 0) && D == 0 || A == 0 && B == D && amin == 0x80 && amax == 0x80;}
__forceinline bool IsOpaque() const {return ((A == B || (C == 2 && FIX == 0)) && D == 0) || (A == 0 && B == D && C == 2 && FIX == 0x80);}
__forceinline bool IsOpaque(int amin, int amax) const {return ((A == B || amax == 0) && D == 0) || (A == 0 && B == D && amin == 0x80 && amax == 0x80);}
REG_END2
REG64_(GIFReg, BITBLTBUF)
@@ -766,9 +766,9 @@ REG64_(GIFReg, TEST)
uint32 _PAD1:13;
uint32 _PAD2:32;
REG_END2
__forceinline bool DoFirstPass() {return !ATE || ATST != ATST_NEVER;} // not all pixels fail automatically
__forceinline bool DoSecondPass() {return ATE && ATST != ATST_ALWAYS && AFAIL != AFAIL_KEEP;} // pixels may fail, write fb/z
__forceinline bool NoSecondPass() {return ATE && ATST != ATST_ALWAYS && AFAIL == AFAIL_KEEP;} // pixels may fail, no output
__forceinline bool DoFirstPass() const {return !ATE || ATST != ATST_NEVER;} // not all pixels fail automatically
__forceinline bool DoSecondPass() const {return ATE && ATST != ATST_ALWAYS && AFAIL != AFAIL_KEEP;} // pixels may fail, write fb/z
__forceinline bool NoSecondPass() const {return ATE && ATST != ATST_ALWAYS && AFAIL == AFAIL_KEEP;} // pixels may fail, no output
REG_END2
REG64_(GIFReg, TEX0)
@@ -799,7 +799,7 @@ union
};
};
REG_END2
__forceinline bool IsRepeating()
__forceinline bool IsRepeating() const
{
if(TBW < 2)
{
@@ -1150,12 +1150,12 @@ __aligned(struct, 32) GIFPath
}
}
__forceinline uint8 GetReg()
__forceinline uint8 GetReg() const
{
return regs.u8[reg];
}
__forceinline uint8 GetReg(uint32 index)
__forceinline uint8 GetReg(uint32 index) const
{
return regs.u8[index];
}

View File

@@ -178,6 +178,7 @@ CRC::Game CRC::m_games[] =
{0xD6385328, GodOfWar, US, 0},
{0xFB0E6D72, GodOfWar, EU, 0},
{0xEB001875, GodOfWar, EU, 0},
{0xCF148C74, GodOfWar, EU, 0},
{0xCA052D22, GodOfWar, JP, 0},
{0xBFCC1795, GodOfWar, KO, 0},
{0x9567B7D6, GodOfWar, KO, 0},
@@ -191,6 +192,7 @@ CRC::Game CRC::m_games[] =
//same crc as the US version. {0x2F123FD8, GodOfWar2, RU, 0},
{0x2F123FD8, GodOfWar2, US, 0},
{0x44A8A22A, GodOfWar2, EU, 0},
{0x60BC362B, GodOfWar2, EU, 0},
{0x4340C7C6, GodOfWar2, KO, 0},
{0xE96E55BD, GodOfWar2, JP, 0},
{0xF8CD3DF6, GodOfWar2, NoRegion, 0},
@@ -545,13 +547,13 @@ CRC::Game CRC::Lookup(uint32 crc)
if(crcDups)
printf("[FIXME] GSdx: Duplicate CRC: Overall: %d\n", crcDups);
}
#ifndef DISABLE_CRC_HACKS
hash_map<uint32, Game*>::iterator i = m_map.find(crc);
if(i != m_map.end())
{
return *i->second;
}
#endif
return m_games[0];
}

View File

@@ -138,11 +138,11 @@ bool GSDevice11::Create(GSWnd* wnd)
{"TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 16, D3D11_INPUT_PER_VERTEX_DATA, 0},
};
hr = CompileShader(IDR_CONVERT_FX, "vs_main", NULL, &m_convert.vs, il_convert, countof(il_convert), &m_convert.il);
CompileShader(IDR_CONVERT_FX, "vs_main", NULL, &m_convert.vs, il_convert, countof(il_convert), &m_convert.il);
for(int i = 0; i < countof(m_convert.ps); i++)
{
hr = CompileShader(IDR_CONVERT_FX, format("ps_main%d", i).c_str(), NULL, &m_convert.ps[i]);
CompileShader(IDR_CONVERT_FX, format("ps_main%d", i).c_str(), NULL, &m_convert.ps[i]);
}
memset(&dsd, 0, sizeof(dsd));
@@ -170,7 +170,7 @@ bool GSDevice11::Create(GSWnd* wnd)
for(int i = 0; i < countof(m_merge.ps); i++)
{
hr = CompileShader(IDR_MERGE_FX, format("ps_main%d", i).c_str(), NULL, &m_merge.ps[i]);
CompileShader(IDR_MERGE_FX, format("ps_main%d", i).c_str(), NULL, &m_merge.ps[i]);
}
memset(&bsd, 0, sizeof(bsd));
@@ -198,7 +198,7 @@ bool GSDevice11::Create(GSWnd* wnd)
for(int i = 0; i < countof(m_interlace.ps); i++)
{
hr = CompileShader(IDR_INTERLACE_FX, format("ps_main%d", i).c_str(), NULL, &m_interlace.ps[i]);
CompileShader(IDR_INTERLACE_FX, format("ps_main%d", i).c_str(), NULL, &m_interlace.ps[i]);
}
// Shade Boost
@@ -229,7 +229,7 @@ bool GSDevice11::Create(GSWnd* wnd)
hr = m_dev->CreateBuffer(&bd, NULL, &m_shadeboost.cb);
hr = CompileShader(IDR_SHADEBOOST_FX, "ps_main", macro, &m_shadeboost.ps);
CompileShader(IDR_SHADEBOOST_FX, "ps_main", macro, &m_shadeboost.ps);
// fxaa
@@ -241,7 +241,7 @@ bool GSDevice11::Create(GSWnd* wnd)
hr = m_dev->CreateBuffer(&bd, NULL, &m_fxaa.cb);
hr = CompileShader(IDR_FXAA_FX, "ps_main", NULL, &m_fxaa.ps);
CompileShader(IDR_FXAA_FX, "ps_main", NULL, &m_fxaa.ps);
//
@@ -719,56 +719,49 @@ void GSDevice11::DoShadeBoost(GSTexture* st, GSTexture* dt)
void GSDevice11::SetupDATE(GSTexture* rt, GSTexture* ds, const GSVertexPT1* vertices, bool datm)
{
const GSVector2i& size = rt->GetSize();
// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows
if(GSTexture* t = CreateRenderTarget(size.x, size.y, rt->IsMSAA()))
{
// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows
BeginScene();
BeginScene();
ClearStencil(ds, 0);
ClearStencil(ds, 0);
// om
// om
OMSetDepthStencilState(m_date.dss, 1);
OMSetBlendState(m_date.bs, 0);
OMSetRenderTargets(NULL, ds);
OMSetDepthStencilState(m_date.dss, 1);
OMSetBlendState(m_date.bs, 0);
OMSetRenderTargets(t, ds);
// ia
// ia
IASetVertexBuffer(vertices, sizeof(vertices[0]), 4);
IASetInputLayout(m_convert.il);
IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
IASetVertexBuffer(vertices, sizeof(vertices[0]), 4);
IASetInputLayout(m_convert.il);
IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
// vs
// vs
VSSetShader(m_convert.vs, NULL);
VSSetShader(m_convert.vs, NULL);
// gs
// gs
GSSetShader(NULL);
GSSetShader(NULL);
// ps
// ps
GSTexture* rt2 = rt->IsMSAA() ? Resolve(rt) : rt;
GSTexture* rt2 = rt->IsMSAA() ? Resolve(rt) : rt;
PSSetShaderResources(rt2, NULL);
PSSetSamplerState(m_convert.pt, NULL);
PSSetShader(m_convert.ps[datm ? 2 : 3], NULL);
PSSetShaderResources(rt2, NULL);
PSSetSamplerState(m_convert.pt, NULL);
PSSetShader(m_convert.ps[datm ? 2 : 3], NULL);
//
//
DrawPrimitive();
DrawPrimitive();
//
//
EndScene();
EndScene();
Recycle(t);
if(rt2 != rt) Recycle(rt2);
}
if(rt2 != rt) Recycle(rt2);
}
void GSDevice11::IASetVertexBuffer(const void* vertex, size_t stride, size_t count)
@@ -1110,6 +1103,9 @@ void GSDevice11::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector
ID3D11RenderTargetView* rtv = NULL;
ID3D11DepthStencilView* dsv = NULL;
if (!rt && !ds)
throw GSDXRecoverableError();
if(rt) rtv = *(GSTexture11*)rt;
if(ds) dsv = *(GSTexture11*)ds;
@@ -1121,9 +1117,10 @@ void GSDevice11::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector
m_ctx->OMSetRenderTargets(1, &rtv, dsv);
}
if(m_state.viewport != rt->GetSize())
GSVector2i size = rt ? rt->GetSize() : ds->GetSize();
if(m_state.viewport != size)
{
m_state.viewport = rt->GetSize();
m_state.viewport = size;
D3D11_VIEWPORT vp;
@@ -1131,15 +1128,15 @@ void GSDevice11::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector
vp.TopLeftX = 0;
vp.TopLeftY = 0;
vp.Width = (float)rt->GetWidth();
vp.Height = (float)rt->GetHeight();
vp.Width = (float)size.x;
vp.Height = (float)size.y;
vp.MinDepth = 0.0f;
vp.MaxDepth = 1.0f;
m_ctx->RSSetViewports(1, &vp);
}
GSVector4i r = scissor ? *scissor : GSVector4i(rt->GetSize()).zwxy();
GSVector4i r = scissor ? *scissor : GSVector4i(size).zwxy();
if(!m_state.scissor.eq(r))
{
@@ -1184,7 +1181,7 @@ void GSDevice11::OMSetRenderTargets(const GSVector2i& rtsize, int count, ID3D11U
}
}
HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11VertexShader** vs, D3D11_INPUT_ELEMENT_DESC* layout, int count, ID3D11InputLayout** il)
void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11VertexShader** vs, D3D11_INPUT_ELEMENT_DESC* layout, int count, ID3D11InputLayout** il)
{
HRESULT hr;
@@ -1203,27 +1200,25 @@ HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MAC
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
hr = m_dev->CreateVertexShader((void*)shader->GetBufferPointer(), shader->GetBufferSize(), NULL, vs);
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
hr = m_dev->CreateInputLayout(layout, count, shader->GetBufferPointer(), shader->GetBufferSize(), il);
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
return hr;
}
HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs)
void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs)
{
HRESULT hr;
@@ -1242,20 +1237,18 @@ HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MAC
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
hr = m_dev->CreateGeometryShader((void*)shader->GetBufferPointer(), shader->GetBufferSize(), NULL, gs);
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
return hr;
}
HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs, D3D11_SO_DECLARATION_ENTRY* layout, int count)
void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs, D3D11_SO_DECLARATION_ENTRY* layout, int count)
{
HRESULT hr;
@@ -1274,20 +1267,18 @@ HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MAC
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
hr = m_dev->CreateGeometryShaderWithStreamOutput((void*)shader->GetBufferPointer(), shader->GetBufferSize(), layout, count, NULL, 0, D3D11_SO_NO_RASTERIZED_STREAM, NULL, gs);
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
return hr;
}
HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11PixelShader** ps)
void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11PixelShader** ps)
{
HRESULT hr;
@@ -1306,20 +1297,18 @@ HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MAC
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
hr = m_dev->CreatePixelShader((void*)shader->GetBufferPointer(), shader->GetBufferSize(),NULL, ps);
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
return hr;
}
HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs)
void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs)
{
HRESULT hr;
@@ -1338,20 +1327,18 @@ HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MAC
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
hr = m_dev->CreateComputeShader((void*)shader->GetBufferPointer(), shader->GetBufferSize(),NULL, cs);
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
return hr;
}
HRESULT GSDevice11::CompileShader(const char* fn, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs)
void GSDevice11::CompileShader(const char* fn, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs)
{
HRESULT hr;
@@ -1370,16 +1357,14 @@ HRESULT GSDevice11::CompileShader(const char* fn, const char* entry, D3D11_SHADE
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
hr = m_dev->CreateComputeShader((void*)shader->GetBufferPointer(), shader->GetBufferSize(),NULL, cs);
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
return hr;
}

View File

@@ -213,11 +213,11 @@ public:
operator ID3D11Device*() {return m_dev;}
operator ID3D11DeviceContext*() {return m_ctx;}
HRESULT CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11VertexShader** vs, D3D11_INPUT_ELEMENT_DESC* layout, int count, ID3D11InputLayout** il);
HRESULT CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs);
HRESULT CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs, D3D11_SO_DECLARATION_ENTRY* layout, int count);
HRESULT CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11PixelShader** ps);
HRESULT CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs);
HRESULT CompileShader(const char* fn, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs);
void CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11VertexShader** vs, D3D11_INPUT_ELEMENT_DESC* layout, int count, ID3D11InputLayout** il);
void CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs);
void CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs, D3D11_SO_DECLARATION_ENTRY* layout, int count);
void CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11PixelShader** ps);
void CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs);
void CompileShader(const char* fn, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs);
};

View File

@@ -1288,7 +1288,7 @@ void GSDevice9::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector4
}
}
HRESULT GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il)
void GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il)
{
vector<D3DXMACRO> m;
@@ -1309,24 +1309,20 @@ HRESULT GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO
printf("%s\n", (const char*)error->GetBufferPointer());
}
ASSERT(SUCCEEDED(hr));
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
hr = m_dev->CreateVertexDeclaration(layout, il);
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
return S_OK;
}
HRESULT GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DPixelShader9** ps)
void GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DPixelShader9** ps)
{
uint32 flags = 0;
@@ -1358,13 +1354,9 @@ HRESULT GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO
printf("%s\n", (const char*)error->GetBufferPointer());
}
ASSERT(SUCCEEDED(hr));
if(FAILED(hr))
{
return hr;
throw GSDXRecoverableError();
}
return S_OK;
}

View File

@@ -221,8 +221,8 @@ public:
IDirect3DDevice9* operator->() {return m_dev;}
operator IDirect3DDevice9*() {return m_dev;}
HRESULT CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il);
HRESULT CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DPixelShader9** ps);
void CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il);
void CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DPixelShader9** ps);
void SetupVS(VSSelector sel, const VSConstantBuffer* cb);
void SetupGS(GSSelector sel) {}

View File

@@ -82,7 +82,7 @@ public:
uint32 key;
};
operator uint32() {return key & 0x3f;}
operator uint32() {return key & 0xff;}
VSSelector() : key(0) {}
};
@@ -175,12 +175,13 @@ public:
uint32 colclip:2;
uint32 date:2;
uint32 spritehack:1;
uint32 point_sampler:1;
};
uint32 key;
};
operator uint32() {return key & 0x3ffffff;}
operator uint32() {return key & 0xfffffff;}
PSSelector() : key(0) {}
};
@@ -214,12 +215,13 @@ public:
uint32 zwe:1;
uint32 date:1;
uint32 fba:1;
uint32 alpha_stencil:1;
};
uint32 key;
};
operator uint32() {return key & 0x1f;}
operator uint32() {return key & 0x3f;}
OMDepthStencilSelector() : key(0) {}
};

View File

@@ -294,9 +294,14 @@ bool GSRendererCS::CreateDevice(GSDevice* dev_unk)
{NULL, NULL},
};
hr = dev->CompileShader(IDR_CS_FX, "ps_main0", macro, &m_ps0);
if(FAILED(hr)) return false;
try
{
dev->CompileShader(IDR_CS_FX, "ps_main0", macro, &m_ps0);
}
catch (GSDXRecoverableError)
{
return false;
}
// PSConstantBuffer

View File

@@ -32,6 +32,7 @@ GSRendererDX::GSRendererDX(GSTextureCache* tc, const GSVector2& pixelcenter)
UserHacks_AlphaHack = !!theApp.GetConfig("UserHacks_AlphaHack", 0) && !!theApp.GetConfig("UserHacks", 0);
UserHacks_WildHack = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_WildHack", 0) : 0;
UserHacks_AlphaStencil = !!theApp.GetConfig("UserHacks_AlphaStencil", 0) && !!theApp.GetConfig("UserHacks", 0);
}
GSRendererDX::~GSRendererDX()
@@ -252,38 +253,51 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
}
if(context->TEST.ATE)
{
ps_sel.atst = context->TEST.ATST;
switch(ps_sel.atst)
{
case ATST_LESS:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF - 1);
break;
case ATST_GREATER:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF + 1);
break;
default:
ps_cb.FogColor_AREF.a = (float)(int)context->TEST.AREF;
break;
}
}
else
{
ps_sel.atst = ATST_ALWAYS;
if (context->TEST.ATE && context->TEST.ATST > 1)
ps_cb.FogColor_AREF.a = (float)context->TEST.AREF;
// Destination alpha pseudo stencil hack: use a stencil operation combined with an alpha test
// to only draw pixels which would cause the destination alpha test to fail in the future once.
// Unfortunately this also means only drawing those pixels at all, which is why this is a hack.
// The interaction with FBA in D3D9 is probably less than ideal.
if (UserHacks_AlphaStencil && DATE && dev->HasStencil() && om_bsel.wa && (!context->TEST.ATE || context->TEST.ATST == 1))
{
if (!context->FBA.FBA)
{
if (context->TEST.DATM == 0)
ps_sel.atst = 5; // >=
else
ps_sel.atst = 2; // <
ps_cb.FogColor_AREF.a = (float)0x80;
}
if (!(context->FBA.FBA && context->TEST.DATM == 1))
om_dssel.alpha_stencil = 1;
}
if(tex)
{
const GSLocalMemory::psm_t &psm = GSLocalMemory::m_psm[context->TEX0.PSM];
const GSLocalMemory::psm_t &cpsm = psm.pal > 0 ? GSLocalMemory::m_psm[context->TEX0.CPSM] : psm;
bool bilinear = m_filter == 2 ? m_vt.IsLinear() : m_filter != 0;
bool simple_sample = !tex->m_palette && cpsm.fmt == 0 && context->CLAMP.WMS < 3 && context->CLAMP.WMT < 3;
ps_sel.wms = context->CLAMP.WMS;
ps_sel.wmt = context->CLAMP.WMT;
ps_sel.fmt = tex->m_fmt;
if (tex->m_palette)
ps_sel.fmt = cpsm.fmt | 4;
else
ps_sel.fmt = cpsm.fmt;
ps_sel.aem = env.TEXA.AEM;
ps_sel.tfx = context->TEX0.TFX;
ps_sel.tcc = context->TEX0.TCC;
ps_sel.ltf = m_filter == 2 ? m_vt.IsLinear() : m_filter;
ps_sel.ltf = bilinear && !simple_sample;
ps_sel.rt = tex->m_target;
ps_sel.spritehack = tex->m_spritehack_t;
ps_sel.point_sampler = !(bilinear && simple_sample);
int w = tex->m_texture->GetWidth();
int h = tex->m_texture->GetHeight();
@@ -313,7 +327,7 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
ps_ssel.tau = (context->CLAMP.WMS + 3) >> 1;
ps_ssel.tav = (context->CLAMP.WMT + 3) >> 1;
ps_ssel.ltf = ps_sel.ltf;
ps_ssel.ltf = bilinear && simple_sample;
}
else
{
@@ -356,6 +370,7 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
dev->SetupPS(ps_selneg, &ps_cb, ps_ssel);
dev->DrawIndexedPrimitive();
dev->SetupOM(om_dssel, om_bsel, afix);
}
}
@@ -367,19 +382,6 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
ps_sel.atst = iatst[ps_sel.atst];
switch(ps_sel.atst)
{
case ATST_LESS:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF - 1);
break;
case ATST_GREATER:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF + 1);
break;
default:
ps_cb.FogColor_AREF.a = (float)(int)context->TEST.AREF;
break;
}
dev->SetupPS(ps_sel, &ps_cb, ps_ssel);
bool z = om_dssel.zwe;

View File

@@ -30,6 +30,7 @@ class GSRendererDX : public GSRendererHW
bool m_fba;
bool UserHacks_AlphaHack;
bool UserHacks_AlphaStencil;
protected:
virtual void DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* tex);

View File

@@ -173,12 +173,8 @@ void GSRendererHW::Draw()
{
if(m_dev->IsLost()) return;
#ifndef DISABLE_CRC_HACKS
if(GSRenderer::IsBadFrame(m_skip, m_userhacks_skipdraw)) return;
#endif
GSDrawingEnvironment& env = m_env;
GSDrawingContext* context = m_context;
@@ -206,8 +202,6 @@ void GSRendererHW::Draw()
if(PRIM->TME)
{
m_mem.m_clut.Read32(context->TEX0, env.TEXA);
GSVector4i r;
GetTextureMinMax(r, context->TEX0, context->CLAMP, m_vt.IsLinear());

View File

@@ -341,14 +341,20 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
if(tex)
{
const GSLocalMemory::psm_t &psm = GSLocalMemory::m_psm[context->TEX0.PSM];
ps_sel.wms = context->CLAMP.WMS;
ps_sel.wmt = context->CLAMP.WMT;
ps_sel.fmt = tex->m_fmt;
ps_sel.aem = env.TEXA.AEM;
ps_sel.tfx = context->TEX0.TFX;
ps_sel.tcc = context->TEX0.TCC;
ps_sel.ltf = m_filter == 2 ? m_vt.IsLinear() : m_filter;
ps_sel.rt = tex->m_target;
if (tex->m_palette) {
const GSLocalMemory::psm_t &cpsm = GSLocalMemory::m_psm[context->TEX0.CPSM];
ps_sel.fmt = cpsm.fmt | 4;
} else
ps_sel.fmt = psm.fmt;
int w = tex->m_texture->GetWidth();
int h = tex->m_texture->GetHeight();

View File

@@ -101,7 +101,6 @@ void GSSettingsDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_WINDOWED, theApp.GetConfig("windowed", 1));
CheckDlgButton(m_hWnd, IDC_FILTER, theApp.GetConfig("filter", 2));
CheckDlgButton(m_hWnd, IDC_PALTEX, theApp.GetConfig("paltex", 0));
CheckDlgButton(m_hWnd, IDC_VSYNC, theApp.GetConfig("vsync", 0));
CheckDlgButton(m_hWnd, IDC_LOGZ, theApp.GetConfig("logz", 1));
CheckDlgButton(m_hWnd, IDC_FBA, theApp.GetConfig("fba", 1));
CheckDlgButton(m_hWnd, IDC_AA1, theApp.GetConfig("aa1", 0));
@@ -201,7 +200,6 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
theApp.SetConfig("filter", (int)IsDlgButtonChecked(m_hWnd, IDC_FILTER));
theApp.SetConfig("paltex", (int)IsDlgButtonChecked(m_hWnd, IDC_PALTEX));
theApp.SetConfig("vsync", (int)IsDlgButtonChecked(m_hWnd, IDC_VSYNC));
theApp.SetConfig("logz", (int)IsDlgButtonChecked(m_hWnd, IDC_LOGZ));
theApp.SetConfig("fba", (int)IsDlgButtonChecked(m_hWnd, IDC_FBA));
theApp.SetConfig("aa1", (int)IsDlgButtonChecked(m_hWnd, IDC_AA1));
@@ -423,6 +421,8 @@ void GSHacksDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_SPRITEHACK, theApp.GetConfig("UserHacks_SpriteHack", 0));
CheckDlgButton(m_hWnd, IDC_WILDHACK, theApp.GetConfig("UserHacks_WildHack", 0));
CheckDlgButton(m_hWnd, IDC_AGGRESSIVECRC, theApp.GetConfig("UserHacks_AggressiveCRC", 0));
CheckDlgButton(m_hWnd, IDC_ALPHASTENCIL, theApp.GetConfig("UserHacks_AlphaStencil", 0));
CheckDlgButton(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS, theApp.GetConfig("UserHacks_DisableCrcHacks", 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETRANGE, 0, MAKELPARAM(1000, 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("UserHacks_SkipDraw", 0), 0));
@@ -489,6 +489,19 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
"Only affects few games, removing some effects which might make the image sharper/clearer.\n"
"Affected games: FFX, FFX2, FFXII, GOW2, ICO, SoTC, SSX3.";
break;
case IDC_ALPHASTENCIL:
helpstr = "Extend stencil based emulation of destination alpha to perform stencil operations while drawing.\n\n"
"Improves many shadows which are normally overdrawn in parts, may affect other effects.\n"
"Will disable partial transparency in some games or even prevent drawing some elements altogether.";
break;
case IDC_CHECK_DISABLE_ALL_HACKS:
helpstr = "FOR TESTING ONLY!!\n\n"
"Disable all CRC hacks - will break many games. Overrides CrcHacksExclusion at gsdx.ini\n"
"\n"
"It's possible to exclude CRC hacks also via the gsdx.ini. E.g.:\n"
"CrcHacksExclusions=all\n"
"CrcHacksExclusions=0x0F0C4A9C, 0x0EE5646B, 0x7ACF7E03";
break;
default:
helpstr = "Hover over an item to get a description.";
break;
@@ -513,6 +526,8 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
theApp.SetConfig("UserHacks_SkipDraw", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_GETPOS, 0, 0));
theApp.SetConfig("UserHacks_WildHack", (int)IsDlgButtonChecked(m_hWnd, IDC_WILDHACK));
theApp.SetConfig("UserHacks_AggressiveCRC", (int)IsDlgButtonChecked(m_hWnd, IDC_AGGRESSIVECRC));
theApp.SetConfig("UserHacks_AlphaStencil", (int)IsDlgButtonChecked(m_hWnd, IDC_ALPHASTENCIL));
theApp.SetConfig("UserHacks_DisableCrcHacks", (int)IsDlgButtonChecked(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS));
EndDialog(m_hWnd, id);
} break;
}

View File

@@ -120,6 +120,7 @@ GSState::GSState()
s_saven = theApp.GetConfig("saven", 0);
userHacks_AggressiveCRC = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_AggressiveCRC", 0) : 0;
userHacks_DisableCrcHacks = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig( "UserHacks_DisableCrcHacks", 0 ) : 0;
}
GSState::~GSState()
@@ -2228,7 +2229,7 @@ void GSState::SetGameCRC(uint32 crc, int options)
{
m_crc = crc;
m_options = options;
m_game = CRC::Lookup(crc);
m_game = CRC::Lookup(userHacks_DisableCrcHacks ? 0 : crc);
}
//
@@ -2668,6 +2669,7 @@ void GSState::GetAlphaMinMax()
a.w = max(env.TEXA.TA0, env.TEXA.TA1);
break;
case 3:
m_mem.m_clut.Read32(context->TEX0, env.TEXA);
m_mem.m_clut.GetAlphaMinMax32(a.y, a.w);
break;
default:
@@ -3126,7 +3128,7 @@ bool GSC_ICO(const GSFrameInfo& fi, int& skip)
}
else if( g_aggressive && fi.TME && fi.FBP == 0x0800 && (fi.TBP0 == 0x2800 || fi.TBP0 ==0x2c00) && fi.TPSM ==0 && fi.FBMSK == 0)
{
skip = 1; //<2F><><EFBFBD>v
skip = 1;
}
}
else
@@ -3280,7 +3282,7 @@ bool GSC_ResidentEvil4(const GSFrameInfo& fi, int& skip)
}
else if(fi.TME && fi.FBP ==0x03100 && (fi.TBP0==0x2a00 ||fi.TBP0==0x3480) && fi.TPSM ==0 && fi.FBMSK == 0)
{
skip = 1; //<2F><><EFBFBD>v
skip = 1;
}
}
@@ -3447,11 +3449,11 @@ bool GSC_GodOfWar2(const GSFrameInfo& fi, int& skip)
{
skip = 1; // wall of fog
}
else if(g_aggressive && fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x1300 ) && (fi.TBP0 ==0x0F00 || fi.TBP0 ==0x1300 || fi.TBP0==0x2b00)) // || fi.FBP == 0x0100 //<2F><><EFBFBD><EFBFBD><EFBFBD>U<EFBFBD>½u<C2BD><75><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
else if(g_aggressive && fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x1300 ) && (fi.TBP0 ==0x0F00 || fi.TBP0 ==0x1300 || fi.TBP0==0x2b00)) // || fi.FBP == 0x0100
{
skip = 1; // global haze/halo
}
else if(g_aggressive && fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x0100 ) && (fi.TBP0==0x2b00 || fi.TBP0==0x2e80)) //480P<EFBFBD>U2e80
else if(g_aggressive && fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x0100 ) && (fi.TBP0==0x2b00 || fi.TBP0==0x2e80)) //480P 2e80
{
skip = 1; // water effect and water vertical lines
}
@@ -3567,15 +3569,15 @@ bool GSC_Genji(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FBP == 0x01500 && fi.FPSM == PSM_PSMCT16 && fi.TBP0 == 0x00e00 && fi.TPSM == PSM_PSMZ16)
{
skip = 6; //<2F><><EFBFBD>W<EFBFBD><57><EFBFBD>ʶ<EFBFBD>
skip = 6;
}
else if(fi.TPSM == PSM_PSMCT24 && fi.TME ==0x0001 && fi.TBP0==fi.FBP)
{
skip = 1; // <20>ҽk
skip = 1;
}
else if(fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0)
{
skip = 1; //<2F><><EFBFBD><EFBFBD>
skip = 1;
}
}
else
@@ -3639,11 +3641,11 @@ bool GSC_RadiataStories(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x03FFF)
{
skip = 1; // CMV<4D><56><EFBFBD>ݯ<EFBFBD>
skip = 1;
}
else if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT4HH)
{
skip = 1000; //
skip = 1000;
}
}
else
@@ -3671,11 +3673,11 @@ bool GSC_HauntingGround(const GSFrameInfo& fi, int& skip)
}
else if(fi.TME && (fi.FBP ==0x2200) && (fi.TBP0 ==0x3a80) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1; // <20>ҽk
skip = 1;
}
else if(fi.FBP ==0x2200 && fi.TBP0==0x3000 && fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0)
{
skip = 1; //<2F><>
skip = 1;
}
else if(fi.TME)
{
@@ -3733,12 +3735,11 @@ bool GSC_CaptainTsubasa(const GSFrameInfo& fi, int& skip)
bool GSC_Oneechanbara2Special(const GSFrameInfo& fi, int& skip)
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v<EFBFBD>U<EFBFBD><55><EFBFBD>v
if(skip == 0)
{
if(fi.TPSM == PSM_PSMCT24 && fi.TME && fi.FBP == 0x01180)
{
skip = 1; // <20><><EFBFBD>v
skip = 1;
}
}
@@ -3800,7 +3801,7 @@ bool GSC_EternalPoison(const GSFrameInfo& fi, int& skip)
{
if(fi.TPSM == PSM_PSMCT16S && fi.TBP0 == 0x3200)
{
skip = 1; //<2F><><EFBFBD>v
skip = 1;
}
}
return true;
@@ -3812,7 +3813,7 @@ bool GSC_LegoBatman(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.TPSM == PSM_PSMZ16 && fi.FPSM == PSM_PSMCT16 && fi.FBMSK == 0x00000)
{
skip = 3; //<2F>h<EFBFBD><68><EFBFBD><EFBFBD>
skip = 3;
}
}
return true;
@@ -3909,19 +3910,19 @@ bool GSC_ShadowofRome(const GSFrameInfo& fi, int& skip)
{
if(fi.FBP && fi.TPSM == PSM_PSMT8H && ( fi.FBMSK ==0x00FFFFFF))
{
skip =1; //<2F><>
skip =1;
}
else if(fi.TME ==0x0001 && (fi.TBP0==0x1300 || fi.TBP0==0x0f00) && fi.FBMSK>=0xFFFFFF)
{
skip = 1; //<2F><><EFBFBD>L<EFBFBD><4C><EFBFBD>M<EFBFBD><4D><EFBFBD><EFBFBD>
skip = 1;
}
else if(fi.TME && (fi.FBP >=0x0) && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 ==0x0160 ||fi.TBP0==0x01e0 || fi.TBP0<=0x0800) && fi.TPSM == PSM_PSMT8)
{
skip = 1; //<2F>t<EFBFBD><74>
skip = 1;
}
else if(fi.TME && (fi.TBP0==0x0700) && (fi.TPSM == PSM_PSMCT32 || fi.TPSM == PSM_PSMCT24))
{
skip = 1; //<2F>ҽk
skip = 1;
}
}
@@ -4233,11 +4234,11 @@ bool GSC_TombRaiderLegend(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FBP == 0x01000 && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32 && (fi.TBP0 == 0x2b60 ||fi.TBP0 == 0x2b80 || fi.TBP0 == 0x2E60 ||fi.TBP0 ==0x3020 ||fi.TBP0 == 0x3200 || fi.TBP0 == 0x3320))
{
skip = 1; //<2F><><EFBFBD><EFBFBD>
skip = 1;
}
else if(fi.TPSM == PSM_PSMCT32 && (fi.TPSM | fi.FBP)==0x2fa0 && (fi.TBP0==0x2bc0 ) && fi.FBMSK ==0)
{
skip = 2; // <20><><EFBFBD><EFBFBD>
skip = 2;
}
@@ -4252,15 +4253,15 @@ bool GSC_TombRaiderUnderWorld(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FBP == 0x01000 && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32 && (fi.TBP0 == 0x2B60 /*|| fi.TBP0 == 0x2EFF || fi.TBP0 ==0x2F00 || fi.TBP0 == 0x3020*/ || fi.TBP0 >= 0x2C01 && fi.TBP0!=0x3029 && fi.TBP0!=0x302d))
{
skip = 1; //<2F><><EFBFBD><EFBFBD>
skip = 1;
}
else if(fi.TPSM == PSM_PSMCT32 && (fi.TPSM | fi.FBP)==0x2c00 && (fi.TBP0 ==0x0ee0) && fi.FBMSK ==0)
{
skip = 2; // <20><><EFBFBD>U<EFBFBD>«<EFBFBD>
skip = 2;
}
/*else if(fi.TPSM == PSM_PSMCT16 && (fi.TPSM | fi.FBP)>=0x0 && (fi.TBP0 >=0x0) && fi.FBMSK ==0)
{
skip = 600; // <20>[<5B>t
skip = 600;
}*/
}
@@ -4475,15 +4476,15 @@ bool GSC_TalesOfLegendia(const GSFrameInfo& fi, int& skip)
}
if(fi.TME && fi.FBP && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x3d80)
{
skip = 1; //<2F><><EFBFBD>W<EFBFBD><57><EFBFBD>ʶ<EFBFBD>2a00
skip = 1;
}
if(fi.TME && fi.FBP ==0x1c00 && (fi.TBP0==0x2e80 ||fi.TBP0==0x2d80) && fi.TPSM ==0 && fi.FBMSK == 0xff000000)
{
skip = 1; //<2F><><EFBFBD>v
skip = 1;
}
if(!fi.TME && fi.FBP ==0x2a00 && (fi.TBP0==0x1C00 ) && fi.TPSM ==0 && fi.FBMSK == 0x00FFFFFF)
{
skip = 1; //<2F><><EFBFBD>r<EFBFBD>ϼh<CFBC><68><EFBFBD><EFBFBD>
skip = 1;
}
}
@@ -4513,7 +4514,7 @@ bool GSC_Kunoichi(const GSFrameInfo& fi, int& skip)
}
if(fi.TME && (fi.FBP ==0x0700 || fi.FBP==0) && fi.TBP0==0x0e00 && fi.TPSM ==0 && fi.FBMSK == 0)
{
skip = 1; //<2F><><EFBFBD>}<7D>«<EFBFBD>
skip = 1;
}
if(fi.TME)
{
@@ -4623,7 +4624,7 @@ bool GSC_ZettaiZetsumeiToshi2(const GSFrameInfo& fi, int& skip)
}
else if(fi.TME && fi.TPSM == PSM_PSMCT32 && fi.FBMSK == 0xFF000000)
{
skip = 2; // <20><>
skip = 2;
}
else if((fi.FBP | fi.TBP0)&& fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x3FFF)
{
@@ -4670,24 +4671,24 @@ bool GSC_ShinOnimusha(const GSFrameInfo& fi, int& skip)
if(fi.TME && fi.FBP == 0x001000 && (fi.TBP0 ==0 || fi.TBP0 == 0x0800) && fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0x00FFFFFF)
{
skip = 0; //<2F><><EFBFBD>i<EFBFBD><69> <20>S<EFBFBD><53><EFBFBD>n<EFBFBD>F?
skip = 0;
}
else if(fi.TPSM == PSM_PSMCT24 && fi.TME && fi.FBP == 0x01000) // || fi.FBP == 0x00000
{
skip = 28; // <20><><EFBFBD>v28 30 56 64
skip = 28; //28 30 56 64
}
else if(fi.FBP && fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0xFFFFFF)
{
skip = 0; //24 33 40 92<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>S<EFBFBD><53><EFBFBD>n<EFBFBD>F?
skip = 0; //24 33 40 9
}
else if(fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0xFF000000)
{
skip = 1; //<2F>ߪF<DFAA><46><EFBFBD>ɪ<EFBFBD><C9AA><EFBFBD><EFBFBD><EFBFBD>
skip = 1;
}
else if(fi.TME && (fi.TBP0 ==0x1400 || fi.TBP0 ==0x1000 ||fi.TBP0 == 0x1200) && (fi.TPSM == PSM_PSMCT32 || fi.TPSM == PSM_PSMCT24))
{
skip = 1;
} //<2F><><EFBFBD><EFBFBD><EFBFBD>x<EFBFBD><78><EFBFBD>L<EFBFBD><4C> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v
}
}
@@ -4700,19 +4701,19 @@ bool GSC_XE3(const GSFrameInfo& fi, int& skip)
{
if(fi.TPSM == PSM_PSMT8H && fi.FBMSK >= 0xEFFFFFFF)
{
skip = 73; //<2F>ʵe
skip = 73;
}
else if(fi.TME && fi.FBP ==0x03800 && fi.TBP0 && fi.TPSM ==0 && fi.FBMSK == 0)
{
skip = 1; //<2F><><EFBFBD>v
skip = 1;
}
/*else if(fi.TPSM ==0x00000 && PSM_PSMCT24 && fi.TME && fi.FBP == 0x03800)
{
skip = 1 ; // <20><><EFBFBD><EFBFBD>
skip = 1 ;
}*/
/*else if(fi.TME ==0 && (fi.FBP ==0 ) && fi.FPSM == PSM_PSMCT32 && ( fi.TPSM == PSM_PSMT8 || fi.TPSM == PSM_PSMT4) && (fi.FBMSK == 0x00FFFFFF || fi.FBMSK == 0xFF000000))
{
skip = 1; //<2F>h<EFBFBD>·t
skip = 1;
}*/
else
{
@@ -4750,15 +4751,15 @@ bool GSC_SakuraWarsSoLongMyLove(const GSFrameInfo& fi, int& skip)
{
if(fi.TME==0 && fi.FBP != fi.TBP0 && fi.TBP0 && fi.FBMSK == 0x00FFFFFF)
{
skip = 3; //<2F>h<EFBFBD>·t
skip = 3;
}
else if(fi.TME==0 && fi.FBP == fi.TBP0 && (fi.TBP0 ==0x1200 ||fi.TBP0 ==0x1180 ||fi.TBP0 ==0) && fi.FBMSK == 0x00FFFFFF)
{
skip = 3; //<2F>h<EFBFBD>·t
skip = 3;
}
else if(fi.TME && (fi.FBP ==0 || fi.FBP ==0x1180) && fi.FPSM == PSM_PSMCT32 && fi.TBP0 ==0x3F3F && fi.TPSM == PSM_PSMT8)
{
skip = 1; //<2F><><EFBFBD>Ҫx<D2AA><78>
skip = 1;
}
}
@@ -4772,7 +4773,7 @@ bool GSC_FightingBeautyWulong(const GSFrameInfo& fi, int& skip)
if(fi.TME && (fi.TBP0 ==0x0700 || fi.TBP0 ==0x0a80) && (fi.TPSM == PSM_PSMCT32 || fi.TPSM == PSM_PSMCT24))
{
skip = 1;
} //<2F><><EFBFBD><EFBFBD><EFBFBD>ҽk
}
}
return true;
@@ -4801,7 +4802,7 @@ bool GSC_GTASanAndreas(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP ==0x0a00 || fi.FBP ==0x08c0) && (fi.TBP0 ==0x1b80 || fi.TBP0 ==0x1a40) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1; // <20><><EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD><69>
skip = 1;
}
}
@@ -4814,11 +4815,11 @@ bool GSC_FrontMission5(const GSFrameInfo& fi, int& skip)
{
if(fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0)
{
skip = 1; //<2F>ʵe
skip = 1;
}
if(fi.TME && (fi.FBP ==0x1000) && (fi.TBP0 ==0x2e00 || fi.TBP0 ==0x3200) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1; //<EFBFBD>v<EFBFBD>lfi.TBP0 ==0x1f00
skip = 1; //fi.TBP0 ==0x1f00
}
}
@@ -4831,7 +4832,7 @@ bool GSC_GodHand(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP ==0x0) && (fi.TBP0 ==0x2800) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1; // <20>ҽk
skip = 1;
}
}
@@ -4844,11 +4845,11 @@ bool GSC_KnightsOfTheTemple2(const GSFrameInfo& fi, int& skip)
{
if(fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0)
{
skip = 1; //<2F><><EFBFBD>v
skip = 1;
}
else if(fi.TPSM ==0x00000 && PSM_PSMCT24 && fi.TME && (fi.FBP ==0x3400 ||fi.FBP==0x3a00))
{
skip = 1 ; //<2F><><EFBFBD><EFBFBD>
skip = 1 ;
}
}
@@ -4861,7 +4862,7 @@ bool GSC_UltramanFightingEvolution(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FBP==0x2a00 && fi.FPSM == PSM_PSMZ24 && fi.TBP0 == 0x1c00 && fi.TPSM == PSM_PSMZ24)
{
skip = 5; // blur <20><><EFBFBD>l<EFBFBD><6C><EFBFBD><EFBFBD>
skip = 5; // blur
}
}
@@ -4874,18 +4875,18 @@ bool GSC_DeathByDegreesTekkenNinaWilliams(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP ==0 ) && fi.TBP0==0x34a0 && (fi.TPSM == PSM_PSMCT32))
{
skip = 1; //<2F>h<EFBFBD>ʵe<CAB5><65><EFBFBD><EFBFBD>
skip = 1;
}
else if((fi.FBP ==0x3500)&& fi.TPSM == PSM_PSMT8 && fi.FBMSK == 0xFFFF00FF)
{
skip = 4; //<2F><><EFBFBD>U<EFBFBD><55><EFBFBD><EFBFBD>
skip = 4;
}
}
if(fi.TME)
{
if((fi.FBP | fi.TBP0 | fi.FPSM | fi.TPSM) && (fi.FBMSK == 0x00FFFFFF ))
{
skip = 1; //<2F>ʵe<CAB5>t<EFBFBD><74>
skip = 1;
}
}
return true;
@@ -4897,7 +4898,7 @@ bool GSC_AlpineRacer3(const GSFrameInfo& fi, int& skip)
{
if(!fi.TME && fi.FBP == 0 && fi.TBP0>=0 && (fi.TPSM >= 0 ) && (fi.FBMSK ==0x0001 ||fi.FBMSK == 0x00FFFFFF))
{
skip = 2; //<2F>h<EFBFBD>·t
skip = 2;
}
}
@@ -4910,7 +4911,7 @@ bool GSC_HummerBadlands(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP ==0x0a00) && (fi.TBP0 ==0x03200 || fi.TBP0==0x3700) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1; //<2F>v<EFBFBD>l
skip = 1;
}
}
@@ -4923,7 +4924,7 @@ bool GSC_SengokuBasara(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.TBP0==0x1800 ) && fi.FBMSK==0xFF000000)
{
skip = 1; //<2F><>
skip = 1;
}
}
@@ -4936,7 +4937,7 @@ bool GSC_Grandia3(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP ==0x0 || fi.FBP ==0x0e00) && (fi.TBP0 ==0x2a00 ||fi.TBP0==0x0e00 ||fi.TBP0==0) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1; // <20>ҽk
skip = 1;
}
}
@@ -4963,11 +4964,11 @@ bool GSC_TalesofSymphonia(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP >= 0) && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 == 0x2bc0 || fi.TBP0 <= 0x0200) && (fi.FBMSK==0xFF000000 ||fi.FBMSK==0x00FFFFFF))
{
skip = 1; //fi.FBMSK==0<EFBFBD>y<EFBFBD><EFBFBD><EFBFBD>ʵe<EFBFBD>«<EFBFBD>,<2C>[<5B>t<EFBFBD>԰<EFBFBD><D4B0>t<EFBFBD><74>
skip = 1; //fi.FBMSK==0
}
if(fi.TME && (fi.TBP0==0x1180 || fi.TBP0==0x1a40 || fi.TBP0==0x2300) && fi.FBMSK>=0xFF000000)
{
skip = 1; //<2F>L<EFBFBD><4C><EFBFBD>ݼv
skip = 1;
}
}
@@ -5018,11 +5019,11 @@ bool GSC_Simple2000Vol114(const GSFrameInfo& fi, int& skip)
{
if(fi.TME==0 && (fi.FBP==0x1500) && (fi.TBP0==0x2c97 || fi.TBP0==0x2ace || fi.TBP0==0x03d0 || fi.TBP0==0x2448) && (fi.FBMSK == 0x0000))
{
skip = 1; //<2F>h<EFBFBD>v<EFBFBD>l
skip = 1;
}
if(fi.TME && (fi.FBP==0x0e00) && (fi.TBP0==0x1000) && (fi.FBMSK == 0x0000))
{
skip = 1; //<2F>h<EFBFBD>g<EFBFBD><67>
skip = 1;
}
}
return true;
@@ -5033,7 +5034,7 @@ bool GSC_UrbanReign(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FBP==0x0000 && fi.TBP0==0x3980 && fi.FPSM==fi.TPSM && fi.TPSM == PSM_PSMCT32 && fi.TPSM ==0 && fi.FBMSK == 0x0)
{
skip = 1; //<2F>¼v
skip = 1;
}
}
return true;

View File

@@ -139,6 +139,7 @@ class GSState : public GSAlignedClass<32>
protected:
bool IsBadFrame(int& skip, int UserHacks_SkipDraw);
int userHacks_AggressiveCRC;
int userHacks_DisableCrcHacks;
GSVertex m_v;
float m_q;

View File

@@ -56,6 +56,15 @@ void GSTextureCache::RemoveAll()
GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, const GSVector4i& r)
{
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[TEX0.PSM];
const GSLocalMemory::psm_t& cpsm = psm.pal > 0 ? GSLocalMemory::m_psm[TEX0.CPSM] : psm;
GIFRegTEXA plainTEXA;
plainTEXA.AEM = 1;
plainTEXA.TA0 = 0;
plainTEXA.TA1 = 0x80;
m_renderer->m_mem.m_clut.Read32(TEX0, plainTEXA);
const uint32* clut = m_renderer->m_mem.m_clut;
Source* src = NULL;
@@ -71,11 +80,6 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con
continue;
}
if((psm.trbpp == 16 || psm.trbpp == 24) && TEX0.TCC && TEXA != s->m_TEXA)
{
continue;
}
if(s->m_palette == NULL && psm.pal > 0 && !GSVector4i::compare64(clut, s->m_clut, psm.pal * sizeof(clut[0])))
{
continue;
@@ -132,17 +136,14 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con
}
}
if(psm.pal > 0)
if (src->m_palette)
{
int size = psm.pal * sizeof(clut[0]);
if(src->m_palette)
if(src->m_initpalette || !GSVector4i::update(src->m_clut, clut, size))
{
if(src->m_initpalette || !GSVector4i::update(src->m_clut, clut, size))
{
src->m_palette->Update(GSVector4i(0, 0, psm.pal, 1), src->m_clut, size);
src->m_initpalette = false;
}
src->m_palette->Update(GSVector4i(0, 0, psm.pal, 1), src->m_clut, size);
src->m_initpalette = false;
}
}
@@ -576,6 +577,7 @@ void GSTextureCache::IncAge()
//Fixme: Several issues in here. Not handling depth stencil, pitch conversion doesnt work.
GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, Target* dst)
{
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[TEX0.PSM];
Source* src = new Source(m_renderer, TEX0, TEXA, m_temp);
int tw = 1 << TEX0.TW;
@@ -584,33 +586,17 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
bool hack = false;
if(dst == NULL)
if(m_spritehack && (TEX0.PSM == PSM_PSMT8 || TEX0.PSM == PSM_PSMT8H))
{
if(m_spritehack && (TEX0.PSM == PSM_PSMT8 || TEX0.PSM == PSM_PSMT8H))
{
src->m_spritehack_t = true;
if(m_spritehack == 2 && TEX0.CPSM != PSM_PSMCT16)
src->m_spritehack_t = false;
}
else
src->m_spritehack_t = false;
src->m_spritehack_t = true;
if(m_paltex && GSLocalMemory::m_psm[TEX0.PSM].pal > 0)
{
src->m_fmt = FMT_8;
src->m_texture = m_renderer->m_dev->CreateTexture(tw, th, Get8bitFormat());
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
}
else
{
src->m_fmt = FMT_32;
src->m_texture = m_renderer->m_dev->CreateTexture(tw, th);
}
}
if(m_spritehack == 2 && TEX0.CPSM != PSM_PSMCT16)
src->m_spritehack_t = false;
}
else
src->m_spritehack_t = false;
if (dst)
{
// TODO: clean up this mess
@@ -722,7 +708,9 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
GSVector4 sr(0, 0, w, h);
GSTexture* st = src->m_texture ? src->m_texture : dst->m_texture;
GSTexture* dt = m_renderer->m_dev->CreateRenderTarget(w, h, false);
GSTexture *dt = m_renderer->m_dev->CreateRenderTarget(w, h, false);
if (psm.pal > 0)
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
if(!src->m_texture)
{
@@ -753,43 +741,6 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
else
ASSERT(0);
switch(TEX0.PSM)
{
default:
// Note: this assertion triggers in Xenosaga2 after the first intro scenes, when
// gameplay first begins (in the city).
ASSERT(0);
case PSM_PSMCT32:
src->m_fmt = FMT_32;
break;
case PSM_PSMCT24:
src->m_fmt = FMT_24;
break;
case PSM_PSMCT16:
case PSM_PSMCT16S:
src->m_fmt = FMT_16;
break;
case PSM_PSMT8H:
src->m_fmt = FMT_8H;
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
break;
case PSM_PSMT8:
//Not sure, this wasn't handled at all.
//Xenosaga 2 and 3 use it, Tales of Legendia as well.
//It's always used for fog like effects.
src->m_fmt = FMT_8;
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
break;
case PSM_PSMT4HL:
src->m_fmt = FMT_4HL;
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
break;
case PSM_PSMT4HH:
src->m_fmt = FMT_4HH;
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
break;
}
if(tmp != NULL)
{
m_renderer->m_dev->Recycle(dst->m_texture);
@@ -819,6 +770,16 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
dst->m_texture->OffsetHack_modx = modx;
dst->m_texture->OffsetHack_mody = mody;
}
else
{
if (m_paltex && psm.pal > 0)
{
src->m_texture = m_renderer->m_dev->CreateTexture(tw, th, Get8bitFormat());
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
}
else
src->m_texture = m_renderer->m_dev->CreateTexture(tw, th);
}
if(src->m_texture == NULL)
{
@@ -827,8 +788,6 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
return NULL;
}
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[TEX0.PSM];
if(psm.pal > 0)
{
memcpy(src->m_clut, (const uint32*)m_renderer->m_mem.m_clut, psm.pal * sizeof(uint32));
@@ -897,7 +856,6 @@ GSTextureCache::Source::Source(GSRenderer* r, const GIFRegTEX0& TEX0, const GIFR
: Surface(r, temp)
, m_palette(NULL)
, m_initpalette(true)
, m_fmt(0)
, m_target(false)
, m_complete(false)
, m_p2t(NULL)
@@ -1015,7 +973,7 @@ void GSTextureCache::Source::Update(const GSVector4i& rect)
if(blocks > 0)
{
m_renderer->m_perfmon.Put(GSPerfMon::Unswizzle, bs.x * bs.y * blocks << (m_fmt == FMT_32 ? 2 : 0));
m_renderer->m_perfmon.Put(GSPerfMon::Unswizzle, bs.x * bs.y * blocks << (m_palette ? 2 : 0));
Flush(m_write.count);
}
@@ -1056,6 +1014,11 @@ void GSTextureCache::Source::Write(const GSVector4i& r)
void GSTextureCache::Source::Flush(uint32 count)
{
// This function as written will not work for paletted formats copied from framebuffers
// because they are 8 or 4 bit formats on the GS and the GS local memory module reads
// these into an 8 bit format while the D3D surfaces are 32 bit.
// However the function is never called for these cases. This is just for information
// should someone wish to use this function for these cases later.
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[m_TEX0.PSM];
int tw = 1 << m_TEX0.TW;
@@ -1071,7 +1034,13 @@ void GSTextureCache::Source::Flush(uint32 count)
GSLocalMemory::readTexture rtx = psm.rtx;
if(m_fmt == FMT_8)
GIFRegTEXA plainTEXA;
plainTEXA.AEM = 1;
plainTEXA.TA0 = 0;
plainTEXA.TA1 = 0x80;
if(m_palette)
{
pitch >>= 2;
rtx = psm.rtxP;
@@ -1095,13 +1064,13 @@ void GSTextureCache::Source::Flush(uint32 count)
if(m_texture->Map(m, &r))
{
(mem.*rtx)(o, r, m.bits, m.pitch, m_TEXA);
(mem.*rtx)(o, r, m.bits, m.pitch, plainTEXA);
m_texture->Unmap();
}
else
{
(mem.*rtx)(o, r, buff, pitch, m_TEXA);
(mem.*rtx)(o, r, buff, pitch, plainTEXA);
m_texture->Update(r, buff, pitch);
}

View File

@@ -29,17 +29,6 @@ class GSTextureCache
public:
enum {RenderTarget, DepthStencil};
enum TextureFormatType
{
FMT_32,
FMT_24,
FMT_16,
FMT_8H,
FMT_4HL,
FMT_4HH,
FMT_8,
};
class Surface : public GSAlignedClass<32>
{
protected:
@@ -71,7 +60,6 @@ public:
bool m_initpalette;
uint32 m_valid[MAX_PAGES]; // each uint32 bits map to the 32 blocks of that page
uint32* m_clut;
int m_fmt;
bool m_target;
bool m_complete;
bool m_repeating;

View File

@@ -177,7 +177,7 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
if(i == m_ps.end())
{
string str[16];
string str[17];
str[0] = format("%d", sel.fst);
str[1] = format("%d", sel.wms);
@@ -195,6 +195,7 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
str[13] = format("%d", sel.colclip);
str[14] = format("%d", sel.date);
str[15] = format("%d", sel.spritehack);
str[16] = format("%d", sel.point_sampler);
D3D11_SHADER_MACRO macro[] =
{
@@ -214,6 +215,7 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
{"PS_COLCLIP", str[13].c_str()},
{"PS_DATE", str[14].c_str()},
{"PS_SPRITEHACK", str[15].c_str()},
{"PS_POINT_SAMPLER", str[16].c_str()},
{NULL, NULL},
};
@@ -296,11 +298,11 @@ void GSDevice11::SetupOM(OMDepthStencilSelector dssel, OMBlendSelector bsel, uin
dsd.StencilReadMask = 1;
dsd.StencilWriteMask = 1;
dsd.FrontFace.StencilFunc = D3D11_COMPARISON_EQUAL;
dsd.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
dsd.FrontFace.StencilPassOp = dssel.alpha_stencil ? D3D11_STENCIL_OP_ZERO : D3D11_STENCIL_OP_KEEP;
dsd.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
dsd.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP;
dsd.BackFace.StencilFunc = D3D11_COMPARISON_EQUAL;
dsd.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
dsd.BackFace.StencilPassOp = dssel.alpha_stencil ? D3D11_STENCIL_OP_ZERO : D3D11_STENCIL_OP_KEEP;
dsd.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
dsd.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP;
}

View File

@@ -135,7 +135,7 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel
if(i == m_ps.end())
{
string str[15];
string str[16];
str[0] = format("%d", sel.fst);
str[1] = format("%d", sel.wms);
@@ -152,6 +152,7 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel
str[12] = format("%d", sel.colclip);
str[13] = format("%d", sel.date);
str[14] = format("%d", sel.spritehack);
str[15] = format("%d", sel.point_sampler);
D3DXMACRO macro[] =
{
@@ -170,6 +171,7 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel
{"PS_COLCLIP", str[12].c_str()},
{"PS_DATE", str[13].c_str()},
{"PS_SPRITEHACK", str[14].c_str()},
{"PS_POINT_SAMPLER", str[15].c_str()},
{NULL, NULL},
};
@@ -236,11 +238,11 @@ void GSDevice9::SetupOM(OMDepthStencilSelector dssel, OMBlendSelector bsel, uint
{
dss->StencilEnable = true;
dss->StencilReadMask = 1;
dss->StencilWriteMask = 2;
dss->StencilWriteMask = dssel.alpha_stencil ? 3 : 2;
dss->StencilFunc = dssel.date ? D3DCMP_EQUAL : D3DCMP_ALWAYS;
dss->StencilPassOp = dssel.fba ? D3DSTENCILOP_REPLACE : D3DSTENCILOP_KEEP;
dss->StencilFailOp = dssel.fba ? D3DSTENCILOP_ZERO : D3DSTENCILOP_KEEP;
dss->StencilDepthFailOp = dssel.fba ? D3DSTENCILOP_ZERO : D3DSTENCILOP_KEEP;
dss->StencilPassOp = dssel.alpha_stencil ? D3DSTENCILOP_ZERO : dssel.fba ? D3DSTENCILOP_REPLACE : D3DSTENCILOP_KEEP;
dss->StencilFailOp = dssel.fba && !dssel.alpha_stencil ? D3DSTENCILOP_ZERO : D3DSTENCILOP_KEEP;
dss->StencilDepthFailOp = D3DSTENCILOP_KEEP;
dss->StencilRef = 3;
}

View File

@@ -226,7 +226,7 @@ public:
}
void Set() {pthread_cond_signal(&m_cv);}
bool Wait(IGSLock* l) {pthread_cond_wait(&m_cv, *(GSCondVarLock*)l) == 0;}
bool Wait(IGSLock* l) {pthread_cond_wait(&m_cv, *(GSCondVarLock*)l) == 0; return true;}
operator pthread_cond_t* () {return &m_cv;}
};

View File

@@ -284,6 +284,7 @@ bool GSWnd::CreateContext(int major, int minor)
void GSWnd::AttachContext()
{
if (!IsContextAttached()) {
fprintf(stderr, "Attach the context\n");
glXMakeCurrent(m_XDisplay, m_Xwindow, m_context);
m_ctx_attached = true;
}
@@ -292,6 +293,7 @@ void GSWnd::AttachContext()
void GSWnd::DetachContext()
{
if (IsContextAttached()) {
fprintf(stderr, "Detach the context\n");
glXMakeCurrent(m_XDisplay, None, NULL);
m_ctx_attached = false;
}

View File

@@ -65,4 +65,7 @@ public:
vector<GSSetting> m_gpu_scale;
};
struct GSDXError {};
struct GSDXRecoverableError : GSDXError {};
extern GSdxApp theApp;

View File

@@ -94,6 +94,8 @@ BEGIN
CONTROL "WildArmsOffset",IDC_WILDHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,105,64,10
LTEXT "TEXT_GOES_HERE",IDC_HACK_DESCRIPTION,92,20,209,145
CONTROL "Aggressive-CRC",IDC_AGGRESSIVECRC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,122,66,10
CONTROL "Alpha Stencil",IDC_ALPHASTENCIL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,139,66,10
CONTROL "Disable CRCs",IDC_CHECK_DISABLE_ALL_HACKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,156,58,10
END
IDD_SHADEBOOST DIALOGEX 0, 0, 316, 129

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="GSdx"
ProjectGUID="{18E42F6F-3A62-41EE-B42F-79366C4F1E95}"
RootNamespace="GSdx"
@@ -1700,6 +1700,14 @@
RelativePath=".\res\convert.fx"
>
</File>
<File
RelativePath=".\res\cs.fx"
>
</File>
<File
RelativePath=".\res\fxaa.fx"
>
</File>
<File
RelativePath=".\res\interlace.fx"
>

View File

@@ -32,12 +32,6 @@
//#define DISABLE_HW_TEXTURE_CACHE // Slow but fixes a lot of bugs
//#define DISABLE_CRC_HACKS // Disable all game specific hacks
#if defined(DISABLE_HW_TEXTURE_CACHE) && !defined(DISABLE_CRC_HACKS)
#define DISABLE_CRC_HACKS
#endif
//#define DISABLE_BITMASKING
//#define DISABLE_COLCLAMP

View File

@@ -2,10 +2,10 @@
#define FMT_32 0
#define FMT_24 1
#define FMT_16 2
#define FMT_8H 3
#define FMT_4HL 4
#define FMT_4HH 5
#define FMT_8 6
#define FMT_PAL 4 /* flag bit */
// And I say this as an ATI user.
#define ATI_SUCKS 1
#if SHADER_MODEL >= 0x400
@@ -24,7 +24,7 @@
#define PS_FST 0
#define PS_WMS 0
#define PS_WMT 0
#define PS_FMT FMT_8
#define PS_FMT FMT_32
#define PS_AEM 0
#define PS_TFX 0
#define PS_TCC 1
@@ -37,6 +37,7 @@
#define PS_COLCLIP 0
#define PS_DATE 0
#define PS_SPRITEHACK 0
#define PS_POINT_SAMPLER 0
#endif
struct VS_INPUT
@@ -104,6 +105,15 @@ cbuffer cb1
float4 sample_c(float2 uv)
{
if (ATI_SUCKS && PS_POINT_SAMPLER)
{
// Weird issue with ATI cards (happens on at least HD 4xxx and 5xxx),
// it looks like they add 127/128 of a texel to sampling coordinates
// occasionally causing point sampling to erroneously round up.
// I'm manually adjusting coordinates to the centre of texels here,
// though the centre is just paranoia, the top left corner works fine.
uv = (trunc(uv * WH.zw) + float2(0.5, 0.5)) / WH.zw;
}
return Texture.Sample(TextureSampler, uv);
}
@@ -130,7 +140,7 @@ float4 sample_rt(float2 uv)
#define PS_FST 0
#define PS_WMS 0
#define PS_WMT 0
#define PS_FMT FMT_8
#define PS_FMT FMT_32
#define PS_AEM 0
#define PS_TFX 0
#define PS_TCC 0
@@ -359,46 +369,38 @@ float4 sample(float2 st, float q)
{
st /= q;
}
float4 t;
float4x4 c;
float2 dd;
/*
if(PS_FMT <= FMT_16 && PS_WMS < 2 && PS_WMT < 2)
if(!PS_LTF && PS_FMT <= FMT_16 && PS_WMS < 2 && PS_WMT < 2)
{
t = sample_c(st);
c[0] = sample_c(st);
}
*/
if(PS_FMT <= FMT_16 && PS_WMS < 3 && PS_WMT < 3)
if (!PS_LTF && PS_FMT <= FMT_16 && PS_WMS < 3 && PS_WMT < 3)
{
t = sample_c(clampuv(st));
c[0] = sample_c(clampuv(st));
}
else
{
float4 uv;
float2 dd;
if(PS_LTF)
{
uv = st.xyxy + HalfTexel;
dd = frac(uv.xy * WH.zw);
dd = frac(uv.xy * WH.zw);
}
else
{
uv = st.xyxy;
}
uv = wrapuv(uv);
float4x4 c;
if(PS_FMT == FMT_8H)
{
c = sample_4p(sample_4a(uv));
}
else if(PS_FMT == FMT_4HL || PS_FMT == FMT_4HH)
{
c = sample_4p(fmod(sample_4a(uv), 1.0f / 16));
}
else if(PS_FMT == FMT_8)
if(PS_FMT & FMT_PAL)
{
c = sample_4p(sample_4a(uv));
}
@@ -406,34 +408,36 @@ float4 sample(float2 st, float q)
{
c = sample_4c(uv);
}
}
if(PS_LTF)
{
t = lerp(lerp(c[0], c[1], dd.x), lerp(c[2], c[3], dd.x), dd.y);
}
else
[unroll]
for (uint i = 0; i < 4; i++)
{
if((PS_FMT & ~FMT_PAL) == FMT_32)
{
t = c[0];
#if SHADER_MODEL <= 0x300
if(PS_RT) c[i].a *= 128.0f / 255;
#endif
}
else if((PS_FMT & ~FMT_PAL) == FMT_24)
{
c[i].a = !PS_AEM || any(c[i].rgb) ? TA.x : 0;
}
else if((PS_FMT & ~FMT_PAL) == FMT_16)
{
c[i].a = c[i].a >= 0.5 ? TA.y : !PS_AEM || any(c[i].rgb) ? TA.x : 0;
}
}
if(PS_FMT == FMT_32)
{
#if SHADER_MODEL <= 0x300
if(PS_RT) t.a *= 128.0f / 255;
#endif
if(PS_LTF)
{
t = lerp(lerp(c[0], c[1], dd.x), lerp(c[2], c[3], dd.x), dd.y);
}
else if(PS_FMT == FMT_24)
else
{
t.a = !PS_AEM || any(t.rgb) ? TA.x : 0;
t = c[0];
}
else if(PS_FMT == FMT_16)
{
// a bit incompatible with up-scaling because the 1 bit alpha is interpolated
t.a = t.a >= 0.5 ? TA.y : !PS_AEM || any(t.rgb) ? TA.x : 0;
}
return t;
}
@@ -515,19 +519,24 @@ void atst(float4 c)
else if(PS_ATST == 2) // l
{
#if PS_SPRITEHACK == 0
clip(AREF - a);
clip(AREF - a - 0.5f);
#endif
}
else if(PS_ATST == 3) // le
{
clip(AREF - a);
clip(AREF - a + 0.5f);
}
else if(PS_ATST == 4) // e
{
clip(0.5f - abs(a - AREF)); }
else if(PS_ATST == 5 || PS_ATST == 6) // ge, g
clip(0.5f - abs(a - AREF));
}
else if(PS_ATST == 5) // ge
{
clip(a - AREF);
clip(a - AREF + 0.5f);
}
else if(PS_ATST == 6) // g
{
clip(a - AREF - 0.5f);
}
else if(PS_ATST == 7) // ne
{

View File

@@ -5,10 +5,7 @@
#define FMT_32 0
#define FMT_24 1
#define FMT_16 2
#define FMT_8H 3
#define FMT_4HL 4
#define FMT_4HH 5
#define FMT_8 6
#define FMT_PAL 4 /* flag bit */
#ifndef VS_BPPZ
#define VS_BPPZ 0
@@ -25,7 +22,7 @@
#define PS_FST 0
#define PS_WMS 0
#define PS_WMT 0
#define PS_FMT FMT_8
#define PS_FMT FMT_32
#define PS_AEM 0
#define PS_TFX 0
#define PS_TCC 1
@@ -431,27 +428,19 @@ vec4 sample_color(vec2 st, float q)
mat4 c;
if(PS_FMT == FMT_8H)
{
if((PS_FMT & FMT_PAL) != 0)
c = sample_4p(sample_4a(uv));
}
else if(PS_FMT == FMT_4HL)
{
// FIXME mod and fmod are different when value are negative
c = sample_4p(mod(sample_4a(uv), 1.0f / 16));
}
else if(PS_FMT == FMT_4HH)
{
// FIXME mod and fmod are different when value are negative
c = sample_4p(mod(sample_4a(uv) * 16, 1.0f / 16));
}
else if(PS_FMT == FMT_8)
{
c = sample_4p(sample_4a(uv));
}
else
{
c = sample_4c(uv);
// PERF: see the impact of the exansion before/after the interpolation
for (int i = 0; i < 4; i++) {
if((PS_FMT & ~FMT_PAL) == FMT_16)
{
// FIXME GLSL any only support bvec so try to mix it with notEqual
bvec3 rgb_check = notEqual( t.rgb, vec3(0.0f, 0.0f, 0.0f) );
t.a = t.a >= 0.5 ? TA.y : ( (PS_AEM == 0) || any(rgb_check) ) ? TA.x : 0.0f;
}
}
if(PS_LTF != 0)
@@ -464,11 +453,7 @@ vec4 sample_color(vec2 st, float q)
}
}
if(PS_FMT == FMT_32)
{
;
}
else if(PS_FMT == FMT_24)
if(PS_FMT == FMT_24)
{
// FIXME GLSL any only support bvec so try to mix it with notEqual
bvec3 rgb_check = notEqual( t.rgb, vec3(0.0f, 0.0f, 0.0f) );

View File

@@ -24,27 +24,19 @@
*/
#define IDC_NATIVERES 2001
#define IDC_VSYNC 2002
#define IDC_PALTEX 2003
#define IDC_LOGZ 2004
#define IDC_CHECK6 2005
#define IDC_CODECS 2006
#define IDC_RESOLUTION 2007
#define IDC_SHADER 2008
#define IDC_RESX_EDIT 2009
#define IDC_RESY_EDIT 2010
#define IDC_AA1 2011
#define IDC_SWTHREADS_EDIT 2012
#define IDC_CUSTOM1 2013
#define IDC_MSAAEDIT 2013
#define IDC_CHECK4 2014
#define IDC_FILTER 2015
#define IDC_DITHERING 2016
#define IDC_RADIO1 2017
#define IDC_RESX 2018
#define IDC_RESY 2019
#define IDD_CONFIG 2020
#define IDC_MSAA 2020
#define IDB_LOGO9 2021
#define IDB_LOGO10 2022
#define IDC_FBA 2023
@@ -52,7 +44,6 @@
#define IDC_LOGO11 2025
#define IDD_CAPTURE 2026
#define IDD_GPUCONFIG 2027
#define IDC_BLUR 2028
#define IDC_RENDERER 2029
#define IDC_INTERLACE 2030
#define IDC_ASPECTRATIO 2031
@@ -67,14 +58,8 @@
#define IDC_WIDTH 2040
#define IDC_HEIGHT 2041
#define IDC_CONFIGURE 2042
#define IDC_STATIC_TEXT_HWAA 2043
#define IDC_ALPHAHACK2 2044
#define IDC_STATIC_TEXT_SKIPDRAW 2045
#define IDC_WINDOWED 2046
#define IDC_USERHACKS 2047
#define IDC_SKIPDRAWHACKEDIT 2048
#define IDC_STATIC10 2049
#define IDC_HACKDISABLED 2050
#define IDC_SPRITEHACK 2051
#define IDRESET 2052
#define IDC_SATURATION_SLIDER 2053
@@ -93,6 +78,8 @@
#define IDC_STATIC_MSAA 2074
#define IDC_STATIC_SKIPDRAW 2075
#define IDC_AGGRESSIVECRC 2076
#define IDC_CHECK_DISABLE_ALL_HACKS 2077
#define IDC_ALPHASTENCIL 2078
#define IDC_COLORSPACE 3000
#define IDR_CONVERT_FX 10000
#define IDR_TFX_FX 10001
@@ -111,7 +98,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 10012
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 2077
#define _APS_NEXT_CONTROL_VALUE 2078
#define _APS_NEXT_SYMED_VALUE 5000
#endif
#endif

View File

@@ -27,12 +27,15 @@ using namespace std;
#include "GS.h"
#include "GifTransfer.h"
#include "null/GSnull.h"
#ifdef _MSC_VER
# include "svnrev.h"
#endif
const unsigned char version = PS2E_GS_VERSION;
const unsigned char revision = 0;
const unsigned char build = 1; // increase that with each version
static char *libraryName = "GSnull Driver";
static char libraryName[256];
Config conf;
u32 GSKeyEvent = 0;
bool GSShift = false, GSAlt = false;
@@ -60,7 +63,12 @@ EXPORT_C_(u32) PS2EgetLibType()
EXPORT_C_(char*) PS2EgetLibName()
{
return libraryName;
#ifdef _MSC_VER
sprintf_s( libraryName, "GSnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "GSnull Driver";
#endif
}
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)

View File

@@ -18,14 +18,16 @@
#include <errno.h>
#include <string>
using namespace std;
#ifdef _MSC_VER
# include "svnrev.h"
#endif
#include "Pad.h"
const u8 version = PS2E_PAD_VERSION;
const u8 revision = 0;
const u8 build = 1; // increase that with each version
static char *libraryName = "Padnull Driver";
static char libraryName[256];
string s_strIniPath="inis";
string s_strLogPath="logs";
@@ -41,7 +43,13 @@ EXPORT_C_(u32) PS2EgetLibType()
EXPORT_C_(char*) PS2EgetLibName()
{
return libraryName;
#ifdef _MSC_VER
sprintf_s( libraryName, "Padnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "Padnull Driver";
#endif
}
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)

View File

@@ -16,7 +16,9 @@
#include <stdlib.h>
#include <string>
using namespace std;
#ifdef _MSC_VER
# include "svnrev.h"
#endif
#include "USB.h"
string s_strIniPath="inis";
string s_strLogPath="logs";
@@ -25,7 +27,7 @@ const unsigned char version = PS2E_USB_VERSION;
const unsigned char revision = 0;
const unsigned char build = 7; // increase that with each version
static char *libraryName = "USBnull Driver";
static char libraryName[256];
USBcallback USBirq;
Config conf;
@@ -57,7 +59,12 @@ EXPORT_C_(u32) PS2EgetLibType()
EXPORT_C_(char*) PS2EgetLibName()
{
return libraryName;
#ifdef _MSC_VER
sprintf_s( libraryName, "USBnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "USBnull Driver";
#endif
}
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)

View File

@@ -31,12 +31,15 @@
using namespace std;
#include "DEV9.h"
#ifdef _MSC_VER
# include "svnrev.h"
#endif
const unsigned char version = PS2E_DEV9_VERSION;
const unsigned char revision = 0;
const unsigned char build = 5; // increase that with each version
const char *libraryName = "DEV9null Driver";
static char libraryName[256];
// Our IRQ call.
void (*DEV9irq)(int);
@@ -73,7 +76,12 @@ EXPORT_C_(u32) PS2EgetLibType()
EXPORT_C_(char*) PS2EgetLibName()
{
return (char *)libraryName;
#ifdef _MSC_VER
sprintf_s( libraryName, "DEV9null Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "DEV9null Driver";
#endif
}
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)

View File

@@ -35,7 +35,6 @@ extern const unsigned char version;
extern const unsigned char revision;
extern const unsigned char build;
extern const unsigned int minor;
extern const char *libraryName;
void SaveConfig();
void LoadConfig();

View File

@@ -19,7 +19,7 @@
void ADMAOutLogWrite(void *lpData, u32 ulSize);
static const s32 tbl_XA_Factor[16][2] =
static const s32 tbl_XA_Factor[5][2] =
{
{ 0, 0 },
{ 60, 0 },
@@ -76,11 +76,8 @@ static void __forceinline XA_decode_block(s16* buffer, const s16* block, s32& pr
{
const s32 header = *block;
const s32 shift = (header&0xF)+16;
const int id = header >> 4 & 0xF;
if (id > 4 && MsgToConsole())
ConLog("* SPU2-X: Unknown ADPCM coefficients table id %d\n", id);
const s32 pred1 = tbl_XA_Factor[id][0];
const s32 pred2 = tbl_XA_Factor[id][1];
const s32 pred1 = tbl_XA_Factor[(header>> 4)&0xF][0];
const s32 pred2 = tbl_XA_Factor[(header>> 4)&0xF][1];
const s8* blockbytes = (s8*)&block[1];
const s8* blockend = &blockbytes[13];
@@ -159,13 +156,11 @@ static __forceinline s32 GetNextDataBuffered( V_Core& thiscore, uint voiceidx )
thiscore.Regs.ENDX |= (1 << voiceidx);
vc.NextA = vc.LoopStartA | 1;
if (!(vc.LoopFlags & XAFLAG_LOOP))
{
vc.Stop();
if( IsDevBuild )
{
if(MsgVoiceOff()) ConLog("* SPU2-X: Voice Off by EndPoint: %d \n", voiceidx);
}
if( IsDevBuild )
{
if(MsgVoiceOff()) ConLog("* SPU2-X: Voice Off by EndPoint: %d \n", voiceidx);
}
}
else
@@ -702,10 +697,7 @@ StereoOut32 V_Core::Mix( const VoiceMixSet& inVoices, const StereoOut32& Input,
// On the other hand, updating the buffer is cheap and easy, so might as well. ;)
Reverb_AdvanceBuffer(); // Updates the reverb work area as well, if needed.
// ToDo:
// Bad EndA causes memory corruption. Bad for us, unknown on PS2!
if (!FxEnable || EffectsEndA >= 0x100000) return TD;
if (!FxEnable) return TD;
StereoOut32 TW;