there was already code for this, but it was broken due to:
- the message is WM_SYSCOMMAND and wParam is SC_SCREENSAVE etc.
- GSPanel doesn't get WM_SYSCOMMAND - GSFrame does.
- also disabled screen saver while paused if not set to hide the GS window.
- it's an ugly hack where windows keeps trying to activate the screen saver
every few seconds but such code prevents it (Lilypad has the same hack).
the new code uses windows API which was designed for this.
the screen saver is now disabled while the window is focused and the emulation
is running. it's on by defauly and without GUI - the same as with normal games.
this patch addresses Windows only, but adds a placeholder for future
implementations for other platforms.
Performance is not important here. I'm not sure Windows could handle VLA
* new/delete can still be used otherwise.
* Put an assert(0) because debugger surely don't use string bigger than
128 bytes.
code is much more compact 20 lines vs 700 lines ...
builds an Utilies_NO_TLS.a archive of the common Utilities code. It replaces native TLS by a slower reimplementation
Rational: number of TLS slot is very limited by the GLIBc on linux. I hope it doesn't impact performance.
* Zzogl don't requires TLS AFAIK
* spu2x will likely use it for assertions only.
TLS exhaustion creates issue to dlopen plugins
issue #384 : https://github.com/PCSX2/pcsx2/issues/384
But also for profiled build (-fprofile-generate)
http://forums.pcsx2.net/Thread-WORKAROUND-build-with-fprofile-generate
If someone have a better idea, please raise your hand!
The non-stdint fallback was not even working which shows that it was never used. No supported platform would not have stdint anyway.
Remove unused code and do not restrict types to Linux and MSVC. Was there a reason for this?
* 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
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.
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.
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.
* 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
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.
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
* 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
* 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
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
* 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
- 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
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
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
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
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
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
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
* Gsopen2 support for GS plugins => Support of the PCSX2 GS window configuration panel. Support of all PCSX2 shortcut.
* new shortcut: shift-f12 to stole the input. ZZogl shortcut must be prefixed with ctrl
* onepad: Support/fix/improve of configuration gui, multiple key, mouse/wiimote for analog joystick, dualshock3/sixaxis (basic), dual pad and experimental forcefeedback
Note: it is advices to delete OnePAD.ini
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4731 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
Details:
The major differences between install and portable modes should now be:
1. Portable mode doesn't use the registry at all.
2. Portable mode uses the folders inside pcsx2 folder as default (install mode has some default at "my documents").
3. Portable mode tries to save relative paths at the ini file where possible*.
Specifically, portable mode now allows to select custom folders for plugins, bios, etc via the standard UI, which allows using several portable pcsx2 folder sharing the same resources (bios, iso, memcards, etc).
* Relative paths where possible = the following sequence (thanks to pseudonym for the brilliant idea):
1. If the file/folder is inside pcsx2 folder, it's saved as completely relative (to pcsx2.exe)
2. Else, if the file/folder is at the same drive as pcsx2.exe, it's saved as absolute path without the drive letter (e.g. /ISO/...)
3. Else, saved as absolute path, including the drive letter (for linux, without drive letter naturally).
This allows to create a removable drive with (one or more) pcsx2 folder on it, configure all the files/folders to point to the same drive (ISOs, save states, etc), and then take this drive, plug it into another computer (where it will be assigned with a different drive letter), and everything will continue working.
Please test it if you can. Bugs here can be inconvenient...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4507 96395faa-99c1-11dd-bbfe-3dabce05a288
* PCSX2 now splits settings into two files: pcsx2-ui.ini and pcsx2-vm.ini. The former is user interface clutter (window positions, confirmation dialogs, etc). The latter is virtual machine settings, speed hacks, game fixes, etc.
* Added support for PORTABLE INSTALLS!! Portable install is currently manually enabled by adding an empty "pcsx2-portable.ini" to the install location of PCSX2. Portable installs should run seamlessly from any flash drive, etc. (and will usually need Admin rights)
* PCSX2 install location and plugins folders are stored in the registry now (unless portable install is enabled, in which case no registry is used).
Notes:
* A button to enable portable installs from within PCSX2 is planned.
* NSIS installer will hopefully be upgraded to allow for a portable install option as well.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4198 96395faa-99c1-11dd-bbfe-3dabce05a288
* 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
* A couple i18n fixes listed in Issue 915, relating to dialog message formatting for a couple specific messages.
DevNote:
* Added some missing operator+() stuff for the pxsFmt string formatter.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4160 96395faa-99c1-11dd-bbfe-3dabce05a288
* Simplified and improved (slightly) the savestate memory cleanup on error/cancellation.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4158 96395faa-99c1-11dd-bbfe-3dabce05a288