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

Add hack for Lode Runner 3-D.

The game uses very unique way to allocate frame buffers.
It uses double buffering, but both buffers share the same address space (sic!)
The game uses interlaced display mode, and lines in RDP buffers are interlaced too.
Plugin's fb and VI emulation code can't handle it properly, so I just added a hack.

Fixed Lode Runner 3-D: No video output if framebuffer is enabled #1937
This commit is contained in:
Sergey Lipskiy 2019-01-12 23:28:52 +07:00
parent fc70172327
commit 0f1b45cfa6
3 changed files with 8 additions and 3 deletions

View File

@ -193,7 +193,7 @@ struct Config
#define hack_WinBack (1<<10) //Hack for WinBack to remove gray rectangle in HLE mode
#define hack_ZeldaMM (1<<11) //Special hacks for Zelda MM
#define hack_ModifyVertexXyInShader (1<<12) //Pass screen coordinates provided in gSPModifyVertex to vertes shader.
#define hack_legoRacers (1<<13) //LEGO racers course map
#define hack_LodeRunner (1<<13) //Hack for Lode runner VI issues.
#define hack_doNotResetOtherModeH (1<<14) //Don't reset othermode.h after dlist end. Quake and Quake 2
#define hack_doNotResetOtherModeL (1<<15) //Don't reset othermode.l after dlist end. Quake
#define hack_LoadDepthTextures (1<<16) //Load textures for depth buffer

View File

@ -1362,6 +1362,11 @@ void FrameBufferList::renderBuffer()
--dstY0;
}
if ((config.generalEmulation.hacks & hack_LodeRunner) != 0) {
srcY0 = 1;
XoffsetRight = XoffsetLeft = 0;
}
srcWidth = min(rdpRes.vi_width, (rdpRes.vi_hres * rdpRes.vi_x_add) >> 10);
srcHeight = rdpRes.vi_width * ((rdpRes.vi_vres*rdpRes.vi_y_add + rdpRes.vi_y_start) >> 10) / pBuffer->m_width;

View File

@ -310,8 +310,8 @@ void RSP_Init()
else if (strstr(RSP.romname, (const char *)"DOUBUTSUNOMORI") != nullptr ||
strstr(RSP.romname, (const char *)"ANIMAL FOREST") != nullptr)
config.generalEmulation.hacks |= hack_subscreen;
else if (strstr(RSP.romname, (const char *)"LEGORacers") != nullptr)
config.generalEmulation.hacks |= hack_legoRacers;
else if (strstr(RSP.romname, (const char *)"Lode Runner 3D") != nullptr)
config.generalEmulation.hacks |= hack_LodeRunner;
else if (strstr(RSP.romname, (const char *)"Blast") != nullptr)
config.generalEmulation.hacks |= hack_blastCorps;
else if (strstr(RSP.romname, (const char *)"MASK") != nullptr) // Zelda MM