Compare commits

..

36 Commits
v1.0 ... 1.0

Author SHA1 Message Date
sudonim1@gmail.com
f665c8255c 1.0: Merged new release flag system.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0@5455 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-11-14 18:51:12 +00:00
sudonim1@gmail.com
1a5cf2eb9e A few more revs for the 1.0 branch.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0@5454 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-11-14 18:36:45 +00:00
sudonim1@gmail.com
de989426d3 1.0.1: Merged some revs, marked a load for not merging (clear bug fixes only) and experimentally started up a news file to make releases easier.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0@5424 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-10-01 19:47:36 +00:00
gregory.hainaut
1c4a900dbd 1.0:
* merge commit 5381 (that fixed some GSdx ogl crash)
* update debian package with the good branch name


git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0@5409 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-09-08 16:11:21 +00:00
ramapcsx2
b247a7db07 Cleanup part 3: Update the cmake files in /trunk and /1.0 and upload the readme and faq pdf to /trunk
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0@5361 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-06 12:00:29 +00:00
ramapcsx2
102af86ed7 Rename the 1.0.0 branch to 1.0 in case of further patches
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0@5352 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-04 14:39:53 +00:00
ramapcsx2
0dee679534 Re-added prafull to the beta testers list, he got lost somehow.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5350 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-01 00:48:00 +00:00
ramapcsx2
db493389d5 1.0 branch: Fixed typo in the readme.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5349 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-28 20:49:06 +00:00
sudonim1@gmail.com
0101433aa9 1.0.0: Merge r5347, remove zerogs and zerospu from installer.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5348 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-28 19:44:46 +00:00
ramapcsx2
02e04e2070 1.0 branch: Updated readme and faq by gigaherz. Thanks dude :p
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5340 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-14 23:13:38 +00:00
gregory.hainaut
3e1497f2f3 1.0.0 & trunk: add new language th_TH
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5339 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-11 19:48:37 +00:00
gregory.hainaut
3dcdec8ba3 1.0.0: debian: update the branch name to 1.0.0
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5338 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-08 07:27:05 +00:00
gregory.hainaut
703a38188e 1.0.0 & trunk:i18n update sv_SE
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5337 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-08 07:25:25 +00:00
gregory.hainaut
575a377dac trunk/branch: i18n: update zh_TW and de_DE
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5335 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-07 08:44:50 +00:00
ramapcsx2
7c6ee2c384 1.0 branch: Merged r5328 and r5330 (game database and Cutie CRC fixes).
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5334 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-03 16:42:35 +00:00
ramapcsx2
d39398ee5a 1.0 branch: Merge fix from r5301.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5333 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-03 13:59:04 +00:00
ramapcsx2
94cc3d4194 Merge installer fixes.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5332 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-03 10:33:39 +00:00
gregory.hainaut
753bd9c46b 1.0.0: sync linux change from trunk + po translation
(5289,5290,5305,5307,5308,5323)


git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5327 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-25 21:03:43 +00:00
refraction
9f2dabdeda GIF/1.0.0: Fix some condition bitching from my sloppy coding in r5277 and integrated the change in to the 1.0.0 branch as it will stop the emulator complaining about double interrupts.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5325 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-25 12:15:39 +00:00
ramapcsx2
b9112de1d1 1.0.0 branch:
Merged the SPU2X fixes.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5324 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-24 13:23:47 +00:00
ramapcsx2
b0da8c1a35 1.0.0 branch:
Preparing some docs for 1.0, part 3.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5298 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 02:01:57 +00:00
ramapcsx2
51dcde903c 1.0.0 branch:
Preparing some docs for 1.0, part 2.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5297 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 02:00:06 +00:00
ramapcsx2
b21e42115b 1.0.0 branch:
Preparing some docs for 1.0.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5296 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 01:57:54 +00:00
gregory.hainaut
b588e1063d 1.0.0: sync with branch.
Didn't take r5273 and 5277


git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5282 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-10 19:04:20 +00:00
refraction
ef6a802eab Merge regression fix to 1.0 branch
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5266 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-02 21:54:13 +00:00
gregory.hainaut
ff69b2b2cc 1.0.0 branch: one file was not merged properly
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5262 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-02 07:42:52 +00:00
refraction
3e09cb5aa2 Merge fix from r5260 in to 1.0.0 branch
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5261 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-01 22:26:11 +00:00
ramapcsx2
98a7871524 1.0 branch: Added missing merge information and latest updates from trunk.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5257 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-01 16:38:32 +00:00
gregory.hainaut
e8123fce61 1.0.0 branch:
* merge r5253 and 5252
* refresh mo files based on the branch code


git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5254 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-01 08:51:02 +00:00
ramapcsx2
9253a64a20 1.0 branch: Merged the latest GIF / VU Interpreter changes as well.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5251 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-31 18:45:34 +00:00
ramapcsx2
fd6511fc6e 1.0 branch: Merge back cmake changes, the debian unstable directory changes and the whole of zzogl-pg.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5250 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-31 18:40:35 +00:00
ramapcsx2
309516bc2b 1.0 branch: Merge of GSdx changes.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5249 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-31 10:49:04 +00:00
ramapcsx2
e31b0755d0 1.0 branch: Merged in miscellaneous changes from trunk. Lots of changes in GSdx need Linux side verification before they can get in!
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5242 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-30 11:54:59 +00:00
refraction
e27c7c4434 Merge of recent changes from trunk, GIF/VIF changes, MicroVU fixes, Locales and GSDX Typo. All other GS plugin changes omitted for the moment until people are happy with them to be sync'd
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5240 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-28 21:56:25 +00:00
ramapcsx2
52f1f50e45 1.0 branch: Biggest commit ever.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5238 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-28 20:09:46 +00:00
sudonim1@gmail.com
91b1c0a4b4 Created release branch
git-svn-id: http://pcsx2.googlecode.com/svn/branches/1.0.0@5195 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-03 15:11:53 +00:00
64 changed files with 629 additions and 665 deletions

View File

@@ -95,7 +95,7 @@ if(PACKAGE_MODE)
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/GameIndex.dbf" DESTINATION "${GAMEINDEX_DIR}")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/linux_various/pcsx2.desktop" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/linux_various/pcsx2.xpm" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/pixmaps")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/docs/PCSX2_FAQ_0.9.8.pdf" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/pcsx2")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/docs/PCSX2_Readme_0.9.8.pdf" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/pcsx2")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/docs/PCSX2_FAQ_1.0.0.pdf" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/pcsx2")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/docs/PCSX2_Readme_1.0.0.pdf" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/pcsx2")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/bin/docs/pcsx2.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1/")
endif(PACKAGE_MODE)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -157,7 +157,7 @@ FixedInt<Precision>& FixedInt<Precision>::SetFraction( u32 fracpart )
template< int Precision >
wxString FixedInt<Precision>::ToString() const
{
return wxsFormat( L"%d.%d", GetWhole(), (GetFraction() * 100) / Precision );
return wxsFormat( L"%d.%02d", GetWhole(), (GetFraction() * 100) / Precision );
}
template< int Precision >
@@ -167,7 +167,8 @@ wxString FixedInt<Precision>::ToString( int fracDigits ) const
pxAssert( fracDigits <= 7 ); // higher numbers would just cause overflows and bad mojo.
int mulby = (int)pow( 10.0, fracDigits );
return wxsFormat( L"%d.%d", GetWhole(), (GetFraction() * mulby) / Precision );
wxString fmt=wxsFormat(L"%%d.%%0%dd", fracDigits);
return wxsFormat( fmt, GetWhole(), (GetFraction() * mulby) / Precision );
}
template< int Precision >

View File

@@ -32,7 +32,7 @@ EOF
# Default value
SVN_CO_VERSION=0;
BRANCH="trunk"
BRANCH="1.0"
LOCAL=0
while [ -n "$1" ]; do
case $1 in
@@ -57,8 +57,8 @@ else
fi
# Debian name of package and tarball
PKG_NAME="pcsx2.snapshot-${SVN_CO_VERSION}"
TAR_NAME="pcsx2.snapshot_${SVN_CO_VERSION}.orig.tar"
PKG_NAME="pcsx2-1.0.0"
TAR_NAME="pcsx2_1.0.0.orig.tar"
# Directory
TMP_DIR=/tmp
@@ -130,15 +130,6 @@ mkdir -p $ROOT_DIR/plugins
echo "Note: some plugins are more or less deprecated CDVDisoEFP, CDVDlinuz, Zerogs, Zeropad ...";
echo "Done")
## Download the internal sdl 1.3 for gsdx
# echo "Downloading 3rdpary SDL 1.3 (need by gsdx) revision ${SVN_CO_VERSION}"
# mkdir -p $ROOT_DIR/3rdparty
# (cd $ROOT_DIR/3rdparty/;
# get_svn_file 3rdparty/CMakeLists.txt;
# get_svn_dir 3rdparty/SDL-1.3.0-5387;)
# echo "Done"
## Installation
echo "Copy the subversion repository to a temporary directory"
# Copy the dir
@@ -156,7 +147,6 @@ echo "Remove useless files (copyright issues)"
rm -fr "${NEW_DIR}/plugins/zzogl-pg/opengl/ZeroGSShaders"
rm -fr "${NEW_DIR}/common/src/Utilities/x86/MemcpyFast.cpp"
rm -fr "${NEW_DIR}/plugins/GSdx/baseclasses"
rm -fr "${NEW_DIR}/plugins/GSdx/vtune"
## BUILD
echo "Build the tar.gz file"

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PCSX2 0.9.7\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/pcsx2/\n"
"POT-Creation-Date: 2012-06-01 10:29+0200\n"
"PO-Revision-Date: 2012-05-21 12:58+0100\n"
"POT-Creation-Date: 2012-04-07 11:42+0200\n"
"PO-Revision-Date: 2011-09-28 21:51+0100\n"
"Last-Translator: Víctor González <pajaroloco_2@hotmail.com>\n"
"Language-Team: \n"
"Language: \n"

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PCSX2 0.9.9\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/pcsx2/\n"
"POT-Creation-Date: 2012-05-27 12:20+0200\n"
"POT-Creation-Date: 2012-06-25 22:57+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PCSX2 0.9.9\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/pcsx2/\n"
"POT-Creation-Date: 2012-05-27 12:20+0200\n"
"POT-Creation-Date: 2012-06-25 22:57+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

14
news.txt Normal file
View File

@@ -0,0 +1,14 @@
Bug fix release 1.0.1:
System:
Fixed incorrect handling of framerate adjustment percentage settings.
Fixed cases in which GS window settings do not apply until the PCSX2 is restarted.
Hidden disable GS output option as isn't currently stable and is only meant for testing.
Core:
Fixed crash on startup when virtual memory for SuperVU cannot be allocated.
Fixed scratchpad DMA access to VU1 memory.
SPU2-X:
Fixed out of bounds array access in ADPCM decoding causing bad audio. (Multiple Crash Bandicoot games.)
Disable digital effects when the effects buffer has an illegal address until we know what to do with it. Prevents crash / memory corruption.

View File

@@ -61,10 +61,8 @@ Section "!${APP_NAME} (required)" SEC_CORE
File /nonfatal /oname=gsdx32-ssse3-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-ssse3.dll
File /nonfatal /oname=gsdx32-sse4-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-sse4.dll
File /nonfatal /oname=gsdx32-avx-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-avx.dll
File /nonfatal /oname=zerogs-r${SVNREV_ZEROGS}.dll ..\bin\Plugins\zerogs.dll
File /nonfatal /oname=spu2-x-r${SVNREV_SPU2X}.dll ..\bin\Plugins\spu2-x.dll
File /nonfatal /oname=zerospu2-r${SVNREV_ZEROSPU2}.dll ..\bin\Plugins\zerospu2.dll
File /nonfatal /oname=cdvdiso-r${SVNREV_CDVDISO}.dll ..\bin\Plugins\cdvdiso.dll
File ..\bin\Plugins\cdvdGigaherz.dll

View File

@@ -57,10 +57,8 @@ Section "!${APP_NAME} (required)" SEC_CORE
File /nonfatal /oname=gsdx32-ssse3-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-ssse3.dll
File /nonfatal /oname=gsdx32-sse4-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-sse4.dll
File /nonfatal /oname=gsdx32-avx-r${SVNREV_GSDX}.dll ..\bin\Plugins\gsdx32-avx.dll
File /nonfatal /oname=zerogs-r${SVNREV_ZEROGS}.dll ..\bin\Plugins\zerogs.dll
File /nonfatal /oname=spu2-x-r${SVNREV_SPU2X}.dll ..\bin\Plugins\spu2-x.dll
File /nonfatal /oname=zerospu2-r${SVNREV_ZEROSPU2}.dll ..\bin\Plugins\zerospu2.dll
File /nonfatal /oname=cdvdiso-r${SVNREV_CDVDISO}.dll ..\bin\Plugins\cdvdiso.dll
File ..\bin\Plugins\cdvdGigaherz.dll

Binary file not shown.

Binary file not shown.

View File

@@ -121,12 +121,23 @@ static __fi void gsCSRwrite( const tGS_CSR& csr )
static __fi void IMRwrite(u32 value)
{
GUNIT_LOG("IMRwrite()");
GSIMR = (value & 0x1f00)|0x6000;
if (CSRreg.GetInterruptMask() & (~value & GSIMR) >> 8)
if(CSRreg.GetInterruptMask() & (~(GSIMR >> 8) & 0x1f))
gsIrq();
GSIMR = (value & 0x1f00)|0x6000;
GUNIT_LOG("IMRwrite()");
if (gifUnit.gsSIGNAL.queued && !(GSIMR & 0x100)) {
// Note: PS2 apps are expected to write a successive 1 and 0 to the IMR in order to
// trigger the gsInt and clear the second pending SIGNAL interrupt -- if they fail
// to do so, the GS will freeze again upon the very next SIGNAL).
//
// What's not known here is whether or not the SIGID register should be updated
// here or when the GS is resumed during CSR write (above).
CSRreg.SIGNAL = true;
gsIrq();
}
}
__fi void gsWrite8(u32 mem, u8 value)

View File

@@ -15,9 +15,10 @@
#pragma once
static const int PCSX2_VersionHi = 0;
static const int PCSX2_VersionMid = 9;
static const int PCSX2_VersionLo = 9;
static const int PCSX2_VersionHi = 1;
static const int PCSX2_VersionMid = 0;
static const int PCSX2_VersionLo = 0;
static const bool PCSX2_isReleaseVersion = 0;
class SysCoreThread;
class CpuInitializerSet;

View File

@@ -71,7 +71,7 @@ void vif1TransferToMemory()
pMem += size;
if(pMem < pMemEnd) {
//DevCon.Warning("GS Transfer < VIF QWC, Clearing end of space");
DevCon.Warning("GS Transfer < VIF QWC, Clearing end of space");
__m128 zeroreg = _mm_setzero_ps();
do {
@@ -313,34 +313,41 @@ __fi void vif1Interrupt()
vif1Regs.stat.VPS = VPS_IDLE;
}
if (vif1.inprogress & 0x1)
{
_VIF1chain();
// VIF_NORMAL_FROM_MEM_MODE is a very slow operation.
// Timesplitters 2 depends on this beeing a bit higher than 128.
if (vif1ch.chcr.DIR) vif1Regs.stat.FQC = min(vif1ch.qwc, (u16)16);
if(!(vif1Regs.stat.VGW && gifUnit.gifPath[GIF_PATH_3].state != GIF_PATH_IDLE)) //If we're waiting on GIF, stop looping, (can be over 1000 loops!)
CPU_INT(DMAC_VIF1, g_vif1Cycles);
return;
}
if (!vif1.done)
{
if (!vif1.done)
{
if (!(dmacRegs.ctrl.DMAE))
{
Console.WriteLn("vif1 dma masked");
return;
}
if (!(dmacRegs.ctrl.DMAE))
{
Console.WriteLn("vif1 dma masked");
return;
}
if ((vif1.inprogress & 0x1) == 0) vif1SetupTransfer();
if (vif1ch.chcr.DIR) vif1Regs.stat.FQC = min(vif1ch.qwc, (u16)16);
if(!(vif1Regs.stat.VGW && gifUnit.gifPath[GIF_PATH_3].state != GIF_PATH_IDLE)) //If we're waiting on GIF, stop looping, (can be over 1000 loops!)
CPU_INT(DMAC_VIF1, g_vif1Cycles);
return;
if ((vif1.inprogress & 0x1) == 0) vif1SetupTransfer();
if (vif1ch.chcr.DIR) vif1Regs.stat.FQC = min(vif1ch.qwc, (u16)16);
if(vif1.waitforvu == true)
{
//DevCon.Warning("Waiting on VU1");
return;
}
}
if (vif1.inprogress & 0x1)
{
_VIF1chain();
// VIF_NORMAL_FROM_MEM_MODE is a very slow operation.
// Timesplitters 2 depends on this being a bit higher than 128.
if (vif1ch.chcr.DIR) vif1Regs.stat.FQC = min(vif1ch.qwc, (u16)16);
}
if(g_vif1Cycles > 0 || vif1ch.qwc)
{
if(!(vif1Regs.stat.VGW && gifUnit.gifPath[GIF_PATH_3].state != GIF_PATH_IDLE)) //If we're waiting on GIF, stop looping, (can be over 1000 loops!)
CPU_INT(DMAC_VIF1, max((int)g_vif1Cycles, 8));
return;
}
else if(vif1Regs.stat.VPS == VPS_TRANSFERRING) DevCon.Warning("Cycles %x, cmd %x, qwc %x, waitonvu %x", g_vif1Cycles, vif1.cmd, vif1ch.qwc, vif1.waitforvu);
if (vif1.vifstalled && vif1.irq)
{

View File

@@ -370,22 +370,18 @@ static const uint TitleBarUpdateMs = 333;
GSFrame::GSFrame(wxWindow* parent, const wxString& title)
: wxFrame(parent, wxID_ANY, title,
g_Conf->GSWindow.WindowPos, wxSize( 640, 480 ),
(g_Conf->GSWindow.DisableResizeBorders ? 0 : wxRESIZE_BORDER) | wxCAPTION | wxCLIP_CHILDREN |
wxSYSTEM_MENU | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX
)
: wxFrame(parent, wxID_ANY, title, g_Conf->GSWindow.WindowPos)
, m_timer_UpdateTitle( this )
{
SetIcons( wxGetApp().GetIconBundle() );
SetClientSize( g_Conf->GSWindow.WindowSize );
SetBackgroundColour( *wxBLACK );
wxStaticText* label = new wxStaticText( this, wxID_ANY, _("GS Output is Disabled!") );
m_id_OutputDisabled = label->GetId();
label->SetFont( wxFont( 20, wxDEFAULT, wxNORMAL, wxBOLD ) );
label->SetForegroundColour( *wxWHITE );
label->Show( EmuConfig.GS.DisableOutput );
AppStatusEvent_OnSettingsApplied();
GSPanel* gsPanel = new GSPanel( this );
gsPanel->Show( !EmuConfig.GS.DisableOutput );
@@ -498,6 +494,12 @@ void GSFrame::AppStatusEvent_OnSettingsApplied()
{
if( IsBeingDeleted() ) return;
SetWindowStyle((g_Conf->GSWindow.DisableResizeBorders ? 0 : wxRESIZE_BORDER) | wxCAPTION | wxCLIP_CHILDREN |
wxSYSTEM_MENU | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX);
if (!IsFullScreen() && !IsMaximized())
SetClientSize(g_Conf->GSWindow.WindowSize);
Refresh();
if( g_Conf->GSWindow.CloseOnEsc )
{
if( IsShown() && !CorePlugins.IsOpen(PluginId_GS) )

View File

@@ -349,19 +349,19 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
wxSize backsize( m_background.GetSize() );
wxString wintitle;
if( PCSX2_VersionLo & 1 )
if( PCSX2_isReleaseVersion )
{
// Odd versions: beta / development editions, which feature revision number and compile date.
wintitle.Printf( _("%s %d.%d.%d.%d%s (svn) %s"), pxGetAppName().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
SVN_REV, SVN_MODS ? L"m" : wxEmptyString, fromUTF8(__DATE__).c_str() );
}
else
{
// evens: stable releases, with a simpler title.
// stable releases, with a simple title.
wintitle.Printf( _("%s %d.%d.%d %s"), pxGetAppName().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
SVN_MODS ? _("(modded)") : wxEmptyString
);
}
else
{
// beta / development editions, which feature revision number and compile date.
wintitle.Printf( _("%s %d.%d.%d.%d%s (svn) %s"), pxGetAppName().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
SVN_REV, SVN_MODS ? L"m" : wxEmptyString, fromUTF8(__DATE__).c_str() );
}
SetTitle( wintitle );

View File

@@ -313,6 +313,8 @@ Panels::VideoPanel::VideoPanel( wxWindow* parent ) :
L"Warning: This option can be enabled on-the-fly but typically cannot be disabled on-the-fly (video will typically be garbage)."
) );
m_check_DisableOutput->Hide(); // Band-aid fix since currently broken
//GSWindowSettingsPanel* winpan = new GSWindowSettingsPanel( left );
//winpan->AddFrame(_("Display/Window"));

View File

@@ -120,7 +120,20 @@ __fi tDMA_TAG* SPRdmaGetAddr(u32 addr, bool write)
vu1Thread.WaitVU();
}
//Access for VU Memory
return (tDMA_TAG*)vtlb_GetPhyPtr(addr & 0x1FFFFFF0);
if((addr >= 0x1100c000) && (addr < 0x11010000))
return (tDMA_TAG*)VU1.Mem + (addr & 0x3ff0);
//Possibly not needed but the manual doesn't say SPR cannot access it.
if((addr >= 0x11008000) && (addr < 0x1100c000))
return (tDMA_TAG*)VU1.Micro + (addr & 0x3ff0);
if ((addr >= 0x11000000) && (addr < 0x11004000))
return (tDMA_TAG*)VU0.Micro + (addr & 0xff0);
if ((addr >= 0x11004000) && (addr < 0x11008000))
return (tDMA_TAG*)VU0.Mem + (addr & 0xff0);
}
else
{

View File

@@ -350,7 +350,8 @@ static void SuperVUAlloc(int vuindex)
{
if (s_recVUMem[vuindex]) return;
s_recVUMem[vuindex] = new RecompiledCodeReserve( pxsFmt("SuperVU%u Recompiler Cache", vuindex), 0 );
wxString mem_name = pxsFmt("SuperVU%u Recompiler Cache", vuindex);
s_recVUMem[vuindex] = new RecompiledCodeReserve( mem_name, 0 );
s_recVUMem[vuindex]->Reserve( sVU_EXESIZE, vuindex ? HostMemoryMap::sVU1rec : HostMemoryMap::sVU0rec, _256mb );
s_recVUMem[vuindex]->SetProfilerName(pxsFmt("sVU%urec",vuindex));
@@ -358,7 +359,7 @@ static void SuperVUAlloc(int vuindex)
if (!s_recVUMem[vuindex]->IsOk())
{
safe_delete(s_recVUMem[vuindex]);
throw Exception::VirtualMemoryMapConflict( s_recVUMem[vuindex]->GetName() )
throw Exception::VirtualMemoryMapConflict(mem_name)
.SetDiagMsg(pxsFmt( L"SuperVU failed to allocate virtual memory below 256MB." ))
.SetUserMsg(pxE( "!Notice:superVU:VirtualMemoryAlloc",
L"Out of Memory (sorta): The SuperVU recompiler was unable to reserve the specific memory "

View File

@@ -16,11 +16,8 @@
#include <stdio.h>
#include "CDVD.h"
#ifdef _MSC_VER
# include "svnrev.h"
#endif
static char libraryName[256];
const char *LibName = "CDVDnull Driver";
const unsigned char version = PS2E_CDVD_VERSION;
const unsigned char revision = 0;
@@ -28,12 +25,7 @@ const unsigned char build = 6;
EXPORT_C_(char*) PS2EgetLibName()
{
#ifdef _MSC_VER
sprintf_s( libraryName, "CDVDnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "CDVDnull Driver";
#endif
return (char *)LibName;
}
EXPORT_C_(u32) PS2EgetLibType()
@@ -122,7 +114,7 @@ EXPORT_C_(void) CDVDconfigure()
EXPORT_C_(void) CDVDabout()
{
SysMessage("%s %d.%d", "CDVDnull Driver", revision, build);
SysMessage("%s %d.%d", LibName, revision, build);
}
EXPORT_C_(s32) CDVDtest()

View File

@@ -46,6 +46,7 @@ extern const unsigned char version;
extern const unsigned char revision;
extern const unsigned char build;
extern const unsigned int minor;
extern const char *LibName;
extern void SysMessage(const char *fmt, ...);
#endif /* __CDVD_H__ */

View File

@@ -21,15 +21,12 @@
using namespace std;
#include "FW.h"
#ifdef _MSC_VER
# include "svnrev.h"
#endif
const u8 version = PS2E_FW_VERSION;
const u8 revision = 0;
const u8 build = 7; // increase that with each version
static char libraryName[256];
static char *libraryName = "FWnull Driver";
string s_strIniPath="inis";
string s_strLogPath = "logs";
@@ -65,12 +62,7 @@ EXPORT_C_(u32) PS2EgetLibType()
EXPORT_C_(char*) PS2EgetLibName()
{
#ifdef _MSC_VER
sprintf_s( libraryName, "FWnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "FWnull Driver";
#endif
return libraryName;
}
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)

View File

@@ -426,206 +426,131 @@ EXPORT_C_(int) GSopen(void** dsp, char* title, int mt)
EXPORT_C GSreset()
{
try
{
s_gs->Reset();
}
catch (GSDXRecoverableError)
{
}
s_gs->Reset();
}
EXPORT_C GSgifSoftReset(uint32 mask)
{
try
{
s_gs->SoftReset(mask);
}
catch (GSDXRecoverableError)
{
}
s_gs->SoftReset(mask);
}
EXPORT_C GSwriteCSR(uint32 csr)
{
try
{
s_gs->WriteCSR(csr);
}
catch (GSDXRecoverableError)
{
}
s_gs->WriteCSR(csr);
}
EXPORT_C GSreadFIFO(uint8* mem)
{
try
{
#ifdef OGL_MT_HACK
// FIXME: double check which thread call this function
// See fifo2 issue below
// FIXME: double check which thread call this function
// See fifo2 issue below
#ifdef OGL_DEBUG
if (theApp.GetConfig("renderer", 0) / 3 == 4) fprintf(stderr, "Disable FIFO1 on opengl\n");
if (theApp.GetConfig("renderer", 0) / 3 == 4) fprintf(stderr, "Disable FIFO1 on opengl\n");
#endif
s_gs->m_wnd.AttachContext();
s_gs->m_wnd.AttachContext();
#endif
s_gs->ReadFIFO(mem, 1);
s_gs->ReadFIFO(mem, 1);
#ifdef OGL_MT_HACK
s_gs->m_wnd.DetachContext();
s_gs->m_wnd.DetachContext();
#endif
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C GSreadFIFO2(uint8* mem, uint32 size)
{
try
{
#ifdef OGL_MT_HACK
// FIXME called from EE core thread not MTGS which cause
// invalidate data for opengl
// FIXME called from EE core thread not MTGS which cause
// invalidate data for opengl
#ifdef OGL_DEBUG
if (theApp.GetConfig("renderer", 0) / 3 == 4) fprintf(stderr, "Disable FIFO2(%d) on opengl\n", size);
if (theApp.GetConfig("renderer", 0) / 3 == 4) fprintf(stderr, "Disable FIFO2(%d) on opengl\n", size);
#endif
s_gs->m_wnd.AttachContext();
s_gs->m_wnd.AttachContext();
#endif
s_gs->ReadFIFO(mem, size);
s_gs->ReadFIFO(mem, size);
#ifdef OGL_MT_HACK
s_gs->m_wnd.DetachContext();
s_gs->m_wnd.DetachContext();
#endif
}
catch (GSDXRecoverableError)
{
}
}
EXPORT_C GSgifTransfer(const uint8* mem, uint32 size)
{
try
{
s_gs->Transfer<3>(mem, size);
}
catch (GSDXRecoverableError)
{
}
s_gs->Transfer<3>(mem, size);
}
EXPORT_C GSgifTransfer1(uint8* mem, uint32 addr)
{
try
{
s_gs->Transfer<0>(const_cast<uint8*>(mem) + addr, (0x4000 - addr) / 16);
}
catch (GSDXRecoverableError)
{
}
s_gs->Transfer<0>(const_cast<uint8*>(mem) + addr, (0x4000 - addr) / 16);
}
EXPORT_C GSgifTransfer2(uint8* mem, uint32 size)
{
try
{
s_gs->Transfer<1>(const_cast<uint8*>(mem), size);
}
catch (GSDXRecoverableError)
{
}
s_gs->Transfer<1>(const_cast<uint8*>(mem), size);
}
EXPORT_C GSgifTransfer3(uint8* mem, uint32 size)
{
try
{
s_gs->Transfer<2>(const_cast<uint8*>(mem), size);
}
catch (GSDXRecoverableError)
{
}
s_gs->Transfer<2>(const_cast<uint8*>(mem), size);
}
EXPORT_C GSvsync(int field)
{
try
{
#ifdef _WINDOWS
if(s_gs->m_wnd.IsManaged())
if(s_gs->m_wnd.IsManaged())
{
MSG msg;
memset(&msg, 0, sizeof(msg));
while(msg.message != WM_QUIT && PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
MSG msg;
memset(&msg, 0, sizeof(msg));
while(msg.message != WM_QUIT && PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
#endif
s_gs->VSync(field);
}
catch (GSDXRecoverableError)
{
}
#ifdef OGL_MT_HACK
s_gs->m_wnd.AttachContext();
#endif
s_gs->VSync(field);
}
EXPORT_C_(uint32) GSmakeSnapshot(char* path)
{
try
{
string s(path);
string s(path);
if(!s.empty() && s[s.length() - 1] != DIRECTORY_SEPARATOR)
{
s = s + DIRECTORY_SEPARATOR;
}
return s_gs->MakeSnapshot(s + "gsdx");
}
catch (GSDXRecoverableError)
if(!s.empty() && s[s.length() - 1] != DIRECTORY_SEPARATOR)
{
return false;
s = s + DIRECTORY_SEPARATOR;
}
return s_gs->MakeSnapshot(s + "gsdx");
}
EXPORT_C GSkeyEvent(GSKeyEventData* e)
{
try
{
s_gs->KeyEvent(e);
}
catch (GSDXRecoverableError)
{
}
s_gs->KeyEvent(e);
}
EXPORT_C_(int) GSfreeze(int mode, GSFreezeData* data)
{
try
if(mode == FREEZE_SAVE)
{
if(mode == FREEZE_SAVE)
{
return s_gs->Freeze(data, false);
}
else if(mode == FREEZE_SIZE)
{
return s_gs->Freeze(data, true);
}
else if(mode == FREEZE_LOAD)
{
return s_gs->Defrost(data);
}
return s_gs->Freeze(data, false);
}
catch (GSDXRecoverableError)
else if(mode == FREEZE_SIZE)
{
return s_gs->Freeze(data, true);
}
else if(mode == FREEZE_LOAD)
{
return s_gs->Defrost(data);
}
return 0;
@@ -633,37 +558,32 @@ EXPORT_C_(int) GSfreeze(int mode, GSFreezeData* data)
EXPORT_C GSconfigure()
{
try
{
if(!GSUtil::CheckSSE()) return;
if(!GSUtil::CheckSSE()) return;
#ifdef _WINDOWS
if(GSSettingsDlg(s_isgsopen2).DoModal() == IDOK)
if(GSSettingsDlg(s_isgsopen2).DoModal() == IDOK)
{
if(s_gs != NULL && s_gs->m_wnd.IsManaged())
{
if(s_gs != NULL && s_gs->m_wnd.IsManaged())
{
// Legacy apps like gsdxgui expect this...
// Legacy apps like gsdxgui expect this...
GSshutdown();
}
GSshutdown();
}
}
#else
// TODO: linux
// TODO: linux
if (RunLinuxDialog())
{
if(s_gs != NULL && s_gs->m_wnd.IsManaged())
{
GSshutdown();
}
}
#endif
} catch (GSDXRecoverableError)
if (RunLinuxDialog())
{
if(s_gs != NULL && s_gs->m_wnd.IsManaged())
{
GSshutdown();
}
}
#endif
}
EXPORT_C_(int) GStest()
@@ -1520,7 +1440,7 @@ EXPORT_C GSReplay(char* lpszCmdLine, int renderer)
}
}
unsigned long end = timeGetTime();
fprintf(stderr, "The %ld frames of the scene was render on %ldms\n", frame_number, end - start);
fprintf(stderr, "The %d frames of the scene was render on %dms\n", frame_number, end - start);
fprintf(stderr, "A means of %fms by frame\n", (float)(end - start)/(float)frame_number);
sleep(1);

View File

@@ -521,8 +521,8 @@ REG64_(GIFReg, ALPHA)
uint8 _PAD2[3];
REG_END2
// opaque => output will be Cs/As
__forceinline bool IsOpaque() const {return ((A == B || (C == 2 && FIX == 0)) && D == 0) || (A == 0 && B == D && C == 2 && FIX == 0x80);}
__forceinline bool IsOpaque(int amin, int amax) const {return ((A == B || amax == 0) && D == 0) || (A == 0 && B == D && amin == 0x80 && amax == 0x80);}
__forceinline bool IsOpaque() const {return (A == B || C == 2 && FIX == 0) && D == 0 || (A == 0 && B == D && C == 2 && FIX == 0x80);}
__forceinline bool IsOpaque(int amin, int amax) const {return (A == B || amax == 0) && D == 0 || A == 0 && B == D && amin == 0x80 && amax == 0x80;}
REG_END2
REG64_(GIFReg, BITBLTBUF)
@@ -766,9 +766,9 @@ REG64_(GIFReg, TEST)
uint32 _PAD1:13;
uint32 _PAD2:32;
REG_END2
__forceinline bool DoFirstPass() const {return !ATE || ATST != ATST_NEVER;} // not all pixels fail automatically
__forceinline bool DoSecondPass() const {return ATE && ATST != ATST_ALWAYS && AFAIL != AFAIL_KEEP;} // pixels may fail, write fb/z
__forceinline bool NoSecondPass() const {return ATE && ATST != ATST_ALWAYS && AFAIL == AFAIL_KEEP;} // pixels may fail, no output
__forceinline bool DoFirstPass() {return !ATE || ATST != ATST_NEVER;} // not all pixels fail automatically
__forceinline bool DoSecondPass() {return ATE && ATST != ATST_ALWAYS && AFAIL != AFAIL_KEEP;} // pixels may fail, write fb/z
__forceinline bool NoSecondPass() {return ATE && ATST != ATST_ALWAYS && AFAIL == AFAIL_KEEP;} // pixels may fail, no output
REG_END2
REG64_(GIFReg, TEX0)
@@ -799,7 +799,7 @@ union
};
};
REG_END2
__forceinline bool IsRepeating() const
__forceinline bool IsRepeating()
{
if(TBW < 2)
{
@@ -1150,12 +1150,12 @@ __aligned(struct, 32) GIFPath
}
}
__forceinline uint8 GetReg() const
__forceinline uint8 GetReg()
{
return regs.u8[reg];
}
__forceinline uint8 GetReg(uint32 index) const
__forceinline uint8 GetReg(uint32 index)
{
return regs.u8[index];
}

View File

@@ -178,7 +178,6 @@ CRC::Game CRC::m_games[] =
{0xD6385328, GodOfWar, US, 0},
{0xFB0E6D72, GodOfWar, EU, 0},
{0xEB001875, GodOfWar, EU, 0},
{0xCF148C74, GodOfWar, EU, 0},
{0xCA052D22, GodOfWar, JP, 0},
{0xBFCC1795, GodOfWar, KO, 0},
{0x9567B7D6, GodOfWar, KO, 0},
@@ -192,7 +191,6 @@ CRC::Game CRC::m_games[] =
//same crc as the US version. {0x2F123FD8, GodOfWar2, RU, 0},
{0x2F123FD8, GodOfWar2, US, 0},
{0x44A8A22A, GodOfWar2, EU, 0},
{0x60BC362B, GodOfWar2, EU, 0},
{0x4340C7C6, GodOfWar2, KO, 0},
{0xE96E55BD, GodOfWar2, JP, 0},
{0xF8CD3DF6, GodOfWar2, NoRegion, 0},
@@ -547,13 +545,13 @@ CRC::Game CRC::Lookup(uint32 crc)
if(crcDups)
printf("[FIXME] GSdx: Duplicate CRC: Overall: %d\n", crcDups);
}
#ifndef DISABLE_CRC_HACKS
hash_map<uint32, Game*>::iterator i = m_map.find(crc);
if(i != m_map.end())
{
return *i->second;
}
#endif
return m_games[0];
}

View File

@@ -138,11 +138,11 @@ bool GSDevice11::Create(GSWnd* wnd)
{"TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 16, D3D11_INPUT_PER_VERTEX_DATA, 0},
};
CompileShader(IDR_CONVERT_FX, "vs_main", NULL, &m_convert.vs, il_convert, countof(il_convert), &m_convert.il);
hr = CompileShader(IDR_CONVERT_FX, "vs_main", NULL, &m_convert.vs, il_convert, countof(il_convert), &m_convert.il);
for(int i = 0; i < countof(m_convert.ps); i++)
{
CompileShader(IDR_CONVERT_FX, format("ps_main%d", i).c_str(), NULL, &m_convert.ps[i]);
hr = CompileShader(IDR_CONVERT_FX, format("ps_main%d", i).c_str(), NULL, &m_convert.ps[i]);
}
memset(&dsd, 0, sizeof(dsd));
@@ -170,7 +170,7 @@ bool GSDevice11::Create(GSWnd* wnd)
for(int i = 0; i < countof(m_merge.ps); i++)
{
CompileShader(IDR_MERGE_FX, format("ps_main%d", i).c_str(), NULL, &m_merge.ps[i]);
hr = CompileShader(IDR_MERGE_FX, format("ps_main%d", i).c_str(), NULL, &m_merge.ps[i]);
}
memset(&bsd, 0, sizeof(bsd));
@@ -198,7 +198,7 @@ bool GSDevice11::Create(GSWnd* wnd)
for(int i = 0; i < countof(m_interlace.ps); i++)
{
CompileShader(IDR_INTERLACE_FX, format("ps_main%d", i).c_str(), NULL, &m_interlace.ps[i]);
hr = CompileShader(IDR_INTERLACE_FX, format("ps_main%d", i).c_str(), NULL, &m_interlace.ps[i]);
}
// Shade Boost
@@ -229,7 +229,7 @@ bool GSDevice11::Create(GSWnd* wnd)
hr = m_dev->CreateBuffer(&bd, NULL, &m_shadeboost.cb);
CompileShader(IDR_SHADEBOOST_FX, "ps_main", macro, &m_shadeboost.ps);
hr = CompileShader(IDR_SHADEBOOST_FX, "ps_main", macro, &m_shadeboost.ps);
// fxaa
@@ -241,7 +241,7 @@ bool GSDevice11::Create(GSWnd* wnd)
hr = m_dev->CreateBuffer(&bd, NULL, &m_fxaa.cb);
CompileShader(IDR_FXAA_FX, "ps_main", NULL, &m_fxaa.ps);
hr = CompileShader(IDR_FXAA_FX, "ps_main", NULL, &m_fxaa.ps);
//
@@ -719,49 +719,56 @@ void GSDevice11::DoShadeBoost(GSTexture* st, GSTexture* dt)
void GSDevice11::SetupDATE(GSTexture* rt, GSTexture* ds, const GSVertexPT1* vertices, bool datm)
{
// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows
const GSVector2i& size = rt->GetSize();
BeginScene();
if(GSTexture* t = CreateRenderTarget(size.x, size.y, rt->IsMSAA()))
{
// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows
ClearStencil(ds, 0);
BeginScene();
// om
ClearStencil(ds, 0);
OMSetDepthStencilState(m_date.dss, 1);
OMSetBlendState(m_date.bs, 0);
OMSetRenderTargets(NULL, ds);
// om
// ia
OMSetDepthStencilState(m_date.dss, 1);
OMSetBlendState(m_date.bs, 0);
OMSetRenderTargets(t, ds);
IASetVertexBuffer(vertices, sizeof(vertices[0]), 4);
IASetInputLayout(m_convert.il);
IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
// ia
// vs
IASetVertexBuffer(vertices, sizeof(vertices[0]), 4);
IASetInputLayout(m_convert.il);
IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
VSSetShader(m_convert.vs, NULL);
// vs
// gs
VSSetShader(m_convert.vs, NULL);
GSSetShader(NULL);
// gs
// ps
GSSetShader(NULL);
GSTexture* rt2 = rt->IsMSAA() ? Resolve(rt) : rt;
// ps
PSSetShaderResources(rt2, NULL);
PSSetSamplerState(m_convert.pt, NULL);
PSSetShader(m_convert.ps[datm ? 2 : 3], NULL);
GSTexture* rt2 = rt->IsMSAA() ? Resolve(rt) : rt;
//
PSSetShaderResources(rt2, NULL);
PSSetSamplerState(m_convert.pt, NULL);
PSSetShader(m_convert.ps[datm ? 2 : 3], NULL);
DrawPrimitive();
//
//
DrawPrimitive();
EndScene();
//
if(rt2 != rt) Recycle(rt2);
EndScene();
Recycle(t);
if(rt2 != rt) Recycle(rt2);
}
}
void GSDevice11::IASetVertexBuffer(const void* vertex, size_t stride, size_t count)
@@ -1103,9 +1110,6 @@ void GSDevice11::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector
ID3D11RenderTargetView* rtv = NULL;
ID3D11DepthStencilView* dsv = NULL;
if (!rt && !ds)
throw GSDXRecoverableError();
if(rt) rtv = *(GSTexture11*)rt;
if(ds) dsv = *(GSTexture11*)ds;
@@ -1117,10 +1121,9 @@ void GSDevice11::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector
m_ctx->OMSetRenderTargets(1, &rtv, dsv);
}
GSVector2i size = rt ? rt->GetSize() : ds->GetSize();
if(m_state.viewport != size)
if(m_state.viewport != rt->GetSize())
{
m_state.viewport = size;
m_state.viewport = rt->GetSize();
D3D11_VIEWPORT vp;
@@ -1128,15 +1131,15 @@ void GSDevice11::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector
vp.TopLeftX = 0;
vp.TopLeftY = 0;
vp.Width = (float)size.x;
vp.Height = (float)size.y;
vp.Width = (float)rt->GetWidth();
vp.Height = (float)rt->GetHeight();
vp.MinDepth = 0.0f;
vp.MaxDepth = 1.0f;
m_ctx->RSSetViewports(1, &vp);
}
GSVector4i r = scissor ? *scissor : GSVector4i(size).zwxy();
GSVector4i r = scissor ? *scissor : GSVector4i(rt->GetSize()).zwxy();
if(!m_state.scissor.eq(r))
{
@@ -1181,7 +1184,7 @@ void GSDevice11::OMSetRenderTargets(const GSVector2i& rtsize, int count, ID3D11U
}
}
void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11VertexShader** vs, D3D11_INPUT_ELEMENT_DESC* layout, int count, ID3D11InputLayout** il)
HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11VertexShader** vs, D3D11_INPUT_ELEMENT_DESC* layout, int count, ID3D11InputLayout** il)
{
HRESULT hr;
@@ -1200,25 +1203,27 @@ void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO*
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
hr = m_dev->CreateVertexShader((void*)shader->GetBufferPointer(), shader->GetBufferSize(), NULL, vs);
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
hr = m_dev->CreateInputLayout(layout, count, shader->GetBufferPointer(), shader->GetBufferSize(), il);
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
return hr;
}
void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs)
HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs)
{
HRESULT hr;
@@ -1237,18 +1242,20 @@ void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO*
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
hr = m_dev->CreateGeometryShader((void*)shader->GetBufferPointer(), shader->GetBufferSize(), NULL, gs);
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
return hr;
}
void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs, D3D11_SO_DECLARATION_ENTRY* layout, int count)
HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs, D3D11_SO_DECLARATION_ENTRY* layout, int count)
{
HRESULT hr;
@@ -1267,18 +1274,20 @@ void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO*
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
hr = m_dev->CreateGeometryShaderWithStreamOutput((void*)shader->GetBufferPointer(), shader->GetBufferSize(), layout, count, NULL, 0, D3D11_SO_NO_RASTERIZED_STREAM, NULL, gs);
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
return hr;
}
void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11PixelShader** ps)
HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11PixelShader** ps)
{
HRESULT hr;
@@ -1297,18 +1306,20 @@ void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO*
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
hr = m_dev->CreatePixelShader((void*)shader->GetBufferPointer(), shader->GetBufferSize(),NULL, ps);
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
return hr;
}
void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs)
HRESULT GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs)
{
HRESULT hr;
@@ -1327,18 +1338,20 @@ void GSDevice11::CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO*
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
hr = m_dev->CreateComputeShader((void*)shader->GetBufferPointer(), shader->GetBufferSize(),NULL, cs);
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
return hr;
}
void GSDevice11::CompileShader(const char* fn, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs)
HRESULT GSDevice11::CompileShader(const char* fn, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs)
{
HRESULT hr;
@@ -1357,14 +1370,16 @@ void GSDevice11::CompileShader(const char* fn, const char* entry, D3D11_SHADER_M
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
hr = m_dev->CreateComputeShader((void*)shader->GetBufferPointer(), shader->GetBufferSize(),NULL, cs);
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
return hr;
}

View File

@@ -213,11 +213,11 @@ public:
operator ID3D11Device*() {return m_dev;}
operator ID3D11DeviceContext*() {return m_ctx;}
void CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11VertexShader** vs, D3D11_INPUT_ELEMENT_DESC* layout, int count, ID3D11InputLayout** il);
void CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs);
void CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs, D3D11_SO_DECLARATION_ENTRY* layout, int count);
void CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11PixelShader** ps);
void CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs);
void CompileShader(const char* fn, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs);
HRESULT CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11VertexShader** vs, D3D11_INPUT_ELEMENT_DESC* layout, int count, ID3D11InputLayout** il);
HRESULT CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs);
HRESULT CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11GeometryShader** gs, D3D11_SO_DECLARATION_ENTRY* layout, int count);
HRESULT CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11PixelShader** ps);
HRESULT CompileShader(uint32 id, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs);
HRESULT CompileShader(const char* fn, const char* entry, D3D11_SHADER_MACRO* macro, ID3D11ComputeShader** cs);
};

View File

@@ -1288,7 +1288,7 @@ void GSDevice9::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector4
}
}
void GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il)
HRESULT GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il)
{
vector<D3DXMACRO> m;
@@ -1309,20 +1309,24 @@ void GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO* m
printf("%s\n", (const char*)error->GetBufferPointer());
}
ASSERT(SUCCEEDED(hr));
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
hr = m_dev->CreateVertexDeclaration(layout, il);
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
return S_OK;
}
void GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DPixelShader9** ps)
HRESULT GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DPixelShader9** ps)
{
uint32 flags = 0;
@@ -1354,9 +1358,13 @@ void GSDevice9::CompileShader(uint32 id, const string& entry, const D3DXMACRO* m
printf("%s\n", (const char*)error->GetBufferPointer());
}
ASSERT(SUCCEEDED(hr));
if(FAILED(hr))
{
throw GSDXRecoverableError();
return hr;
}
return S_OK;
}

View File

@@ -221,8 +221,8 @@ public:
IDirect3DDevice9* operator->() {return m_dev;}
operator IDirect3DDevice9*() {return m_dev;}
void CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il);
void CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DPixelShader9** ps);
HRESULT CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il);
HRESULT CompileShader(uint32 id, const string& entry, const D3DXMACRO* macro, IDirect3DPixelShader9** ps);
void SetupVS(VSSelector sel, const VSConstantBuffer* cb);
void SetupGS(GSSelector sel) {}

View File

@@ -82,7 +82,7 @@ public:
uint32 key;
};
operator uint32() {return key & 0xff;}
operator uint32() {return key & 0x3f;}
VSSelector() : key(0) {}
};
@@ -175,13 +175,12 @@ public:
uint32 colclip:2;
uint32 date:2;
uint32 spritehack:1;
uint32 point_sampler:1;
};
uint32 key;
};
operator uint32() {return key & 0xfffffff;}
operator uint32() {return key & 0x3ffffff;}
PSSelector() : key(0) {}
};
@@ -215,13 +214,12 @@ public:
uint32 zwe:1;
uint32 date:1;
uint32 fba:1;
uint32 alpha_stencil:1;
};
uint32 key;
};
operator uint32() {return key & 0x3f;}
operator uint32() {return key & 0x1f;}
OMDepthStencilSelector() : key(0) {}
};

View File

@@ -294,14 +294,9 @@ bool GSRendererCS::CreateDevice(GSDevice* dev_unk)
{NULL, NULL},
};
try
{
dev->CompileShader(IDR_CS_FX, "ps_main0", macro, &m_ps0);
}
catch (GSDXRecoverableError)
{
return false;
}
hr = dev->CompileShader(IDR_CS_FX, "ps_main0", macro, &m_ps0);
if(FAILED(hr)) return false;
// PSConstantBuffer

View File

@@ -32,7 +32,6 @@ GSRendererDX::GSRendererDX(GSTextureCache* tc, const GSVector2& pixelcenter)
UserHacks_AlphaHack = !!theApp.GetConfig("UserHacks_AlphaHack", 0) && !!theApp.GetConfig("UserHacks", 0);
UserHacks_WildHack = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_WildHack", 0) : 0;
UserHacks_AlphaStencil = !!theApp.GetConfig("UserHacks_AlphaStencil", 0) && !!theApp.GetConfig("UserHacks", 0);
}
GSRendererDX::~GSRendererDX()
@@ -253,51 +252,38 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
}
if(context->TEST.ATE)
ps_sel.atst = context->TEST.ATST;
else
ps_sel.atst = ATST_ALWAYS;
if (context->TEST.ATE && context->TEST.ATST > 1)
ps_cb.FogColor_AREF.a = (float)context->TEST.AREF;
// Destination alpha pseudo stencil hack: use a stencil operation combined with an alpha test
// to only draw pixels which would cause the destination alpha test to fail in the future once.
// Unfortunately this also means only drawing those pixels at all, which is why this is a hack.
// The interaction with FBA in D3D9 is probably less than ideal.
if (UserHacks_AlphaStencil && DATE && dev->HasStencil() && om_bsel.wa && (!context->TEST.ATE || context->TEST.ATST == 1))
{
if (!context->FBA.FBA)
ps_sel.atst = context->TEST.ATST;
switch(ps_sel.atst)
{
if (context->TEST.DATM == 0)
ps_sel.atst = 5; // >=
else
ps_sel.atst = 2; // <
ps_cb.FogColor_AREF.a = (float)0x80;
case ATST_LESS:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF - 1);
break;
case ATST_GREATER:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF + 1);
break;
default:
ps_cb.FogColor_AREF.a = (float)(int)context->TEST.AREF;
break;
}
if (!(context->FBA.FBA && context->TEST.DATM == 1))
om_dssel.alpha_stencil = 1;
}
else
{
ps_sel.atst = ATST_ALWAYS;
}
if(tex)
{
const GSLocalMemory::psm_t &psm = GSLocalMemory::m_psm[context->TEX0.PSM];
const GSLocalMemory::psm_t &cpsm = psm.pal > 0 ? GSLocalMemory::m_psm[context->TEX0.CPSM] : psm;
bool bilinear = m_filter == 2 ? m_vt.IsLinear() : m_filter != 0;
bool simple_sample = !tex->m_palette && cpsm.fmt == 0 && context->CLAMP.WMS < 3 && context->CLAMP.WMT < 3;
ps_sel.wms = context->CLAMP.WMS;
ps_sel.wmt = context->CLAMP.WMT;
if (tex->m_palette)
ps_sel.fmt = cpsm.fmt | 4;
else
ps_sel.fmt = cpsm.fmt;
ps_sel.fmt = tex->m_fmt;
ps_sel.aem = env.TEXA.AEM;
ps_sel.tfx = context->TEX0.TFX;
ps_sel.tcc = context->TEX0.TCC;
ps_sel.ltf = bilinear && !simple_sample;
ps_sel.ltf = m_filter == 2 ? m_vt.IsLinear() : m_filter;
ps_sel.rt = tex->m_target;
ps_sel.spritehack = tex->m_spritehack_t;
ps_sel.point_sampler = !(bilinear && simple_sample);
int w = tex->m_texture->GetWidth();
int h = tex->m_texture->GetHeight();
@@ -327,7 +313,7 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
ps_ssel.tau = (context->CLAMP.WMS + 3) >> 1;
ps_ssel.tav = (context->CLAMP.WMT + 3) >> 1;
ps_ssel.ltf = bilinear && simple_sample;
ps_ssel.ltf = ps_sel.ltf;
}
else
{
@@ -370,7 +356,6 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
dev->SetupPS(ps_selneg, &ps_cb, ps_ssel);
dev->DrawIndexedPrimitive();
dev->SetupOM(om_dssel, om_bsel, afix);
}
}
@@ -382,6 +367,19 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
ps_sel.atst = iatst[ps_sel.atst];
switch(ps_sel.atst)
{
case ATST_LESS:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF - 1);
break;
case ATST_GREATER:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF + 1);
break;
default:
ps_cb.FogColor_AREF.a = (float)(int)context->TEST.AREF;
break;
}
dev->SetupPS(ps_sel, &ps_cb, ps_ssel);
bool z = om_dssel.zwe;

View File

@@ -30,7 +30,6 @@ class GSRendererDX : public GSRendererHW
bool m_fba;
bool UserHacks_AlphaHack;
bool UserHacks_AlphaStencil;
protected:
virtual void DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* tex);

View File

@@ -173,8 +173,12 @@ void GSRendererHW::Draw()
{
if(m_dev->IsLost()) return;
#ifndef DISABLE_CRC_HACKS
if(GSRenderer::IsBadFrame(m_skip, m_userhacks_skipdraw)) return;
#endif
GSDrawingEnvironment& env = m_env;
GSDrawingContext* context = m_context;
@@ -202,6 +206,8 @@ void GSRendererHW::Draw()
if(PRIM->TME)
{
m_mem.m_clut.Read32(context->TEX0, env.TEXA);
GSVector4i r;
GetTextureMinMax(r, context->TEX0, context->CLAMP, m_vt.IsLinear());

View File

@@ -341,20 +341,14 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
if(tex)
{
const GSLocalMemory::psm_t &psm = GSLocalMemory::m_psm[context->TEX0.PSM];
ps_sel.wms = context->CLAMP.WMS;
ps_sel.wmt = context->CLAMP.WMT;
ps_sel.fmt = tex->m_fmt;
ps_sel.aem = env.TEXA.AEM;
ps_sel.tfx = context->TEX0.TFX;
ps_sel.tcc = context->TEX0.TCC;
ps_sel.ltf = m_filter == 2 ? m_vt.IsLinear() : m_filter;
ps_sel.rt = tex->m_target;
if (tex->m_palette) {
const GSLocalMemory::psm_t &cpsm = GSLocalMemory::m_psm[context->TEX0.CPSM];
ps_sel.fmt = cpsm.fmt | 4;
} else
ps_sel.fmt = psm.fmt;
int w = tex->m_texture->GetWidth();
int h = tex->m_texture->GetHeight();

View File

@@ -101,6 +101,7 @@ void GSSettingsDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_WINDOWED, theApp.GetConfig("windowed", 1));
CheckDlgButton(m_hWnd, IDC_FILTER, theApp.GetConfig("filter", 2));
CheckDlgButton(m_hWnd, IDC_PALTEX, theApp.GetConfig("paltex", 0));
CheckDlgButton(m_hWnd, IDC_VSYNC, theApp.GetConfig("vsync", 0));
CheckDlgButton(m_hWnd, IDC_LOGZ, theApp.GetConfig("logz", 1));
CheckDlgButton(m_hWnd, IDC_FBA, theApp.GetConfig("fba", 1));
CheckDlgButton(m_hWnd, IDC_AA1, theApp.GetConfig("aa1", 0));
@@ -200,6 +201,7 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
theApp.SetConfig("filter", (int)IsDlgButtonChecked(m_hWnd, IDC_FILTER));
theApp.SetConfig("paltex", (int)IsDlgButtonChecked(m_hWnd, IDC_PALTEX));
theApp.SetConfig("vsync", (int)IsDlgButtonChecked(m_hWnd, IDC_VSYNC));
theApp.SetConfig("logz", (int)IsDlgButtonChecked(m_hWnd, IDC_LOGZ));
theApp.SetConfig("fba", (int)IsDlgButtonChecked(m_hWnd, IDC_FBA));
theApp.SetConfig("aa1", (int)IsDlgButtonChecked(m_hWnd, IDC_AA1));
@@ -421,8 +423,6 @@ void GSHacksDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_SPRITEHACK, theApp.GetConfig("UserHacks_SpriteHack", 0));
CheckDlgButton(m_hWnd, IDC_WILDHACK, theApp.GetConfig("UserHacks_WildHack", 0));
CheckDlgButton(m_hWnd, IDC_AGGRESSIVECRC, theApp.GetConfig("UserHacks_AggressiveCRC", 0));
CheckDlgButton(m_hWnd, IDC_ALPHASTENCIL, theApp.GetConfig("UserHacks_AlphaStencil", 0));
CheckDlgButton(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS, theApp.GetConfig("UserHacks_DisableCrcHacks", 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETRANGE, 0, MAKELPARAM(1000, 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("UserHacks_SkipDraw", 0), 0));
@@ -489,19 +489,6 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
"Only affects few games, removing some effects which might make the image sharper/clearer.\n"
"Affected games: FFX, FFX2, FFXII, GOW2, ICO, SoTC, SSX3.";
break;
case IDC_ALPHASTENCIL:
helpstr = "Extend stencil based emulation of destination alpha to perform stencil operations while drawing.\n\n"
"Improves many shadows which are normally overdrawn in parts, may affect other effects.\n"
"Will disable partial transparency in some games or even prevent drawing some elements altogether.";
break;
case IDC_CHECK_DISABLE_ALL_HACKS:
helpstr = "FOR TESTING ONLY!!\n\n"
"Disable all CRC hacks - will break many games. Overrides CrcHacksExclusion at gsdx.ini\n"
"\n"
"It's possible to exclude CRC hacks also via the gsdx.ini. E.g.:\n"
"CrcHacksExclusions=all\n"
"CrcHacksExclusions=0x0F0C4A9C, 0x0EE5646B, 0x7ACF7E03";
break;
default:
helpstr = "Hover over an item to get a description.";
break;
@@ -526,8 +513,6 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
theApp.SetConfig("UserHacks_SkipDraw", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_GETPOS, 0, 0));
theApp.SetConfig("UserHacks_WildHack", (int)IsDlgButtonChecked(m_hWnd, IDC_WILDHACK));
theApp.SetConfig("UserHacks_AggressiveCRC", (int)IsDlgButtonChecked(m_hWnd, IDC_AGGRESSIVECRC));
theApp.SetConfig("UserHacks_AlphaStencil", (int)IsDlgButtonChecked(m_hWnd, IDC_ALPHASTENCIL));
theApp.SetConfig("UserHacks_DisableCrcHacks", (int)IsDlgButtonChecked(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS));
EndDialog(m_hWnd, id);
} break;
}

View File

@@ -120,7 +120,6 @@ GSState::GSState()
s_saven = theApp.GetConfig("saven", 0);
userHacks_AggressiveCRC = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_AggressiveCRC", 0) : 0;
userHacks_DisableCrcHacks = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig( "UserHacks_DisableCrcHacks", 0 ) : 0;
}
GSState::~GSState()
@@ -2229,7 +2228,7 @@ void GSState::SetGameCRC(uint32 crc, int options)
{
m_crc = crc;
m_options = options;
m_game = CRC::Lookup(userHacks_DisableCrcHacks ? 0 : crc);
m_game = CRC::Lookup(crc);
}
//
@@ -2669,7 +2668,6 @@ void GSState::GetAlphaMinMax()
a.w = max(env.TEXA.TA0, env.TEXA.TA1);
break;
case 3:
m_mem.m_clut.Read32(context->TEX0, env.TEXA);
m_mem.m_clut.GetAlphaMinMax32(a.y, a.w);
break;
default:
@@ -3128,7 +3126,7 @@ bool GSC_ICO(const GSFrameInfo& fi, int& skip)
}
else if( g_aggressive && fi.TME && fi.FBP == 0x0800 && (fi.TBP0 == 0x2800 || fi.TBP0 ==0x2c00) && fi.TPSM ==0 && fi.FBMSK == 0)
{
skip = 1;
skip = 1; //<2F><><EFBFBD>v
}
}
else
@@ -3282,7 +3280,7 @@ bool GSC_ResidentEvil4(const GSFrameInfo& fi, int& skip)
}
else if(fi.TME && fi.FBP ==0x03100 && (fi.TBP0==0x2a00 ||fi.TBP0==0x3480) && fi.TPSM ==0 && fi.FBMSK == 0)
{
skip = 1;
skip = 1; //<2F><><EFBFBD>v
}
}
@@ -3449,11 +3447,11 @@ bool GSC_GodOfWar2(const GSFrameInfo& fi, int& skip)
{
skip = 1; // wall of fog
}
else if(g_aggressive && fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x1300 ) && (fi.TBP0 ==0x0F00 || fi.TBP0 ==0x1300 || fi.TBP0==0x2b00)) // || fi.FBP == 0x0100
else if(g_aggressive && fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x1300 ) && (fi.TBP0 ==0x0F00 || fi.TBP0 ==0x1300 || fi.TBP0==0x2b00)) // || fi.FBP == 0x0100 //<2F><><EFBFBD><EFBFBD><EFBFBD>U<EFBFBD>½u<C2BD><75><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
skip = 1; // global haze/halo
}
else if(g_aggressive && fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x0100 ) && (fi.TBP0==0x2b00 || fi.TBP0==0x2e80)) //480P 2e80
else if(g_aggressive && fi.TPSM == PSM_PSMCT24 && fi.TME && (fi.FBP ==0x0100 ) && (fi.TBP0==0x2b00 || fi.TBP0==0x2e80)) //480P<EFBFBD>U2e80
{
skip = 1; // water effect and water vertical lines
}
@@ -3569,15 +3567,15 @@ bool GSC_Genji(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FBP == 0x01500 && fi.FPSM == PSM_PSMCT16 && fi.TBP0 == 0x00e00 && fi.TPSM == PSM_PSMZ16)
{
skip = 6;
skip = 6; //<2F><><EFBFBD>W<EFBFBD><57><EFBFBD>ʶ<EFBFBD>
}
else if(fi.TPSM == PSM_PSMCT24 && fi.TME ==0x0001 && fi.TBP0==fi.FBP)
{
skip = 1;
skip = 1; // <20>ҽk
}
else if(fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0)
{
skip = 1;
skip = 1; //<2F><><EFBFBD><EFBFBD>
}
}
else
@@ -3641,11 +3639,11 @@ bool GSC_RadiataStories(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x03FFF)
{
skip = 1;
skip = 1; // CMV<4D><56><EFBFBD>ݯ<EFBFBD>
}
else if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT4HH)
{
skip = 1000;
skip = 1000; //
}
}
else
@@ -3673,11 +3671,11 @@ bool GSC_HauntingGround(const GSFrameInfo& fi, int& skip)
}
else if(fi.TME && (fi.FBP ==0x2200) && (fi.TBP0 ==0x3a80) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1;
skip = 1; // <20>ҽk
}
else if(fi.FBP ==0x2200 && fi.TBP0==0x3000 && fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0)
{
skip = 1;
skip = 1; //<2F><>
}
else if(fi.TME)
{
@@ -3735,11 +3733,12 @@ bool GSC_CaptainTsubasa(const GSFrameInfo& fi, int& skip)
bool GSC_Oneechanbara2Special(const GSFrameInfo& fi, int& skip)
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v<EFBFBD>U<EFBFBD><55><EFBFBD>v
if(skip == 0)
{
if(fi.TPSM == PSM_PSMCT24 && fi.TME && fi.FBP == 0x01180)
{
skip = 1;
skip = 1; // <20><><EFBFBD>v
}
}
@@ -3801,7 +3800,7 @@ bool GSC_EternalPoison(const GSFrameInfo& fi, int& skip)
{
if(fi.TPSM == PSM_PSMCT16S && fi.TBP0 == 0x3200)
{
skip = 1;
skip = 1; //<2F><><EFBFBD>v
}
}
return true;
@@ -3813,7 +3812,7 @@ bool GSC_LegoBatman(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.TPSM == PSM_PSMZ16 && fi.FPSM == PSM_PSMCT16 && fi.FBMSK == 0x00000)
{
skip = 3;
skip = 3; //<2F>h<EFBFBD><68><EFBFBD><EFBFBD>
}
}
return true;
@@ -3910,19 +3909,19 @@ bool GSC_ShadowofRome(const GSFrameInfo& fi, int& skip)
{
if(fi.FBP && fi.TPSM == PSM_PSMT8H && ( fi.FBMSK ==0x00FFFFFF))
{
skip =1;
skip =1; //<2F><>
}
else if(fi.TME ==0x0001 && (fi.TBP0==0x1300 || fi.TBP0==0x0f00) && fi.FBMSK>=0xFFFFFF)
{
skip = 1;
skip = 1; //<2F><><EFBFBD>L<EFBFBD><4C><EFBFBD>M<EFBFBD><4D><EFBFBD><EFBFBD>
}
else if(fi.TME && (fi.FBP >=0x0) && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 ==0x0160 ||fi.TBP0==0x01e0 || fi.TBP0<=0x0800) && fi.TPSM == PSM_PSMT8)
{
skip = 1;
skip = 1; //<2F>t<EFBFBD><74>
}
else if(fi.TME && (fi.TBP0==0x0700) && (fi.TPSM == PSM_PSMCT32 || fi.TPSM == PSM_PSMCT24))
{
skip = 1;
skip = 1; //<2F>ҽk
}
}
@@ -4234,11 +4233,11 @@ bool GSC_TombRaiderLegend(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FBP == 0x01000 && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32 && (fi.TBP0 == 0x2b60 ||fi.TBP0 == 0x2b80 || fi.TBP0 == 0x2E60 ||fi.TBP0 ==0x3020 ||fi.TBP0 == 0x3200 || fi.TBP0 == 0x3320))
{
skip = 1;
skip = 1; //<2F><><EFBFBD><EFBFBD>
}
else if(fi.TPSM == PSM_PSMCT32 && (fi.TPSM | fi.FBP)==0x2fa0 && (fi.TBP0==0x2bc0 ) && fi.FBMSK ==0)
{
skip = 2;
skip = 2; // <20><><EFBFBD><EFBFBD>
}
@@ -4253,15 +4252,15 @@ bool GSC_TombRaiderUnderWorld(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FBP == 0x01000 && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32 && (fi.TBP0 == 0x2B60 /*|| fi.TBP0 == 0x2EFF || fi.TBP0 ==0x2F00 || fi.TBP0 == 0x3020*/ || fi.TBP0 >= 0x2C01 && fi.TBP0!=0x3029 && fi.TBP0!=0x302d))
{
skip = 1;
skip = 1; //<2F><><EFBFBD><EFBFBD>
}
else if(fi.TPSM == PSM_PSMCT32 && (fi.TPSM | fi.FBP)==0x2c00 && (fi.TBP0 ==0x0ee0) && fi.FBMSK ==0)
{
skip = 2;
skip = 2; // <20><><EFBFBD>U<EFBFBD>«<EFBFBD>
}
/*else if(fi.TPSM == PSM_PSMCT16 && (fi.TPSM | fi.FBP)>=0x0 && (fi.TBP0 >=0x0) && fi.FBMSK ==0)
{
skip = 600;
skip = 600; // <20>[<5B>t
}*/
}
@@ -4476,15 +4475,15 @@ bool GSC_TalesOfLegendia(const GSFrameInfo& fi, int& skip)
}
if(fi.TME && fi.FBP && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x3d80)
{
skip = 1;
skip = 1; //<2F><><EFBFBD>W<EFBFBD><57><EFBFBD>ʶ<EFBFBD>2a00
}
if(fi.TME && fi.FBP ==0x1c00 && (fi.TBP0==0x2e80 ||fi.TBP0==0x2d80) && fi.TPSM ==0 && fi.FBMSK == 0xff000000)
{
skip = 1;
skip = 1; //<2F><><EFBFBD>v
}
if(!fi.TME && fi.FBP ==0x2a00 && (fi.TBP0==0x1C00 ) && fi.TPSM ==0 && fi.FBMSK == 0x00FFFFFF)
{
skip = 1;
skip = 1; //<2F><><EFBFBD>r<EFBFBD>ϼh<CFBC><68><EFBFBD><EFBFBD>
}
}
@@ -4514,7 +4513,7 @@ bool GSC_Kunoichi(const GSFrameInfo& fi, int& skip)
}
if(fi.TME && (fi.FBP ==0x0700 || fi.FBP==0) && fi.TBP0==0x0e00 && fi.TPSM ==0 && fi.FBMSK == 0)
{
skip = 1;
skip = 1; //<2F><><EFBFBD>}<7D>«<EFBFBD>
}
if(fi.TME)
{
@@ -4624,7 +4623,7 @@ bool GSC_ZettaiZetsumeiToshi2(const GSFrameInfo& fi, int& skip)
}
else if(fi.TME && fi.TPSM == PSM_PSMCT32 && fi.FBMSK == 0xFF000000)
{
skip = 2;
skip = 2; // <20><>
}
else if((fi.FBP | fi.TBP0)&& fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16 && fi.FBMSK == 0x3FFF)
{
@@ -4671,24 +4670,24 @@ bool GSC_ShinOnimusha(const GSFrameInfo& fi, int& skip)
if(fi.TME && fi.FBP == 0x001000 && (fi.TBP0 ==0 || fi.TBP0 == 0x0800) && fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0x00FFFFFF)
{
skip = 0;
skip = 0; //<2F><><EFBFBD>i<EFBFBD><69> <20>S<EFBFBD><53><EFBFBD>n<EFBFBD>F?
}
else if(fi.TPSM == PSM_PSMCT24 && fi.TME && fi.FBP == 0x01000) // || fi.FBP == 0x00000
{
skip = 28; //28 30 56 64
skip = 28; // <20><><EFBFBD>v28 30 56 64
}
else if(fi.FBP && fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0xFFFFFF)
{
skip = 0; //24 33 40 9
skip = 0; //24 33 40 92<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>S<EFBFBD><53><EFBFBD>n<EFBFBD>F?
}
else if(fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0xFF000000)
{
skip = 1;
skip = 1; //<2F>ߪF<DFAA><46><EFBFBD>ɪ<EFBFBD><C9AA><EFBFBD><EFBFBD><EFBFBD>
}
else if(fi.TME && (fi.TBP0 ==0x1400 || fi.TBP0 ==0x1000 ||fi.TBP0 == 0x1200) && (fi.TPSM == PSM_PSMCT32 || fi.TPSM == PSM_PSMCT24))
{
skip = 1;
}
} //<2F><><EFBFBD><EFBFBD><EFBFBD>x<EFBFBD><78><EFBFBD>L<EFBFBD><4C> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v
}
@@ -4701,19 +4700,19 @@ bool GSC_XE3(const GSFrameInfo& fi, int& skip)
{
if(fi.TPSM == PSM_PSMT8H && fi.FBMSK >= 0xEFFFFFFF)
{
skip = 73;
skip = 73; //<2F>ʵe
}
else if(fi.TME && fi.FBP ==0x03800 && fi.TBP0 && fi.TPSM ==0 && fi.FBMSK == 0)
{
skip = 1;
skip = 1; //<2F><><EFBFBD>v
}
/*else if(fi.TPSM ==0x00000 && PSM_PSMCT24 && fi.TME && fi.FBP == 0x03800)
{
skip = 1 ;
skip = 1 ; // <20><><EFBFBD><EFBFBD>
}*/
/*else if(fi.TME ==0 && (fi.FBP ==0 ) && fi.FPSM == PSM_PSMCT32 && ( fi.TPSM == PSM_PSMT8 || fi.TPSM == PSM_PSMT4) && (fi.FBMSK == 0x00FFFFFF || fi.FBMSK == 0xFF000000))
{
skip = 1;
skip = 1; //<2F>h<EFBFBD>·t
}*/
else
{
@@ -4751,15 +4750,15 @@ bool GSC_SakuraWarsSoLongMyLove(const GSFrameInfo& fi, int& skip)
{
if(fi.TME==0 && fi.FBP != fi.TBP0 && fi.TBP0 && fi.FBMSK == 0x00FFFFFF)
{
skip = 3;
skip = 3; //<2F>h<EFBFBD>·t
}
else if(fi.TME==0 && fi.FBP == fi.TBP0 && (fi.TBP0 ==0x1200 ||fi.TBP0 ==0x1180 ||fi.TBP0 ==0) && fi.FBMSK == 0x00FFFFFF)
{
skip = 3;
skip = 3; //<2F>h<EFBFBD>·t
}
else if(fi.TME && (fi.FBP ==0 || fi.FBP ==0x1180) && fi.FPSM == PSM_PSMCT32 && fi.TBP0 ==0x3F3F && fi.TPSM == PSM_PSMT8)
{
skip = 1;
skip = 1; //<2F><><EFBFBD>Ҫx<D2AA><78>
}
}
@@ -4773,7 +4772,7 @@ bool GSC_FightingBeautyWulong(const GSFrameInfo& fi, int& skip)
if(fi.TME && (fi.TBP0 ==0x0700 || fi.TBP0 ==0x0a80) && (fi.TPSM == PSM_PSMCT32 || fi.TPSM == PSM_PSMCT24))
{
skip = 1;
}
} //<2F><><EFBFBD><EFBFBD><EFBFBD>ҽk
}
return true;
@@ -4802,7 +4801,7 @@ bool GSC_GTASanAndreas(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP ==0x0a00 || fi.FBP ==0x08c0) && (fi.TBP0 ==0x1b80 || fi.TBP0 ==0x1a40) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1;
skip = 1; // <20><><EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD><69>
}
}
@@ -4815,11 +4814,11 @@ bool GSC_FrontMission5(const GSFrameInfo& fi, int& skip)
{
if(fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0)
{
skip = 1;
skip = 1; //<2F>ʵe
}
if(fi.TME && (fi.FBP ==0x1000) && (fi.TBP0 ==0x2e00 || fi.TBP0 ==0x3200) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1; //fi.TBP0 ==0x1f00
skip = 1; //<EFBFBD>v<EFBFBD>lfi.TBP0 ==0x1f00
}
}
@@ -4832,7 +4831,7 @@ bool GSC_GodHand(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP ==0x0) && (fi.TBP0 ==0x2800) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1;
skip = 1; // <20>ҽk
}
}
@@ -4845,11 +4844,11 @@ bool GSC_KnightsOfTheTemple2(const GSFrameInfo& fi, int& skip)
{
if(fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0)
{
skip = 1;
skip = 1; //<2F><><EFBFBD>v
}
else if(fi.TPSM ==0x00000 && PSM_PSMCT24 && fi.TME && (fi.FBP ==0x3400 ||fi.FBP==0x3a00))
{
skip = 1 ;
skip = 1 ; //<2F><><EFBFBD><EFBFBD>
}
}
@@ -4862,7 +4861,7 @@ bool GSC_UltramanFightingEvolution(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FBP==0x2a00 && fi.FPSM == PSM_PSMZ24 && fi.TBP0 == 0x1c00 && fi.TPSM == PSM_PSMZ24)
{
skip = 5; // blur
skip = 5; // blur <20><><EFBFBD>l<EFBFBD><6C><EFBFBD><EFBFBD>
}
}
@@ -4875,18 +4874,18 @@ bool GSC_DeathByDegreesTekkenNinaWilliams(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP ==0 ) && fi.TBP0==0x34a0 && (fi.TPSM == PSM_PSMCT32))
{
skip = 1;
skip = 1; //<2F>h<EFBFBD>ʵe<CAB5><65><EFBFBD><EFBFBD>
}
else if((fi.FBP ==0x3500)&& fi.TPSM == PSM_PSMT8 && fi.FBMSK == 0xFFFF00FF)
{
skip = 4;
skip = 4; //<2F><><EFBFBD>U<EFBFBD><55><EFBFBD><EFBFBD>
}
}
if(fi.TME)
{
if((fi.FBP | fi.TBP0 | fi.FPSM | fi.TPSM) && (fi.FBMSK == 0x00FFFFFF ))
{
skip = 1;
skip = 1; //<2F>ʵe<CAB5>t<EFBFBD><74>
}
}
return true;
@@ -4898,7 +4897,7 @@ bool GSC_AlpineRacer3(const GSFrameInfo& fi, int& skip)
{
if(!fi.TME && fi.FBP == 0 && fi.TBP0>=0 && (fi.TPSM >= 0 ) && (fi.FBMSK ==0x0001 ||fi.FBMSK == 0x00FFFFFF))
{
skip = 2;
skip = 2; //<2F>h<EFBFBD>·t
}
}
@@ -4911,7 +4910,7 @@ bool GSC_HummerBadlands(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP ==0x0a00) && (fi.TBP0 ==0x03200 || fi.TBP0==0x3700) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1;
skip = 1; //<2F>v<EFBFBD>l
}
}
@@ -4924,7 +4923,7 @@ bool GSC_SengokuBasara(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.TBP0==0x1800 ) && fi.FBMSK==0xFF000000)
{
skip = 1;
skip = 1; //<2F><>
}
}
@@ -4937,7 +4936,7 @@ bool GSC_Grandia3(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP ==0x0 || fi.FBP ==0x0e00) && (fi.TBP0 ==0x2a00 ||fi.TBP0==0x0e00 ||fi.TBP0==0) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32)
{
skip = 1;
skip = 1; // <20>ҽk
}
}
@@ -4964,11 +4963,11 @@ bool GSC_TalesofSymphonia(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && (fi.FBP >= 0) && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 == 0x2bc0 || fi.TBP0 <= 0x0200) && (fi.FBMSK==0xFF000000 ||fi.FBMSK==0x00FFFFFF))
{
skip = 1; //fi.FBMSK==0
skip = 1; //fi.FBMSK==0<EFBFBD>y<EFBFBD><EFBFBD><EFBFBD>ʵe<EFBFBD>«<EFBFBD>,<2C>[<5B>t<EFBFBD>԰<EFBFBD><D4B0>t<EFBFBD><74>
}
if(fi.TME && (fi.TBP0==0x1180 || fi.TBP0==0x1a40 || fi.TBP0==0x2300) && fi.FBMSK>=0xFF000000)
{
skip = 1;
skip = 1; //<2F>L<EFBFBD><4C><EFBFBD>ݼv
}
}
@@ -5019,11 +5018,11 @@ bool GSC_Simple2000Vol114(const GSFrameInfo& fi, int& skip)
{
if(fi.TME==0 && (fi.FBP==0x1500) && (fi.TBP0==0x2c97 || fi.TBP0==0x2ace || fi.TBP0==0x03d0 || fi.TBP0==0x2448) && (fi.FBMSK == 0x0000))
{
skip = 1;
skip = 1; //<2F>h<EFBFBD>v<EFBFBD>l
}
if(fi.TME && (fi.FBP==0x0e00) && (fi.TBP0==0x1000) && (fi.FBMSK == 0x0000))
{
skip = 1;
skip = 1; //<2F>h<EFBFBD>g<EFBFBD><67>
}
}
return true;
@@ -5034,7 +5033,7 @@ bool GSC_UrbanReign(const GSFrameInfo& fi, int& skip)
{
if(fi.TME && fi.FBP==0x0000 && fi.TBP0==0x3980 && fi.FPSM==fi.TPSM && fi.TPSM == PSM_PSMCT32 && fi.TPSM ==0 && fi.FBMSK == 0x0)
{
skip = 1;
skip = 1; //<2F>¼v
}
}
return true;

View File

@@ -139,7 +139,6 @@ class GSState : public GSAlignedClass<32>
protected:
bool IsBadFrame(int& skip, int UserHacks_SkipDraw);
int userHacks_AggressiveCRC;
int userHacks_DisableCrcHacks;
GSVertex m_v;
float m_q;

View File

@@ -56,15 +56,6 @@ void GSTextureCache::RemoveAll()
GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, const GSVector4i& r)
{
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[TEX0.PSM];
const GSLocalMemory::psm_t& cpsm = psm.pal > 0 ? GSLocalMemory::m_psm[TEX0.CPSM] : psm;
GIFRegTEXA plainTEXA;
plainTEXA.AEM = 1;
plainTEXA.TA0 = 0;
plainTEXA.TA1 = 0x80;
m_renderer->m_mem.m_clut.Read32(TEX0, plainTEXA);
const uint32* clut = m_renderer->m_mem.m_clut;
Source* src = NULL;
@@ -80,6 +71,11 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con
continue;
}
if((psm.trbpp == 16 || psm.trbpp == 24) && TEX0.TCC && TEXA != s->m_TEXA)
{
continue;
}
if(s->m_palette == NULL && psm.pal > 0 && !GSVector4i::compare64(clut, s->m_clut, psm.pal * sizeof(clut[0])))
{
continue;
@@ -136,14 +132,17 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con
}
}
if (src->m_palette)
if(psm.pal > 0)
{
int size = psm.pal * sizeof(clut[0]);
if(src->m_initpalette || !GSVector4i::update(src->m_clut, clut, size))
if(src->m_palette)
{
src->m_palette->Update(GSVector4i(0, 0, psm.pal, 1), src->m_clut, size);
src->m_initpalette = false;
if(src->m_initpalette || !GSVector4i::update(src->m_clut, clut, size))
{
src->m_palette->Update(GSVector4i(0, 0, psm.pal, 1), src->m_clut, size);
src->m_initpalette = false;
}
}
}
@@ -577,7 +576,6 @@ void GSTextureCache::IncAge()
//Fixme: Several issues in here. Not handling depth stencil, pitch conversion doesnt work.
GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, Target* dst)
{
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[TEX0.PSM];
Source* src = new Source(m_renderer, TEX0, TEXA, m_temp);
int tw = 1 << TEX0.TW;
@@ -586,17 +584,33 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
bool hack = false;
if(m_spritehack && (TEX0.PSM == PSM_PSMT8 || TEX0.PSM == PSM_PSMT8H))
if(dst == NULL)
{
src->m_spritehack_t = true;
if(m_spritehack && (TEX0.PSM == PSM_PSMT8 || TEX0.PSM == PSM_PSMT8H))
{
src->m_spritehack_t = true;
if(m_spritehack == 2 && TEX0.CPSM != PSM_PSMCT16)
src->m_spritehack_t = false;
}
else
src->m_spritehack_t = false;
if(m_spritehack == 2 && TEX0.CPSM != PSM_PSMCT16)
src->m_spritehack_t = false;
}
else
src->m_spritehack_t = false;
if(m_paltex && GSLocalMemory::m_psm[TEX0.PSM].pal > 0)
{
src->m_fmt = FMT_8;
if (dst)
src->m_texture = m_renderer->m_dev->CreateTexture(tw, th, Get8bitFormat());
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
}
else
{
src->m_fmt = FMT_32;
src->m_texture = m_renderer->m_dev->CreateTexture(tw, th);
}
}
else
{
// TODO: clean up this mess
@@ -708,9 +722,7 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
GSVector4 sr(0, 0, w, h);
GSTexture* st = src->m_texture ? src->m_texture : dst->m_texture;
GSTexture *dt = m_renderer->m_dev->CreateRenderTarget(w, h, false);
if (psm.pal > 0)
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
GSTexture* dt = m_renderer->m_dev->CreateRenderTarget(w, h, false);
if(!src->m_texture)
{
@@ -741,6 +753,43 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
else
ASSERT(0);
switch(TEX0.PSM)
{
default:
// Note: this assertion triggers in Xenosaga2 after the first intro scenes, when
// gameplay first begins (in the city).
ASSERT(0);
case PSM_PSMCT32:
src->m_fmt = FMT_32;
break;
case PSM_PSMCT24:
src->m_fmt = FMT_24;
break;
case PSM_PSMCT16:
case PSM_PSMCT16S:
src->m_fmt = FMT_16;
break;
case PSM_PSMT8H:
src->m_fmt = FMT_8H;
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
break;
case PSM_PSMT8:
//Not sure, this wasn't handled at all.
//Xenosaga 2 and 3 use it, Tales of Legendia as well.
//It's always used for fog like effects.
src->m_fmt = FMT_8;
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
break;
case PSM_PSMT4HL:
src->m_fmt = FMT_4HL;
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
break;
case PSM_PSMT4HH:
src->m_fmt = FMT_4HH;
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
break;
}
if(tmp != NULL)
{
m_renderer->m_dev->Recycle(dst->m_texture);
@@ -770,16 +819,6 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
dst->m_texture->OffsetHack_modx = modx;
dst->m_texture->OffsetHack_mody = mody;
}
else
{
if (m_paltex && psm.pal > 0)
{
src->m_texture = m_renderer->m_dev->CreateTexture(tw, th, Get8bitFormat());
src->m_palette = m_renderer->m_dev->CreateTexture(256, 1);
}
else
src->m_texture = m_renderer->m_dev->CreateTexture(tw, th);
}
if(src->m_texture == NULL)
{
@@ -788,6 +827,8 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
return NULL;
}
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[TEX0.PSM];
if(psm.pal > 0)
{
memcpy(src->m_clut, (const uint32*)m_renderer->m_mem.m_clut, psm.pal * sizeof(uint32));
@@ -856,6 +897,7 @@ GSTextureCache::Source::Source(GSRenderer* r, const GIFRegTEX0& TEX0, const GIFR
: Surface(r, temp)
, m_palette(NULL)
, m_initpalette(true)
, m_fmt(0)
, m_target(false)
, m_complete(false)
, m_p2t(NULL)
@@ -973,7 +1015,7 @@ void GSTextureCache::Source::Update(const GSVector4i& rect)
if(blocks > 0)
{
m_renderer->m_perfmon.Put(GSPerfMon::Unswizzle, bs.x * bs.y * blocks << (m_palette ? 2 : 0));
m_renderer->m_perfmon.Put(GSPerfMon::Unswizzle, bs.x * bs.y * blocks << (m_fmt == FMT_32 ? 2 : 0));
Flush(m_write.count);
}
@@ -1014,11 +1056,6 @@ void GSTextureCache::Source::Write(const GSVector4i& r)
void GSTextureCache::Source::Flush(uint32 count)
{
// This function as written will not work for paletted formats copied from framebuffers
// because they are 8 or 4 bit formats on the GS and the GS local memory module reads
// these into an 8 bit format while the D3D surfaces are 32 bit.
// However the function is never called for these cases. This is just for information
// should someone wish to use this function for these cases later.
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[m_TEX0.PSM];
int tw = 1 << m_TEX0.TW;
@@ -1034,13 +1071,7 @@ void GSTextureCache::Source::Flush(uint32 count)
GSLocalMemory::readTexture rtx = psm.rtx;
GIFRegTEXA plainTEXA;
plainTEXA.AEM = 1;
plainTEXA.TA0 = 0;
plainTEXA.TA1 = 0x80;
if(m_palette)
if(m_fmt == FMT_8)
{
pitch >>= 2;
rtx = psm.rtxP;
@@ -1064,13 +1095,13 @@ void GSTextureCache::Source::Flush(uint32 count)
if(m_texture->Map(m, &r))
{
(mem.*rtx)(o, r, m.bits, m.pitch, plainTEXA);
(mem.*rtx)(o, r, m.bits, m.pitch, m_TEXA);
m_texture->Unmap();
}
else
{
(mem.*rtx)(o, r, buff, pitch, plainTEXA);
(mem.*rtx)(o, r, buff, pitch, m_TEXA);
m_texture->Update(r, buff, pitch);
}

View File

@@ -29,6 +29,17 @@ class GSTextureCache
public:
enum {RenderTarget, DepthStencil};
enum TextureFormatType
{
FMT_32,
FMT_24,
FMT_16,
FMT_8H,
FMT_4HL,
FMT_4HH,
FMT_8,
};
class Surface : public GSAlignedClass<32>
{
protected:
@@ -60,6 +71,7 @@ public:
bool m_initpalette;
uint32 m_valid[MAX_PAGES]; // each uint32 bits map to the 32 blocks of that page
uint32* m_clut;
int m_fmt;
bool m_target;
bool m_complete;
bool m_repeating;

View File

@@ -177,7 +177,7 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
if(i == m_ps.end())
{
string str[17];
string str[16];
str[0] = format("%d", sel.fst);
str[1] = format("%d", sel.wms);
@@ -195,7 +195,6 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
str[13] = format("%d", sel.colclip);
str[14] = format("%d", sel.date);
str[15] = format("%d", sel.spritehack);
str[16] = format("%d", sel.point_sampler);
D3D11_SHADER_MACRO macro[] =
{
@@ -215,7 +214,6 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
{"PS_COLCLIP", str[13].c_str()},
{"PS_DATE", str[14].c_str()},
{"PS_SPRITEHACK", str[15].c_str()},
{"PS_POINT_SAMPLER", str[16].c_str()},
{NULL, NULL},
};
@@ -298,11 +296,11 @@ void GSDevice11::SetupOM(OMDepthStencilSelector dssel, OMBlendSelector bsel, uin
dsd.StencilReadMask = 1;
dsd.StencilWriteMask = 1;
dsd.FrontFace.StencilFunc = D3D11_COMPARISON_EQUAL;
dsd.FrontFace.StencilPassOp = dssel.alpha_stencil ? D3D11_STENCIL_OP_ZERO : D3D11_STENCIL_OP_KEEP;
dsd.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
dsd.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
dsd.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP;
dsd.BackFace.StencilFunc = D3D11_COMPARISON_EQUAL;
dsd.BackFace.StencilPassOp = dssel.alpha_stencil ? D3D11_STENCIL_OP_ZERO : D3D11_STENCIL_OP_KEEP;
dsd.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
dsd.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
dsd.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP;
}

View File

@@ -135,7 +135,7 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel
if(i == m_ps.end())
{
string str[16];
string str[15];
str[0] = format("%d", sel.fst);
str[1] = format("%d", sel.wms);
@@ -152,7 +152,6 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel
str[12] = format("%d", sel.colclip);
str[13] = format("%d", sel.date);
str[14] = format("%d", sel.spritehack);
str[15] = format("%d", sel.point_sampler);
D3DXMACRO macro[] =
{
@@ -171,7 +170,6 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel
{"PS_COLCLIP", str[12].c_str()},
{"PS_DATE", str[13].c_str()},
{"PS_SPRITEHACK", str[14].c_str()},
{"PS_POINT_SAMPLER", str[15].c_str()},
{NULL, NULL},
};
@@ -238,11 +236,11 @@ void GSDevice9::SetupOM(OMDepthStencilSelector dssel, OMBlendSelector bsel, uint
{
dss->StencilEnable = true;
dss->StencilReadMask = 1;
dss->StencilWriteMask = dssel.alpha_stencil ? 3 : 2;
dss->StencilWriteMask = 2;
dss->StencilFunc = dssel.date ? D3DCMP_EQUAL : D3DCMP_ALWAYS;
dss->StencilPassOp = dssel.alpha_stencil ? D3DSTENCILOP_ZERO : dssel.fba ? D3DSTENCILOP_REPLACE : D3DSTENCILOP_KEEP;
dss->StencilFailOp = dssel.fba && !dssel.alpha_stencil ? D3DSTENCILOP_ZERO : D3DSTENCILOP_KEEP;
dss->StencilDepthFailOp = D3DSTENCILOP_KEEP;
dss->StencilPassOp = dssel.fba ? D3DSTENCILOP_REPLACE : D3DSTENCILOP_KEEP;
dss->StencilFailOp = dssel.fba ? D3DSTENCILOP_ZERO : D3DSTENCILOP_KEEP;
dss->StencilDepthFailOp = dssel.fba ? D3DSTENCILOP_ZERO : D3DSTENCILOP_KEEP;
dss->StencilRef = 3;
}

View File

@@ -226,7 +226,7 @@ public:
}
void Set() {pthread_cond_signal(&m_cv);}
bool Wait(IGSLock* l) {pthread_cond_wait(&m_cv, *(GSCondVarLock*)l) == 0; return true;}
bool Wait(IGSLock* l) {pthread_cond_wait(&m_cv, *(GSCondVarLock*)l) == 0;}
operator pthread_cond_t* () {return &m_cv;}
};

View File

@@ -284,7 +284,6 @@ bool GSWnd::CreateContext(int major, int minor)
void GSWnd::AttachContext()
{
if (!IsContextAttached()) {
fprintf(stderr, "Attach the context\n");
glXMakeCurrent(m_XDisplay, m_Xwindow, m_context);
m_ctx_attached = true;
}
@@ -293,7 +292,6 @@ void GSWnd::AttachContext()
void GSWnd::DetachContext()
{
if (IsContextAttached()) {
fprintf(stderr, "Detach the context\n");
glXMakeCurrent(m_XDisplay, None, NULL);
m_ctx_attached = false;
}

View File

@@ -65,7 +65,4 @@ public:
vector<GSSetting> m_gpu_scale;
};
struct GSDXError {};
struct GSDXRecoverableError : GSDXError {};
extern GSdxApp theApp;

View File

@@ -94,8 +94,6 @@ BEGIN
CONTROL "WildArmsOffset",IDC_WILDHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,105,64,10
LTEXT "TEXT_GOES_HERE",IDC_HACK_DESCRIPTION,92,20,209,145
CONTROL "Aggressive-CRC",IDC_AGGRESSIVECRC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,122,66,10
CONTROL "Alpha Stencil",IDC_ALPHASTENCIL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,139,66,10
CONTROL "Disable CRCs",IDC_CHECK_DISABLE_ALL_HACKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,156,58,10
END
IDD_SHADEBOOST DIALOGEX 0, 0, 316, 129

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Version="9,00"
Name="GSdx"
ProjectGUID="{18E42F6F-3A62-41EE-B42F-79366C4F1E95}"
RootNamespace="GSdx"
@@ -1700,14 +1700,6 @@
RelativePath=".\res\convert.fx"
>
</File>
<File
RelativePath=".\res\cs.fx"
>
</File>
<File
RelativePath=".\res\fxaa.fx"
>
</File>
<File
RelativePath=".\res\interlace.fx"
>

View File

@@ -32,6 +32,12 @@
//#define DISABLE_HW_TEXTURE_CACHE // Slow but fixes a lot of bugs
//#define DISABLE_CRC_HACKS // Disable all game specific hacks
#if defined(DISABLE_HW_TEXTURE_CACHE) && !defined(DISABLE_CRC_HACKS)
#define DISABLE_CRC_HACKS
#endif
//#define DISABLE_BITMASKING
//#define DISABLE_COLCLAMP

View File

@@ -2,10 +2,10 @@
#define FMT_32 0
#define FMT_24 1
#define FMT_16 2
#define FMT_PAL 4 /* flag bit */
// And I say this as an ATI user.
#define ATI_SUCKS 1
#define FMT_8H 3
#define FMT_4HL 4
#define FMT_4HH 5
#define FMT_8 6
#if SHADER_MODEL >= 0x400
@@ -24,7 +24,7 @@
#define PS_FST 0
#define PS_WMS 0
#define PS_WMT 0
#define PS_FMT FMT_32
#define PS_FMT FMT_8
#define PS_AEM 0
#define PS_TFX 0
#define PS_TCC 1
@@ -37,7 +37,6 @@
#define PS_COLCLIP 0
#define PS_DATE 0
#define PS_SPRITEHACK 0
#define PS_POINT_SAMPLER 0
#endif
struct VS_INPUT
@@ -105,15 +104,6 @@ cbuffer cb1
float4 sample_c(float2 uv)
{
if (ATI_SUCKS && PS_POINT_SAMPLER)
{
// Weird issue with ATI cards (happens on at least HD 4xxx and 5xxx),
// it looks like they add 127/128 of a texel to sampling coordinates
// occasionally causing point sampling to erroneously round up.
// I'm manually adjusting coordinates to the centre of texels here,
// though the centre is just paranoia, the top left corner works fine.
uv = (trunc(uv * WH.zw) + float2(0.5, 0.5)) / WH.zw;
}
return Texture.Sample(TextureSampler, uv);
}
@@ -140,7 +130,7 @@ float4 sample_rt(float2 uv)
#define PS_FST 0
#define PS_WMS 0
#define PS_WMT 0
#define PS_FMT FMT_32
#define PS_FMT FMT_8
#define PS_AEM 0
#define PS_TFX 0
#define PS_TCC 0
@@ -369,38 +359,46 @@ float4 sample(float2 st, float q)
{
st /= q;
}
float4 t;
float4x4 c;
float2 dd;
/*
if(!PS_LTF && PS_FMT <= FMT_16 && PS_WMS < 2 && PS_WMT < 2)
if(PS_FMT <= FMT_16 && PS_WMS < 2 && PS_WMT < 2)
{
c[0] = sample_c(st);
t = sample_c(st);
}
*/
if (!PS_LTF && PS_FMT <= FMT_16 && PS_WMS < 3 && PS_WMT < 3)
if(PS_FMT <= FMT_16 && PS_WMS < 3 && PS_WMT < 3)
{
c[0] = sample_c(clampuv(st));
t = sample_c(clampuv(st));
}
else
{
float4 uv;
float2 dd;
if(PS_LTF)
{
uv = st.xyxy + HalfTexel;
dd = frac(uv.xy * WH.zw);
dd = frac(uv.xy * WH.zw);
}
else
{
uv = st.xyxy;
}
uv = wrapuv(uv);
if(PS_FMT & FMT_PAL)
float4x4 c;
if(PS_FMT == FMT_8H)
{
c = sample_4p(sample_4a(uv));
}
else if(PS_FMT == FMT_4HL || PS_FMT == FMT_4HH)
{
c = sample_4p(fmod(sample_4a(uv), 1.0f / 16));
}
else if(PS_FMT == FMT_8)
{
c = sample_4p(sample_4a(uv));
}
@@ -408,36 +406,34 @@ float4 sample(float2 st, float q)
{
c = sample_4c(uv);
}
}
[unroll]
for (uint i = 0; i < 4; i++)
if(PS_LTF)
{
t = lerp(lerp(c[0], c[1], dd.x), lerp(c[2], c[3], dd.x), dd.y);
}
else
{
t = c[0];
}
}
if(PS_FMT == FMT_32)
{
if((PS_FMT & ~FMT_PAL) == FMT_32)
{
#if SHADER_MODEL <= 0x300
if(PS_RT) c[i].a *= 128.0f / 255;
#endif
}
else if((PS_FMT & ~FMT_PAL) == FMT_24)
{
c[i].a = !PS_AEM || any(c[i].rgb) ? TA.x : 0;
}
else if((PS_FMT & ~FMT_PAL) == FMT_16)
{
c[i].a = c[i].a >= 0.5 ? TA.y : !PS_AEM || any(c[i].rgb) ? TA.x : 0;
}
#if SHADER_MODEL <= 0x300
if(PS_RT) t.a *= 128.0f / 255;
#endif
}
if(PS_LTF)
{
t = lerp(lerp(c[0], c[1], dd.x), lerp(c[2], c[3], dd.x), dd.y);
}
else
else if(PS_FMT == FMT_24)
{
t = c[0];
t.a = !PS_AEM || any(t.rgb) ? TA.x : 0;
}
else if(PS_FMT == FMT_16)
{
// a bit incompatible with up-scaling because the 1 bit alpha is interpolated
t.a = t.a >= 0.5 ? TA.y : !PS_AEM || any(t.rgb) ? TA.x : 0;
}
return t;
}
@@ -519,24 +515,19 @@ void atst(float4 c)
else if(PS_ATST == 2) // l
{
#if PS_SPRITEHACK == 0
clip(AREF - a - 0.5f);
clip(AREF - a);
#endif
}
else if(PS_ATST == 3) // le
{
clip(AREF - a + 0.5f);
clip(AREF - a);
}
else if(PS_ATST == 4) // e
{
clip(0.5f - abs(a - AREF));
}
else if(PS_ATST == 5) // ge
clip(0.5f - abs(a - AREF)); }
else if(PS_ATST == 5 || PS_ATST == 6) // ge, g
{
clip(a - AREF + 0.5f);
}
else if(PS_ATST == 6) // g
{
clip(a - AREF - 0.5f);
clip(a - AREF);
}
else if(PS_ATST == 7) // ne
{

View File

@@ -5,7 +5,10 @@
#define FMT_32 0
#define FMT_24 1
#define FMT_16 2
#define FMT_PAL 4 /* flag bit */
#define FMT_8H 3
#define FMT_4HL 4
#define FMT_4HH 5
#define FMT_8 6
#ifndef VS_BPPZ
#define VS_BPPZ 0
@@ -22,7 +25,7 @@
#define PS_FST 0
#define PS_WMS 0
#define PS_WMT 0
#define PS_FMT FMT_32
#define PS_FMT FMT_8
#define PS_AEM 0
#define PS_TFX 0
#define PS_TCC 1
@@ -428,19 +431,27 @@ vec4 sample_color(vec2 st, float q)
mat4 c;
if((PS_FMT & FMT_PAL) != 0)
if(PS_FMT == FMT_8H)
{
c = sample_4p(sample_4a(uv));
}
else if(PS_FMT == FMT_4HL)
{
// FIXME mod and fmod are different when value are negative
c = sample_4p(mod(sample_4a(uv), 1.0f / 16));
}
else if(PS_FMT == FMT_4HH)
{
// FIXME mod and fmod are different when value are negative
c = sample_4p(mod(sample_4a(uv) * 16, 1.0f / 16));
}
else if(PS_FMT == FMT_8)
{
c = sample_4p(sample_4a(uv));
}
else
{
c = sample_4c(uv);
// PERF: see the impact of the exansion before/after the interpolation
for (int i = 0; i < 4; i++) {
if((PS_FMT & ~FMT_PAL) == FMT_16)
{
// FIXME GLSL any only support bvec so try to mix it with notEqual
bvec3 rgb_check = notEqual( t.rgb, vec3(0.0f, 0.0f, 0.0f) );
t.a = t.a >= 0.5 ? TA.y : ( (PS_AEM == 0) || any(rgb_check) ) ? TA.x : 0.0f;
}
}
if(PS_LTF != 0)
@@ -453,7 +464,11 @@ vec4 sample_color(vec2 st, float q)
}
}
if(PS_FMT == FMT_24)
if(PS_FMT == FMT_32)
{
;
}
else if(PS_FMT == FMT_24)
{
// FIXME GLSL any only support bvec so try to mix it with notEqual
bvec3 rgb_check = notEqual( t.rgb, vec3(0.0f, 0.0f, 0.0f) );

View File

@@ -24,19 +24,27 @@
*/
#define IDC_NATIVERES 2001
#define IDC_VSYNC 2002
#define IDC_PALTEX 2003
#define IDC_LOGZ 2004
#define IDC_CHECK6 2005
#define IDC_CODECS 2006
#define IDC_RESOLUTION 2007
#define IDC_SHADER 2008
#define IDC_RESX_EDIT 2009
#define IDC_RESY_EDIT 2010
#define IDC_AA1 2011
#define IDC_SWTHREADS_EDIT 2012
#define IDC_CUSTOM1 2013
#define IDC_MSAAEDIT 2013
#define IDC_CHECK4 2014
#define IDC_FILTER 2015
#define IDC_DITHERING 2016
#define IDC_RADIO1 2017
#define IDC_RESX 2018
#define IDC_RESY 2019
#define IDD_CONFIG 2020
#define IDC_MSAA 2020
#define IDB_LOGO9 2021
#define IDB_LOGO10 2022
#define IDC_FBA 2023
@@ -44,6 +52,7 @@
#define IDC_LOGO11 2025
#define IDD_CAPTURE 2026
#define IDD_GPUCONFIG 2027
#define IDC_BLUR 2028
#define IDC_RENDERER 2029
#define IDC_INTERLACE 2030
#define IDC_ASPECTRATIO 2031
@@ -58,8 +67,14 @@
#define IDC_WIDTH 2040
#define IDC_HEIGHT 2041
#define IDC_CONFIGURE 2042
#define IDC_STATIC_TEXT_HWAA 2043
#define IDC_ALPHAHACK2 2044
#define IDC_STATIC_TEXT_SKIPDRAW 2045
#define IDC_WINDOWED 2046
#define IDC_USERHACKS 2047
#define IDC_SKIPDRAWHACKEDIT 2048
#define IDC_STATIC10 2049
#define IDC_HACKDISABLED 2050
#define IDC_SPRITEHACK 2051
#define IDRESET 2052
#define IDC_SATURATION_SLIDER 2053
@@ -78,8 +93,6 @@
#define IDC_STATIC_MSAA 2074
#define IDC_STATIC_SKIPDRAW 2075
#define IDC_AGGRESSIVECRC 2076
#define IDC_CHECK_DISABLE_ALL_HACKS 2077
#define IDC_ALPHASTENCIL 2078
#define IDC_COLORSPACE 3000
#define IDR_CONVERT_FX 10000
#define IDR_TFX_FX 10001
@@ -98,7 +111,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 10012
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 2078
#define _APS_NEXT_CONTROL_VALUE 2077
#define _APS_NEXT_SYMED_VALUE 5000
#endif
#endif

View File

@@ -27,15 +27,12 @@ using namespace std;
#include "GS.h"
#include "GifTransfer.h"
#include "null/GSnull.h"
#ifdef _MSC_VER
# include "svnrev.h"
#endif
const unsigned char version = PS2E_GS_VERSION;
const unsigned char revision = 0;
const unsigned char build = 1; // increase that with each version
static char libraryName[256];
static char *libraryName = "GSnull Driver";
Config conf;
u32 GSKeyEvent = 0;
bool GSShift = false, GSAlt = false;
@@ -63,12 +60,7 @@ EXPORT_C_(u32) PS2EgetLibType()
EXPORT_C_(char*) PS2EgetLibName()
{
#ifdef _MSC_VER
sprintf_s( libraryName, "GSnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "GSnull Driver";
#endif
return libraryName;
}
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)

View File

@@ -18,16 +18,14 @@
#include <errno.h>
#include <string>
using namespace std;
#ifdef _MSC_VER
# include "svnrev.h"
#endif
#include "Pad.h"
const u8 version = PS2E_PAD_VERSION;
const u8 revision = 0;
const u8 build = 1; // increase that with each version
static char libraryName[256];
static char *libraryName = "Padnull Driver";
string s_strIniPath="inis";
string s_strLogPath="logs";
@@ -43,13 +41,7 @@ EXPORT_C_(u32) PS2EgetLibType()
EXPORT_C_(char*) PS2EgetLibName()
{
#ifdef _MSC_VER
sprintf_s( libraryName, "Padnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "Padnull Driver";
#endif
return libraryName;
}
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)

View File

@@ -16,9 +16,7 @@
#include <stdlib.h>
#include <string>
using namespace std;
#ifdef _MSC_VER
# include "svnrev.h"
#endif
#include "USB.h"
string s_strIniPath="inis";
string s_strLogPath="logs";
@@ -27,7 +25,7 @@ const unsigned char version = PS2E_USB_VERSION;
const unsigned char revision = 0;
const unsigned char build = 7; // increase that with each version
static char libraryName[256];
static char *libraryName = "USBnull Driver";
USBcallback USBirq;
Config conf;
@@ -59,12 +57,7 @@ EXPORT_C_(u32) PS2EgetLibType()
EXPORT_C_(char*) PS2EgetLibName()
{
#ifdef _MSC_VER
sprintf_s( libraryName, "USBnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "USBnull Driver";
#endif
return libraryName;
}
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)

View File

@@ -31,15 +31,12 @@
using namespace std;
#include "DEV9.h"
#ifdef _MSC_VER
# include "svnrev.h"
#endif
const unsigned char version = PS2E_DEV9_VERSION;
const unsigned char revision = 0;
const unsigned char build = 5; // increase that with each version
static char libraryName[256];
const char *libraryName = "DEV9null Driver";
// Our IRQ call.
void (*DEV9irq)(int);
@@ -76,12 +73,7 @@ EXPORT_C_(u32) PS2EgetLibType()
EXPORT_C_(char*) PS2EgetLibName()
{
#ifdef _MSC_VER
sprintf_s( libraryName, "DEV9null Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
#else
return "DEV9null Driver";
#endif
return (char *)libraryName;
}
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)

View File

@@ -35,6 +35,7 @@ extern const unsigned char version;
extern const unsigned char revision;
extern const unsigned char build;
extern const unsigned int minor;
extern const char *libraryName;
void SaveConfig();
void LoadConfig();

View File

@@ -19,7 +19,7 @@
void ADMAOutLogWrite(void *lpData, u32 ulSize);
static const s32 tbl_XA_Factor[5][2] =
static const s32 tbl_XA_Factor[16][2] =
{
{ 0, 0 },
{ 60, 0 },
@@ -76,8 +76,11 @@ static void __forceinline XA_decode_block(s16* buffer, const s16* block, s32& pr
{
const s32 header = *block;
const s32 shift = (header&0xF)+16;
const s32 pred1 = tbl_XA_Factor[(header>> 4)&0xF][0];
const s32 pred2 = tbl_XA_Factor[(header>> 4)&0xF][1];
const int id = header >> 4 & 0xF;
if (id > 4 && MsgToConsole())
ConLog("* SPU2-X: Unknown ADPCM coefficients table id %d\n", id);
const s32 pred1 = tbl_XA_Factor[id][0];
const s32 pred2 = tbl_XA_Factor[id][1];
const s8* blockbytes = (s8*)&block[1];
const s8* blockend = &blockbytes[13];
@@ -156,11 +159,13 @@ static __forceinline s32 GetNextDataBuffered( V_Core& thiscore, uint voiceidx )
thiscore.Regs.ENDX |= (1 << voiceidx);
vc.NextA = vc.LoopStartA | 1;
if (!(vc.LoopFlags & XAFLAG_LOOP))
{
vc.Stop();
if( IsDevBuild )
{
if(MsgVoiceOff()) ConLog("* SPU2-X: Voice Off by EndPoint: %d \n", voiceidx);
if( IsDevBuild )
{
if(MsgVoiceOff()) ConLog("* SPU2-X: Voice Off by EndPoint: %d \n", voiceidx);
}
}
}
else
@@ -697,7 +702,10 @@ StereoOut32 V_Core::Mix( const VoiceMixSet& inVoices, const StereoOut32& Input,
// On the other hand, updating the buffer is cheap and easy, so might as well. ;)
Reverb_AdvanceBuffer(); // Updates the reverb work area as well, if needed.
if (!FxEnable) return TD;
// ToDo:
// Bad EndA causes memory corruption. Bad for us, unknown on PS2!
if (!FxEnable || EffectsEndA >= 0x100000) return TD;
StereoOut32 TW;