mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +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:
parent
38ff9e97d5
commit
3567dc6bf0
|
@ -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_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_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_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_ZeldaMM (1<<12) //Special hacks for Zelda MM
|
||||||
#define hack_ModifyVertexXyInShader (1<<13) //Pass screen coordinates provided in gSPModifyVertex to vertes shader.
|
#define hack_ModifyVertexXyInShader (1<<13) //Pass screen coordinates provided in gSPModifyVertex to vertes shader.
|
||||||
#define hack_legoRacers (1<<14) //LEGO racers course map
|
#define hack_legoRacers (1<<14) //LEGO racers course map
|
||||||
|
|
10
src/RDP.cpp
10
src/RDP.cpp
|
@ -8,6 +8,7 @@
|
||||||
#include "gDP.h"
|
#include "gDP.h"
|
||||||
#include "gSP.h"
|
#include "gSP.h"
|
||||||
#include "OpenGL.h"
|
#include "OpenGL.h"
|
||||||
|
#include "Config.h"
|
||||||
#include "Debug.h"
|
#include "Debug.h"
|
||||||
|
|
||||||
void RDP_Unknown( u32 w0, u32 w1 )
|
void RDP_Unknown( u32 w0, u32 w1 )
|
||||||
|
@ -266,8 +267,11 @@ void _getTexRectParams(u32 & w2, u32 & w3)
|
||||||
RSP.PC[RSP.PCi] += 8;
|
RSP.PC[RSP.PCi] += 8;
|
||||||
break;
|
break;
|
||||||
case gdpTexRect:
|
case gdpTexRect:
|
||||||
w2 = *(u32*)&RDRAM[RSP.PC[RSP.PCi] + 0];
|
if ((config.generalEmulation.hacks & hack_WinBack) == 0) {
|
||||||
w3 = *(u32*)&RDRAM[RSP.PC[RSP.PCi] + 4];
|
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;
|
RSP.PC[RSP.PCi] += 8;
|
||||||
break;
|
break;
|
||||||
case halfTexRect:
|
case halfTexRect:
|
||||||
|
@ -285,6 +289,8 @@ void _TexRect( u32 w0, u32 w1, bool flip )
|
||||||
{
|
{
|
||||||
u32 w2, w3;
|
u32 w2, w3;
|
||||||
_getTexRectParams(w2, w3);
|
_getTexRectParams(w2, w3);
|
||||||
|
if (w3 == 0)
|
||||||
|
return;
|
||||||
const u32 ulx = _SHIFTR(w1, 12, 12);
|
const u32 ulx = _SHIFTR(w1, 12, 12);
|
||||||
const u32 uly = _SHIFTR(w1, 0, 12);
|
const u32 uly = _SHIFTR(w1, 0, 12);
|
||||||
const u32 lrx = _SHIFTR(w0, 12, 12);
|
const u32 lrx = _SHIFTR(w0, 12, 12);
|
||||||
|
|
|
@ -355,6 +355,9 @@ void RSP_Init()
|
||||||
config.generalEmulation.hacks |= hack_doNotResetTLUTmode;
|
config.generalEmulation.hacks |= hack_doNotResetTLUTmode;
|
||||||
else if (strstr(RSP.romname, (const char *)"quarterback_club_98") != nullptr)
|
else if (strstr(RSP.romname, (const char *)"quarterback_club_98") != nullptr)
|
||||||
config.generalEmulation.hacks |= hack_LoadDepthTextures;
|
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);
|
api().FindPluginPath(RSP.pluginpath);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user