From 046493e7d33240a47aac309d9edb60d1a66b7be0 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Sat, 2 Apr 2016 14:15:22 +0600 Subject: [PATCH] Revert "remove Lego racers hack" This reverts commit ca6d6c720ff2c764c39545ea4a20545eb680832e. Fixed lego racers: map doesn't appear anymore (regression) #935 --- src/Config.h | 1 + src/FrameBuffer.cpp | 2 +- src/RSP.cpp | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Config.h b/src/Config.h index d63ba506..602eff4f 100644 --- a/src/Config.h +++ b/src/Config.h @@ -153,6 +153,7 @@ struct Config #define hack_skipVIChangeCheck (1<<11) //Don't reset FBO when VI parameters changed. Zelda MM #define hack_ZeldaCamera (1<<12) //Special hack to detect and process Zelda MM camera. #define hack_ModifyVertexXyInShader (1<<13) //Pass screen coordinates provided in gSPModifyVertex to vertes shader. +#define hack_legoRacers (1<<14) //LEGO racers course map extern Config config; diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp index b33d805a..2b7cb8ce 100644 --- a/src/FrameBuffer.cpp +++ b/src/FrameBuffer.cpp @@ -597,7 +597,7 @@ void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _widt buffer.init(_address, endAddress, _format, _size, _width, _height, _cfb); m_pCurrent = &buffer; - if (m_pCurrent->_isMarioTennisScoreboard()) + if (m_pCurrent->_isMarioTennisScoreboard() || ((config.generalEmulation.hacks & hack_legoRacers) != 0 && _width == VI.width)) g_RDRAMtoFB.CopyFromRDRAM(m_pCurrent->m_startAddress + 4, true); } diff --git a/src/RSP.cpp b/src/RSP.cpp index aed5610e..ce240cc6 100644 --- a/src/RSP.cpp +++ b/src/RSP.cpp @@ -337,6 +337,8 @@ void RSP_Init() strstr(RSP.romname, (const char *)"ZELDA MASTER QUEST") != NULL || strstr(RSP.romname, (const char *)"DOUBUTSUNOMORI") != NULL) config.generalEmulation.hacks |= hack_subscreen; + else if (strstr(RSP.romname, (const char *)"LEGORacers") != NULL) + config.generalEmulation.hacks |= hack_legoRacers; else if (strstr(RSP.romname, (const char *)"Blast") != NULL) config.generalEmulation.hacks |= hack_blastCorps; else if (strstr(RSP.romname, (const char *)"SPACE INVADERS") != NULL)