1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Add hack for WinBack to remove gray rectangle in HLE mode.

The hack removes weird texrect, which appears only in HLE mode.

Fixed The famous winback square bug #63
Fixed operation winback: sky doesn't move (regression) #578
This commit is contained in:
Sergey Lipskiy 2016-09-22 22:11:01 +07:00
parent 38ff9e97d5
commit 3567dc6bf0
3 changed files with 12 additions and 2 deletions

View File

@ -159,6 +159,7 @@ struct Config
#define hack_ignoreVIHeightChange (1<<8) //Do not reset FBO when VI height is changed. Space Invaders need it.
#define hack_rectDepthBufferCopyPD (1<<9) //Copy depth buffer only when game need it. Optimized for PD
#define hack_rectDepthBufferCopyCBFD (1<<10) //Copy depth buffer only when game need it. Optimized for CBFD
#define hack_WinBack (1<<11) //Hack for WinBack to remove gray rectangle in HLE mode
#define hack_ZeldaMM (1<<12) //Special hacks for Zelda MM
#define hack_ModifyVertexXyInShader (1<<13) //Pass screen coordinates provided in gSPModifyVertex to vertes shader.
#define hack_legoRacers (1<<14) //LEGO racers course map

View File

@ -8,6 +8,7 @@
#include "gDP.h"
#include "gSP.h"
#include "OpenGL.h"
#include "Config.h"
#include "Debug.h"
void RDP_Unknown( u32 w0, u32 w1 )
@ -266,8 +267,11 @@ void _getTexRectParams(u32 & w2, u32 & w3)
RSP.PC[RSP.PCi] += 8;
break;
case gdpTexRect:
w2 = *(u32*)&RDRAM[RSP.PC[RSP.PCi] + 0];
w3 = *(u32*)&RDRAM[RSP.PC[RSP.PCi] + 4];
if ((config.generalEmulation.hacks & hack_WinBack) == 0) {
w2 = *(u32*)&RDRAM[RSP.PC[RSP.PCi] + 0];
w3 = *(u32*)&RDRAM[RSP.PC[RSP.PCi] + 4];
} else
w2 = w3 = 0;
RSP.PC[RSP.PCi] += 8;
break;
case halfTexRect:
@ -285,6 +289,8 @@ void _TexRect( u32 w0, u32 w1, bool flip )
{
u32 w2, w3;
_getTexRectParams(w2, w3);
if (w3 == 0)
return;
const u32 ulx = _SHIFTR(w1, 12, 12);
const u32 uly = _SHIFTR(w1, 0, 12);
const u32 lrx = _SHIFTR(w0, 12, 12);

View File

@ -355,6 +355,9 @@ void RSP_Init()
config.generalEmulation.hacks |= hack_doNotResetTLUTmode;
else if (strstr(RSP.romname, (const char *)"quarterback_club_98") != nullptr)
config.generalEmulation.hacks |= hack_LoadDepthTextures;
else if (strstr(RSP.romname, (const char *)"WIN BACK") != nullptr ||
strstr(RSP.romname, (const char *)"OPERATION WINBACK") != nullptr)
config.generalEmulation.hacks |= hack_WinBack;
api().FindPluginPath(RSP.pluginpath);