Compare commits

...
9 Commits
Author SHA1 Message Date
Connor McLaughlin fac171fa95 CDVD: Check file actually opened before proceeding
If you loaded an invalid file, particularly with compression, the file
open may fail, leading to a division by zero (on block size), or trying
to read from nothing.
2021-12-18 13:41:56 +00:00
refractionpcsx2 fa1b6493da CDVD GZip: Correct type causing index creation to fail 2021-12-17 11:46:31 +00:00
refractionpcsx2 e58766745c Log: Restore BIOS Found message 2021-12-16 11:45:12 +00:00
Mrlinkwii d8a9c5b479 Gamedb add gamefixes to 'Titeuf Mega-compet' and patch 'Yamiyo ni Sasayaku - Tantei Sagara Kyouichirou' series 2021-12-15 17:17:18 +00:00
Mrlinkwii 9a4d8ba934 Gamedb: add more 2k games patches 2021-12-15 10:52:22 +00:00
refractionpcsx2 ab816543c8 CDVD: Fixed typo opening gzip files
Fixes #5162
2021-12-15 09:38:04 +00:00
refractionpcsx2 37ccd81985 GS: Avoid some unnecessary flushes
CLUT only updates if valid index type used in PSM
2021-12-14 18:28:21 +00:00
refractionpcsx2 42dad4ade8 GS: Check CLUT dirty write on vertex kick 2021-12-14 18:28:21 +00:00
refractionpcsx2 b2ac035862 VS: Fix location of shaders in project 2021-12-14 17:47:53 +00:00
10 changed files with 64 additions and 38 deletions
+21
View File
@@ -12450,6 +12450,8 @@ SLES-52710:
SLES-52711:
name: "Titeuf Mega Compet"
region: "PAL-F"
gameFixes:
- GIFFIFOHack # Fixes corrupted textures.
patches:
958e5086:
content: |-
@@ -25778,6 +25780,13 @@ SLPM-66294:
SLPM-66295:
name: "Yamiyo ni Sasayaku - Tantei Sagara Kyouichirou [Limited Edition]"
region: "NTSC-J"
patches:
23A9A026:
content: |-
author=PSI, Jelta
// Game does weird stack manipulation, causing data sent to the IOP to be corrupted unless EE data cache is enabled.
// This patch skips over the stack code, allowing the game to boot.
patch=1,EE,00156888,word,10000003
SLPM-66296:
name: "Yamiyo ni Sasayaku - Tantei Sagara Kyouichirou"
region: "NTSC-J"
@@ -41050,6 +41059,12 @@ SLUS-21944:
SLUS-21945:
name: "Major League Baseball 2K11"
region: "NTSC-U"
patches:
3D621C56:
content: |-
author=By Prafull
comment=fixes hang at start
patch=1,EE,003CFE58,word,00000000
SLUS-21946:
name: "Madden NFL 12"
region: "NTSC-U"
@@ -41072,6 +41087,12 @@ SLUS-21950:
SLUS-21951:
name: "Major League Baseball 2K12"
region: "NTSC-U"
patches:
C26C70A9:
content: |-
author=By Prafull
comment=fixes hang at start
patch=1,EE,003D4098,word,00000000
SLUS-21954:
name: "FIFA 13"
region: "NTSC-U" # Latin America with En,Fr,Es
+2 -2
View File
@@ -80,7 +80,7 @@ static void WriteIndexToFile(Access* index, const char* filename)
return;
}
auto fp = FileSystem::OpenManagedCFile(filename, "rb");
auto fp = FileSystem::OpenManagedCFile(filename, "wb");
if (!fp)
return;
@@ -300,7 +300,7 @@ bool GzippedFileReader::OkIndex()
// Try to read index from disk
const std::string indexfile(iso2indexname(m_filename));
if (indexfile.empty() == 0)
if (indexfile.empty())
return false; // iso2indexname(...) will print errors if it can't apply the template
if (FileSystem::FileExists(indexfile.c_str()) && (m_pIndex = ReadIndexFromFile(indexfile.c_str())))
+2 -1
View File
@@ -221,7 +221,8 @@ bool InputIsoFile::Open(std::string srcfile, bool testOnly)
m_reader = new FlatFileReader(EmuConfig.CdvdShareWrite);
}
m_reader->Open(m_filename);
if (!m_reader->Open(m_filename))
return false;
// It might actually be a blockdump file.
// Check that before continuing with the FlatFileReader.
+4 -3
View File
@@ -148,16 +148,17 @@ bool GSClut::WriteTest(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
__assume(0);
}
return m_write.IsDirty(TEX0, TEXCLUT);
// CLUT only reloads if PSM is a valid index type, avoid unnecessary flushes
return ((TEX0.PSM & 0x7) >= 3) && m_write.IsDirty(TEX0, TEXCLUT);
}
void GSClut::Write(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
{
m_write.TEX0 = TEX0;
m_write.TEXCLUT = TEXCLUT;
m_write.dirty = false;
m_read.dirty = true;
m_write.dirty = false;
(this->*m_wc[TEX0.CSM][TEX0.CPSM][TEX0.PSM])(TEX0, TEXCLUT);
}
+7 -2
View File
@@ -2546,8 +2546,13 @@ __forceinline void GSState::VertexKick(u32 skip)
__assume(0);
}
if (auto_flush && PRIM->TME && (m_context->FRAME.Block() == m_context->TEX0.TBP0))
FlushPrim();
if (m_context->FRAME.FBMSK != 0xFFFFFFFF)
{
m_mem.m_clut.Invalidate(m_context->FRAME.Block());
if (auto_flush && PRIM->TME && (m_context->FRAME.Block() == m_context->TEX0.TBP0))
FlushPrim();
}
}
void GSState::GetTextureMinMax(GSVector4i& r, const GIFRegTEX0& TEX0, const GIFRegCLAMP& CLAMP, bool linear)
-2
View File
@@ -1009,7 +1009,6 @@ void GSRendererHW::SwSpriteRender()
}
m_tc->InvalidateVideoMem(dpo, m_r);
m_mem.m_clut.Invalidate();
}
bool GSRendererHW::CanUseSwSpriteRender()
@@ -2279,7 +2278,6 @@ bool GSRendererHW::OI_PointListPalette(GSTexture* rt, GSTexture* ds, GSTextureCa
m_mem.WritePixel32(x, y, c, FBP, FBW);
}
m_tc->InvalidateVideoMem(m_context->offset.fb, m_r);
m_mem.m_clut.Invalidate();
return false;
}
return true;
-2
View File
@@ -578,8 +578,6 @@ void GSRendererSW::Queue(GSRingHeap::SharedPtr<GSRasterizerData>& item)
if (sd->global.sel.fwrite)
{
m_tc->InvalidatePages(sd->m_fb_pages, sd->m_fpsm);
m_mem.m_clut.Invalidate(m_context->FRAME.Block());
}
if (sd->global.sel.zwrite)
+13 -13
View File
@@ -71,19 +71,19 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="GS\res\glsl\common_header.glsl" />
<None Include="GS\res\glsl\convert.glsl" />
<None Include="GS\res\glsl\interlace.glsl" />
<None Include="GS\res\glsl\merge.glsl" />
<None Include="GS\res\glsl\shadeboost.glsl" />
<None Include="GS\res\glsl\tfx_fs.glsl" />
<None Include="GS\res\glsl\tfx_vgs.glsl" />
<None Include="GS\res\convert.fx" />
<None Include="GS\res\fxaa.fx" />
<None Include="GS\res\interlace.fx" />
<None Include="GS\res\merge.fx" />
<None Include="GS\res\shadeboost.fx" />
<None Include="GS\res\tfx.fx" />
<None Include="..\bin\resources\shaders\opengl\common_header.glsl" />
<None Include="..\bin\resources\shaders\opengl\convert.glsl" />
<None Include="..\bin\resources\shaders\opengl\interlace.glsl" />
<None Include="..\bin\resources\shaders\opengl\merge.glsl" />
<None Include="..\bin\resources\shaders\opengl\shadeboost.glsl" />
<None Include="..\bin\resources\shaders\opengl\tfx_fs.glsl" />
<None Include="..\bin\resources\shaders\opengl\tfx_vgs.glsl" />
<None Include="..\bin\resources\shaders\dx11\convert.fx" />
<None Include="..\bin\resources\shaders\common\fxaa.fx" />
<None Include="..\bin\resources\shaders\dx11\interlace.fx" />
<None Include="..\bin\resources\shaders\dx11\merge.fx" />
<None Include="..\bin\resources\shaders\dx11\shadeboost.fx" />
<None Include="..\bin\resources\shaders\dx11\tfx.fx" />
<None Include="PAD\Windows\Default.ini" />
<None Include="Utilities\folderdesc.txt" />
<None Include="Docs\License.txt" />
+13 -13
View File
@@ -330,43 +330,43 @@
<None Include="PAD\Windows\Default.ini">
<Filter>System\Ps2\PAD</Filter>
</None>
<None Include="GS\res\glsl\common_header.glsl">
<None Include="..\bin\resources\shaders\opengl\common_header.glsl">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\glsl\convert.glsl">
<None Include="..\bin\resources\shaders\opengl\convert.glsl">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\glsl\interlace.glsl">
<None Include="..\bin\resources\shaders\opengl\interlace.glsl">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\glsl\merge.glsl">
<None Include="..\bin\resources\shaders\opengl\merge.glsl">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\glsl\shadeboost.glsl">
<None Include="..\bin\resources\shaders\opengl\shadeboost.glsl">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\glsl\tfx_fs.glsl">
<None Include="..\bin\resources\shaders\opengl\tfx_fs.glsl">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\glsl\tfx_vgs.glsl">
<None Include="..\bin\resources\shaders\opengl\tfx_vgs.glsl">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\convert.fx">
<None Include="..\bin\resources\shaders\dx11\convert.fx">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\fxaa.fx">
<None Include="..\bin\resources\shaders\common\fxaa.fx">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\interlace.fx">
<None Include="..\bin\resources\shaders\dx11\interlace.fx">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\merge.fx">
<None Include="..\bin\resources\shaders\dx11\merge.fx">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\shadeboost.fx">
<None Include="..\bin\resources\shaders\dx11\shadeboost.fx">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
<None Include="GS\res\tfx.fx">
<None Include="..\bin\resources\shaders\dx11\tfx.fx">
<Filter>System\Ps2\GS\Shaders</Filter>
</None>
</ItemGroup>
+2
View File
@@ -119,6 +119,8 @@ static bool LoadBiosVersion(std::FILE* fp, u32& version, std::string& descriptio
version = strtol(vermaj, (char**)NULL, 0) << 8;
version |= strtol(vermin, (char**)NULL, 0);
foundRomVer = true;
Console.WriteLn("Bios Found: %s", description.c_str());
}
if ((rd.fileSize % 0x10) == 0)