Commit Graph

9150 Commits

Author SHA1 Message Date
Robert Neumann fd58ee6289 psxmode: disabled a PGIF ringbuffer memset, added comments 2016-09-28 16:18:59 +02:00
Gregory Hainaut c272359f20 Merge pull request #1550 from PCSX2/gsdx-dual-context-clut
gsdx state: TEX0 write behavior might depends on the context
2016-09-27 12:06:17 +02:00
Gregory Hainaut b34243fa7b gsdx state: TEX0 write behavior might depends on the context
Game: harley davidson
* write tex0 ctx0
* write tex0 ctx1
* draw  ctx 0

Previous GSdx behavior will load the clut every write of TEX0. In the
above case the draw will take the wrong clut.

To be honest, it could be a wrong emulation on the EE core emulation.
The hardware likely got a single clut (1KB cache is quite expensive)
So clut loading must be skipped if the context is wrong.

Next draw will use the ctx1 clut so I apply TEX0 when the context is switched

Please test harley davidson :)

v2: detect context switch from UpdateContext function
V3: always set m_env.CTXT[i].offset.tex, avoid crash (Thanks to FlatOutPS2 that spot the issue)
V4: move bad psm correction code (rebase put it in the wrong place)
2016-09-27 10:04:09 +02:00
Gregory Hainaut e0961d81a0 gsdx HW: use after free crash
Free bt
3 0xe676d194 in ~Source ../plugins/GSdx/GSTextureCache.cpp:1526
4 0xe676d194 in GSTextureCache::SourceMap::RemoveAt(GSTextureCache::Source*) ../plugins/GSdx/GSTextureCache.cpp:1990
5 0xe676f0fe in GSTextureCache::IncAge() ../plugins/GSdx/GSTextureCache.cpp:1022

Use bt
0 0xe6772a83 in GSTextureCache::LookupSource(GIFRegTEX0 const&, GIFRegTEXA const&, GSVector4i const&) ../plugins/GSdx/GSTextureCache.cpp:204
1 0xe66b0c9f in GSRendererHW::Draw() ../plugins/GSdx/GSRendererHW.cpp:579
2 0xe66fb43e in GSState::FlushPrim() ../plugins/GSdx/GSState.cpp:1509

Hypothesis the m_map array of list contains an invalid pointer
It is populated GSTextureCache::SourceMap::Add based on the coverage. The coverage is based on the offset.
So offset is potentially wrong. As mipmap code hack the offset value. It would be a nice culprit.

This commit avoids a potential bad transition between MIPMAP (which
overwrite the "offset") and the base layer (which wrongly keep an old "offset")

Conclusion, pray for my soul as it is very hard to reproduce
2016-09-26 20:34:38 +02:00
Gregory Hainaut 04d82d8127 gsdx: size doesn't count but 0.625 might change your life :p 2016-09-26 19:42:07 +02:00
Gregory Hainaut be9995bd1e gsdx mipmap: improve robustness to avoid potential crash 2016-09-26 09:27:03 +02:00
Jonathan Li 43f5b5e2a6 3rdparty: Update wxWidgets to latest wx3.0.x branch
Fixes a whole bunch of warnings.

Updated to revision d77661c73bf6f9668077ac5a85b4854a1a2204ee.
2016-09-25 21:19:07 +01:00
Gregory Hainaut ebb2a8ad5a gsdx debug: Add DISABLE_WIP_ASSERTION
To easily disable assertion on codes that only require investigation
2016-09-25 20:00:51 +02:00
Gregory Hainaut ca4f265ce6 gsdx debug: dump mipmap register could be useful now :) 2016-09-25 20:00:51 +02:00
Robert Neumann 013940250b psxmode: color for mdec please! ;p 2016-09-25 19:55:44 +02:00
ramapcsx2 fdf5e7ab2a Merge pull request #1583 from PCSX2/ramapcsx2-psx-mode
PCSX2 rudimentary supports PlayStation 1 games now. Many thanks to user Wisi on the assemblergames.com forums. He researched and wrote the essential missing piece; The PGIF device!
Note: To use this in any form, SPU2-X needs to be fixed. ZeroSPU2 can be used to boot games for now, but without sound.
2016-09-25 12:51:29 +02:00
Gregory Hainaut ef9a144437 gsdx hw: extra trick for the mipmap
Ratchet & Clank (the third) uses an address of 0 for invalid mipmap.

It would be very awkward to put the middle layer of texture in start of
memory. So let's use this information to correct the lod.

It make the game more robust on the lod rounding
2016-09-25 11:54:00 +02:00
Gregory Hainaut 78b2848622 gsdx: factorize the TEX0 generation for mipmap 2016-09-25 11:51:48 +02:00
Gregory Hainaut ccd9ce1728 gsdx hack: move tales of legendia hack to full move
Also remove the OI hack which is handled by the generic double half clear
2016-09-25 10:17:08 +02:00
Gregory Hainaut e229dc1549 gsdx hack: move Resident Evil 4 to full level
The CRC hack removes the fog, without the hack the screen turns green with D3D,, but the fog emulates correctly on OGL with hardware depth.
2016-09-25 10:13:21 +02:00
Gregory Hainaut 307c4a22ed Merge pull request #1579 from PCSX2/gsdx-generic-double-half-clear
Gsdx generic double half clear
2016-09-25 10:09:24 +02:00
Gregory Hainaut ad8a84a532 gsdx hw: reduce hack of Spyro series
Based on the comment, it ought to be fixed with previous commit.
2016-09-25 10:08:55 +02:00
Gregory Hainaut 7f871b0cc6 gsdx hw: remove various CRC hack that ought to be fixed with previous commit
* SpidermanWoS
* TyTasmanianTiger
* TyTasmanianTiger2
* DigimonRumbleArena2
* XmenOriginsWolverine
* CallofDutyFinalFronts
* GoW2 (only in openGL)
2016-09-25 10:08:54 +02:00
Gregory Hainaut 1e343084e2 gsdx hw: group the double half clear with gs mem clear hack
It avoid redundant check of the GS context

You can disable the extra clear with UserHacks_DisableGsMemClear = 1
2016-09-25 10:08:54 +02:00
Gregory Hainaut 6c6ed5f443 gsdx ogl: trigger the special RW framebuffer shader when only Alpha is written (#1588)
* gsdx ogl: trigger the special RW framebuffer shader when only Alpha is written

It will work for both Jak and Ratchet&Clank and without CRC
2016-09-25 10:05:44 +02:00
Robert 5e460c57f8 psxmode: add all the rest on core side. psx mode works now.
- include a small game exe detection so pcsx2 doesn't believe it's running the bios
- cdrom.cpp has a hack to account for pcsx2's wrong iop dma timing when mixing mdec and cdrom dmas. This should be properly fixed for the benefit of all ps2 / psx software!
- dmasif2 is disabled since pgpu already handles it
2016-09-24 20:11:32 +02:00
Robert 277b8f3503 psxmode:EE: Plug SBUS PGIF register
v2: improve code integration
v3: fix conflict between sif2/pgif code
2016-09-24 20:11:32 +02:00
Robert 43e8796b2c psxmode:IOP: Init mdec and pgif 2016-09-24 20:11:32 +02:00
Robert 4047e34050 psxmode:IOP: plug in hardware read / write handlers for PGIF and MDEC
v2:
* Update sioRead8() to read a single byte  and add a comment on it
* Better code integration IOP REG

v3:
* only log the bad 16 bit access
2016-09-24 20:11:16 +02:00
Robert 35fa20d965 psxmode: changes to sio that allow psx pads to work 2016-09-24 20:08:46 +02:00
Robert 95be7cf505 build: cmake/MSVC add mdec.cpp/h files 2016-09-24 20:08:46 +02:00
Robert Neumann f22a8126ed psxmode: prepare mdec 2016-09-24 20:08:46 +02:00
Robert Neumann 236c0c78c3 psxmode:MDEC: use dedicated MDEC_LOG 2016-09-24 20:08:46 +02:00
Robert Neumann 58fe959f85 build: cmake/MSVC add the 2 new files 2016-09-24 20:08:46 +02:00
Robert 280b036b91 psxmode: add PGPU.cpp/h code by user wise on the assemblergames.com forums. 2016-09-24 20:08:45 +02:00
Gregory Hainaut 6e2bf98d5f gsdx hw: round mipmap lod value
Will avoid some corruption based on distance/angle
2016-09-24 20:05:39 +02:00
Gregory Hainaut 719982e4a3 gsdx hw: forget to update a parameter
OMG, fixes various mipmap issues
2016-09-24 18:57:47 +02:00
Gregory Hainaut 76494e5f9c gsdx hw: add an userhack for hw mipmap 2016-09-24 12:39:31 +02:00
Gregory Hainaut e38aba0dff gsdx: rename SW texture dump filename
* Use texraw for the unconverted texture (keep index fmt)
  => avoid bad filename order with the multiple texture layers
* add the real mipmap address
* Use a nice string format
2016-09-24 09:15:40 +02:00
Gregory Hainaut f26842faa7 Of course I screwed up in the rebase!
It is a shame!
2016-09-23 18:08:51 +02:00
Gregory Hainaut 816e38db8e Merge branch 'pcsx2-gif-fifo' 2016-09-23 17:50:55 +02:00
refractionpcsx2 2734f53a79 GIF: Implement GIF FIFO on GIF MFIFO mode.
-Removed some obsolete code
-Tiny optimisation for the gifUnit
-Fixed a tiny bug on GIF MFIFO
2016-09-23 17:48:13 +02:00
refractionpcsx2 71601b88ff Fix & symbols in GameFixesPanel 2016-09-23 17:41:48 +02:00
refractionpcsx2 97a8cc7ce5 PCSX2/GameDB: Savestate version bump, Added GIFFIFO entries to GameDB
-RE Savestate version: Sorry, not sorry ;)
2016-09-23 17:41:48 +02:00
refractionpcsx2 0b83b849e7 GIF: Implement GIF FIFO - Enabled as hack as it is slow
-Fixes DJ Hero, Wallace & Gromit (properly), Hot Wheels (closer)
2016-09-23 17:41:48 +02:00
Gregory Hainaut d89b09427f gsdx: gl logging is only available in MTGS thread
Fix crash in debug build
2016-09-22 17:54:44 +02:00
Gregory Hainaut b00ae974d2 gsdx ogl: fix bad interaction between accurate blending and geometry shader
Recent optimization allow to use triangle to render sprite even when gs is supported

close #1574
2016-09-20 09:30:24 +02:00
Jonathan Li c64e8f944e cdvdgigaherz: Fix printf sign mismatch warnings
Fixes warning C6340: printf sign mismatch

Only remaining warnings for cdvdGigaherz (using level 4 warning
settings) are:
C6258: TerminateThread does not allow proper thread clean up
C4201: nonstandard extension used: nameless struct/union (from the
lo/hi u128 struct in common/include/Pcsx2Types.h)
2016-09-20 01:24:23 +01:00
Jonathan Li 57d029f34a cdvdgigaherz: Use INT_PTR for dialog handler return type
BOOL is not the correct return type (though it works for 32-bit).
2016-09-20 01:23:47 +01:00
Jonathan Li 0ca36e8943 cdvdgigaherz: Fix value truncation warnings
Fixes warning C4244: conversion to smaller data type, possible loss of
data.
2016-09-20 00:47:15 +01:00
Jonathan Li a61aa8ff0b cdvdgigaherz: Remove unreachable return
Fixes warning C4702: unreachable code
2016-09-20 00:46:33 +01:00
Jonathan Li 49cd751acf format-check: enable checking cdvdGigaherz 2016-09-19 19:53:06 +01:00
Clang Format 2967d5d3f1 cdvdgigaherz: Reformat with clang-format 2016-09-19 19:53:00 +01:00
Jonathan Li 60da39712c cdvdgigaherz: Remove unused code/macros/variables/etc
The SPTI code is unused, and it's simpler to just use the Windows
ioctls/API if they work (only raw disk sector reading is an issue and
the SPTI workaround is already in place).
2016-09-19 19:50:55 +01:00
Avi Halachmi (:avih) 52fbfdc5ab Revert most of "Updated some entries in the GameIndex (#1487)"
This reverts commit 07d54587 except for the updates of SCUS-97150 (Formula
One 2001 NTSC-U) - where we have a record of compatibility 5, and also
there's an agreement that the patch is not required anymore since ad61503 .

The reverted compatibility values are because we don't have any kind of
records to support them, no one tested them, and they also don't appear at
our online compatibility list.
2016-09-19 20:47:08 +03:00