Commit Graph

26 Commits

Author SHA1 Message Date
Gregory Hainaut b9369e7c00 pcsx2: remove the reserve feature of recompiler memory
Cons:
* requires ~180MB of physical memory (virtual memory is the same so it
  doesn't impact the 4GB limit)

From steam: 98.81% got at least 2GB of RAM. 83.62% got at least 4GB of RAM.
That being said, it might not really increase RAM requirements as OS could put the
new allocation in the swap.

Pro:
* code is much easier
* remove at least half of the signal listener
* last but not least, it is way easier for profiler/debugger
2016-12-09 09:28:19 +01:00
Clang Format 1fba5cb580 reformat main common directory
Disable some reformat around emitter registers declaration and a massive cases.
2016-11-12 16:52:49 +01:00
Gregory Hainaut 7565bcc789 ee: drop SpatialArrayReserve allocator
Let's the kernel manage the memory either with builtin lazy allocation or
swapped memory.

Avoid to handle SIGSEGV manually (nicer for debug) and removes 250 lines of code.
2015-11-12 10:35:10 +01:00
Gregory Hainaut 8083b2c754 common: init values in the constructors of SpatialArrayReserve and pxStaticText 2015-09-23 09:47:27 +02:00
Gregory Hainaut a2a9b6252a common: fix compilation 2015-06-05 21:18:21 +02:00
Gregory Hainaut 768362852e pscx2: s/wxTrap/pxTrap/
wxTrap is only enabled on wxDebug build. pxTrap is always available. It is much nicer for debug on linux
2014-12-13 12:28:37 +01:00
Gregory Hainaut 76237955c7 wx3.0: fix various string printing on linux
wide-char must use %ls format on linux. Don't rely on non standard %s/%S
2014-07-29 20:45:44 +02:00
Gregory Hainaut d5d19acb3f wx3.0: lots of cast...
Various string as still wrong but at least it can be compiled now.

I think the remaining issue are w_char with %s format (at least on linux)
2014-07-29 20:45:44 +02:00
Ryan Houdek 182e826dc5 Fix SpatialArrayReserve::SetBlockSize function declaration to match definition.
The function was defined to use uptr, but the declaration was using uint.
2014-07-05 04:59:31 -05: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
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
Jake.Stine f76e901c64 Minor cleanups for the new virtual memory alloc/reserve system:
* 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
2010-12-30 06:21:07 +00:00
Jake.Stine 2ee6b7abc6 Merge newHostVM branch. Feature overview:
* PCSX2 uses significantly less memory when starting.
 * Overall memory use reduced (mildly for some games, significantly for most).
 * EE and IOP main memory are now fixed at 0x20000000 and 0x24000000 -- useful when using external cheat apps.
 * Properly implemented the 'Shutdown' menu option -- Shutdown now unloads the entire PS2 virtual machine and reduced PCSX2's memory footprint to bare minimums.
 * Some more meaningful errors for when memory is a problem (out of memory, low virtual memory, etc).
 * Bugfix for pxsFmt when formatting long/large strings (over 1k)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4029 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-17 05:49:11 +00:00
Jake.Stine b10a6d5271 newHostVM: MSVC compilation fix.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@4028 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-17 04:58:35 +00:00
Jake.Stine 0692ab1bc5 newHostVM: Linux fixes.
* Removed some missing / obsolete files from codeblocks projects.
 * Fixed a segfault on exit
 * Implemented a platform-consistent pointer value string formatter (%p has no defined standard)

git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@4026 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-17 03:18:36 +00:00
Jake.Stine 63b254c8bd newHostVM:
* 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
2010-11-16 15:58:42 +00:00
Jake.Stine be1a590464 newHostVM: (WIP, may not run!) -- Applied host virtual memory mapping to the EE/IOP/VU main and on-chip memory banks. Added a new OO-based system allocator object for handling said virtual memory resources. Plus many code cleanups, and some added mess that needs to be cleaned up.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@4020 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-15 14:05:02 +00:00
Jake.Stine f1024dad91 newHostVM: Fix for savestates!
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@4004 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-07 00:04:53 +00:00
Jake.Stine d6de2e3942 newHostVM: Made use of the new SpatialArrayReserve for the EE/R5900 recompiler. Reduces the recompiler's lookup tables from ~40mb to a mere 1-3mb.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@4003 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-06 16:25:40 +00:00
arcum42 7f51e8ee66 newHostVM: Linux compilation fixes.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@3998 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-06 05:21:06 +00:00
Jake.Stine 3bdf62fa0e newHostVM: Sync with trunk (r3972-r3993)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@3995 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-05 01:39:25 +00:00
Jake.Stine a7726871dc newHostVM: More exception / error handling mess.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@3994 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-05 01:33:01 +00:00
Jake.Stine dc7f00d05e newHostVM:
* Preliminary implementation for the SpatialArrayReserve class, which will be used for recompiler lookup tables (large portions of these tables are never used by many games).  Will put it to use and test it soon.
 * Finished implementation of TryResize method for reservations, which will be used by PCSX2 if the operating system runs low on ram.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@3992 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-03 17:37:29 +00:00
Jake.Stine 5579350d22 newHostVM:
* Moved profiler management to the RecompiledCodeReserve class.
 * Improved error handling some more.
 * Numerous minor cleanups.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@3991 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-03 14:18:30 +00:00
Jake.Stine 4dec10976d newHostVM: Working on linux side now ... (WIP)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@3976 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-10-27 23:22:19 +00:00
Jake.Stine 4bee22a4cd newHostVM branch: Implemented VM reservation feature for all recompilers.
* SuperVU note: SuperVU recompiler now uses two separate 8mb caches for VU0 and VU1 (needed in order to simplify/saneify the reserve/alloc stages of pcsx2 app startup).
 * Added MemsetFast.inl, which houses SSE intrinsic versions of memset and memzero, for use on aligned data targets.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@3975 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-10-27 19:18:46 +00:00