Commit Graph

8576 Commits

Author SHA1 Message Date
Gregory Hainaut
64e8e02f54 cmake: add Intel's ICC compiler support
Full of compilations errors and warnings
2016-07-28 10:36:40 +02:00
Jonathan Li
a9f9c1406c Merge pull request #1474 from turtleli/windows-64-bit-fixes
Windows 64-bit compile fixes
2016-07-28 00:19:04 +01:00
Gregory Hainaut
7fa55c39f1 Merge pull request #1479 from ssakash/custom_fixes
GSDX-TextureCache: Add proper rounding when unscaling texture size
2016-07-27 22:31:21 +02:00
Avi Halachmi (:avih)
cff8cb137c patches: simplify by unifying patches/cheats (effectively no-op)
patches and cheats are exactly the same (pnach style patch line) but we
stored two sets of them depending on their source: "patches" for
GameIndex.dbf patches, and "cheats" for all the rest (cheats, widescreen,
etc).

Unify patches and cheats and keep only "patches", cleanup and rename the
public API at Patch.h, and add documentation.

Also: add some console messages on invalid "place" value, and when we skip
searching cheats_ws.zip because a pnach file was found at cheats_ws dir.

Also: removed checks before applying different kinds of patches/cheats
because we don't need them (we didn't have disabled patches loaded anyway).

The checks removal _shouldn't_ have any effect, except that the checks were
wrong and accidentally prevented loading widescreen hacks which have a place
value of 0. No one probably noticed it since all the widescreen patches
which I looked at have a place value of 1. So now ws patches with place=0
would load correctly too. If we'll ever have such.
2016-07-27 18:15:17 +03:00
Avi Halachmi (:avih)
eb1e890278 patches/cheats: document "place" value and use it explicitly
This commit doesn't change any behavior, but documents the "places" value
of the patch structure ("place" is 1 in patch=1,... and 0 in patch=0,...)
and also uses an enum to make its use explicit.
2016-07-27 14:21:37 +03:00
Avi Halachmi (:avih)
67aee8a19c patches: reset also patches on VM restart
This should fully fix #851
2016-07-27 14:21:37 +03:00
Avi Halachmi (:avih)
56adb85a87 cheats: reset cheats when restarting the VM
If cheats are enabled and loaded (pnatch files from the cheats folder, or
from the cheats_ws folder, or from cheats_ws.zip), then they were still
applied for some time while rebooting the emulation after a game is already
loaded (e.g. start pcsx2, boot fast, play, boot full). This could cause
the reboot to fail if some patches were applied (e.g. widescreen patches).

It seems that the offending application of the cheats happens at
SysCoreThread::VsyncInThread(), which possibly runs before the config
change event is handled (and re-load the cheats for the current crc).

So reset/invalidate the cheats when the VM is reset.

This should improve issue #851, but ultimately not fully fix it, since
the patches (from games db) are not reset yet with this commit, and we
don't have a function to do so. For now the non-cheats patches are only
reset/reloaded when a configuration change is being handled.

It would probably be a good thing if we can unify patches/cheats.
2016-07-27 14:21:37 +03:00
Gregory Hainaut
d6383e6c21 Merge pull request #1472 from PCSX2/gsdx-gta-depth-issue-1457
Gsdx gta depth issue 1457
2016-07-26 18:40:53 +02:00
Akash
d3ebd4b318 GSDX-TextureCache: Add proper rounding when unscaling texture size
Fixes flickering issues on Dragon Ball Z Budokai Tenkaichi FMV's on custom resolution, might also help prevent some crashes on custom resolution.
2016-07-26 18:28:07 +05:30
ramapcsx2
c592ccb3e5 Merge pull request #1435 from ssakash/Custom_TextureCache
GSDX: Improve scaling of custom resolution
2016-07-26 14:07:19 +02:00
Gregory Hainaut
20aee23edc onepad: fix gcc warning
warning: comparison between signed and unsigned integer expressions
2016-07-26 09:27:57 +02:00
Gregory Hainaut
0937526aac onepad: handle correctly the release state of analog pad
Axe ranges from 0 to 255 but the release state value is 127 not 128.

close #243
2016-07-26 09:27:14 +02:00
Jonathan Li
77b9f2c15e pcsx2: Initialise g_Conf->Mcd[].Type
Fixes a valgrind warning. Folder memory cards are autodetected later, so
it's safe to set it to a file memory card.
2016-07-24 22:41:54 +01:00
Jonathan Li
dbf6b38a2e windows: Remove intrin_x86.h from solution
File was deleted recently.
2016-07-24 22:25:08 +01:00
Jonathan Li
38c802a4ef pcsx2:windows: Remove unused sampling profiler
Visual Studio has a much more powerful performance profiler which can do
the same task and more.
2016-07-24 21:42:53 +01:00
Jonathan Li
ed47dca8a1 x86emitter:windows: Make cpu detection/affinity 64-bit compatible
Use DWORD_PTR since that works on both 32-bit and 64-bit builds. And
remove some empty unused functions.

Fixes a 64-bit compilation issue.
2016-07-24 19:05:18 +01:00
Robert Neumann
b8c1fa9b43 Fix warning in dev9ghz 2016-07-23 15:58:37 +02:00
Jonathan Li
043d2926fa pcsx2:windows: Disable SuperVU for 64-bit builds
Doesn't compile. Not going to make this work either.
2016-07-23 10:52:10 +01:00
Jonathan Li
f04dfe43a8 utilities:windows: Restrict memcmp_mmx to 32-bits
Fixes a 64-bit compilation issue.
2016-07-23 10:52:09 +01:00
Jonathan Li
8387de09e2 pcsx2: Use _M_X86_64 for Baseblock static_assert ifdef
Fixes a 64-bit compilation issue.
2016-07-23 10:51:56 +01:00
Jonathan Li
ac7e7a79c3 utilities:windows: Remove memset32 assembly
It's unused, and it doesn't compile in 64 bits.
2016-07-23 02:21:21 +01:00
Jonathan Li
768ed80ece utilities:threading:windows: Use intrinsic pause
Fixes a 64-bit compile error.
2016-07-23 02:21:13 +01:00
Jonathan Li
f40b2e641b spu2-x:windows: Use INT_PTR for DialogProc return type
Fixes a 64-bit compile error.
2016-07-23 02:19:29 +01:00
Jonathan Li
5719bddbb5 gsdx:windows: Change m_colorspace to INT_PTR
Fixes a 64-bit compile error.
2016-07-23 02:19:28 +01:00
Gregory Hainaut
aea75f51bd gsdx tc: partial support of pseudo depth for Dx
Fix #1457 (GTA)

The game uses a depth format for a pure color buffer (cokes do ravage
in gaming industry)

However I'm really afraid that it migth break another effect in other games.
2016-07-22 20:38:46 +02:00
Gregory Hainaut
d58c07d697 onepad: init event struct
Might help to reduce valgrind warning
2016-07-22 20:27:54 +02:00
Gregory Hainaut
fa12743c8e debugger: fix another missing init
==18373== Conditional jump or move depends on uninitialised value(s)
==18373==    at 0x825CC9B: CtrlMemView::render(wxDC&) (CtrlMemView.cpp:277)
==18373==    by 0x825DA19: CtrlMemView::paintEvent(wxPaintEvent&) (CtrlMemView.cpp:138)
==18373==    by 0x81F3A5F: Pcsx2App::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) (AppMain.cpp:614)
==18373==    by 0x40BC50B: wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const (in /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0.2.0)
==18373==    by 0x426C654: wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (in /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0.2.0)
==18373==    by 0x426C752: wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (in /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0.2.0)

Reported by gcc too
2016-07-22 19:02:34 +02:00
Gregory Hainaut
5cf2688c0c common: remove useless x86_intrin.h
Yeah one less licence in the project :)
2016-07-22 18:47:51 +02:00
Gregory Hainaut
7d35e15fea Merge pull request #1444 from PCSX2/atomic-relax
Atomic relax
2016-07-22 18:36:02 +02:00
Gregory Hainaut
0f62bccb0b Merge pull request #1470 from ssakash/spu2_x_nitpicks
SPU2-X: Align GUI elements on debug dialog
2016-07-22 18:18:20 +02:00
Gregory Hainaut
9182a287e2 Merge pull request #1469 from PCSX2/valgrind-memleak
Valgrind memleak
2016-07-22 18:17:37 +02:00
Akash
8e2b19ada7 SPU2-X: Align GUI elements on debug dialog 2016-07-22 19:29:45 +05:30
Gregory Hainaut
55a408edad debugger: init resolvePointerStrings to a default value
Fix valgrind issue:

==3560== Conditional jump or move depends on uninitialised value(s)
==3560==    at 0x81F7949: CtrlRegisterList::OnDraw(wxDC&) (CtrlRegisterList.cpp:291)
==3560==    by 0x47826DE: wxAnyScrollHelperBase::HandleOnPaint(wxPaintEvent&) (in /usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==3560==    by 0x4785969: wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) (in /usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==3560==    by 0x426CA0E: wxEvtHandler::SafelyProcessEvent(wxEvent&) (in /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0.2.0)
==3560==    by 0x4710BAE: wxWindowBase::HandleWindowEvent(wxEvent&) const (in /usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
==3560==    by 0x44EF67D: wxWindow::GTKSendPaintEvents(_GdkRegion const*) (in /usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0)
2016-07-22 10:13:54 +02:00
Jonathan Li
fee374b0e9 Merge pull request #1462 from turtleli/tidy-vs-projects
Tidy Visual Studio project files
2016-07-22 00:30:52 +01:00
Jonathan Li
259a39ef0c windows: Update VS solution configurations
Use portaudio devel build for devel config - it fixes a warning that
occurs due to incompatible linker settings (incremental vs whole program
optimisation)

Also add 64-bit configurations.
2016-07-21 23:59:41 +01:00
Gregory Hainaut
53a70d9018 onepad: use modal dialog instead of frame
Avoid various pitfall such as #1387

v2:
* use stack object
2016-07-21 09:51:16 +02:00
Gregory Hainaut
1e3c46a6bb gsdx ogl: purge debug message in destructor
Allow to see latest error and avoid noise in Valgrind log
2016-07-21 09:51:16 +02:00
Gregory Hainaut
b6a55f50ab gsdx ogl: fully initialise PSConstantBuffer structure 2016-07-21 09:51:16 +02:00
Gregory Hainaut
b322ef286e CDVD: initialize a temporary buffer
I'm not sure to understand why Valgrind reports it as we populate the buffer
during the ReadAsync. Maybe Valgrind doesn't like async IO from the kernel.

In doubt, the init will avoid those warnings

==19897== Thread 6 EE Core:
==19897== Conditional jump or move depends on uninitialised value(s)
==19897==    at 0x80FE9E1: BlockdumpFileReader::DetectBlockdump(AsyncFileReader*) (BlockdumpFileReader.cpp:40)
==19897==    by 0x8109EE5: InputIsoFile::Open(wxString const&, bool) (InputIsoFile.cpp:229)
==19897==    by 0x810939E: ISOopen(char const*) (CDVDisoReader.cpp:57)
==19897==    by 0x810194E: DoCDVDopen() (CDVDaccess.cpp:359)
==19897==    by 0x80B651C: SysCorePlugins::OpenPlugin_CDVD() (PluginManager.cpp:1219)
2016-07-21 09:51:16 +02:00
Gregory Hainaut
3c0a97354c pcsx2:linux: leaking allocation isn't necessary 2016-07-21 09:51:15 +02:00
Gregory Hainaut
8b91aefd49 gui: add a destructor to CtrlRegisterList object
So we can free allocated memory
2016-07-21 09:51:15 +02:00
Gregory Hainaut
11e5fe8879 pcsx2 gui: fix a pseudo memory leak on SavestateEntryPack
It is a pseudo leak as it is a global object. Nevertheless it pollutes
the valgrind log.

v2:
* use an array of unique pointer
* use ArraySize instead of a constant
2016-07-21 09:50:28 +02:00
trostboot
dbda9292d8 Add EE clamp modes for Shadow Hearts (#1463)
GameDB: Full EE clamping is required in Shadow Hearts for characters to appear correctly in
various scenes throughout the game.
2016-07-20 11:56:10 +01:00
Jonathan Li
e271932f41 bin2cpp: Tidy VS project
Group common properties. This removes some of the optimisation
properties, which aren't really essential since bin2cpp is only used as
a tool to convert images to header files.
Add 64-bit configurations.
2016-07-19 23:25:12 +01:00
Jonathan Li
e25e8bc580 plugins: Tidy/standardise VS projects
Combine all the different configurations together so the project files
are more generic and maintainable.

Also standardise the layout so all the project files will be similar and
all have the same standard elements (even if empty).

Add 64-bit configurations.

Additional specifics:
spu2-x: FLOAT_SAMPLES preprocessor definition removed since it's unused.
2016-07-19 23:25:12 +01:00
Jonathan Li
f8605dda61 common|pcsx2: Tidy/standardise VS project
Combine all the different configurations together so the project files
are more generic and maintainable.

Also standardise the layout so all the project files will be similar and
all have the same standard elements (even if empty).

Add 64-bit configurations.
2016-07-19 23:25:12 +01:00
Jonathan Li
97e268e5a5 3rdparty: Tidy/standardise VS projects
Combine all the different configurations together so the project files
are more generic and maintainable.

Also standardise the layout so all the project files will be similar and
all have the same standard elements (even if empty).

Add 64-bit configurations.

Additional specifics:
wxWidgets: Common stuff into the property sheets.
pthreads: Fixes the LNK4068 warning.
portaudio: Devel config added.
libjpeg: Non-existent file removed.

Side note: libjpeg is barely used - wxWidgets uses it but doesn't have
to, ZeroGS uses it but we don't develop that anymore.
2016-07-19 23:25:12 +01:00
Jonathan Li
7c3cee0624 spu2-x: Rearrange lowpass.cpp header order
It allows VS to use the precompiled header for that file too.
2016-07-19 23:25:12 +01:00
Jonathan Li
296ef4184f 3rdparty: Use SolutionDir instead of SvnRootDir in property sheet
It's part of Visual Studio, and more importantly, I don't need to
specify a build output directory in the libpng project file.
2016-07-19 23:25:12 +01:00
Jonathan Li
7277074d9e windows: Fix incremental linking property sheet
Don't use "-dbg" target suffix - both Devel and Debug builds use the
property sheet, so it's incorrect.

Also don't set optimise references to false - it's incompatible with
incremental linking and causes compile failures.
2016-07-19 23:25:12 +01:00