Compare commits

...

13 Commits

Author SHA1 Message Date
Stenzek
7b8f9a54ec GS/HW: Purge FFX-2 depth clear CRC hack 2023-02-11 15:26:04 +00:00
JordanTheToaster
28980af858 GameDB: Port COP2 patch for Disneys Cars
Ports patch to fix broken collisions to PAL Disney's Cars
2023-02-11 15:24:23 +00:00
Stenzek
80dce398e0 GS/HW: Carefully allow move to create new targets
Xenosaga I does a move from BP 1C00 to E00, then from E00 to 2A00 a few
frames later for its cutscene transitions. 2A00 then gets used as a
texture and blended on top of the later frames. Because there's no
target at 2A00, the move falls back to the CPU, and E00 contains junk
which gets moved and eventually preloaded instead.

Gradius V uses moves for a screen move/wobble-like effect, by moving
chunks of the framebuffer out, then using those as a texture. It's not
broken at the moment, but it does readback (slow), and break upscaling.
2023-02-11 07:16:19 +00:00
TheTechnician27
06db8eec48 Context.cpp: fix minor typo 2023-02-11 06:46:44 +00:00
Stenzek
9c720efe46 GS/OGL: Fix possible crash downloading odd texture sizes 2023-02-11 06:43:20 +00:00
refractionpcsx2
cbf91a8d19 GS-HW: Tighten CLUT detection slightly. 2023-02-11 02:07:01 +00:00
TheTechnician27
f99414708d Readme: Two minor changes to the README (#8105) 2023-02-11 00:00:25 +00:00
refractionpcsx2
9549a6b16a GS: Fix TME processing when Alpha->IsBlack & !TEX0->TCC 2023-02-10 23:48:43 +00:00
lightningterror
3206094545 GameDB: Add full mipmap and trilinear ps2 to Hard Hitter games.
Improves ground texture rendering.
2023-02-10 22:24:33 +01:00
Stenzek
5cfae80701 GL/OpenGL: Add a hidden [EmuCore/GS] DisableGLDownloadPBO option
.. to disable the use of PBOs when reading back.
2023-02-10 14:38:21 +00:00
JordanTheToaster
b4d140c6bb GameDB: Fixes for 187 Ride or Die
Add autoflush to soften bloom and HPO Special Texture to fix misaligned bloom.
2023-02-10 14:15:51 +00:00
Stenzek
c65eb3c3ee GS/HW: Fix crash with AVX2 due to unaligned pitch 2023-02-10 14:15:33 +00:00
Mrlinkwii
eec0984dbe Gamedb: remove skipdraw from Need for Speed - Undercover 2023-02-10 14:47:52 +01:00
10 changed files with 78 additions and 63 deletions

View File

@@ -36,10 +36,10 @@ _Note: Recommended GPU is based on 3x Internal, ~1080p resolution requirements.
### Technical Notes
- You need the [Visual C++ 2019 x64 Redistributables](https://support.microsoft.com/en-us/help/2977003/) to run PCSX2.
- You need the [Visual C++ 2019 x64 Redistributables](https://support.microsoft.com/en-us/help/2977003/) to run PCSX2 on Windows.
- Windows XP and Direct3D9 support was dropped after stable release 1.4.0.
- Windows 7, Windows 8.0, and Windows 8.1 support was dropped after stable release 1.6.0.
- 32-bit and wxwidgets support was dropped after stable release 1.6.0, with the wxwidgets code being removed completely on 25th December 2022.
- 32-bit and wxWidgets support was dropped after stable release 1.6.0, with the wxWidgets code being removed completely on 25th December 2022.
- Make sure to update your operating system and drivers to ensure you have the best experience possible. Having a newer GPU is also recommended so you have the latest supported drivers.
- Because of copyright issues, and the complexity of trying to work around it, you need a BIOS dump extracted from a legitimately-owned PS2 console to use the emulator. For more information about the BIOS and how to get it from your console, visit [this page](pcsx2/Docs/PCSX2_FAQ.md#question-13-where-do-i-get-a-ps2-bios).
- PCSX2 uses two CPU cores for emulation by default. A third core can be used via the MTVU speed hack, which is compatible with most games. This can be a significant speedup on CPUs with 3+ cores, but it may be a slowdown on GS-limited games (or on CPUs with fewer than 2 cores). Software renderers will then additionally use however many rendering threads it is set to and will need higher core counts to run efficiently.

View File

@@ -9392,6 +9392,9 @@ SLED-53512:
SLED-53537:
name: "187 - Ride or Die [Demo]"
region: "PAL-E"
gsHWFixes:
autoFlush: 1 # Softens bloom on objects and cars.
halfPixelOffset: 2 # Fixes misalgined bloom on objects and cars.
SLED-53673:
name: "007 - From Russia with Love [Demo]"
region: "PAL-E"
@@ -10800,6 +10803,9 @@ SLES-50632:
SLES-50636:
name: "Centre Court - Hard Hitter"
region: "PAL-M3"
gsHWFixes:
mipmap: 2 # Improves ground texture rendering.
trilinearFiltering: 1
SLES-50637:
name: "Pro Rally 2002"
region: "PAL-M5"
@@ -11749,6 +11755,9 @@ SLES-51056:
SLES-51057:
name: "Hard Hitter 2"
region: "PAL-M3"
gsHWFixes:
mipmap: 2 # Improves ground texture rendering.
trilinearFiltering: 1
SLES-51058:
name: "Maken Shao - Demon Sword"
region: "PAL-E"
@@ -14327,6 +14336,9 @@ SLES-52276:
name: "187 - Ride or Die"
region: "PAL-M5"
compat: 5
gsHWFixes:
autoFlush: 1 # Softens bloom on objects and cars.
halfPixelOffset: 2 # Fixes misalgined bloom on objects and cars.
SLES-52277:
name: "Riding Spirits 2"
region: "PAL-M5"
@@ -15519,7 +15531,7 @@ SLES-52745:
region: "PAL-M4"
SLES-52746:
name: "Hugo - Cannon Cruise"
region: "PAL-M4"
region: "PAL-SC"
SLES-52747:
name: "Dukes of Hazzard, The - The Return of General Lee"
region: "PAL-E"
@@ -15705,7 +15717,7 @@ SLES-52816:
cpuCLUTRender: 1 # Fixes duplicated post processing.
SLES-52820:
name: "Incredibles, The"
region: "PAL-M4"
region: "PAL-SC"
gsHWFixes:
halfPixelOffset: 1 # Fixes offset post processing.
cpuCLUTRender: 1 # Fixes duplicated post processing.
@@ -18815,7 +18827,14 @@ SLES-54013:
region: "PAL-E"
SLES-54015:
name: "Disney-Pixar's Cars"
region: "PAL-M3"
region: "PAL-SC"
patches:
B36778F5:
content: |-
author=refraction ported by jordanthetoast
// COP2 Rearrangement. Fixes broken collisions.
patch=1,EE,00203df8,word,484e9000
patch=1,EE,00203dfc,word,4bdbd9ff
SLES-54016:
name: "AND 1 Streetball"
region: "PAL-M5"
@@ -22231,37 +22250,27 @@ SLES-55349:
region: "PAL-E"
gsHWFixes:
halfPixelOffset: 2 # Fixes blurriness.
skipDrawStart: 1 # Removes even more blurriness and garbage texture like on top left.
skipDrawEnd: 1 # Removes even more blurriness and garbage texture like on top left.
SLES-55350:
name: "Need for Speed - Undercover"
region: "PAL-F-G"
gsHWFixes:
halfPixelOffset: 2 # Fixes blurriness.
skipDrawStart: 1 # Removes even more blurriness and garbage texture like on top left.
skipDrawEnd: 1 # Removes even more blurriness and garbage texture like on top left.
SLES-55351:
name: "Need for Speed - Undercover"
region: "PAL-I-S"
gsHWFixes:
halfPixelOffset: 2 # Fixes blurriness.
skipDrawStart: 1 # Removes even more blurriness and garbage texture like on top left.
skipDrawEnd: 1 # Removes even more blurriness and garbage texture like on top left.
SLES-55352:
name: "Need for Speed - Undercover"
region: "PAL-M4"
compat: 5
gsHWFixes:
halfPixelOffset: 2 # Fixes blurriness.
skipDrawStart: 1 # Removes even more blurriness and garbage texture like on top left.
skipDrawEnd: 1 # Removes even more blurriness and garbage texture like on top left.
SLES-55353:
name: "Need for Speed - Undercover"
region: "PAL-M6"
gsHWFixes:
halfPixelOffset: 2 # Fixes blurriness.
skipDrawStart: 1 # Removes even more blurriness and garbage texture like on top left.
skipDrawEnd: 1 # Removes even more blurriness and garbage texture like on top left.
SLES-55354:
name: "Shin Megami Tensei - Persona 3 FES"
region: "PAL-E"
@@ -23238,6 +23247,9 @@ SLKA-15011:
SLKA-15013:
name: "Grand Slam 2003 Tennis" # Hard Hitter 2
region: "NTSC-K"
gsHWFixes:
mipmap: 2 # Improves ground texture rendering.
trilinearFiltering: 1
SLKA-15015:
name: "Ichigeki Sacchuu!! HoiHoi-San"
region: "NTSC-K"
@@ -24709,8 +24721,6 @@ SLPM-55127:
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 2 # Fixes blurriness.
skipDrawStart: 1 # Removes even more blurriness and garbage texture like on top left.
skipDrawEnd: 1 # Removes even more blurriness and garbage texture like on top left.
SLPM-55131:
name: "World Soccer Winning Eleven 2009"
region: "NTSC-J"
@@ -24905,8 +24915,6 @@ SLPM-55244:
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 2 # Fixes blurriness.
skipDrawStart: 1 # Removes even more blurriness and garbage texture like on top left.
skipDrawEnd: 1 # Removes even more blurriness and garbage texture like on top left.
SLPM-55245:
name: "Himawari - Pebble in the Sky"
region: "NTSC-J"
@@ -35642,6 +35650,9 @@ SLPS-20097:
SLPS-20098:
name: "Magical Sports - Hard Hitter"
region: "NTSC-J"
gsHWFixes:
mipmap: 2 # Improves ground texture rendering.
trilinearFiltering: 1
SLPS-20099:
name: "Dream Audition 3"
region: "NTSC-J"
@@ -35793,6 +35804,9 @@ SLPS-20171:
SLPS-20173:
name: "Magical Sports - Hard Hitter 2"
region: "NTSC-J"
gsHWFixes:
mipmap: 2 # Improves ground texture rendering.
trilinearFiltering: 1
SLPS-20174:
name: "Typing Renai Hakusho - Boys Be... [with Keyboard]"
region: "NTSC-J"
@@ -43196,6 +43210,9 @@ SLUS-20567:
SLUS-20568:
name: "Hard Hitter Tennis"
region: "NTSC-U"
gsHWFixes:
mipmap: 2 # Improves ground texture rendering.
trilinearFiltering: 1
SLUS-20569:
name: "All-Star Baseball 2004"
region: "NTSC-U"
@@ -45938,6 +45955,9 @@ SLUS-21116:
name: "187 - Ride or Die"
region: "NTSC-U"
compat: 5
gsHWFixes:
autoFlush: 1 # Softens bloom on objects and cars.
halfPixelOffset: 2 # Fixes misalgined bloom on objects and cars.
SLUS-21117:
name: "World Soccer - Winning Eleven 8 - International"
region: "NTSC-U"

View File

@@ -119,7 +119,7 @@ namespace GL
if (!context)
return nullptr;
Console.WriteLn("Created a %s context", context->IsGLES() ? "OpenGL ES" : "OpenGL");
Console.WriteLn("Created an %s context", context->IsGLES() ? "OpenGL ES" : "OpenGL");
// NOTE: Not thread-safe. But this is okay, since we're not going to be creating more than one context at a time.
static Context* context_being_created;

View File

@@ -24,15 +24,6 @@ const CRC::Game CRC::m_games[] =
{
// Note: IDs 0x7ACF7E03, 0x7D4EA48F, 0x37C53760 - shouldn't be added as it's from the multiloaders when packing games.
{0x00000000, NoTitle /* NoRegion */},
{0x9AAC5309, FFX2 /* EU */},
{0x9AAC530C, FFX2 /* FR */},
{0x9AAC530A, FFX2 /* ES */},
{0x9AAC530D, FFX2 /* DE */},
{0x9AAC530B, FFX2 /* IT */},
{0x48FE0C71, FFX2 /* US */},
{0x8A6D7F14, FFX2 /* JP */},
{0xE1FD9A2D, FFX2 /* JP */}, // int.
{0x11624CD6, FFX2 /* KO */},
{0x08C1ED4D, HauntingGround /* EU */},
{0x2CD5794C, HauntingGround /* EU */},
{0x867BB945, HauntingGround /* JP */},

View File

@@ -23,7 +23,6 @@ public:
enum Title : u32
{
NoTitle,
FFX2,
GetawayGames,
HauntingGround,
ICO,

View File

@@ -1486,8 +1486,9 @@ void GSRendererHW::Draw()
}
}
TextureMinMaxResult tmm;
const bool process_texture = PRIM->TME && !(PRIM->ABE && m_context->ALPHA.IsBlack() && !m_context->TEX0.TCC);
// Disable texture mapping if the blend is black and using alpha from vertex.
if (PRIM->TME && !(PRIM->ABE && m_context->ALPHA.IsBlack() && !m_context->TEX0.TCC))
if (process_texture)
{
GIFRegCLAMP MIP_CLAMP = context->CLAMP;
GSVector2i hash_lod_range(0, 0);
@@ -1607,7 +1608,7 @@ void GSRendererHW::Draw()
if (!no_ds)
ds = m_tc->LookupTarget(TEX0, t_size, GSTextureCache::DepthStencil, context->DepthWrite(), 0, false, 0, 0, preload);
if (PRIM->TME)
if (process_texture)
{
GIFRegCLAMP MIP_CLAMP = context->CLAMP;
@@ -4025,8 +4026,8 @@ GSRendererHW::CLUTDrawTestResult GSRendererHW::PossibleCLUTDraw()
(PRIM->TME && ((m_regs->DISP[0].DISPFB.Block() == m_context->TEX0.TBP0) || (m_regs->DISP[1].DISPFB.Block() == m_context->TEX0.TBP0)) && !(m_mem.m_clut.IsInvalid() & 2)))
return CLUTDrawTestResult::NotCLUTDraw;
// Ignore recursive/shuffle effects, but possible it will recursively draw, but make sure it's staying in page width
if (PRIM->TME && m_context->TEX0.TBP0 == m_context->FRAME.Block() && (m_context->FRAME.FBW != 1 && m_context->TEX0.TBW == m_context->FRAME.FBW))
// Ignore large render targets, make sure it's staying in page width.
if (PRIM->TME && (m_context->FRAME.FBW != 1 && m_context->TEX0.TBW == m_context->FRAME.FBW))
return CLUTDrawTestResult::NotCLUTDraw;
// Hopefully no games draw a CLUT with a CLUT, that would be evil, most likely a channel shuffle.

View File

@@ -1579,6 +1579,24 @@ bool GSTextureCache::Move(u32 SBP, u32 SBW, u32 SPSM, int sx, int sy, u32 DBP, u
// Look for an exact match on the targets.
GSTextureCache::Target* src = GetExactTarget(SBP, SBW, SPSM);
GSTextureCache::Target* dst = GetExactTarget(DBP, DBW, DPSM);
// Beware of the case where a game might create a larger texture by moving a bunch of chunks around.
// We use dx/dy == 0 and the TBW check as a safeguard to make sure these go through to local memory.
// Good test case for this is the Xenosaga I cutscene transitions, or Gradius V.
if (src && !dst && dx == 0 && dy == 0 && ((static_cast<u32>(w) + 63) / 64) == DBW)
{
GIFRegTEX0 new_TEX0 = {};
new_TEX0.TBP0 = DBP;
new_TEX0.TBW = DBW;
new_TEX0.PSM = DPSM;
const int real_height = GetTargetHeight(DBP, DBW, DPSM, h);
const GSVector2 scale(src->m_texture->GetScale());
dst = LookupTarget(new_TEX0, GSVector2i(static_cast<int>(w * scale.x), static_cast<int>(real_height * scale.y)), src->m_type, true);
if (dst)
dst->m_texture->SetScale(scale);
}
if (!src || !dst || src->m_texture->GetScale() != dst->m_texture->GetScale())
return false;
@@ -3070,21 +3088,6 @@ void GSTextureCache::Target::Update(bool reset_age)
m_dirty.ClearDirty();
return;
}
else if (m_type == DepthStencil && g_gs_renderer->m_game.title == CRC::FFX2)
{
GL_INS("ERROR: bad invalidation detected, depth buffer will be cleared");
// FFX2 menu. Invalidation of the depth is wrongly done and only the first
// page is invalidated. Technically a CRC hack will be better but I don't expect
// any games to only upload a single page of data for the depth.
//
// FFX2 menu got another bug. I'm not sure the top-left is properly written or not. It
// could be a gs transfer bug too due to unaligned-page transfer.
//
// So the quick and dirty solution is just to clean the depth buffer.
g_gs_device->ClearDepth(m_texture);
m_dirty.ClearDirty();
return;
}
GIFRegTEXA TEXA = {};
@@ -3116,7 +3119,7 @@ void GSTextureCache::Target::Update(bool reset_age)
}
else
{
int pitch = ((r.width()+3) & ~3) * 4;
const int pitch = Common::AlignUpPow2(r.width() * sizeof(u32), 32);
g_gs_renderer->m_mem.ReadTexture(off, r, s_unswizzle_buffer, pitch, TEXA);
t->Update(r, s_unswizzle_buffer, pitch);

View File

@@ -17,6 +17,7 @@
#include "GLLoader.h"
#include "GS/GS.h"
#include "Host.h"
#include "HostSettings.h"
namespace ReplaceGL
{
@@ -112,8 +113,8 @@ namespace GLLoader
bool vendor_id_amd = false;
bool vendor_id_nvidia = false;
bool vendor_id_intel = false;
bool mesa_driver = false;
bool buggy_pbo = false;
bool disable_download_pbo = false;
bool is_gles = false;
bool has_dual_source_blend = false;
@@ -131,14 +132,8 @@ namespace GLLoader
vendor_id_amd = true;
else if (strstr(vendor, "NVIDIA Corporation"))
vendor_id_nvidia = true;
#ifdef _WIN32
else if (strstr(vendor, "Intel"))
vendor_id_intel = true;
#else
// On linux assumes the free driver if it isn't nvidia or amd pro driver
mesa_driver = !vendor_id_nvidia && !vendor_id_amd;
#endif
if (GSConfig.OverrideGeometryShaders != -1)
{
@@ -225,10 +220,16 @@ namespace GLLoader
// Don't use PBOs when we don't have ARB_buffer_storage, orphaning buffers probably ends up worse than just
// using the normal texture update routines and letting the driver take care of it.
GLLoader::buggy_pbo = !GLAD_GL_VERSION_4_4 && !GLAD_GL_ARB_buffer_storage && !GLAD_GL_EXT_buffer_storage;
if (GLLoader::buggy_pbo)
buggy_pbo = !GLAD_GL_VERSION_4_4 && !GLAD_GL_ARB_buffer_storage && !GLAD_GL_EXT_buffer_storage;
if (buggy_pbo)
Console.Warning("Not using PBOs for texture uploads because buffer_storage is unavailable.");
// Give the user the option to disable PBO usage for downloads.
// Most drivers seem to be faster with PBO.
disable_download_pbo = Host::GetBoolSettingValue("EmuCore/GS", "DisableGLDownloadPBO", false);
if (disable_download_pbo)
Console.Warning("Not using PBOs for texture downloads, this may reduce performance.");
return true;
}

View File

@@ -29,9 +29,8 @@ namespace GLLoader
extern bool vendor_id_amd;
extern bool vendor_id_nvidia;
extern bool vendor_id_intel;
extern bool mesa_driver;
extern bool buggy_pbo;
extern bool in_replayer;
extern bool disable_download_pbo;
// GL
extern bool is_gles;

View File

@@ -453,9 +453,10 @@ GSDownloadTextureOGL::~GSDownloadTextureOGL()
std::unique_ptr<GSDownloadTextureOGL> GSDownloadTextureOGL::Create(u32 width, u32 height, GSTexture::Format format)
{
const u32 buffer_size = GetBufferSize(width, height, format, GSTexture::GetCompressedBytesPerBlock(format));
const u32 buffer_size = GetBufferSize(width, height, format, TEXTURE_UPLOAD_PITCH_ALIGNMENT);
const bool use_buffer_storage = (GLAD_GL_VERSION_4_4 || GLAD_GL_ARB_buffer_storage || GLAD_GL_EXT_buffer_storage);
const bool use_buffer_storage = (GLAD_GL_VERSION_4_4 || GLAD_GL_ARB_buffer_storage || GLAD_GL_EXT_buffer_storage) &&
!GLLoader::disable_download_pbo;
if (use_buffer_storage)
{
GLuint buffer_id;