Technically it did work, but it was undefined behaviour. Use __cpuidex,
which allows setting ecx as well.
Also fix the _xgetbv intrinsic - I have no idea how PCSX2 even
compiled on Windows.
* Use c++11 static assert
* Properly cast to parameter template to u32 (help clang)
* Remove lots of useless ASM. Memset it only used with a size of 4096.
* check pthread_mutex_init status
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
- Reimplemented mini/max opcodes using integer comparison operations instead of double comparison. This results in a bit less code and integer operations tend to be faster than double ops (especially on AMD cpus). Thanks to pseudonym for the idea!
- Fixed some minor bugs in mVU dev builds.
pcsx2:
- Added __fc as a shorthand macro for __fastcall since we already have __ri and __fi macros.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4713 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
* Re-added a trace log for the GIFtag parse optimization; Fixed some mVU warnings.
DevNotes:
Places where GIF needs stalled and resumed are marked with [TODO]'s. We also need to add a way for SIGNAL to abort the currently processing GIFtag, which might need a return code added to the callbacks.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3373 96395faa-99c1-11dd-bbfe-3dabce05a288
* Fixed a savestate loading bug, when loading states made with different sets/versions of plugins.
DevNote:
* Moved some old PS2E types to PS2Edefs, since the new v2 plugin API won't use them (freezeData, keyEvent).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2380 96395faa-99c1-11dd-bbfe-3dabce05a288
* Configuration panels are all modal-less now, so that you can open the config panel and leave it open while running games.
* Handful of thread sync improvements.
* Fixed on-the-fly interpreter/recompiler configuration.
* Fixed plugin hotswapping (mostly works, but still a little funny at times)
* All new assertion dialogs and popup message handlers.
* RecentIsoList defaults to 12 instead of 6
Dev Notes:
* I had to create a new set of assertion functions called pxAssume*. Originally I hoped to avoid that complexity, and just use a single one-assert-fits-all case, but turned out blanketly using __assume() for all assertion cases wasn't reliable.
* wxGuiTools: Replaced the operator, with operator& -- the latter has proper order of precedence, the former required () to scope correctly. >_<
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2339 96395faa-99c1-11dd-bbfe-3dabce05a288
DevNote: Moved jNO_DEFAULT from the Pcsx2Defs.h, since it's too dependent on the Common libraries. It's now in Assertions.h. Plugins can use __assume(0); directly instead or roll their own.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2326 96395faa-99c1-11dd-bbfe-3dabce05a288
* Added SSE_MXCSR union/struct with bitfields and methods for doing common actions.
* Converted all existing MXCSR code to use the new union.
* Added a __pagesize macro for use in conjunction with __pagealigned and dynarec functions.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2113 96395faa-99c1-11dd-bbfe-3dabce05a288
* Completely new assertion macros: pxAssert, pxAssertMsg, and pxFail, pxAssertDev (both which default to using a message). These replace *all* wxASSERT, DevAssert, and jASSUME varieties of macros. New macros borrow the best of all assertion worlds: MSVCRT, wxASSERT, and AtlAssume. :)
* Rewrote the Console namespace as a structure called IConsoleWriter, and created several varieties of ConsoleWriters for handling different states of log and console availability (should help reduce overhead of console logging nicely).
* More improvements to the PersistentThread model, using safely interlocked "Do*" style callbacks for starting and cleaning up threads.
* Fixed console logs so that they're readable in Win32 notepad again (the log writer adds CRs to naked LFs).
* Added AppInit.cpp -- contains constructor, destructor, OnInit, and command line parsing mess.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1950 96395faa-99c1-11dd-bbfe-3dabce05a288
PCSX2/Win32:
* Assigned names to the threads so that they show up nicely in the debugger.
* Added more error checking in the new stdout/stderr PipeRedirection code, hopefully fixing Issue 422 (but can't reproduce the error here to be sure).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1904 96395faa-99c1-11dd-bbfe-3dabce05a288
* handful of minor code cleanups, and some warning removals for ICC.
* replaced the dualshock.png with a dualshock.jpg (120k smaller!)
* Updated the About Box, and added Zeydlitz / ZZogl to the plugin author credits.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1902 96395faa-99c1-11dd-bbfe-3dabce05a288
Linux/GCC: Disabled __forceinlining in debug builds. This is the intended design, fixes many GCC errors in debug builds, and also mimics MSVC behavior.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1854 96395faa-99c1-11dd-bbfe-3dabce05a288
* Borrowed wxScopedPtr from wxWidgets 2.9
* Fixed up first-time startup procedures and folder selection
* Implemented most of the rest of the missing configuration options, and cleaned up some ambiguities regarding bool types and bitfields.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1649 96395faa-99c1-11dd-bbfe-3dabce05a288
* Moved the x86 emitter to /common, so that plugins can link against it if they wish.
* Created a new "utility" class in /common which houses string utils, fast memcpy, common exception classes, and other handy dandies.
* Removed old-style linux automake files from the pcsx2 dir since they were hopelessly out of date (and their multi-file-per-line format makes svn merging impossible >_<)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1454 96395faa-99c1-11dd-bbfe-3dabce05a288
* Changed w32pthreads library into a DLL so that it can be used from plugins correctly. (NOTE: you will need to make sure to build and copy w32pthreads.dll into your pcsx2 folder).
* Switched pcsx2 from static CRT to shared CRT linking (needed to ensure correct exception handling behavior in multithreaded DLL environments).
* Switched all standard plugins in the Suite to the shared CRT, to match pcsx2's new style. :)
* Renamed _DEBUG (depreciated) to PCSX2_DEBUG (excluding Gabest projects since the ATL still uses it).
* Added intrin.h to Pcsx2Defs.h (so that it is included universally), and added intrin_x86.h for GCC compatibility.
Notes:
* Current plugin version compatibility status should be unaffected. The new shared-CRT plugins work fine with older versions of Pcsx2, and the older plugins should work fine with the new shared-CRT version of pcsx2; so long as the necessary CRT DLLs are available on the user's system.
* All future packagings of pcsx2 will include w32pthreads.dll and the Common Runtimes (CRTs).
* Existing users who do not have MSVC installed can obtain the CRTs by downloading the Microsoft Visual C++ 2008 Redistributable Package (anyone with msvc installed should already have all they need).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1388 96395faa-99c1-11dd-bbfe-3dabce05a288