diff --git a/src/Config.cpp b/src/Config.cpp index 19dc1def..e5895272 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -47,9 +47,9 @@ void Config::resetToDefaults() #else frameBufferEmulation.enable = 1; #endif - frameBufferEmulation.copyDepthToRDRAM = 0; + frameBufferEmulation.copyDepthToRDRAM = ctDisable; frameBufferEmulation.copyFromRDRAM = 0; - frameBufferEmulation.copyToRDRAM = 1; + frameBufferEmulation.copyToRDRAM = ctSync; frameBufferEmulation.detectCFB = 0; frameBufferEmulation.N64DepthCompare = 0; frameBufferEmulation.aspect = 1; diff --git a/src/Config.h b/src/Config.h index 924f0b03..06ccd5e7 100644 --- a/src/Config.h +++ b/src/Config.h @@ -63,6 +63,12 @@ struct Config aTotal = 4 }; + enum CopyToRDRAM { + ctDisable = 0, + ctSync, + ctAsync + }; + struct { u32 enable; u32 copyToRDRAM; diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp index e169b3d8..9eb1a919 100644 --- a/src/FrameBuffer.cpp +++ b/src/FrameBuffer.cpp @@ -934,7 +934,7 @@ void FrameBufferToRDRAM::Init() glBindBuffer(GL_PIXEL_PACK_BUFFER, m_aPBO[1]); glBufferData(GL_PIXEL_PACK_BUFFER, m_pTexture->textureBytes, NULL, GL_DYNAMIC_READ); glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); - m_bSync = true; + m_bSync = config.frameBufferEmulation.copyToRDRAM == Config::ctSync; m_curIndex = 0; } diff --git a/src/RSP.cpp b/src/RSP.cpp index 797b5369..0b594af0 100644 --- a/src/RSP.cpp +++ b/src/RSP.cpp @@ -209,9 +209,9 @@ void RSP_ProcessDList() } } - if (config.frameBufferEmulation.copyToRDRAM) + if (config.frameBufferEmulation.copyToRDRAM != Config::ctDisable) FrameBuffer_CopyToRDRAM(gDP.colorImage.address); - if (config.frameBufferEmulation.copyDepthToRDRAM) + if (config.frameBufferEmulation.copyDepthToRDRAM != Config::ctDisable) FrameBuffer_CopyDepthBuffer(gDP.colorImage.address); RSP.busy = FALSE; diff --git a/src/gDP.cpp b/src/gDP.cpp index 0b1ff9c9..8597fe5d 100644 --- a/src/gDP.cpp +++ b/src/gDP.cpp @@ -883,9 +883,9 @@ void gDPTextureRectangleFlip( f32 ulx, f32 uly, f32 lrx, f32 lry, s32 tile, f32 void gDPFullSync() { if (RSP.bLLE) { - if (config.frameBufferEmulation.copyToRDRAM) + if (config.frameBufferEmulation.copyToRDRAM != Config::ctDisable) FrameBuffer_CopyToRDRAM(gDP.colorImage.address); - if (config.frameBufferEmulation.copyDepthToRDRAM) + if (config.frameBufferEmulation.copyDepthToRDRAM != Config::ctDisable) FrameBuffer_CopyDepthBuffer(gDP.colorImage.address); }