From d43148bc9e702954d599a86799ca8276ae125276 Mon Sep 17 00:00:00 2001 From: purplemarshmallow Date: Tue, 29 Nov 2016 20:30:54 +0100 Subject: [PATCH] add hack for framebuffer emulation in Pokemon Snap --- 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 6936413e..53abdd5a 100644 --- a/src/Config.h +++ b/src/Config.h @@ -193,6 +193,7 @@ struct Config #define hack_legoRacers (1<<14) //LEGO racers course map #define hack_doNotResetTLUTmode (1<<15) //Don't set TLUT mode to none after dlist end. Quake 64 #define hack_LoadDepthTextures (1<<16) //Load textures for depth buffer +#define hack_Snap (1<<17) //Frame buffer settings for camera detection in Pokemon Snap. Copy aux buffers at fullsync extern Config config; diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp index 353a6e85..2f3d77af 100644 --- a/src/FrameBuffer.cpp +++ b/src/FrameBuffer.cpp @@ -571,7 +571,7 @@ FrameBuffer * FrameBufferList::findTmpBuffer(u32 _address) void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _width, u16 _height, bool _cfb) { - if (m_pCurrent != nullptr && config.frameBufferEmulation.copyAuxToRDRAM != 0) { + if (m_pCurrent != nullptr && config.frameBufferEmulation.copyAuxToRDRAM != 0 && (config.generalEmulation.hacks & hack_Snap) == 0) { if (m_pCurrent->isAuxiliary()) { FrameBuffer_CopyToRDRAM(m_pCurrent->m_startAddress, true); removeBuffer(m_pCurrent->m_startAddress); diff --git a/src/RSP.cpp b/src/RSP.cpp index f21dfd0e..8b2a7b84 100644 --- a/src/RSP.cpp +++ b/src/RSP.cpp @@ -360,6 +360,8 @@ void RSP_Init() else if (strstr(RSP.romname, (const char *)"WIN BACK") != nullptr || strstr(RSP.romname, (const char *)"OPERATION WINBACK") != nullptr) config.generalEmulation.hacks |= hack_WinBack; + else if (strstr(RSP.romname, (const char *)"POKEMON SNAP") != nullptr) + config.generalEmulation.hacks |= hack_Snap; api().FindPluginPath(RSP.pluginpath);