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
* Moved VIF dynamic recompiler buffers to the recompilers section of PCSX2.
* Using RecompiledCodeReserve for the VIF SSE functions.
* Minor bugfixes to VirtualMemory class implementations.
* Improved error handling and error message display.
* [TODO] : implement a call to cpuShutdown() to clean up VIF unpack/SSE reserves.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4169 96395faa-99c1-11dd-bbfe-3dabce05a288
* Applied the new RecompiledCodeReserve to the VIF recompilers (saves another 4-8mb of memory, depending on game).
* Fixed a bug in pxsFmt / FastFormatUnicode (string formatting).
* Final round of error handling cleanups.
(branch is basically ready for re-integration -- needs some testin for obvious/show stopping bugs, thanks!)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@4025 96395faa-99c1-11dd-bbfe-3dabce05a288
* All remaining code for handling partial/fragmented unpacks removed.
* vifRegs.NUM is now accurately simulated when queuing data from fragmented unpacks.
* Reduced the VIFunpack fragment buffer from 1MB to 4KB (max size of an unpack due to NUM being limited to 8 bits).
* Removed vif/vifRegs globals formally used by VIF interpreters (everything relies on the templated vifIdx now -- simpler and faster!)
* g_vifMask vars are integrated into vifStruct.
* All VIF mask register stuff uses the SSE-friendly vifStruct.MaskRow/Col vars now.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3762 96395faa-99c1-11dd-bbfe-3dabce05a288
* Fixed V2/V3 unpacks to behave same as the SSE unpacks (matches undefined PS2 behaviors)
* Removed legacy vifUnpacker (haven't needed it for any regression testing in forever).
* Move some VIF MARK console spam to DevCon (Ape Escape 3)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3746 96395faa-99c1-11dd-bbfe-3dabce05a288
* Writes via 16 and 8 bit ops now use 32-bit read/modify/write operations by default; which should enable nearly complete support for all such operations (instead of the formerly spotty coverage before).
* Eliminated almost all former 8/16-bit specific register operations. All code shares the same 32 bit handlers now.
* Completely revamped the developer trace logs for hardware registers! *ALL* registers are logged now, complete with address, name, and value being read/written (and nicely formatted!).
* Handlers are now fully page-based using templated functions (minor speedup)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3704 96395faa-99c1-11dd-bbfe-3dabce05a288
* More VU interpreter cleanups (VU0micro.cpp and VU1micro.cpp are just about ready for permanent removal now).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3685 96395faa-99c1-11dd-bbfe-3dabce05a288
* Added __fi and __ri, which are abbreviations for __forceinline and __releaseinline.
* Added some static qualifiers to functions in mVU, MMI ops, and others where appropriate.
* Removed some unnecessary __fastcall qualifiers (since GCC gets funny sometimes when you combine __fastcall and inlining).
* Made _1mb, _16mb, _1gb values common to all emulation code (moved from newVif/mvu to Common.h) -- they're useful! :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3624 96395faa-99c1-11dd-bbfe-3dabce05a288
DevNote: I could have left the code for the freezes in, except I *really* don't want us to ever have to resort to using such a system ever again in the future. For anything. (its just not safe on modern optimizing compilers)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3392 96395faa-99c1-11dd-bbfe-3dabce05a288
(was some optimization i had, but only was working correctly for skipping writes...)
Fixes half-life...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2732 96395faa-99c1-11dd-bbfe-3dabce05a288
Not in effect yet cuz there seems to be a minor bug in the current saved-state versioning system. (GetVersion() is not correctly returning the loaded-state's version when loading a saved state)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2567 96395faa-99c1-11dd-bbfe-3dabce05a288
The code is very simple now and doesn't need the vif unpack interpreter anymore for partial transfers.
Need some more testing done before I remove the code for the old way...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2549 96395faa-99c1-11dd-bbfe-3dabce05a288
There is a lot of code duplication in the vif0/vif1 files, I will probably work on getting them to use common functions.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2489 96395faa-99c1-11dd-bbfe-3dabce05a288
I need to do more later on...
I mostly separated the unpack code from the dma/transfer code in this commit.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2485 96395faa-99c1-11dd-bbfe-3dabce05a288
Notes to Devs:
- Linux project files probably need to be updated since I deleted some files.
- In the vif0/vif1 Freeze() functions for saved states, I kept some dummy vars to keep saved state compatibility. We should remove them next time we decide to break saved state compatibility.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2461 96395faa-99c1-11dd-bbfe-3dabce05a288
This revision correctly fixes .hack GU Rebirth.
At this point we don't know any games newVif breaks compared to the old vif code. If you know any please leave a comment.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2447 96395faa-99c1-11dd-bbfe-3dabce05a288
so .hack gu rebirth will be broken with this revision... i still need to figure out the real problem.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2446 96395faa-99c1-11dd-bbfe-3dabce05a288
hopefully this fixes the rest of the problems newVif was having with games..
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2429 96395faa-99c1-11dd-bbfe-3dabce05a288
* Optimized codegen of the VPU recompiler using displaced memory offsets (1-2% speedup)
* Undid a lot of the inl stuff for more traditional cpp code layout (explained below)
* Removed some redundant code and turned some macros into functions.
* Renamed a few things to VPU (Vector Processing Unit, which is the specific name of the logic core that performs VIF Command Processing and Unpacking on the PS2)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2387 96395faa-99c1-11dd-bbfe-3dabce05a288