Commit Graph

452 Commits

Author SHA1 Message Date
Sacha ad3b76c4d8 Remove all custom memcpy usage from core pcsx2 and remove memcpy_fast from plugins. 2014-08-27 13:45:23 +10:00
ramapcsx2 9168c344b1 Use generic memcpy from now on. Tests show generics are good enough now.
It should be a speedup even on modern CPUs.
2014-08-26 01:02:23 +02:00
Sacha f542c7232e Use __builtin_unreachable where possible for non-msvc 2014-08-15 14:43:52 +10:00
Sacha a3bc6a73a3 Remove some horrible old code.
Remove an assert define and instead use the static_assert that all compilers provide.
As an added bonus, assert messages\!
2014-08-13 13:55:32 +10:00
Ryan Houdek 3d37a6ce27 Removes the usage of __LINUX__ define
This is defined and set it a ton of different places.
It's checked in a whole lot more
Instead just use __linux__ like a real project should
2014-08-03 13:20:36 -05:00
Gregory Hainaut 82c7bcd761 wx3.0: compilation fix for arch linux
* Manually cast WxGetTranslation
* Accept string as format parameter of pxWindowTextWriter
* Manually convert wxString to wide string

Note: Wx setup.h is not the same between Debian and Arch. Unfortunately it
generated various compilations errors on wx code.

Close issue #172
2014-08-03 14:54:44 +02:00
Gregory Hainaut e99540554a wx3.0: clang complains about support of reference in varargs 2014-08-03 14:43:08 +02:00
Pseudonym 03bfffea23 Merge pulled request #174 from Sonicadvance1/x86_64-emitter-fixes
Fix a couple issues in the x86emitter on x86_64.
2014-07-31 15:43:35 +01:00
Ryan Houdek b4771030d3 Fix a couple issues in the x86emitter on x86_64.
This won't fix the billions of errors that will happen at runtime of using the x86 emitter, but chooses to make some better coding practice choices
that enables it to compile on x86_64.

in the xIndirectVoid class, instead of using s32 for the offset, use sptr which will be 32bit or 64bit depending on architecture.
This also fixes a few alignment issues in xAddressVoid's constructors.

In EmitSibMagic we are casting a void* to s32, which won't work on x86_64, so first do a cast from sptr to s32.
Won't work on x86_64, but gets us compiling.
2014-07-31 09:01:56 -05:00
Lioncash ac558afc8a Remove 'elif' define from Pcsx2Defs and microvu_misc.h 2014-07-30 23:44:04 -04:00
sudonim1 904f5de1ea Merge pull request #144 from Sonicadvance1/fix-BitScanFoward
Fix the BitScanForward implementations for x86_64.
2014-07-30 18:19:19 +01:00
Gregory Hainaut 6485bd89d9 common: drop remaining of HashMap
Ryan Houdek removes all use of this code.

Let's remove the left-overs too, beside it will removes the sparsehash depencency
2014-07-29 21:06:31 +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
Pseudonym 28227ea4c4 Merge pull request #123 from Sonicadvance1/fix_interlockedbittestandresetset
Fixes interlockedbittestandreset/set in intrin_x86.h
2014-07-29 14:20:13 +01:00
Forrest McDonald 81458912f9 pcsx2: remove template and pointer on overload function from wxGuiTools
Fixed clang build.

Note from Gregory:
C++ requests that at least 1 parameters is a class, an enumeration, or a
reference to those objects. Probably to avoid to screw basic type operation.
For example: *p += 4;

The realy buggy code was this one because T could be an int!
template T
f(*ptr, T)

To avoid any issue in the future the Team decide to drop all overload that use pointers.
2014-07-18 19:20:53 +02:00
Ryan Houdek 0c1087a2e5 Remove HashTools::IHashable/CommonComparisonClass
These are no longer used.
2014-07-15 22:08:11 -05:00
Ryan Houdek abd605a066 Remove HashTools::HashSet.
This is no longer used.
2014-07-15 22:07:03 -05:00
Ryan Houdek 5bd06d3a02 Remove HashTools::HashMap/SpecializedHashMap
These are no longer used. Wipe them out.
2014-07-15 22:05:36 -05:00
Ryan Houdek 264cce2003 Also remove UnicodeDictionary.
This class isn't used anywhere and we should promote usage of std::unordered_map instead of this class
2014-07-15 21:01:30 -05:00
Ryan Houdek 79dd0958d0 Remove the pxDictionary class since it is no longer needed.
This was only used by the game database, which has now been changed to an unordered_map
2014-07-15 20:58:25 -05:00
Ryan Houdek 2a6656050c Fix the BitScanForward implementations for x86_64. 2014-07-15 18:13:32 -05:00
sudonim1 6f0f7ce948 Merge pull request #110 from Sonicadvance1/hashmap_64bit
Support 64bit address hashing in the CommonHashClass.
2014-07-15 23:15:03 +01:00
Ryan Houdek 8c746302a2 Fix NOT32M function declaration.
Use uptr as the argument since it is either u32 or u64 depending on architecture.
2014-07-15 15:05:46 -05:00
Ryan Houdek 48d178886e Fixes interlockedbittestandreset/set in intrin_x86.h
This doesn't update the file to the latest version from mingw32 since this is already a custom header stripped from mingw32.

This also fixes the functions for x86_64(verified that it still works for both architectures) and also updates the version inside of GSdx.
Also removes a comment in the GSdx header saying that these functions are broken since they no longer are.
2014-07-14 21:20:31 -05:00
Gregory Hainaut c6c6171841 pcsx2: don't hide base function
As far as I understand you can't mix virtual (select at runtime) and
overloading (select at compile time).
2014-07-12 16:01:21 +02:00
Gregory Hainaut 4fdfd04d3c partially revert c5d2343f51
Parameter name can help to understand the code so let's keep them.
Clang warning was disabled in previous commit
2014-07-12 13:30:34 +02:00
Gregory Hainaut 79f6aacc85 common: various warning fix
* 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
2014-07-12 12:59:23 +02:00
Ryan Houdek d132e6bce4 Support 64bit address hashing in the CommonHashClass.
The class already supports hashing 64bit values, just break it out to support it in this particular case.
From the 64bit version of the hash, this hash favours values that aren't on the extreme end.
Consdering that hashing is only really used by the class itself it isn't too big of an issue.
2014-07-11 17:16:58 -05:00
Gregory Hainaut c5d2343f51 pcsx2/common: fix tons of warning spamming on clang
* Don't use parameter name to avoid unused parameter
* Set a default for various case
2014-07-05 00:08:48 +02:00
ramapcsx2 ecb42cad9b Thanks Bluefire101 for reporting this (eventually) undefined behavior (depending on who you ask).
Even if there was no problem, code should always be clear on what it does.
2014-07-01 15:43:26 +02:00
Gregory Hainaut 0bf7a35a53 pcsx2: improve the GS read fifo API
1/ initReadFifo will be first called on the GS thread
    (openGL can only be done on the GS thread)

2/ readFifo will be called on the EE thread. It is not safe too access eeMem from GS
 because of memory is virtual

Fix "recent" regression (crash) on Kingdom heart and others game too.

v2: add a len check on GSState::InitReadFIFO
2014-05-06 20:28:18 +02:00
Gregory Hainaut 58077c63a7 gcc-warning: check c function return. Print error when bad.
v2: properly check return code of fread/getcwd function
2014-05-03 10:32:05 +02:00
gigaherz f7c1b6e060 Git-based versioning. 2014-03-25 13:31:36 +01:00
gregory.hainaut e24f3585d4 pcsx2: fix window compilation + a couple of extra ;)
* Fix some issue with the new debugger on linux
* Enable the previous tlb miss fix on the interpreter
* disable the building of po by default. It pollute too much my env.



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5914 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-23 16:00:55 +00:00
gregory.hainaut 220f55d760 linux compilation fix:
* use c++11 for pcsx2
* rename __rdtsc so I won't conflict with gnu version
* add a bunch of .data() method to get string data



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5913 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-23 09:57:01 +00:00
avihal@gmail.com 92487e2618 (Patch by KrossX): Fixed multitap - Part 2 - (e.g. Timesplitters), New: support raw PSX
memcards (mcd/mcr), Fixed issues with pad 2 (e.g. issue 1326).

These are changes which were left out at r5622, updated to pach v9 by KrossX from http://forums.pcsx2.net/Thread-Multitap-PCSX2 .

- Please report any issues with memcards corruption/incompatibilities here.
- Please feedback on multitap improvements here.

Thanks, KrossX! :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5703 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-19 13:43:33 +00:00
gregory.hainaut ba2ec6fe59 all: gcc warning clean round 4
* remove unused variable
* move static function from h into cpp
* Initialized hw_by_page to 0xFFFFFFFF instead of -1 (number must be a positive integer)
* Use a s32 fore m_current_lsn instead of u32 (use -1 as error code)
Bonus: a couple of fix for clang compiler (doesn't mean that it fully compile with clang)
* remove useless __debugbreak on linux
* use short for 16bits atomic function


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5695 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-03 18:42:05 +00:00
gabest11 811a3d96cc Fix for the v110_xp toolset in vs2012. Removed winuser.h from afxresmw.h, nothing seems to be using it, but it breaks something in string.h. I did not change the projects to use v110_xp by default, to get an xp compatible binary, you have to call it from command line like this: msbuild pcsx2_suite_2012.sln /t:Build "/p:Configuration=Release AVX2" /p:PlatformToolset=v110_xp /m. Change Configuration=... as needed.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5694 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-02 16:01:06 +00:00
gabest11@gmail.com c3ceac83f9 Missing file
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5693 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-01 21:32:44 +00:00
avihal@gmail.com 6bfcf433db (Patch by KrossX): Fixed multitap (e.g. Timesplitters), New: support raw PSX memcards (mcd/mcr), Fixed issues with pad 2 (e.g. issue 1326).
- Also, I slightly modified the default column widths at the memory card config panel.
- Tip: If the column widths are resized, the new widths will get saved after clicking OK/Apply, but NOT if clicking Cancel or closing the window with [X]. 

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5622 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-04-27 16:24:02 +00:00
gregory.hainaut 86a2f5a8ec gcc:
* Fix a couple of GCC warning
* Fix build with gcc4.8 (issue 1392)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5618 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-04-14 10:48:50 +00:00
gigaherz 4a27edc8a3 Revert previous mistake.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5487 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-12-28 01:44:32 +00:00
gigaherz d2f3b4a7fc async-iso: First iteration of the experimental read-ahead system.
In this iteration, a simple read-ahead scheme is used where the next expected read begins as soon as the CDVD code calls FinishRead.
The expected improvement is close to 0 since a similar system is already in place in the core.

The next iteration should have an internal buffer, and use completion callbacks to initiate read-aheads as soon as the previous read is done, without waiting for the emulator to fetch the results of the previous operation.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5486 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-12-28 01:42:39 +00:00
gigaherz 72372c2219 Make PCSX2 compile with Visual Studio 2012 (1/3): Workaround compiler differences that result in compile-time errors.
NOTE: The 'glew' project does NOT build yet, but it will have to be decided how to approach the problem (String literal too long in glew.rc)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5382 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-19 19:36:59 +00:00
avihal 42f3f9526f Fixed Issue 1311: UI percentage values sometimes save incorrectly to ini file.
All UI percentage values (framerates, zoom) are saved incorrectly when the number ends with 0n (e.g. 105 is saved as 150, 307 is saved as 370, etc). The problem becomes apparent when these values are loaded from the ini file after restarting pcsx2.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5369 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-14 07:15:27 +00: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
sudonim1@gmail.com 2e22e56b48 Fixed PGO builds, MSVC does not like inline asm for function calls.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5146 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-06 18:41:20 +00:00
gregory.hainaut 9264b7725c pcsx2: gcc 4.7 compilation fix
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5132 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-03-17 11:21:51 +00:00
gregory.hainaut 6a0953ab94 cmake: sparsehash moves header file in newer version! Detect the 2 include pathes and add a define. Fix issue 1222
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5117 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-03-06 19:42:59 +00:00