Commit Graph

4209 Commits

Author SHA1 Message Date
gigaherz 94e79f781d SPU2-X: Fix one little bug in the spu2replay code and a few warnings discovered by warning level 4 + code analysis.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4867 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-12 14:47:36 +00:00
shadowladyngemu b54fe4cb9e VS2010 Compile fix for r4865
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4866 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-12 03:31:25 +00:00
cottonvibes ac9bf45f98 pcsx2: Implemented Threaded VU1 :D
Threading VU1 took a lot of rewrites and new code to make possible (MTGS, microVU, gifUnit...), but we finally got to the point where it was feasible, and now we've done it! (so now everyone can stop complaining that pcsx2 only takes advantages of 2 cores :p).

The speedups in the games that benefit from it are great if you have a cpu with 3+ cores (generally a 10~45% speedup), however games that are GS limited can be a slowdown (especially on dual core cpu's).

The option can be found in the speedhacks section as "MTVU (Multi-Threaded microVU1)". And when enabled it should should show the VU thread-time percentage on the title bar window (Like we currently do for EE/GS/UI threads).

It is listed as a speedhack because in order for threading VU1 to have been a speedup, we need to assume that games will not send gif packets containing Signal/Finish/Label commands from path 1 (vu1's xgkick). The good news is very-few games ever do this, so the compatibility of MTVU is very high (a game that does do this will likely hang).

Note: vs2010 builds and Linux builds need to be updated to include "MTVU.h" and "MTVU.cpp".


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4865 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-12 02:31:49 +00:00
gregory.hainaut 60cec5a9b0 spu2x: linux compilation fix.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4864 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-11 17:36:44 +00:00
shadowladyngemu ae4bad0799 GSdx: CRC hackfixes for NanoBreaker and Kunoichi/Nightshade, removing the shadows that are not properly emulated and just cause 3D to look darker (NanoBreaker in D3D9 just showed a black screen with smoke effects ingame :p).
Minimal changes to the GameDB.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4863 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-11 12:54:57 +00:00
ramapcsx2 d3784af2ab Commit the SPU2-X compile fix from miseru99. GSdx CRC hackfix is included, too.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4862 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-11 09:15:03 +00:00
gigaherz 3373f6852b SPU2-X: Give some more range to the balancing, I realized its most probably safe for our ears ( an it seems to be based on testing ;P).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4861 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-10 21:21:49 +00:00
gigaherz 08b2cac8aa SPU2-X: Improved dplII decoder algorithm, it now generates more defined positional balance.
It's still most probably very wrong, but its sounding nice at least. ;P

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4860 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-10 20:59:40 +00:00
gigaherz a4a40441c9 SPU2-X: Added config setting for ProLogic decoding level.
Refactored the ProLogicII code into a separate file and changed it to floating point math for easier debugging. 
Added a basic ProLogic decoder that doesn't try to do surround separation into L/R.

The setting does not have a GUI option yet, since the PLII decoder is experimental and doesn't give too good results.
To change it, set DplDecodingLevel to one of: 0=none, 1=ProLogic, 2=ProLogicII. The default is 0.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4859 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-10 20:08:29 +00:00
gigaherz c0f9d1b619 SPU2-X: Added audio expansion support to the portaudio backend. This change also corrects the volume in normal stereo mode.
Removed an useless method from the module interfaces.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4858 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-10 13:17:41 +00:00
gigaherz a22b36815c SPU2-X: kill a few warnings
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4857 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-10 11:59:08 +00:00
gregory.hainaut@gmail.com b490282c55 spu2x: linux compilation fix
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4856 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-08 17:49:59 +00:00
ramapcsx2 9a1793b954 Added "portable.ini" to /bin, so SVN builds will work in portable mode by default.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4855 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-08 15:59:06 +00:00
gigaherz 224797c4ec SPU2-X: Experimental change! Lowered the lower latency limit to 3ms if the timestretcher is not being used. This latency will add up to the output latency as usual, but with a good sound chip this should allow overall latencies < 15ms.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4854 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-08 15:56:49 +00:00
gigaherz f2bc219425 SPU2-X: Removed the std::vector I used out of lazyness. The config dialog should no longer keep an ever-growing list of devices, and it has less potential side-effects if somehow the portaudio device list changes while the dialog is open.
3rdparty/portaudio: Removed debug prints on release targets.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4853 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-08 13:59:19 +00:00
gigaherz a5638b1466 SPU2-X: Added configuration dialog for the portaudio backend (windows only).
Added settings for customizing the suggested latency.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4852 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-08 12:49:33 +00:00
gigaherz 44f0cc140a SPU2-X / portaudio: Fix the requested latency from a hardcoded 200ms to "as close as you can to 64 samples / buffer".
Causes internal buffer size allocations to be as small as possible within portaudio and the OS, so it can have bad effects if the number turns out to be too small.
Would be nice if someone with a "real" audio card (Audigy, X-fi or similar) tested WASAPI Exclusive Mode, KS or ASIO with this change.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4851 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-07 16:37:59 +00:00
gigaherz cb74fd2c10 3rdparty/portaudio: Updated to a slightly newer revision of portaudio, sicne the fixes in it seemed interesting enough.
I also enabled WDMKS backend, but I had to change some #defines to get it to compile, and I can't seem to be able to use it on my Win7 machine. If anyone on XP wants to try it, it will be at their own risk. (use WDMKS hostApi name on the .ini)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4850 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-07 12:40:25 +00:00
avihal ddcfdb6d77 Test. Dummy commit.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4849 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-07 09:33:27 +00:00
gigaherz bb0100deea I went and copypasted the one line I typoed.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4848 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-07 01:55:44 +00:00
gigaherz 1886affc54 3rdparty/portaudio: Fixed portaudio not finding any device because there wasn't any API enabled. The new toggle system requires the compiler to specify the enabled APIs, instead of assuming default-on.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4847 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-07 01:53:24 +00:00
gigaherz 1d8e159433 3rdparty/portaudio: Fixed the build with vs2008 (I hope). I commited the wrong .vcproj file. Reverted to the previous one and updated the file with the same changes I did to the vs2010 .vcxproj
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4846 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-07 01:15:49 +00:00
gigaherz dabe415929 3rdparty/portaudio: Fixed the build (windows). Somehow it compiled in devel/release, but not in debug. Should have failed in both of them though...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4845 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-07 00:58:00 +00:00
gigaherz 5a3cd8e57e 3rdparty/portaudio: Updated portaudio to the march 26 stable release (svn rev 1647). Too many changes to list here.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4844 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-07 00:50:05 +00:00
avihal@gmail.com 529f620e37 SPUX: New stretcher: Should be slightly more stable now, compared to r4840.
On 4840 I added dynamic tuning (which may have slight negative effect on stability) to adapt to different iterations/sec of different systems, but I didn't like this system too much. On 4840 I also made a small change which, I now understand, factors out the differences between systems in this regard, essentially making dynamic tuning not required anymore. So now dynamic tuning is disabled.

If you enable the SPU2X messages (and the overrun messages), you would see log messages similar to this:

buffers:   44 ms ( 89%), tempo: 1.000000, comp: 1.000, iters: 764, (N-IPS:750 -> avg:50, minokc:50, div:100)

If the iters value (764 at this example) on your system when running at 100% speed (50/60fps) is higher than 1000 or lower than 500, then please comment here and post few of the log lines.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4843 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-04 18:21:32 +00:00
avihal@gmail.com fc359249e4 SPU2X: Better control of debug messages. (Now they actually print when enable at the SPU2X debug GUI).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4842 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-04 16:51:59 +00:00
ramapcsx2 0a4c082e4b SPU2-X: Clean up some logging code.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4841 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-04 14:27:21 +00:00
avihal@gmail.com 36fc051238 SPU2X: New stretcher: hopefully works better than r4834 (same goals as r4834: better resiliance to very high/low fps, compared to r4820).
I'm not fully happy with it, as it's a bit complicated for my taste, so feedback about how it performs will be appreciated.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4840 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-02 18:48:48 +00:00
gregory.hainaut@gmail.com 34569047b4 cmake: add/delete files
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4839 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-02 06:52:53 +00:00
ramapcsx2 527df7420b V2 of the previous GSdx hack: Now also works in pointlisted FMV's (FFX-2, Legend of Legaia).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4838 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-01 17:42:01 +00:00
ramapcsx2 e181358986 Hack for GSdx hardware to fix inverted videos that showed up with the new GIF rewrite.
The problem as I understood is is incomplete COLCLAMP support.
Thanks to sudo for the hack :)

(Unfortunately we couldn't find out more about why these FMV also *all* flicker.)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4837 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-01 17:18:13 +00:00
shadowladyngemu c8b7b410a3 Fix VS2010 compiling. Patch by miseru99, thanks :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4836 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-01 15:40:20 +00:00
cottonvibes f816748d72 microVU:
- Fixed a bug with mVU's ESIN implementation. This finally fixes the flower-petal bug in Radiata Stories (and hopefully the clouds-bug in VP2 but havn't tested). Rama and I have wanted to fix this for a long time, but never knew the problem :p
- Improved implementation of some undefined behavior that happens on branches to take into account pipeline stalls. 

gif / vif:
- Added some logging code that parses gif packets. It can be enabled by the PRINT_GIF_PACKET macro in Gif.h
- Deleted some old gif code.
- On ReadFIFO_VIF1() clear the out-reg to prevent uninitialized results in case GSreadFIFO() doesn't modify it...
- Create a fallback for GSreadFIFO2() so that its always defined (as long as the plugin implements GSreadFIFO()) 

pcsx2:
- Organized the virtual folders in vs2008 a bit...

Note: vs2010 and Linux builds need to be modified to add Gif_Logger.cpp and delete GIFpath.cpp


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4835 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-01 03:16:42 +00:00
avihal@gmail.com 92e67c218a SPU2X: New time stretcher: Improved behavior on extremes.
1. Much better behavior at extreme low/high FPS (less skips/lower latency).
2. As a result, I was able to reduce internal latency by 50% (50ms config now equals 100ms before).

Recommended latency config for stretcher: 100ms.
For rhythm games, if your FPS is very stable, I recommend 50ms.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4834 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-31 11:27:50 +00:00
shadowladyngemu 52a0eb047d GSdx: CRC hackfixes!
Summary of changes...

Fixed menus and HUD for Spyro: A New Beginning and Spyro: the Eternal Night.

Fixed missing dialogs and reduced the VRam usage a bit for Tales of Legendia ("8-bit textures" help a bit more with Vram/speed). Should be playable now in hardware mode. Thanks to rama for figuring it could be hackfixed this way and the initial patch :)

Half-screen fixes for Ty the Tasmanian Tiger 2, X-men Origins: Wolverine, Call of Duty: World at War - Final Fronts.

Modified the Star Wars: Force Unleashed hackfix a bit, shouldn't have the see-thru objects anymore.
Also modified the Metal Gear Solid 3 and Gran Turismo 4 hackfixes as they needed different skip values for each region (PAL/NTSC). Thanx to avih for the region code... and the free C/C++ lessons :P

The hackfix for Sly 3 was still showing stripes for 3-D and two-player modes, fixed for NTSC version now and hopefully works for PAL one too.

Couple GameDB updates after the gif rewrite.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4833 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-29 18:11:22 +00:00
cottonvibes a4059b45b5 Bring back GSnull, zzogl, and old plugins from the dead!
(they were crashing with the new Gif rewrite... shouldn't anymore)

Although Jake had added the new "GSgifTransfer" callback to these plugins in the past, he forgot to modify the .def files so pcsx2 can actually use them :p

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4832 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-27 08:16:51 +00:00
cottonvibes c918df60d2 newGif: do what r4829 did, except only flush the gs primitives to the mtgs when theres going to be a GS download (busdir=1).
this should be the only time that an explicit flushing is needed.
doing it this way should be faster than flushing every incomplete gs packet like r4829 was doing...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4831 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-27 03:55:43 +00:00
ramapcsx2 c2c19d7e96 New GIF: Quick fix from Cotton, fixes ICO and hopefully Tekken 4.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4830 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-26 17:53:54 +00:00
cottonvibes d8149fdb8b newGif: send complete gs primitive packets to the gs plugin even if eop wasn't detected. this is needed for games that do GS->EE downloads to make sure the gs plugin is up-to-date with the sent gif data.
fixes Bleach bankai problem, and probably other games (wizardry/growlancer 3) but haven't tested...
Also removed a vif FlushA hack that used to be needed for tekken 4/gitaroo man but not anymore...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4829 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-26 08:47:47 +00:00
gabest11 bfbf403bf4 GSdx: FXAA 3.10, page up key activates it
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4828 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-25 11:16:01 +00:00
arcum42 0b09b84526 Fix Linux so that it compiles.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4827 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-25 10:24:05 +00:00
cottonvibes 1515949a98 will probably fix compilation errors on linux/gcc...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4826 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-25 08:46:07 +00:00
cottonvibes 44a186266a newGif - Fix Area 51 slowness.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4825 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-25 07:43:31 +00:00
gregory.hainaut@gmail.com a100aac7cb cmake: add new Gif Unit files.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4824 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-25 06:29:53 +00:00
cottonvibes 7e1be9c489 pcsx2: deleted a lot of the old gif code.
some bits were kept for reference and should be deleted in the future (along with the entire GIFpath.cpp)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4823 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-24 22:24:10 +00:00
ramapcsx2 794904cf3c This should fix MSVC 2010 compiling.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4822 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-24 14:18:51 +00:00
cottonvibes c05dc759e3 Big gif transfer code rewrite!
Pcsx2 now has a gifUnit class which acts like the ps2's gif and executes a single gif transfer at a time (and performs path arbitration according to priority and path3 slicing).

This new code is generally a speedup for most games. Particularly VU heavy games like GoW.
This revision breaks old saved state compatibility so don't update if you wish to keep playing with your old saved states.
Leave comments if this revision fixes or breaks anything...

Message to GS Plugin authors:
This new code now uses only 1 gif callback to transfer data to the gs plugin (GSgifTransfer).
pcsx2 also is garaunteed to send full GS primitives to the plugin. So you don't have to account for partial-transfers anymore.

Thanks goes out to shadowlady who tested around 500 games for me :D

Note 1: The old gif code is still in this revision, and can be enabled by the USE_OLD_GIF macro. The old code will be deleted soon.
Note 2: This revision also enables assertion dialogs in devel builds, and changed a lot of assume cases into assertions.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4821 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-24 13:02:50 +00:00
avihal@gmail.com 7cb4dbb8d9 SPU2X: New (simpler) time stretcher algorithm.
Should prevent erratic tempo variations near 100% speeds (compared to the previous implementation), and generally allow much lower latencies while keeping the audio stable (on all audio systems).
E.g. my tests show that at 70ms latency it can properly handle sharp speed variance of 50%-100%. If your game generally doesn't get slower than 70% speed, 50ms latency would probably be fine.

Note that on extreme scenarios (e.g. extreme sharp drops in speed) it doesn't try to keep the audio continues at all costs. If your game exhibits such behavior (audible clicks, etc), increasing the latency a bit at the config would help.

Comments on actual performance/quality on different systems would be greatly appreciated.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4820 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-24 10:58:42 +00:00
ramapcsx2 9a16937018 GSdx: Fix an old and silly bug that could cause slowness in native resolution hardware rendering. Thanks for debugging, Lana and avih.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4819 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-23 16:15:00 +00:00
avihal@gmail.com 073e5e2f3a Reverting r4796 (Console window now opens again before main window). Reason: The console window's menus were overlapping the main window menus, leading to main window menu actions getting invoked when using the console menus...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4818 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-23 10:19:53 +00:00