Commit Graph

62 Commits

Author SHA1 Message Date
Jonathan Li c87b8c7f49 pcsx2|utilities: Remove ambiguous wxString-related overloads
Avoid some function overloads that can accept char*, wxChar* and
wxString as a parameter. wxString can be constructed with either of
those parameters, so the function overloads may actually result in
ambiguity errors. Keep the wxString parameter versions and remove the
rest.

Fixes some compile errors on FreeBSD.
2019-10-07 01:39:32 +01:00
Jonathan Li a977f1e6c1 pcsx2|utilities; Revert ambiguous wxString related commits
This reverts
93d5b52df3
f3e78b8267
55155ca7f1.

Unfortunately wxString stuff is a PITA to deal with. Breaks FreeBSD
compile, but there are probably more issues that just haven't been
reported yet...
2018-09-04 21:57:27 +01:00
Jonathan Li 55155ca7f1 utilities: Fix compile when using --enable-stl wxWidgets builds
Regression introduced in 93d5b52df3.
2018-09-03 20:30:14 +01:00
Jonathan Li 93d5b52df3 pcsx2|utilities: Remove ambiguous wxString-related overloads
Avoid some function overloads that can accept char*, wxChar* and
wxString as a parameter. wxString can be constructed with either of
those parameters, so the function overloads may actually result in
ambiguity errors. Keep the wxString parameter versions and remove the
rest.

Fixes some compile errors on FreeBSD.
2018-09-03 01:56:35 +01:00
Gregory Hainaut 9e101c9ef0 common: use = default instead of trivial constructor/destructor
reported by clang-tidy

Note: drop throw() specifier as it is the 'default' in C++11 for
destructor
2017-05-13 10:38:35 +02:00
Gregory Hainaut a378e307b3 common: drop pthread TLS emulation
thread_local is supported by all C++11 compliant compiler

Keep a way to disable TLS for shared object to avoid issue of DTV
slot shortage.
2017-04-14 17:18:20 +02:00
Gregory Hainaut 23d081ab21 common: remove an old gcc workaround 2017-02-01 18:24:51 +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
Jonathan Li f78d1a4018 utilities: Remove wx2.8 code and uses of wxMAJOR_VERSION 2016-04-29 00:09:47 +01:00
Gregory Hainaut 18a6403852 common-wx3: fix nasty bug between overload function of pxOnAssert 2015-05-19 17:40:38 +02:00
Gregory Hainaut 66d7aa75e2 cmake: move -DNDEBUG to global option 2014-12-20 13:43:25 +01: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
Gregory Hainaut fded22e1b3 wx3.0: extend logger to support wxString as input
Note: only enabled it on 2.8 for windows (because of UTF8 linux is fine)
2014-07-29 20:45:44 +02:00
gregory.hainaut 20958dede3 i18n: use standard pcsx2_Iconize instead of an additional key lookup. In others word, english string is now included directly in the po/pot
Translators note: I save previous translation but a careful review is mandatory


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5366 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-10 10:10:55 +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 a728cfee96 wxSavestates: many bugfixes!! *now* it's ready for testing. :p
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxSavestates@4096 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-12-14 22:41:02 +00:00
Jake.Stine daf47b50a0 wxSavestates branch: (partially sync'd with trunk**)
* Finished up zipfile-style savestate implementation
 * Simplified BaseSaveState class, and removed lots of now-unneeded code.
 * Prepared the i18n stuff for a pcsx2_Dev.pot file (WIP), and sorted more stuff to pcsx2_Tertiary.pot.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxSavestates@4091 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-12-14 07:28:05 +00:00
Jake.Stine 9bcff9f3d5 Internationalization fix-ups. PCSX2 0.9.7 should *finally* be ready for translations. Whew.
* Also did some work on re-introducing the game database dialog.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4063 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-12-02 08:15:11 +00:00
Jake.Stine 6dcdf9cfa9 wxSavestates:
* Basic savestate loading/saving working now (needs testing).
 * No support for screenshots embedded into the savestate (yet).

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxSavestates@4043 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-22 16:24:54 +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 bd8127f75e newHostVM: More error/exception handling WIP stuff.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@3980 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-10-29 02:49:01 +00:00
Jake.Stine bed33749b5 newHostVM branch: (now boots games!)
* EE and IOP recompilers are using the new RecompiledCodeReserve class.
 * PS2 main memory should typically be located at 0x20000000 (code still need some cleanups)

VU0/VU1 recompilers will be implemented soon.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@3959 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-10-22 19:47:02 +00:00
Jake.Stine 5ba7b0650d wxIsoFile: final annoying compilation error fixed. Just needs a little linux-side testing now.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxIsoFile@3945 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-10-19 09:51:57 +00:00
Jake.Stine d5bc947e8d wxIsoFile branch: fix missing includes and gcc compilation stuffs.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxIsoFile@3941 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-10-18 15:46:05 +00:00
Jake.Stine 2b4d7cc384 wxIsoFile branch: (needs linux testing)
* Convert IsoFileFormats.cpp into a class.
 * Use wxFile and wxFileInputStream instead of windows/posix specific file functions.
 * Added new ScopedAlloc classes, which are very simple dependency-free templates for exception-safe allocations.
 * FastFormatString: Improved performance ad fixed an obscure bug.
 * Drag&Drop (UI) - Improved the friendliness and responsiveness, so that PCSX2 doesn't end up tying up an explorer window while it prompts the user or issues error messages.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxIsoFile@3934 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-10-18 01:40:49 +00:00
Jake.Stine 1cac8d3948 * Added subdivided content to the u128 type (changed it from a struct to a union, added _u32[4], _u16[8], etc).
* Added ToString methods to the u128 type.
* Bugfixes for the FastFormat string utilities, namely when writing UTF8 content via the UTF16 formatter.
* MSVC: Removed obsolete disabling of unsigned/signed mismatch warning (4018)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3703 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-08-31 05:14:00 +00:00
Jake.Stine 8375b0a989 Refactoring:
* 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
2010-08-09 04:10:38 +00:00
Jake.Stine 912872af80 Introducing a mostly revamped Tracelog and Console log system. Various console log sources can now be toggled on/off on the fly, allowing end users to enable more verbose logging when they encounter problems. Both console and trace sources can be given automatic prefixing.
DevNotes:  DevCon logs are now available in *Release* builds as well as Devel builds, and can be enabled from the Console window's "Sources" menu.  They are disabled by default in Release builds, and are always enabled regardless of the ini setting in devel builds.  Debug logs are still strictly available in debug builds only.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3609 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-08-06 05:46:09 +00:00
Jake.Stine bc849cc042 Merge const qualifiers and cleanups from ReorderingMTGS: Includes the VIF DIRECT changes, which seem to be stable this time. ;)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3549 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-22 12:20:11 +00:00
Jake.Stine 4f62554702 ReorderingMTGS: Revert changes to Vif_Codes.cpp from earlier, until other bugs in VIF processing can be resolved. (fixes ICO bootup).
git-svn-id: http://pcsx2.googlecode.com/svn/branches/ReorderingMTGS@3519 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-17 18:05:13 +00:00
Jake.Stine 51638cc189 Fix Linux. >_<
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3337 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-28 19:51:51 +00:00
Jake.Stine 1c7fc3e176 Mostly-new host exception system (host meaning the C++ / SEH exceptions, not the VM's PS2/MIPS exceptions). Main purpose is to make specifying diagnostic and end-user messages more sane. Secondary goal was to remove the need for C++ multiple and virtual inheritance, which are buggy in MSVC still, and problematic even when they aren't buggy.
I also re-implemented R5900 runtime exception handling for TLB Miss and such (devbuilds only, for now).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3335 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-28 18:03:54 +00:00
Jake.Stine 12bdd9dc10 * Fixed death-by-recursion caused when a thread threw an exception.
* Fixed some minor bugs when processing idle events.
 * Plugin Load/Init/Shutdown/Unload are all called from the Main/UI thread again; this is important for plugins that issue popup warning/error messages.

DevNotes:
 * Added ScopedPtrMT, a multithread-safe version of ScopedPtr.
 * MTGS errors are still not handled as gracefully as they should be; namely the MTGS thread doesn't restart itself (it's on the TODO list).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2958 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-07 03:20:58 +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
arcum42 d2c63c7bbc A rubber chicken with a pulley in the middle...what possible use could that have?
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2923 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-28 01:36:15 +00:00
Jake.Stine 5d37925617 Major UI renovations!
* Added versioning info to savestates! (along with some other bugfixes)
 * Simplified the Boot and System menus -- removed the old Skip BIOS hack and replaced it with the new BOOT2 injection method (which is considered hack-free at this time).
 * Removed lots of UI deadlock gotchas.
 * Some new confirmation dialogs and better error handling.
 * Implemented an exclusive SysExecutor thread, which serves the purpose of executing system/VM commands and events in uninterrupted order (including suspend, resume, savestates, etc.)



 * ... and probably broke linux!

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2911 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-27 13:12:03 +00:00
arcum42 ca02bffc6c We'll need to include signal.h if we're raising signals.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2398 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-25 18:58:25 +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 408dbd7256 * Call PADupdate from MTGS thread when using legacy GSopen -- Should fix Linux Pad instabilities.
* 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
2009-12-22 03:15: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 0591686c67 Misc bugfixes to plugin management and error handling.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2128 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-04 09:30:22 +00:00
Jake.Stine 0a4745863c Changed most instances of wxString::FromAscii to fromUTF8, which is generally more correct (may fix Issue 460, please confirm).
Rationale: FromAscii should only be used on old-style DOS/ANSI character strings that use the upper 128 characters for drawing pictures or writing umlauts, which is pretty much nothing at all as far as PCSX2 is concerned.  Chances are even the japanese console logs coming from the PS2 itself use UTF8. 

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2092 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-29 13:51:49 +00:00
Jake.Stine 7d458d583c Revamped some console log stuff.
* Added more colors!
 * VM's EE/IOP logs (the ones that come from the emulated games themselves) are colored accordingly: EE are faint cyan, IOP are faint yellow.  They're intentionally "hard to read" because 99% of the time they're meaningless trivia (but still cool since it's what the actual devs would have used for developing the games!).

Dev Notes:
 * Removed Console.Status (specify blue/green colors manually if you want them).
 * Renamed Console.Notice to Console.Warning.
 * I changed the overloads so that both char* and wxChar* versions work like printf now (no need to use wxsFormat when working with unicode strings).  I also removed wxString& versions of the overloads.  This should (I hope) also be an easier port to wx2.9 or 3.0, when that time comes.
 * Default log color is now black instead of gray; typically you'll want to manually specify Color_Gray when doing high volume logging (like the EErec's block tracking in debug builds).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2091 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-29 13:32:40 +00:00
Jake.Stine 6c631e009d Yet more thread sync fixes, mostly to do with rapid reset/resume/suspend/exit actions.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2030 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-18 12:30:00 +00:00
Jake.Stine eda5d1d834 Savestates work! Not much else does yet (settings, etc), but at least this monkey's off my back. I can work on tying up more loose ends now. :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1975 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-07 19:20:11 +00:00
Jake.Stine db01c15977 Linux: Minor fixups!
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1952 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-04 09:00:07 +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