Commit Graph

60 Commits

Author SHA1 Message Date
Jake.Stine b04af0e6e9 UI:
* Added 3-state checkbox support to pxCheckBox.
 * Fixed some buggy behavior when closing PCSX2 with either main window or console window minimized (window positions would get screwy)

DevNotes:
 * Moved ImplementEnumOperators macro to Common headers and improved it a bit.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3220 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-18 02:44:27 +00:00
Jake.Stine df3bda9183 * Bugfixed some popup dialogs, which would sometimes be too small or empty.
* Various small cleanups to emitters and microVU's regalloc code (no functional changes)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3162 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-05 04:07:58 +00:00
Jake.Stine a7bb875e18 x86emitter: removed implicit pointer dereferencing on 'indirect' operand types, and implicit uptr addressing on ptr[]; avoids some obscure pitfalls and might speed up release mode builds (LTCG).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3158 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-04 22:27:06 +00:00
Jake.Stine 23857a0e16 Added a little OOP to the CPU detection code, and turned one monolithic cpu detection function into several isolated ones (isolated by what general info they detect).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3136 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-01 03:33:51 +00:00
Jake.Stine 70d47bf240 Copyright 2010 : PCSX2 and plugins! (notable exception: didn't update copyright info in any Gabest plugins)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2937 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-03 14:08:02 +00:00
sudonim1 4457fe40fc Removed all trailing whitespace in *.c *.cpp *.h because it irritates me.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2897 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-25 00:31:27 +00:00
sudonim1 3657bebe9e Fixed trap instructions by using the old implementation for now.
Added INT and INTO to the emitter.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2716 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-03-15 14:15:40 +00:00
Jake.Stine a63115988b PS2E v2 (plugin interface) tweaks and additions.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2402 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-27 12:15:21 +00:00
Jake.Stine de637fc921 Bugfix for assertion breaks not working in Devbuilds.
newVif:
 * Bugfix to HashBucket::find() cuts microprogram caches misses in half.
 * Dynarec version now uses alternating XMM registers for unmasked unpacks (very minor speedup, ~1%).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2397 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-25 18:00:51 +00:00
Jake.Stine 9473e69b7f Thread Local Storage Fixes:
* Implemented TlsVariable, a nifty alternative to __threadlocal, suitable for archaic operating systems that don't have native TLS support (namely Mac OS/X).
 * Added a forced reference to TLS in AppInit so that TLS is sure to be available to DLLs (otherwise windows doesn't init TLS by default).
 * Disabled TLS support in the x86emitter by default, since it's looking increasingly like we won't find a use for multithreading PS2 sub-components (can be re-enabled later if spontaneous brilliance at a later date proves me wrong).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2396 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-24 22:22:34 +00:00
Jake.Stine b27b89b162 newVif: I'm a terrible person. What started out at an optimization turned into this.
* 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
2009-12-23 13:22:30 +00:00
Jake.Stine b3fead5dc9 * Disable newVifUnpack, which I left enabled in the prev commit (it's not ready yet!)
* Added feature to align call targets for EErec functions and blocks on P4's and AMDs, and pack them on Core2/i7's.
 * Fixed some svn:native props.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2347 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-15 20:46:30 +00:00
Jake.Stine c17455c702 User Interface code cleanups and bugfixes. some highlights:
* 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
2009-12-14 12:18:55 +00:00
Jake.Stine 1dced84153 Linux compilation fixes and fix some signed/unsigned stuff in IsoReader.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2217 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-18 16:53:44 +00:00
Jake.Stine af7bb73948 Fixed the Recent Iso List, which got broken a few revs back... and many more wee bug fixes, most are too unimportant to list here!!
Code Cleanups:
 * cpuDetect: Split Win32/Linux code portions into separate modules. (probably breaks linux)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2205 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-16 13:54:32 +00:00
Jake.Stine d114d698a2 svnrev.h fixes for when TortoiseSVN isn't available (fixes compilation errors in SPU2-X and cdvdGigaherz).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2149 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-07 17:15:37 +00:00
Jake.Stine ae64b98e6a Emitter code cleanups, and re-added GCC 4.4.x code I accidentally removed in a prev rev.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2148 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-07 15:46:09 +00:00
Jake.Stine 2b5964199c Emitter rewrite, part 4 of 5: De-templificated all x86 base integer operations.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2142 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-06 21:45:30 +00:00
arcum42 6a7c617a65 Misc changes to Patches.cpp. Unconst xSHUF for the moment, so Linux compiles.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2136 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-06 01:50:11 +00:00
Jake.Stine fcdb429bb9 Emitter Rewrite, Part 3 of 5: Finished all SIMD instructions, except those embedded into base instruction groups (CMPSS/SD, DIVSS/SD, etc).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2135 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-05 23:39:45 +00:00
Jake.Stine d868edc17c Recompiler Bugfix: for crashes in Ace Combat 4, and likely other games that use COP2 extensively.
Explanation: EBP was being used by mVU macro-mode (COP2), which violated the new EErec aligned stack setup.  ie, register/stack corruption resulted.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2123 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-03 20:35:40 +00:00
Jake.Stine 24d6221141 * More MXCSR fixes (roundmode / DaZ / FtZ).
* Fixed a bug in the Full-mode FPU recompiler.
 * Added some better error handling to the BIOS Rom loader.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2117 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-02 19:56:38 +00:00
Jake.Stine 71ba32f3b9 Fixes for more crash bugs introduced in the prev revision; potential fix for Linux/GTK errors.
Details:
 * Intel's FXSAVE requires an aligned buffer (wasn't explicitly documented in the programmer's guide).
 * I moved the wxMenu() objects in the wxApp constructor to OnInit(), which should be post-GTK initialization.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2115 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-02 13:42:28 +00:00
Jake.Stine 94222f4aaf Rewrote internal handling of SSE roundmodes and DAZ/FTZ (fixes major crash bugs of the prev revision).
* 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
2009-11-02 07:00:59 +00:00
arcum42 22c76d3ce8 Fix the trunk for gcc 4.4 (haven't looked at 4.3 yet), and add a few log changes I hadn't committed yet.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2074 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-25 04:48:16 +00:00
Jake.Stine ada3d9ed8a Emitter rewrite, Part 2 of 5: Converted SSE comparisons and SSE conversions to constructor-less structs.
(also includes some header file prepwork for my next wxWidgets windows.h commit fix)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2069 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-24 21:43:28 +00:00
Jake.Stine 6fdaea2c79 Emitter rewrite, part 1 of 5 (or so...): Re-tooled SSE arithmetic instructions to be class/template free.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2067 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-24 19:06:11 +00:00
Jake.Stine 66d92503aa Attempted fix for GCC compilation errors in previous revision. Also:
* Removed some unused sealed class container mess that liked to cause compilation errors on GCC 4.2
 * Added a macro for efficient invocation of static recompiled code buffers.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2065 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-24 16:28:48 +00:00
arcum42 06d3e01efe One last pass on the register freezing code for now, and remove the remnants of the iVif workaround code.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2060 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-22 13:00:59 +00:00
Jake.Stine 1a09a7792f Compilation errors fix: MSVC needs 'extern' qualifiers on functions declared as __forceinline, otherwise it assumes static/local scope when it compiles them.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2059 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-22 11:07:21 +00:00
arcum42 8e493ad2d2 Revamp the FreezeRegs functions.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2056 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-22 01:20:22 +00:00
Jake.Stine 51999656ab aligned_stack: Implement full compliment of stack alignment options for the IOP (untested in gcc/linux yet); and fix a compiler error in MSVC.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/aligned_stack@2048 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-21 07:10:30 +00:00
Jake.Stine 54f8f33257 aligned_stack: Linux has never worked so well!
* made a workaround for some obscure GCC templating bug
 * Fixes the assert from PersistentThread when starting the emu

git-svn-id: http://pcsx2.googlecode.com/svn/branches/aligned_stack@2047 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-21 02:23:42 +00:00
Jake.Stine 00461fdac6 aligned_stack: synced with trunk, to bring in the new console code for additional testing under a (properly working!) linux.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/aligned_stack@2046 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-21 01:25:55 +00:00
Jake.Stine 3e1c1f939c aligned_stack: Finished conversion of all CALLFunc and _callFunctionArg1 functions to aligned-stack safe __fastcall invocations; only IOP's psxExecute and dispatchers remain to be done. (rev is fully functional in this state tho, on win32 at least)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/aligned_stack@2045 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-20 20:02:07 +00:00
Jake.Stine 2cb8e571cd Second half of __unused removal -- comment out (remove) names on unused parameters as per the guidelines of some C guideline that all compilers adhere to (this suppresses the same warnings __unused used to suppress).
Minor cleanups to Counters/Gif.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2038 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-19 11:53:18 +00:00
arcum42 29e8fe94e9 Change a few project options and get rid of _unused.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2036 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-19 10:42:36 +00:00
Jake.Stine 047726a60c aligned_stack: no real progress... just reached a point where I need to move dev over to my windows so I can have real debugging/disasm/memory dumping ability. (this is the most horrible job I've ever undertaken, btw)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/aligned_stack@2034 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-18 19:26:07 +00:00
Jake.Stine 6b0c9cfdfe Added some missing semaphore/mutex resets, and bugfixed the emitter when using a certain type of complex indirect sddressing ( ie, ptr32[addr + (eax*4)] )
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2026 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-17 23:30:16 +00:00
Jake.Stine 87cbaaf5ca aligned_stack branch: Preliminary work for having the recompilers align the stack to 16 bytes, to appease the expectations of GCC and Mac OSX.
Done:
 * EEcore aligns stack on entry and performs routine checks of ESP and EBP integrity.
 * Dispatchers are recoded using the PCSX2 Emitter.

Todo:
 * Convert all C-code function calls from the recompiler to use the new aligned stack setup.
 * Implement stack-alignment checks and emitter-based dispatchers for the IOP.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/aligned_stack@2024 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-17 20:48:03 +00:00
Jake.Stine adf4b7ae50 Recompilers:
* Removed EBP push/pop stuff from the recExecute of the R5900 and R3000A both (not needed anymore since we disabled EBP in iCore).
 * Moved the legacy j8ptr and j32ptr buffers to iCore, since they'll go obsolete at the same time iCore does; and nothing outside PCSX2 references them.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2009 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-16 03:46:19 +00:00
Jake.Stine 75d3c053ef Two minor cosmetic fixes from the __aligned switchover.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1960 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-05 02:25:54 +00:00
Jake.Stine 6412271470 Renamed PCSX2_ALIGNED to __aligned and removed the need for excess parenthesis and oddball qualifiers. Left the old macros in Pcsx2defs.h for now, just in case. Redid some of the storage organization of microVU and iFPU consts and temporaries while I was at it, using structs instead of naked vars -- should improve cpu cache behavior a wee bit.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1959 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-05 02:15:49 +00:00
Jake.Stine 5b92054923 Better fix for zmuldefs. Less warnings in MSVC and GCC both. :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1957 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-04 21:49:23 +00:00
Jake.Stine 4f6d7ca776 Linux: We don't need no stinkin' muldefs! (fyi, turns out the solution was to use the "inline" keyword on class member prototype definitions, yes that simple -_-)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1955 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-04 20:28:08 +00:00
Jake.Stine e1c89dacdb Bind the cdvd's newDiskCB properly when changing CDVD sources; and more jASSUME->pxAssert change-overs.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1953 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-04 15:34:40 +00:00
Jake.Stine 653d09e821 Lots of new code maintenance stuffs:
* 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
2009-10-04 08:27:27 +00:00
Jake.Stine 6907b78640 Fixes Issue 419 by checking validity of StdHandle values. Also:
* 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
2009-09-22 04:37:11 +00:00
Jake.Stine 8d91458c95 Win32: Added stdout and stderr pipe support for the ConsoleLogger; such that plugins using printf or fprintf will have their messages show up in the new-style console log and in the emuLog.txt file.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1897 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-21 03:33:35 +00:00
Jake.Stine 4fbc2c26aa Fixed a bug in BiosTools.cpp that caused Bios-Not-Found errors.
MemoryCard / Multitap Renovations:
 * Memorycards should now support multitap (somewhat untested)
 * Implemented a memorycard plugin interface, using the new API defined in PluginCallbacks.h (still prelim and hackish)
 * Memorycard settings are saved to ini!
 * Multitap is now controlled by PCSX2 instead of the pad plugin (which means no multitap until we implement the gui toggles to enable it)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1817 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-13 17:11:35 +00:00