From 5ff77f9c882acdec1bd673d883dded9d219b8fa0 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Fri, 18 Jan 2013 13:40:54 -0600 Subject: [PATCH 01/35] Fix emulated turntable crossfade slider. (DJ Hero controller) Fixes issue 4504. --- Source/Core/Core/Src/HW/WiimoteEmu/Attachment/Turntable.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/Attachment/Turntable.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/Attachment/Turntable.cpp index 292d9c5a86..182170f501 100644 --- a/Source/Core/Core/Src/HW/WiimoteEmu/Attachment/Turntable.cpp +++ b/Source/Core/Core/Src/HW/WiimoteEmu/Attachment/Turntable.cpp @@ -97,8 +97,9 @@ void Turntable::GetState(u8* const data, const bool focus) // crossfade slider { - u8 cfs = 0; - m_crossfade->GetState(&cfs, 8, 7); + s8 cfs = 0; + m_crossfade->GetState(&cfs, focus ? 7 : 0); + cfs += 8; ttdata->slider = cfs; } From c4bd6329c003686fd43002fc4f78f735166b6cbd Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 18 Jan 2013 23:42:37 -0500 Subject: [PATCH 02/35] Fully fix that clear bug in aldlist.cpp. Seems I missed part. Corrected it. --- Source/Core/AudioCommon/Src/aldlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/AudioCommon/Src/aldlist.cpp b/Source/Core/AudioCommon/Src/aldlist.cpp index 5e2e072f7b..fa11fe3282 100644 --- a/Source/Core/AudioCommon/Src/aldlist.cpp +++ b/Source/Core/AudioCommon/Src/aldlist.cpp @@ -146,7 +146,7 @@ ALDeviceList::~ALDeviceList() { for (u32 i = 0; i < vDeviceInfo.size(); i++) { if (vDeviceInfo[i].pvstrExtensions) { - vDeviceInfo[i].pvstrExtensions->empty(); + vDeviceInfo[i].pvstrExtensions->clear(); delete vDeviceInfo[i].pvstrExtensions; } } From ff9ba6777327d07291bd8682e38931b77fea463d Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sat, 19 Jan 2013 00:51:00 -0600 Subject: [PATCH 03/35] Remove the dependency on rectangle textures in the software rasterizer. Also make it the be used by default in the software renderer like it was before. --- .../Plugin_VideoSoftware/Src/SWRenderer.cpp | 68 ++++++++----------- .../Src/SWVideoConfig.cpp | 2 +- 2 files changed, 28 insertions(+), 42 deletions(-) diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp index 49739b7f6e..16ac1c3cd0 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp @@ -52,10 +52,10 @@ void CreateShaders() { static const char *fragShaderText = "varying " PREC " vec2 TexCoordOut;\n" - "uniform " TEXTYPE " Texture;\n" + "uniform sampler2D Texture;\n" "void main() {\n" " " PREC " vec4 tmpcolor;\n" - " tmpcolor = " TEXFUNC "(Texture, TexCoordOut);\n" + " tmpcolor = texture2D(Texture, TexCoordOut);\n" " gl_FragColor = tmpcolor;\n" "}\n"; static const char *vertShaderText = @@ -63,7 +63,7 @@ void CreateShaders() "attribute vec2 TexCoordIn;\n " "varying vec2 TexCoordOut;\n " "void main() {\n" - " gl_Position = pos;\n" + " gl_Position = pos;\n" " TexCoordOut = TexCoordIn;\n" "}\n"; @@ -74,6 +74,23 @@ void CreateShaders() uni_tex = glGetUniformLocation(program, "Texture"); attr_pos = glGetAttribLocation(program, "pos"); attr_tex = glGetAttribLocation(program, "TexCoordIn"); + + static const GLfloat verts[4][2] = { + { -1, -1}, // Left top + { -1, 1}, // left bottom + { 1, 1}, // right bottom + { 1, -1} // right top + }; + static const GLfloat texverts[4][2] = { + {0, 1}, + {0, 0}, + {1, 0}, + {1, 1} + }; + + glUniform1i(uni_tex, 0); + glVertexAttribPointer(attr_pos, 2, GL_FLOAT, GL_FALSE, 0, verts); + glVertexAttribPointer(attr_tex, 2, GL_FLOAT, GL_FALSE, 0, texverts); } void SWRenderer::Prepare() @@ -86,7 +103,7 @@ void SWRenderer::Prepare() // TODO: Enable for GLES once RasterFont supports GLES #ifndef USE_GLES s_pfont = new RasterFont(); - glEnable(GL_TEXTURE_RECTANGLE_ARB); + glEnable(GL_TEXTURE_2D); #endif GL_REPORT_ERRORD(); } @@ -142,48 +159,20 @@ void SWRenderer::DrawTexture(u8 *texture, int width, int height) glViewport(0, 0, glWidth, glHeight); glScissor(0, 0, glWidth, glHeight); - glBindTexture(TEX2D, s_RenderTarget); + glBindTexture(GL_TEXTURE_2D, s_RenderTarget); - glTexImage2D(TEX2D, 0, GL_RGBA, (GLsizei)width, (GLsizei)height, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture); - glTexParameteri(TEX2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(TEX2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)width, (GLsizei)height, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - static const GLfloat verts[4][2] = { - { -1, -1}, // Left top - { -1, 1}, // left bottom - { 1, 1}, // right bottom - { 1, -1} // right top - }; - //Texture rectangle uses pixel coordinates -#ifndef USE_GLES - GLfloat u_max = (GLfloat)width; - GLfloat v_max = (GLfloat)height; - - static const GLfloat texverts[4][2] = { - {0, v_max}, - {0, 0}, - {u_max, 0}, - {u_max, v_max} - }; -#else - static const GLfloat texverts[4][2] = { - {0, 1}, - {0, 0}, - {1, 0}, - {1, 1} - }; -#endif - glVertexAttribPointer(attr_pos, 2, GL_FLOAT, GL_FALSE, 0, verts); - glVertexAttribPointer(attr_tex, 2, GL_FLOAT, GL_FALSE, 0, texverts); glEnableVertexAttribArray(attr_pos); glEnableVertexAttribArray(attr_tex); glActiveTexture(GL_TEXTURE0); - glUniform1i(uni_tex, 0); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glDisableVertexAttribArray(attr_pos); glDisableVertexAttribArray(attr_tex); - glBindTexture(TEX2D, 0); + glBindTexture(GL_TEXTURE_2D, 0); GL_REPORT_ERRORD(); } @@ -195,11 +184,8 @@ void SWRenderer::SwapBuffer() GLInterface->Swap(); - swstats.ResetFrame(); + swstats.ResetFrame(); -#ifndef USE_GLES - glClearDepth(1.0f); -#endif glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); GL_REPORT_ERRORD(); diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.cpp index 7f7ef6b0f8..05a6cdddf2 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWVideoConfig.cpp @@ -51,7 +51,7 @@ void SWVideoConfig::Load(const char* ini_file) iniFile.Get("Hardware", "Fullscreen", &bFullscreen, 0); // Hardware iniFile.Get("Hardware", "RenderToMainframe", &renderToMainframe, false); - iniFile.Get("Rendering", "HwRasterizer", &bHwRasterizer, true); + iniFile.Get("Rendering", "HwRasterizer", &bHwRasterizer, false); iniFile.Get("Info", "ShowStats", &bShowStats, false); From 621204f3e86212de77e10285b9cfd70b95c8fd8d Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sat, 19 Jan 2013 02:18:39 -0600 Subject: [PATCH 04/35] Fix switching from the different rasterizers --- .../Plugin_VideoSoftware/Src/SWRenderer.cpp | 34 +++++++------- .../Plugin_VideoSoftware/Src/SWmain.cpp | 44 ++++++++----------- 2 files changed, 37 insertions(+), 41 deletions(-) diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp index 16ac1c3cd0..fb472cfdba 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp @@ -75,22 +75,7 @@ void CreateShaders() attr_pos = glGetAttribLocation(program, "pos"); attr_tex = glGetAttribLocation(program, "TexCoordIn"); - static const GLfloat verts[4][2] = { - { -1, -1}, // Left top - { -1, 1}, // left bottom - { 1, 1}, // right bottom - { 1, -1} // right top - }; - static const GLfloat texverts[4][2] = { - {0, 1}, - {0, 0}, - {1, 0}, - {1, 1} - }; - - glUniform1i(uni_tex, 0); - glVertexAttribPointer(attr_pos, 2, GL_FLOAT, GL_FALSE, 0, verts); - glVertexAttribPointer(attr_tex, 2, GL_FLOAT, GL_FALSE, 0, texverts); + } void SWRenderer::Prepare() @@ -165,8 +150,25 @@ void SWRenderer::DrawTexture(u8 *texture, int width, int height) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glUseProgram(program); + static const GLfloat verts[4][2] = { + { -1, -1}, // Left top + { -1, 1}, // left bottom + { 1, 1}, // right bottom + { 1, -1} // right top + }; + static const GLfloat texverts[4][2] = { + {0, 1}, + {0, 0}, + {1, 0}, + {1, 1} + }; + + glVertexAttribPointer(attr_pos, 2, GL_FLOAT, GL_FALSE, 0, verts); + glVertexAttribPointer(attr_tex, 2, GL_FLOAT, GL_FALSE, 0, texverts); glEnableVertexAttribArray(attr_pos); glEnableVertexAttribArray(attr_tex); + glUniform1i(uni_tex, 0); glActiveTexture(GL_TEXTURE0); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glDisableVertexAttribArray(attr_pos); diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp index ae2a4db3f5..4c88a89ab6 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp @@ -70,7 +70,7 @@ void VideoSoftware::ShowConfig(void *_hParent) bool VideoSoftware::Initialize(void *&window_handle) { - g_SWVideoConfig.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_software.ini").c_str()); + g_SWVideoConfig.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_software.ini").c_str()); InitInterface(); if (!GLInterface->Create(window_handle)) @@ -79,18 +79,16 @@ bool VideoSoftware::Initialize(void *&window_handle) return false; } - InitBPMemory(); - InitXFMemory(); - SWCommandProcessor::Init(); - SWPixelEngine::Init(); - OpcodeDecoder::Init(); - Clipper::Init(); - Rasterizer::Init(); - if (g_SWVideoConfig.bHwRasterizer) - HwRasterizer::Init(); - else - SWRenderer::Init(); - DebugUtil::Init(); + InitBPMemory(); + InitXFMemory(); + SWCommandProcessor::Init(); + SWPixelEngine::Init(); + OpcodeDecoder::Init(); + Clipper::Init(); + Rasterizer::Init(); + HwRasterizer::Init(); + SWRenderer::Init(); + DebugUtil::Init(); return true; } @@ -134,10 +132,8 @@ void VideoSoftware::EmuStateChange(EMUSTATE_CHANGE newState) void VideoSoftware::Shutdown() { - if (g_SWVideoConfig.bHwRasterizer) - HwRasterizer::Shutdown(); - else - SWRenderer::Shutdown(); + HwRasterizer::Shutdown(); + SWRenderer::Shutdown(); GLInterface->Shutdown(); } @@ -149,9 +145,9 @@ void VideoSoftware::Video_Prepare() { #ifndef USE_GLES if (glewInit() != GLEW_OK) { - ERROR_LOG(VIDEO, "glewInit() failed!Does your video card support OpenGL 2.x?"); - return; - } + ERROR_LOG(VIDEO, "glewInit() failed!Does your video card support OpenGL 2.x?"); + return; + } // Handle VSync on/off #ifdef _WIN32 @@ -168,12 +164,10 @@ void VideoSoftware::Video_Prepare() #endif } - if (g_SWVideoConfig.bHwRasterizer) - HwRasterizer::Prepare(); - else - SWRenderer::Prepare(); + HwRasterizer::Prepare(); + SWRenderer::Prepare(); - INFO_LOG(VIDEO, "Video backend initialized."); + INFO_LOG(VIDEO, "Video backend initialized."); } // Run from the CPU thread (from VideoInterface.cpp) From c553c42d63daad7aafbd2996da1f05ce2a911635 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sat, 19 Jan 2013 05:09:00 +0100 Subject: [PATCH 05/35] Implement backpatch support for 16 bit loads --- Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp | 7 +++++-- Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp b/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp index 9337f87b77..e2d9b50d42 100644 --- a/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp +++ b/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp @@ -90,6 +90,10 @@ const u8 *TrampolineCache::GetReadTrampoline(const InstructionInfo &info) case 4: CALL(thunks.ProtectFunction((void *)&Memory::Read_U32, 1)); break; + case 2: + CALL(thunks.ProtectFunction((void *)&Memory::Read_U16, 1)); + SHL(32, R(EAX), Imm8(16)); + break; } ABI_PopAllCallerSavedRegsAndAdjustStack(); if (dataReg != EAX) { @@ -176,7 +180,7 @@ const u8 *JitBase::BackPatch(u8 *codePtr, int accessType, u32 emAddress, void *c codePtr, emAddress); }*/ - if (info.operandSize != 4) { + if (info.operandSize == 1) { BackPatchError(StringFromFormat("BackPatch - no support for operand size %i", info.operandSize), codePtr, emAddress); } @@ -188,7 +192,6 @@ const u8 *JitBase::BackPatch(u8 *codePtr, int accessType, u32 emAddress, void *c PanicAlert("BackPatch : Currently only supporting reads." "\n\nAttempted to write to %08x.", emAddress); - // In the first iteration, we assume that all accesses are 32-bit. We also only deal with reads. if (accessType == 0) { XEmitter emitter(codePtr); diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp index 4cfc3ab934..f43604fa9b 100644 --- a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp +++ b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp @@ -120,12 +120,13 @@ void EmuCodeBlock::SafeLoadToEAX(const Gen::OpArg & opAddress, int accessSize, s { #if defined(_M_X64) #ifdef ENABLE_MEM_CHECK - if (accessSize == 32 && !Core::g_CoreStartupParameter.bMMU && !Core::g_CoreStartupParameter.bEnableDebugging) + if (accessSize != 8 && !Core::g_CoreStartupParameter.bMMU && !Core::g_CoreStartupParameter.bEnableDebugging) #else - if (accessSize == 32 && !Core::g_CoreStartupParameter.bMMU) + if (accessSize != 8 && !Core::g_CoreStartupParameter.bMMU) #endif { - // BackPatch only supports 32-bits accesses + // We don't support 8 bit loads backpatching at the moment, but they + // are very rare. UnsafeLoadToEAX(opAddress, accessSize, offset, signExtend); } else From 905d38827e70ea438b7c744addd46f75e89d87b0 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sat, 19 Jan 2013 16:52:13 +0100 Subject: [PATCH 06/35] Implement 8 bit loads backpatching --- .../Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp | 7 +++---- Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp | 12 +++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp b/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp index e2d9b50d42..3042cfedba 100644 --- a/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp +++ b/Source/Core/Core/Src/PowerPC/JitCommon/JitBackpatch.cpp @@ -94,6 +94,9 @@ const u8 *TrampolineCache::GetReadTrampoline(const InstructionInfo &info) CALL(thunks.ProtectFunction((void *)&Memory::Read_U16, 1)); SHL(32, R(EAX), Imm8(16)); break; + case 1: + CALL(thunks.ProtectFunction((void *)&Memory::Read_U8, 1)); + break; } ABI_PopAllCallerSavedRegsAndAdjustStack(); if (dataReg != EAX) { @@ -180,10 +183,6 @@ const u8 *JitBase::BackPatch(u8 *codePtr, int accessType, u32 emAddress, void *c codePtr, emAddress); }*/ - if (info.operandSize == 1) { - BackPatchError(StringFromFormat("BackPatch - no support for operand size %i", info.operandSize), codePtr, emAddress); - } - if (info.otherReg != RBX) PanicAlert("BackPatch : Base reg not RBX." "\n\nAttempted to access %08x.", emAddress); diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp index f43604fa9b..cc1327c695 100644 --- a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp +++ b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp @@ -96,7 +96,11 @@ void EmuCodeBlock::UnsafeLoadToEAX(const Gen::OpArg & opAddress, int accessSize, MOVZX(32, accessSize, EAX, MDisp(EAX, (u32)Memory::base + offset)); } #endif - + + // Add a 2 bytes NOP to have some space for the backpatching + if (accessSize == 8) + NOP(2); + if (accessSize == 32) { BSWAP(32, EAX); @@ -120,13 +124,11 @@ void EmuCodeBlock::SafeLoadToEAX(const Gen::OpArg & opAddress, int accessSize, s { #if defined(_M_X64) #ifdef ENABLE_MEM_CHECK - if (accessSize != 8 && !Core::g_CoreStartupParameter.bMMU && !Core::g_CoreStartupParameter.bEnableDebugging) + if (!Core::g_CoreStartupParameter.bMMU && !Core::g_CoreStartupParameter.bEnableDebugging) #else - if (accessSize != 8 && !Core::g_CoreStartupParameter.bMMU) + if (!Core::g_CoreStartupParameter.bMMU) #endif { - // We don't support 8 bit loads backpatching at the moment, but they - // are very rare. UnsafeLoadToEAX(opAddress, accessSize, offset, signExtend); } else From ed1a9480b0233e424ae3c266467b6d821c801793 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Sat, 19 Jan 2013 15:02:02 -0500 Subject: [PATCH 07/35] Misc movie fixes. Fix setting memory cards on playback. Fix saving revision to header. Herpa derp lets open a file while it's still open in another function, and not even check if it fails to load. Fix an assumption that wii games are using a wiimote. --- Source/Core/Core/Src/HW/EXI.cpp | 8 ++++- Source/Core/Core/Src/Movie.cpp | 52 ++++++++++++++++----------------- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/Source/Core/Core/Src/HW/EXI.cpp b/Source/Core/Core/Src/HW/EXI.cpp index 8800ea6095..1e86bd1b90 100644 --- a/Source/Core/Core/Src/HW/EXI.cpp +++ b/Source/Core/Core/Src/HW/EXI.cpp @@ -25,6 +25,7 @@ #include "EXI.h" #include "Sram.h" +#include "../Movie.h" SRAM g_SRAM; namespace ExpansionInterface @@ -44,7 +45,12 @@ void Init() for (u32 i = 0; i < NUM_CHANNELS; i++) g_Channels[i] = new CEXIChannel(i); - g_Channels[0]->AddDevice(SConfig::GetInstance().m_EXIDevice[0], 0); // SlotA + if (Movie::IsPlayingInput() && Movie::IsUsingMemcard() && Movie::IsConfigSaved()) + g_Channels[0]->AddDevice(EXIDEVICE_MEMORYCARD, 0); // SlotA + else if(Movie::IsPlayingInput() && !Movie::IsUsingMemcard() && Movie::IsConfigSaved()) + g_Channels[0]->AddDevice(EXIDEVICE_NONE, 0); // SlotA + else + g_Channels[0]->AddDevice(SConfig::GetInstance().m_EXIDevice[0], 0); // SlotA g_Channels[0]->AddDevice(EXIDEVICE_MASKROM, 1); g_Channels[0]->AddDevice(SConfig::GetInstance().m_EXIDevice[2], 2); // Serial Port 1 g_Channels[1]->AddDevice(SConfig::GetInstance().m_EXIDevice[1], 0); // SlotB diff --git a/Source/Core/Core/Src/Movie.cpp b/Source/Core/Core/Src/Movie.cpp index 316181d449..752e367431 100644 --- a/Source/Core/Core/Src/Movie.cpp +++ b/Source/Core/Core/Src/Movie.cpp @@ -736,16 +736,6 @@ bool PlayInput(const char *filename) goto cleanup; } - // Load savestate (and skip to frame data) - if(tmpHeader.bFromSaveState) - { - const std::string stateFilename = std::string(filename) + ".sav"; - if(File::Exists(stateFilename)) - Core::SetStateFileName(stateFilename); - g_bRecordingFromSaveState = true; - Movie::LoadInput(filename); - } - ReadHeader(); g_totalFrames = tmpHeader.frameCount; g_totalLagCount = tmpHeader.lagCount; @@ -762,6 +752,16 @@ bool PlayInput(const char *filename) g_currentByte = 0; g_recordfd.Close(); + // Load savestate (and skip to frame data) + if(tmpHeader.bFromSaveState) + { + const std::string stateFilename = std::string(filename) + ".sav"; + if(File::Exists(stateFilename)) + Core::SetStateFileName(stateFilename); + g_bRecordingFromSaveState = true; + Movie::LoadInput(filename); + } + return true; cleanup: @@ -786,7 +786,13 @@ void DoState(PointerWrap &p) void LoadInput(const char *filename) { - File::IOFile t_record(filename, "r+b"); + File::IOFile t_record; + if (!t_record.Open(filename, "r+b")) + { + PanicAlertT("Failed to read %s", filename); + EndPlayInput(false); + return; + } t_record.ReadArray(&tmpHeader, 1); @@ -849,7 +855,7 @@ void LoadInput(const char *filename) { // this is a "you did something wrong" alert for the user's benefit. // we'll try to say what's going on in excruciating detail, otherwise the user might not believe us. - if(Core::g_CoreStartupParameter.bWii) + if(IsUsingWiimote(1)) { // TODO: more detail PanicAlertT("Warning: You loaded a save whose movie mismatches on byte %d (0x%X). You should load another save before continuing, or load this state with read-only mode off. Otherwise you'll probably get a desync.", i+256, i+256); @@ -925,18 +931,6 @@ void PlayController(SPADStatus *PadStatus, int controllerID) if (!IsPlayingInput() || !IsUsingPad(controllerID) || tmpInput == NULL) return; - if (g_currentFrame == 1) - { - if (tmpHeader.bMemcard) - { - ExpansionInterface::ChangeDevice(0, EXIDEVICE_MEMORYCARD, 0); - } - else if (!tmpHeader.bMemcard) - { - ExpansionInterface::ChangeDevice(0, EXIDEVICE_NONE, 0); - } - } - if (g_currentByte + 8 > g_totalBytes) { PanicAlertT("Premature movie end in PlayController. %u + 8 > %u", (u32)g_currentByte, (u32)g_totalBytes); @@ -1194,9 +1188,13 @@ void GetSettings() g_bClearSave = !File::Exists(SConfig::GetInstance().m_strMemoryCardA); bMemcard = SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD; - std::stringstream ss; - ss << std::hex << SCM_REV_STR; - ss >> revision; + int temp; + + for(int i = 0; i < 4; ++i ) + { + sscanf(SCM_REV_STR + 2 * i, "%2x", &temp ); + revision[i] = temp; + } } void CheckMD5() From d6cee44be03e0320935e4c5480dac1e1357d87ef Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Sat, 19 Jan 2013 15:08:29 -0500 Subject: [PATCH 08/35] Typo fix. --- Source/Core/Core/Src/Movie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/Src/Movie.cpp b/Source/Core/Core/Src/Movie.cpp index 752e367431..6c646f6870 100644 --- a/Source/Core/Core/Src/Movie.cpp +++ b/Source/Core/Core/Src/Movie.cpp @@ -855,7 +855,7 @@ void LoadInput(const char *filename) { // this is a "you did something wrong" alert for the user's benefit. // we'll try to say what's going on in excruciating detail, otherwise the user might not believe us. - if(IsUsingWiimote(1)) + if(IsUsingWiimote(0)) { // TODO: more detail PanicAlertT("Warning: You loaded a save whose movie mismatches on byte %d (0x%X). You should load another save before continuing, or load this state with read-only mode off. Otherwise you'll probably get a desync.", i+256, i+256); From 01d393ed6cb823abe623e8c71a971368c94a6157 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Sat, 19 Jan 2013 15:21:00 -0500 Subject: [PATCH 09/35] Actually remove lttc. --- Source/Core/Core/Src/Core.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index 797c3e1be6..a6c07eeaaa 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -310,8 +310,6 @@ void CpuThread() g_video_backend->Video_Prepare(); } - Common::SetCurrentThreadAffinity(1); // Force to first core - #if defined(_M_X64) EMM::InstallExceptionHandler(); // Let's run under memory watch #endif @@ -343,8 +341,6 @@ void FifoPlayerThread() Common::SetCurrentThreadName("FIFO-GPU thread"); } - Common::SetCurrentThreadAffinity(1); // Force to first core - g_bStarted = true; // Enter CPU run loop. When we leave it - we are done. @@ -369,13 +365,6 @@ void EmuThread() Common::SetCurrentThreadName("Emuthread - Starting"); - { - if (cpu_info.num_cores > 3) // Force to third, non-HT core - Common::SetCurrentThreadAffinity(4); - else // Force to second core - Common::SetCurrentThreadAffinity(2); - } - DisplayMessage(cpu_info.brand_string, 8000); DisplayMessage(cpu_info.Summarize(), 8000); DisplayMessage(_CoreParameter.m_strFilename, 3000); From 37af25e03dd132c691aa2ff9709e439b4eb9e0ad Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sun, 13 Jan 2013 10:49:33 +0100 Subject: [PATCH 10/35] Revert my dual-core fix for FifoPlayer. Apparently it breaks more than it fixes. This reverts commit bab9b5d3ce14c5b9cb55bd34da4851672e287467. --- .../Core/Core/Src/FifoPlayer/FifoPlayer.cpp | 42 +------------------ Source/Core/Core/Src/FifoPlayer/FifoPlayer.h | 1 - 2 files changed, 1 insertion(+), 42 deletions(-) diff --git a/Source/Core/Core/Src/FifoPlayer/FifoPlayer.cpp b/Source/Core/Core/Src/FifoPlayer/FifoPlayer.cpp index 1873a91574..ff90736fec 100644 --- a/Source/Core/Core/Src/FifoPlayer/FifoPlayer.cpp +++ b/Source/Core/Core/Src/FifoPlayer/FifoPlayer.cpp @@ -20,7 +20,6 @@ #include "Common.h" #include "CoreTiming.h" -#include "Thread.h" #include "HW/GPFifo.h" #include "HW/Memmap.h" @@ -28,7 +27,6 @@ #include "PowerPC/PowerPC.h" #include "BPMemory.h" -#include "CommandProcessor.h" FifoPlayer::~FifoPlayer() { @@ -96,40 +94,7 @@ bool FifoPlayer::Play() if (m_EarlyMemoryUpdates && m_CurrentFrame == m_FrameRangeStart) WriteAllMemoryUpdates(); - // Stop Fifo processing until we've written the new frame - WriteCP(CommandProcessor::CTRL_REGISTER, 0x10); // disable read & breakpoints, enable GP link - - // Write frame data - WriteFrame(m_File->GetFrame(m_CurrentFrame), m_FrameInfo[m_CurrentFrame]); - - // Enable frame processing and break when done - u16 write_ptr_lo = ReadCP(CommandProcessor::FIFO_WRITE_POINTER_LO); - u16 write_ptr_hi = ReadCP(CommandProcessor::FIFO_WRITE_POINTER_HI); - WriteCP(CommandProcessor::FIFO_BP_LO, write_ptr_lo); - WriteCP(CommandProcessor::FIFO_BP_HI, write_ptr_hi); - WriteCP(CommandProcessor::CTRL_REGISTER, 0x13); // enable read, breakpoints & GP link - - // If necessary, wait until GP has reached the breakpoint to prevent fifo overflows - // TODO: Can this be done any better? Dual core mode is slower than single core mode even with these conditions.. - if (m_CurrentFrame < m_FrameRangeEnd) - { - // Check if FIFO would be overflown when writing the next frame - u32 CPRWDistance = (ReadCP(CommandProcessor::FIFO_RW_DISTANCE_HI)<<16) | ReadCP(CommandProcessor::FIFO_RW_DISTANCE_LO); - CPRWDistance += m_File->GetFrame(m_CurrentFrame+1).fifoDataSize + CommandProcessor::GATHER_PIPE_SIZE; - u32 CPFifoBase = (ReadCP(CommandProcessor::FIFO_BASE_HI)<<16) | ReadCP(CommandProcessor::FIFO_BASE_LO); - u32 CPFifoEnd = (ReadCP(CommandProcessor::FIFO_END_HI)<<16) | ReadCP(CommandProcessor::FIFO_END_LO); - - bool bWait = (CPRWDistance > CPFifoEnd - CPFifoBase); - while (bWait && (ReadCP(CommandProcessor::FIFO_READ_POINTER_LO) != write_ptr_lo || - ReadCP(CommandProcessor::FIFO_READ_POINTER_HI) != write_ptr_hi)) - { - Common::YieldCPU(); - CoreTiming::Advance(); // Process scheduled events (esp. PixelEngine::SetFinish!) - - if (PowerPC::GetState() == PowerPC::CPU_POWERDOWN) - break; - } - } + WriteFrame(m_File->GetFrame(m_CurrentFrame), m_FrameInfo[m_CurrentFrame]); ++m_CurrentFrame; } @@ -422,11 +387,6 @@ void FifoPlayer::LoadMemory() FlushWGP(); } -u16 FifoPlayer::ReadCP(u32 address) -{ - return Memory::Read_U16(0xCC000000 | address); -} - void FifoPlayer::WriteCP(u32 address, u16 value) { Memory::Write_U16(value, 0xCC000000 | address); diff --git a/Source/Core/Core/Src/FifoPlayer/FifoPlayer.h b/Source/Core/Core/Src/FifoPlayer/FifoPlayer.h index 838ac13f18..9db6c0d980 100644 --- a/Source/Core/Core/Src/FifoPlayer/FifoPlayer.h +++ b/Source/Core/Core/Src/FifoPlayer/FifoPlayer.h @@ -87,7 +87,6 @@ private: void LoadMemory(); - u16 ReadCP(u32 address); void WriteCP(u32 address, u16 value); void WritePI(u32 address, u32 value); From 6c0f6ffecff631344fe52972e267753e19e8d121 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sat, 19 Jan 2013 22:34:07 +0100 Subject: [PATCH 11/35] Fix a dumb regression from revision 4925a28f94d8. --- Source/Core/VideoCommon/Src/PixelShaderGen.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index c1ebdbcc89..448501aad0 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -158,10 +158,11 @@ void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode, u32 compo if (dstAlphaMode != DSTALPHA_ALPHA_PASS) { + ptr[0] |= bpmem.fog.c_proj_fsel.fsel << 13; // 3 if (bpmem.fog.c_proj_fsel.fsel != 0) { - ptr[0] |= bpmem.fog.c_proj_fsel.proj << 13; // 1 - ptr[0] |= bpmem.fogRange.Base.Enabled << 14; // 1 + ptr[0] |= bpmem.fog.c_proj_fsel.proj << 16; // 1 + ptr[0] |= bpmem.fogRange.Base.Enabled << 17; // 1 } } From 7f8341825b559277a1031c076b1a89604ccc94d8 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Sat, 19 Jan 2013 17:17:18 -0500 Subject: [PATCH 12/35] Remove lttc for lle on thread too. --- Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp b/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp index 0d2b375268..92053053de 100644 --- a/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp +++ b/Source/Core/Core/Src/HW/DSPLLE/DSPLLE.cpp @@ -104,26 +104,6 @@ void DSPLLE::dsp_thread(DSPLLE *dsp_lle) { Common::SetCurrentThreadName("DSP thread"); - { - if (cpu_info.num_cores > 3) - { - // HACK (delroth): there is no way to know where hyperthreads are in - // the current Dolphin version. - bool windows = false; -#ifdef _WIN32 - windows = true; -#endif - - u8 core_id; - if (windows && cpu_info.num_cores > 4) // Probably HT - core_id = 5; // 3rd non HT core - else - core_id = 3; // 3rd core - - Common::SetCurrentThreadAffinity(1 << (core_id - 1)); - } - } - while (dsp_lle->m_bIsRunning) { int cycles = (int)dsp_lle->m_cycle_count; From 6ec95d30af4ce33090d896414107844bea18c612 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 19 Jan 2013 19:16:01 -0600 Subject: [PATCH 13/35] Allow emulated wiimote to be tilted 180 degrees in each direction. (was 90) Fixes issue 3492. --- Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp | 9 +++++---- Source/Core/InputCommon/Src/ControllerEmu.cpp | 1 + Source/Core/InputCommon/Src/ControllerEmu.h | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp index 61996d8e7c..485a5e7e52 100644 --- a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp +++ b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp @@ -124,7 +124,8 @@ void EmulateTilt(AccelData* const accel , const bool focus, const bool sideways, const bool upright) { float roll, pitch; - tilt_group->GetState( &roll, &pitch, 0, focus ? (PI / 2) : 0 ); // 90 degrees + // 180 degrees + tilt_group->GetState(&roll, &pitch, 0, focus ? PI : 0); unsigned int ud = 0, lr = 0, fb = 0; @@ -267,6 +268,9 @@ Wiimote::Wiimote( const unsigned int index ) for (unsigned int i=0; i < sizeof(named_buttons)/sizeof(*named_buttons); ++i) m_buttons->controls.push_back(new ControlGroup::Input( named_buttons[i])); + // udp + groups.push_back(m_udp = new UDPWrapper(m_index, _trans("UDP Wiimote"))); + // ir groups.push_back(m_ir = new Cursor(_trans("IR"))); @@ -276,9 +280,6 @@ Wiimote::Wiimote( const unsigned int index ) // tilt groups.push_back(m_tilt = new Tilt(_trans("Tilt"))); - // udp - groups.push_back(m_udp = new UDPWrapper(m_index, _trans("UDP Wiimote"))); - // shake groups.push_back(m_shake = new Buttons(_trans("Shake"))); m_shake->controls.push_back(new ControlGroup::Input("X")); diff --git a/Source/Core/InputCommon/Src/ControllerEmu.cpp b/Source/Core/InputCommon/Src/ControllerEmu.cpp index 9065888d7d..2e6ad10617 100644 --- a/Source/Core/InputCommon/Src/ControllerEmu.cpp +++ b/Source/Core/InputCommon/Src/ControllerEmu.cpp @@ -295,6 +295,7 @@ ControllerEmu::Tilt::Tilt(const char* const _name) settings.push_back(new Setting(_trans("Dead Zone"), 0, 0, 50)); settings.push_back(new Setting(_trans("Circle Stick"), 0)); + settings.push_back(new Setting(_trans("Angle"), 0.9f, 0, 180)); } ControllerEmu::Cursor::Cursor(const char* const _name) diff --git a/Source/Core/InputCommon/Src/ControllerEmu.h b/Source/Core/InputCommon/Src/ControllerEmu.h index 888e0c7fa9..6084a610a1 100644 --- a/Source/Core/InputCommon/Src/ControllerEmu.h +++ b/Source/Core/InputCommon/Src/ControllerEmu.h @@ -307,6 +307,7 @@ public: ControlState deadzone = settings[0]->value; ControlState circle = settings[1]->value; + auto const angle = settings[2]->value / 1.8f; ControlState m = controls[4]->control_ref->State(); // modifier code @@ -363,8 +364,8 @@ public: m_tilt[1] = std::max(m_tilt[1] - 0.1f, yy); } - *y = C(m_tilt[1] * range + base); - *x = C(m_tilt[0] * range + base); + *y = C(m_tilt[1] * angle * range + base); + *x = C(m_tilt[0] * angle * range + base); } private: float m_tilt[2]; From 0a5f479250a3f596dd8757b6d28bdc29de92c32c Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 20 Jan 2013 13:09:38 +1100 Subject: [PATCH 14/35] Added a game property to disable the clearing of the data cache. This is needed by one known game, "Rubik's Puzzle Galaxy: Rush". Fixes Violin Paradise. --- Data/User/GameConfig/WZIPTW.ini | 1 + Source/Core/Core/Src/BootManager.cpp | 8 +++--- Source/Core/Core/Src/ConfigManager.cpp | 2 +- Source/Core/Core/Src/CoreParameter.cpp | 4 +-- Source/Core/Core/Src/CoreParameter.h | 2 +- Source/Core/Core/Src/HW/MemmapFunctions.cpp | 2 +- .../Interpreter/Interpreter_LoadStore.cpp | 2 +- Source/Core/DolphinWX/Src/ISOProperties.cpp | 26 +++++++++---------- Source/Core/DolphinWX/Src/ISOProperties.h | 4 +-- 9 files changed, 26 insertions(+), 25 deletions(-) diff --git a/Data/User/GameConfig/WZIPTW.ini b/Data/User/GameConfig/WZIPTW.ini index 5fb4a23c18..6e7cce2648 100644 --- a/Data/User/GameConfig/WZIPTW.ini +++ b/Data/User/GameConfig/WZIPTW.ini @@ -1,5 +1,6 @@ # WZIPTW - Rubik's: Rush [Core] Values set here will override the main dolphin settings. +DCBZ = 1 [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. EmulationStateId = 1 EmulationIssues = Requires data cache emulation diff --git a/Source/Core/Core/Src/BootManager.cpp b/Source/Core/Core/Src/BootManager.cpp index 50c5756178..b867052381 100644 --- a/Source/Core/Core/Src/BootManager.cpp +++ b/Source/Core/Core/Src/BootManager.cpp @@ -54,7 +54,7 @@ namespace BootManager // Apply fire liberally struct ConfigCache { - bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT, + bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bDCBZOFF, bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bDisableWiimoteSpeaker, bHLE_BS2; int iTLBHack, iCPUCore; std::string strBackend; @@ -92,7 +92,7 @@ bool BootCore(const std::string& _rFilename) config_cache.iCPUCore = StartUp.iCPUCore; config_cache.bEnableFPRF = StartUp.bEnableFPRF; config_cache.bMMU = StartUp.bMMU; - config_cache.bMMUBAT = StartUp.bMMUBAT; + config_cache.bDCBZOFF = StartUp.bDCBZOFF; config_cache.iTLBHack = StartUp.iTLBHack; config_cache.bVBeam = StartUp.bVBeam; config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed; @@ -107,8 +107,8 @@ bool BootCore(const std::string& _rFilename) game_ini.Get("Core", "SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle); game_ini.Get("Core", "EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF); game_ini.Get("Core", "MMU", &StartUp.bMMU, StartUp.bMMU); - game_ini.Get("Core", "BAT", &StartUp.bMMUBAT, StartUp.bMMUBAT); game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack); + game_ini.Get("Core", "DCBZ", &StartUp.bDCBZOFF, StartUp.bDCBZOFF); game_ini.Get("Core", "VBeam", &StartUp.bVBeam, StartUp.bVBeam); game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed); game_ini.Get("Core", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks); @@ -167,7 +167,7 @@ void Stop() StartUp.iCPUCore = config_cache.iCPUCore; StartUp.bEnableFPRF = config_cache.bEnableFPRF; StartUp.bMMU = config_cache.bMMU; - StartUp.bMMUBAT = config_cache.bMMUBAT; + StartUp.bDCBZOFF = config_cache.bDCBZOFF; StartUp.iTLBHack = config_cache.iTLBHack; StartUp.bVBeam = config_cache.bVBeam; StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed; diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp index 317e770868..f6194c1bb7 100644 --- a/Source/Core/Core/Src/ConfigManager.cpp +++ b/Source/Core/Core/Src/ConfigManager.cpp @@ -400,7 +400,7 @@ void SConfig::LoadSettings() ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0); ini.Get("Core", "VBeam", &m_LocalCoreStartupParameter.bVBeam, false); ini.Get("Core", "FastDiscSpeed", &m_LocalCoreStartupParameter.bFastDiscSpeed, false); - ini.Get("Core", "BAT", &m_LocalCoreStartupParameter.bMMUBAT, false); + ini.Get("Core", "DCBZ", &m_LocalCoreStartupParameter.bDCBZOFF, false); ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default ini.Get("Core", "UseFPS", &b_UseFPS, false); // use vps as default diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp index 16615f5805..9fc451c807 100644 --- a/Source/Core/Core/Src/CoreParameter.cpp +++ b/Source/Core/Core/Src/CoreParameter.cpp @@ -49,7 +49,7 @@ SCoreStartupParameter::SCoreStartupParameter() bMergeBlocks(false), bDPL2Decoder(false), iLatency(14), bRunCompareServer(false), bRunCompareClient(false), - bMMU(false), bMMUBAT(false), iTLBHack(0), bVBeam(false), + bMMU(false), bDCBZOFF(false), iTLBHack(0), bVBeam(false), bFastDiscSpeed(false), SelectedLanguage(0), bWii(false), bDisableWiimoteSpeaker(false), bConfirmStop(false), bHideCursor(false), @@ -75,7 +75,7 @@ void SCoreStartupParameter::LoadDefaults() bDSPThread = true; bEnableFPRF = false; bMMU = false; - bMMUBAT = false; + bDCBZOFF = false; iTLBHack = 0; bVBeam = false; bFastDiscSpeed = false; diff --git a/Source/Core/Core/Src/CoreParameter.h b/Source/Core/Core/Src/CoreParameter.h index 4c7c33cdfb..e2e5eb6f1b 100644 --- a/Source/Core/Core/Src/CoreParameter.h +++ b/Source/Core/Core/Src/CoreParameter.h @@ -113,7 +113,7 @@ struct SCoreStartupParameter bool bRunCompareClient; bool bMMU; - bool bMMUBAT; + bool bDCBZOFF; int iTLBHack; bool bVBeam; bool bFastDiscSpeed; diff --git a/Source/Core/Core/Src/HW/MemmapFunctions.cpp b/Source/Core/Core/Src/HW/MemmapFunctions.cpp index b391eea975..e01eedaaab 100644 --- a/Source/Core/Core/Src/HW/MemmapFunctions.cpp +++ b/Source/Core/Core/Src/HW/MemmapFunctions.cpp @@ -956,7 +956,7 @@ u32 TranslateAddress(const u32 _Address, const XCheckTLBFlag _Flag) // Check MSR[DR] bit before translating data addresses //if (((_Flag == FLAG_READ) || (_Flag == FLAG_WRITE)) && !(MSR & (1 << (31 - 27)))) return _Address; - u32 tlb_addr = Core::g_CoreStartupParameter.bMMUBAT?TranslateBlockAddress(_Address, _Flag):0; + u32 tlb_addr = TranslateBlockAddress(_Address, _Flag); if (tlb_addr == 0) { tlb_addr = TranslatePageAddress(_Address, _Flag); diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_LoadStore.cpp b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_LoadStore.cpp index bc5cfc10e6..5e665eb38e 100644 --- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_LoadStore.cpp +++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_LoadStore.cpp @@ -407,7 +407,7 @@ void Interpreter::dcbtst(UGeckoInstruction _inst) void Interpreter::dcbz(UGeckoInstruction _inst) { // HACK but works... we think - if (HID2.WPE || !HID0.DCFA) + if (!Core::g_CoreStartupParameter.bDCBZOFF) Memory::Memset(Helper_Get_EA_X(_inst) & (~31), 0, 32); if (!jit) PowerPC::CheckExceptions(); diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index f06b3daa8a..2083c39201 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -315,10 +315,10 @@ void CISOProperties::CreateGUIControls(bool IsWad) SkipIdle = new wxCheckBox(m_GameConfig, ID_IDLESKIP, _("Enable Idle Skipping"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); MMU = new wxCheckBox(m_GameConfig, ID_MMU, _("Enable MMU"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); MMU->SetToolTip(_("Enables the Memory Management Unit, needed for some games. (ON = Compatible, OFF = Fast)")); - MMUBAT = new wxCheckBox(m_GameConfig, ID_MMUBAT, _("Enable BAT"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); - MMUBAT->SetToolTip(_("Enables Block Address Translation (BAT); a function of the Memory Management Unit. Accurate to the hardware, but slow to emulate. (ON = Compatible, OFF = Fast)")); TLBHack = new wxCheckBox(m_GameConfig, ID_TLBHACK, _("MMU Speed Hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); TLBHack->SetToolTip(_("Fast version of the MMU. Does not work for every game.")); + DCBZOFF = new wxCheckBox(m_GameConfig, ID_DCBZOFF, _("Skip DCBZ clearing"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); + DCBZOFF->SetToolTip(_("Bypass the clearing of the data cache by the DCBZ instruction. Usually leave this option disabled.")); VBeam = new wxCheckBox(m_GameConfig, ID_VBEAM, _("Accurate VBeam emulation"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); VBeam->SetToolTip(_("If the FPS is erratic, this option may help. (ON = Compatible, OFF = Fast)")); FastDiscSpeed = new wxCheckBox(m_GameConfig, ID_DISCSPEED, _("Speed up Disc Transfer Rate"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); @@ -364,7 +364,7 @@ void CISOProperties::CreateGUIControls(bool IsWad) sbCoreOverrides->Add(CPUThread, 0, wxLEFT, 5); sbCoreOverrides->Add(SkipIdle, 0, wxLEFT, 5); sbCoreOverrides->Add(MMU, 0, wxLEFT, 5); - sbCoreOverrides->Add(MMUBAT, 0, wxLEFT, 5); + sbCoreOverrides->Add(DCBZOFF, 0, wxLEFT, 5); sbCoreOverrides->Add(TLBHack, 0, wxLEFT, 5); sbCoreOverrides->Add(VBeam, 0, wxLEFT, 5); sbCoreOverrides->Add(FastDiscSpeed, 0, wxLEFT, 5); @@ -930,16 +930,16 @@ void CISOProperties::LoadGameConfig() else MMU->Set3StateValue(wxCHK_UNDETERMINED); - if (GameIni.Get("Core", "BAT", &bTemp)) - MMUBAT->Set3StateValue((wxCheckBoxState)bTemp); - else - MMUBAT->Set3StateValue(wxCHK_UNDETERMINED); - if (GameIni.Get("Core", "TLBHack", &bTemp)) TLBHack->Set3StateValue((wxCheckBoxState)bTemp); else TLBHack->Set3StateValue(wxCHK_UNDETERMINED); + if (GameIni.Get("Core", "DCBZ", &bTemp)) + DCBZOFF->Set3StateValue((wxCheckBoxState)bTemp); + else + DCBZOFF->Set3StateValue(wxCHK_UNDETERMINED); + if (GameIni.Get("Core", "VBeam", &bTemp)) VBeam->Set3StateValue((wxCheckBoxState)bTemp); else @@ -1025,16 +1025,16 @@ bool CISOProperties::SaveGameConfig() else GameIni.Set("Core", "MMU", MMU->Get3StateValue()); - if (MMUBAT->Get3StateValue() == wxCHK_UNDETERMINED) - GameIni.DeleteKey("Core", "BAT"); - else - GameIni.Set("Core", "BAT", MMUBAT->Get3StateValue()); - if (TLBHack->Get3StateValue() == wxCHK_UNDETERMINED) GameIni.DeleteKey("Core", "TLBHack"); else GameIni.Set("Core", "TLBHack", TLBHack->Get3StateValue()); + if (DCBZOFF->Get3StateValue() == wxCHK_UNDETERMINED) + GameIni.DeleteKey("Core", "DCBZ"); + else + GameIni.Set("Core", "DCBZ", DCBZOFF->Get3StateValue()); + if (VBeam->Get3StateValue() == wxCHK_UNDETERMINED) GameIni.DeleteKey("Core", "VBeam"); else diff --git a/Source/Core/DolphinWX/Src/ISOProperties.h b/Source/Core/DolphinWX/Src/ISOProperties.h index 9d71e675e2..4f03130ba7 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.h +++ b/Source/Core/DolphinWX/Src/ISOProperties.h @@ -69,7 +69,7 @@ private: DECLARE_EVENT_TABLE(); // Core - wxCheckBox *CPUThread, *SkipIdle, *MMU, *MMUBAT, *TLBHack; + wxCheckBox *CPUThread, *SkipIdle, *MMU, *DCBZOFF, *TLBHack; wxCheckBox *VBeam, *FastDiscSpeed, *BlockMerging, *DSPHLE; // Wii wxCheckBox *EnableWideScreen, *DisableWiimoteSpeaker; @@ -127,7 +127,7 @@ private: ID_USEDUALCORE, ID_IDLESKIP, ID_MMU, - ID_MMUBAT, + ID_DCBZOFF, ID_TLBHACK, ID_VBEAM, ID_DISCSPEED, From 4cc4abfe25747b6ade6c60c47258a1b6622a64f1 Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 20 Jan 2013 16:11:15 +1100 Subject: [PATCH 15/35] Preset the HBeam and VBeam to 0 on boot. Fixes Densha de Go Shinkansen EX. Fixes issue 4882. --- Source/Core/Core/Src/HW/VideoInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/HW/VideoInterface.cpp b/Source/Core/Core/Src/HW/VideoInterface.cpp index cc2ce18ce0..95c06d1f88 100644 --- a/Source/Core/Core/Src/HW/VideoInterface.cpp +++ b/Source/Core/Core/Src/HW/VideoInterface.cpp @@ -144,8 +144,8 @@ void Preset(bool _bNTSC) m_HorizontalStepping.FbSteps = 40; m_HorizontalStepping.FieldSteps = 40; - m_HBeamPos = 1; - m_VBeamPos = 1; + m_HBeamPos = 0; + m_VBeamPos = 0; // 54MHz, capable of progressive scan m_Clock = Core::g_CoreStartupParameter.bProgressive; From 83237a36e03dc53545dab51f6a54c70bfc7b2b66 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Sun, 20 Jan 2013 18:47:59 -0500 Subject: [PATCH 16/35] Save memory card paths relative to exe directory. --- Source/Core/DolphinWX/Src/ConfigMain.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp index 423885e0f2..4daf263b63 100644 --- a/Source/Core/DolphinWX/Src/ConfigMain.cpp +++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp @@ -1064,6 +1064,13 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA) return; } } + #ifdef _WIN32 + if (!strncmp(File::GetExeDirectory().c_str(), filename.c_str(), File::GetExeDirectory().size())) + { + filename.erase(0, File::GetExeDirectory().size() +1); + filename = "./" + filename; + } + #endif // also check that the path isn't used for the other memcard... if (filename.compare(isSlotA ? SConfig::GetInstance().m_strMemoryCardB From 45a7fa293bebd520d86f5068dc866a35793d7af8 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Sun, 20 Jan 2013 19:15:48 -0500 Subject: [PATCH 17/35] Set the default memory card path as relative too. --- Source/Core/Core/Src/CoreParameter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp index 9fc451c807..7f019bcf59 100644 --- a/Source/Core/Core/Src/CoreParameter.cpp +++ b/Source/Core/Core/Src/CoreParameter.cpp @@ -348,7 +348,11 @@ void SCoreStartupParameter::CheckMemcardPath(std::string& memcardPath, std::stri { // Use default memcard path if there is no user defined name std::string defaultFilename = isSlotA ? GC_MEMCARDA : GC_MEMCARDB; - memcardPath = File::GetUserPath(D_GCUSER_IDX) + defaultFilename + ext; + #ifdef _WIN32 + memcardPath = "." + File::GetUserPath(D_GCUSER_IDX).substr(File::GetExeDirectory().size()) + defaultFilename + ext; + #else + memcardPath = File::GetUserPath(D_GCUSER_IDX) + defaultFilename + ext; + #endif } else { From 0c1ea605d5008fabc8b23feeeac9708fef18fadf Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 20 Jan 2013 23:24:56 -0500 Subject: [PATCH 18/35] Ctrl+A support in the action replay code editing menu. Makes adding/editing codes less of a pain in the ass. You don't need to manually highlight everything anymore. --- Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp | 24 +++++++++++++++++++++ Source/Core/DolphinWX/Src/ARCodeAddEdit.h | 1 + 2 files changed, 25 insertions(+) diff --git a/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp b/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp index c3ed12bbea..03cf7f47b4 100644 --- a/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp +++ b/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp @@ -48,11 +48,13 @@ CARCodeAddEdit::CARCodeAddEdit(int _selection, wxWindow* parent, wxWindowID id, wxStaticText* EditCheatNameText = new wxStaticText(this, ID_EDITCHEAT_NAME_TEXT, _("Name:"), wxDefaultPosition, wxDefaultSize); EditCheatName = new wxTextCtrl(this, ID_EDITCHEAT_NAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); + EditCheatName->Bind(wxEVT_KEY_DOWN, &CARCodeAddEdit::OnKey, this); EditCheatName->SetValue(currentName); EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT, wxDefaultPosition, wxDefaultSize, wxVERTICAL); EntrySelection->SetRange(1, ((int)arCodes.size()) > 0 ? (int)arCodes.size() : 1); EntrySelection->SetValue((int)(arCodes.size() - selection)); EditCheatCode = new wxTextCtrl(this, ID_EDITCHEAT_CODE, wxEmptyString, wxDefaultPosition, wxSize(300, 100), wxTE_MULTILINE); + EditCheatCode->Bind(wxEVT_KEY_DOWN, &CARCodeAddEdit::OnKey, this); UpdateTextCtrl(tempEntries); sgEntry->Add(EditCheatNameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER|wxALL, 5); @@ -174,3 +176,25 @@ void CARCodeAddEdit::UpdateTextCtrl(ActionReplay::ARCode arCode) else EditCheatCode->SetValue(_("Insert Encrypted or Decrypted code here...")); } + +void CARCodeAddEdit::OnKey(wxKeyEvent& event) +{ + // Technically you can extend this to whatever bindings you want. + switch (event.GetKeyCode()) + { + case 'a': + case 'A': + { + if (event.ControlDown() && FindFocus() == EditCheatCode) + { + EditCheatCode->SetSelection(0, EditCheatCode->GetValue().Length()); + } + + if (event.ControlDown() && FindFocus() == EditCheatName) + { + EditCheatName->SetSelection(0, EditCheatName->GetValue().Length()); + } + } + break; + } +} diff --git a/Source/Core/DolphinWX/Src/ARCodeAddEdit.h b/Source/Core/DolphinWX/Src/ARCodeAddEdit.h index 2702dfb888..c3e5f72f58 100644 --- a/Source/Core/DolphinWX/Src/ARCodeAddEdit.h +++ b/Source/Core/DolphinWX/Src/ARCodeAddEdit.h @@ -49,6 +49,7 @@ class CARCodeAddEdit : public wxDialog void SaveCheatData(wxCommandEvent& event); void ChangeEntry(wxSpinEvent& event); void UpdateTextCtrl(ActionReplay::ARCode arCode); + void OnKey(wxKeyEvent& event); int selection; From 2bae4345c58c3684b6375ad4de847876e5e77357 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 21 Jan 2013 00:11:53 -0500 Subject: [PATCH 19/35] Revert "Ctrl+A support in the action replay code editing menu." Guess it wasnt much of a solution as I'd hoped. (considering it seems to work on linux without this). This reverts commit 0c1ea605d5008fabc8b23feeeac9708fef18fadf. --- Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp | 24 --------------------- Source/Core/DolphinWX/Src/ARCodeAddEdit.h | 1 - 2 files changed, 25 deletions(-) diff --git a/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp b/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp index 03cf7f47b4..c3ed12bbea 100644 --- a/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp +++ b/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp @@ -48,13 +48,11 @@ CARCodeAddEdit::CARCodeAddEdit(int _selection, wxWindow* parent, wxWindowID id, wxStaticText* EditCheatNameText = new wxStaticText(this, ID_EDITCHEAT_NAME_TEXT, _("Name:"), wxDefaultPosition, wxDefaultSize); EditCheatName = new wxTextCtrl(this, ID_EDITCHEAT_NAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); - EditCheatName->Bind(wxEVT_KEY_DOWN, &CARCodeAddEdit::OnKey, this); EditCheatName->SetValue(currentName); EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT, wxDefaultPosition, wxDefaultSize, wxVERTICAL); EntrySelection->SetRange(1, ((int)arCodes.size()) > 0 ? (int)arCodes.size() : 1); EntrySelection->SetValue((int)(arCodes.size() - selection)); EditCheatCode = new wxTextCtrl(this, ID_EDITCHEAT_CODE, wxEmptyString, wxDefaultPosition, wxSize(300, 100), wxTE_MULTILINE); - EditCheatCode->Bind(wxEVT_KEY_DOWN, &CARCodeAddEdit::OnKey, this); UpdateTextCtrl(tempEntries); sgEntry->Add(EditCheatNameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER|wxALL, 5); @@ -176,25 +174,3 @@ void CARCodeAddEdit::UpdateTextCtrl(ActionReplay::ARCode arCode) else EditCheatCode->SetValue(_("Insert Encrypted or Decrypted code here...")); } - -void CARCodeAddEdit::OnKey(wxKeyEvent& event) -{ - // Technically you can extend this to whatever bindings you want. - switch (event.GetKeyCode()) - { - case 'a': - case 'A': - { - if (event.ControlDown() && FindFocus() == EditCheatCode) - { - EditCheatCode->SetSelection(0, EditCheatCode->GetValue().Length()); - } - - if (event.ControlDown() && FindFocus() == EditCheatName) - { - EditCheatName->SetSelection(0, EditCheatName->GetValue().Length()); - } - } - break; - } -} diff --git a/Source/Core/DolphinWX/Src/ARCodeAddEdit.h b/Source/Core/DolphinWX/Src/ARCodeAddEdit.h index c3e5f72f58..2702dfb888 100644 --- a/Source/Core/DolphinWX/Src/ARCodeAddEdit.h +++ b/Source/Core/DolphinWX/Src/ARCodeAddEdit.h @@ -49,7 +49,6 @@ class CARCodeAddEdit : public wxDialog void SaveCheatData(wxCommandEvent& event); void ChangeEntry(wxSpinEvent& event); void UpdateTextCtrl(ActionReplay::ARCode arCode); - void OnKey(wxKeyEvent& event); int selection; From 0ba1794df3ee479ade6520ac46860610774ffdff Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Mon, 21 Jan 2013 21:48:02 +0000 Subject: [PATCH 20/35] Fix AGL.cpp --- Source/Core/DolphinWX/Src/GLInterface/AGL.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp index 30ff4a31cf..cf68c0baa4 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp @@ -18,6 +18,7 @@ #include "VideoConfig.h" #include "Host.h" #include "RenderBase.h" +#include "ConfigManager.h" #include "VertexShaderManager.h" #include "../GLInterface.h" @@ -90,13 +91,6 @@ bool cInterfaceAGL::Create(void *&window_handle) } bool cInterfaceAGL::MakeCurrent() -{ - [GLWin.cocoaCtx makeCurrentContext]; - return true; -} - -// Update window width, size and etc. Called from Render.cpp -void cInterfaceAGL::Update() { int width, height; @@ -110,6 +104,7 @@ void cInterfaceAGL::Update() [GLWin.cocoaCtx makeCurrentContext]; s_backbuffer_width = width; s_backbuffer_height = height; + return true; } // Close backend From cff8fe8f77cda18cda80b95364d59dc45a9c6830 Mon Sep 17 00:00:00 2001 From: skidau Date: Tue, 22 Jan 2013 21:17:29 +1100 Subject: [PATCH 21/35] Revert the fix for the random static audio that would sometimes occur in DSP HLE and DSP LLE. The fix caused the music in Fast - Racing League to play random sounds. This reverts commit r7bf72a6c8476798ecbb9cdb13ec3a8f0b9858da6. Fixes issue 5910. --- Source/Core/Core/Src/DSP/DSPAccelerator.cpp | 5 +++-- Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/Src/DSP/DSPAccelerator.cpp b/Source/Core/Core/Src/DSP/DSPAccelerator.cpp index 2058a92f9d..dcb79b7ac5 100644 --- a/Source/Core/Core/Src/DSP/DSPAccelerator.cpp +++ b/Source/Core/Core/Src/DSP/DSPAccelerator.cpp @@ -165,10 +165,11 @@ u16 dsp_read_accelerator() // Somehow, YN1 and YN2 must be initialized with their "loop" values, // so yeah, it seems likely that we should raise an exception to let // the DSP program do that, at least if DSP_FORMAT == 0x0A. - if ((Address & ~0x1f) == (EndAddress & ~0x1f)) + if (Address >= EndAddress) { // Set address back to start address. - Address = (g_dsp.ifx_regs[DSP_ACSAH] << 16) | g_dsp.ifx_regs[DSP_ACSAL]; + if ((Address & ~0x1f) == (EndAddress & ~0x1f)) + Address = (g_dsp.ifx_regs[DSP_ACSAH] << 16) | g_dsp.ifx_regs[DSP_ACSAL]; DSPCore_SetException(EXP_ACCOV); } diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h index e39b38b100..349dc7e03b 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h @@ -203,10 +203,12 @@ u16 AcceleratorGetSample() // // On real hardware, this would raise an interrupt that is handled by the // UCode. We simulate what this interrupt does here. - if ((*acc_cur_addr & ~0x1F) == (acc_end_addr & ~0x1F)) + if (*acc_cur_addr >= acc_end_addr) { - // If we are really at the end, loop back to loop_addr. - *acc_cur_addr = acc_loop_addr; + // If we are really at the end (and we don't simply have cur_addr > + // end_addr all the time), loop back to loop_addr. + if ((*acc_cur_addr & ~0x1F) == (acc_end_addr & ~0x1F)) + *acc_cur_addr = acc_loop_addr; if (acc_pb->audio_addr.looping) { From b7d32b0a3d810736b2e1151d6d8b9da85ebfbcf3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 23 Jan 2013 23:29:50 -0500 Subject: [PATCH 22/35] mem_fun -> mem_fn. mem_fun is deprecated in C++11. Also it does everything mem_fun can do, but more conveniently. --- Source/Core/AudioCommon/Src/AOSoundStream.cpp | 2 +- Source/Core/AudioCommon/Src/DSoundStream.cpp | 2 +- Source/Core/AudioCommon/Src/OpenALStream.cpp | 6 ++++-- Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp | 2 +- Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp | 2 +- Source/Core/Core/Src/NetPlayClient.cpp | 2 +- Source/Core/Core/Src/NetPlayServer.cpp | 2 +- Source/Core/InputCommon/Src/UDPWiimote.cpp | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Source/Core/AudioCommon/Src/AOSoundStream.cpp b/Source/Core/AudioCommon/Src/AOSoundStream.cpp index 99ae2e661c..276938c3e2 100644 --- a/Source/Core/AudioCommon/Src/AOSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/AOSoundStream.cpp @@ -63,7 +63,7 @@ bool AOSound::Start() { memset(realtimeBuffer, 0, sizeof(realtimeBuffer)); - thread = std::thread(std::mem_fun(&AOSound::SoundLoop), this); + thread = std::thread(std::mem_fn(&AOSound::SoundLoop), this); return true; } diff --git a/Source/Core/AudioCommon/Src/DSoundStream.cpp b/Source/Core/AudioCommon/Src/DSoundStream.cpp index b252dc90c5..c0c54e00f5 100644 --- a/Source/Core/AudioCommon/Src/DSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/DSoundStream.cpp @@ -135,7 +135,7 @@ bool DSound::Start() dsBuffer->Lock(0, bufferSize, (void* *)&p1, &num1, 0, 0, DSBLOCK_ENTIREBUFFER); memset(p1, 0, num1); dsBuffer->Unlock(p1, num1, 0, 0); - thread = std::thread(std::mem_fun(&DSound::SoundLoop), this); + thread = std::thread(std::mem_fn(&DSound::SoundLoop), this); return true; } diff --git a/Source/Core/AudioCommon/Src/OpenALStream.cpp b/Source/Core/AudioCommon/Src/OpenALStream.cpp index cfe6a40630..814f720e6e 100644 --- a/Source/Core/AudioCommon/Src/OpenALStream.cpp +++ b/Source/Core/AudioCommon/Src/OpenALStream.cpp @@ -15,6 +15,8 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ +#include + #include "aldlist.h" #include "OpenALStream.h" #include "DPL2Decoder.h" @@ -52,7 +54,7 @@ bool OpenALStream::Start() //period_size_in_millisec = 1000 / refresh; alcMakeContextCurrent(pContext); - thread = std::thread(std::mem_fun(&OpenALStream::SoundLoop), this); + thread = std::thread(std::mem_fn(&OpenALStream::SoundLoop), this); bReturn = true; } else @@ -72,7 +74,7 @@ bool OpenALStream::Start() PanicAlertT("OpenAL: can't find sound devices"); } - // Initialise DPL2 parameters + // Initialize DPL2 parameters dpl2reset(); soundTouch.clear(); diff --git a/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp b/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp index 93b7cd5d09..ce416af7e2 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp +++ b/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp @@ -101,7 +101,7 @@ bool GeckoSockServer::GetAvailableSock(sf::SocketTCP &sock_to_fill) recv_fifo = std::queue(); send_fifo = std::queue(); } - clientThread = std::thread(std::mem_fun(&GeckoSockServer::ClientThread), this); + clientThread = std::thread(std::mem_fn(&GeckoSockServer::ClientThread), this); client_count++; waiting_socks.pop(); sock_filled = true; diff --git a/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp b/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp index cc05bc10e1..30054b274c 100644 --- a/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp +++ b/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp @@ -264,7 +264,7 @@ bool Wiimote::Connect() // Set LEDs SetLEDs(WIIMOTE_LED_1 << index); - m_wiimote_thread = std::thread(std::mem_fun(&Wiimote::ThreadFunc), this); + m_wiimote_thread = std::thread(std::mem_fn(&Wiimote::ThreadFunc), this); // This isn't as drastic as it sounds, since the process in which the threads // reside is normal priority. Needed for keeping audio reports at a decent rate diff --git a/Source/Core/Core/Src/NetPlayClient.cpp b/Source/Core/Core/Src/NetPlayClient.cpp index ef1edeeb7f..7293b615b3 100644 --- a/Source/Core/Core/Src/NetPlayClient.cpp +++ b/Source/Core/Core/Src/NetPlayClient.cpp @@ -70,7 +70,7 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay is_connected = true; m_selector.Add(m_socket); - m_thread = std::thread(std::mem_fun(&NetPlayClient::ThreadFunc), this); + m_thread = std::thread(std::mem_fn(&NetPlayClient::ThreadFunc), this); } } else diff --git a/Source/Core/Core/Src/NetPlayServer.cpp b/Source/Core/Core/Src/NetPlayServer.cpp index 61a61d00ae..80e00c4656 100644 --- a/Source/Core/Core/Src/NetPlayServer.cpp +++ b/Source/Core/Core/Src/NetPlayServer.cpp @@ -38,7 +38,7 @@ NetPlayServer::NetPlayServer(const u16 port, const std::string& name, NetPlayUI* is_connected = true; m_selector.Add(m_socket); - m_thread = std::thread(std::mem_fun(&NetPlayServer::ThreadFunc), this); + m_thread = std::thread(std::mem_fn(&NetPlayServer::ThreadFunc), this); } else is_connected = false; diff --git a/Source/Core/InputCommon/Src/UDPWiimote.cpp b/Source/Core/InputCommon/Src/UDPWiimote.cpp index f14f9ed7e2..83799f2a43 100644 --- a/Source/Core/InputCommon/Src/UDPWiimote.cpp +++ b/Source/Core/InputCommon/Src/UDPWiimote.cpp @@ -134,7 +134,7 @@ UDPWiimote::UDPWiimote(const char *_port, const char * name, int _index) : initBroadcastIPv6(); std::lock_guard lk(d->termLock); - d->thread = std::thread(std::mem_fun(&UDPWiimote::mainThread), this); + d->thread = std::thread(std::mem_fn(&UDPWiimote::mainThread), this); return; } From fe7e691d77550195f71ae2b7af67c6395493908d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 23 Jan 2013 23:38:49 -0500 Subject: [PATCH 23/35] Revert "mem_fun -> mem_fn." This reverts commit b7d32b0a3d810736b2e1151d6d8b9da85ebfbcf3. OSX C++ std library in charge of holding back progress (as usual). --- Source/Core/AudioCommon/Src/AOSoundStream.cpp | 2 +- Source/Core/AudioCommon/Src/DSoundStream.cpp | 2 +- Source/Core/AudioCommon/Src/OpenALStream.cpp | 6 ++---- Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp | 2 +- Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp | 2 +- Source/Core/Core/Src/NetPlayClient.cpp | 2 +- Source/Core/Core/Src/NetPlayServer.cpp | 2 +- Source/Core/InputCommon/Src/UDPWiimote.cpp | 2 +- 8 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Source/Core/AudioCommon/Src/AOSoundStream.cpp b/Source/Core/AudioCommon/Src/AOSoundStream.cpp index 276938c3e2..99ae2e661c 100644 --- a/Source/Core/AudioCommon/Src/AOSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/AOSoundStream.cpp @@ -63,7 +63,7 @@ bool AOSound::Start() { memset(realtimeBuffer, 0, sizeof(realtimeBuffer)); - thread = std::thread(std::mem_fn(&AOSound::SoundLoop), this); + thread = std::thread(std::mem_fun(&AOSound::SoundLoop), this); return true; } diff --git a/Source/Core/AudioCommon/Src/DSoundStream.cpp b/Source/Core/AudioCommon/Src/DSoundStream.cpp index c0c54e00f5..b252dc90c5 100644 --- a/Source/Core/AudioCommon/Src/DSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/DSoundStream.cpp @@ -135,7 +135,7 @@ bool DSound::Start() dsBuffer->Lock(0, bufferSize, (void* *)&p1, &num1, 0, 0, DSBLOCK_ENTIREBUFFER); memset(p1, 0, num1); dsBuffer->Unlock(p1, num1, 0, 0); - thread = std::thread(std::mem_fn(&DSound::SoundLoop), this); + thread = std::thread(std::mem_fun(&DSound::SoundLoop), this); return true; } diff --git a/Source/Core/AudioCommon/Src/OpenALStream.cpp b/Source/Core/AudioCommon/Src/OpenALStream.cpp index 814f720e6e..cfe6a40630 100644 --- a/Source/Core/AudioCommon/Src/OpenALStream.cpp +++ b/Source/Core/AudioCommon/Src/OpenALStream.cpp @@ -15,8 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include - #include "aldlist.h" #include "OpenALStream.h" #include "DPL2Decoder.h" @@ -54,7 +52,7 @@ bool OpenALStream::Start() //period_size_in_millisec = 1000 / refresh; alcMakeContextCurrent(pContext); - thread = std::thread(std::mem_fn(&OpenALStream::SoundLoop), this); + thread = std::thread(std::mem_fun(&OpenALStream::SoundLoop), this); bReturn = true; } else @@ -74,7 +72,7 @@ bool OpenALStream::Start() PanicAlertT("OpenAL: can't find sound devices"); } - // Initialize DPL2 parameters + // Initialise DPL2 parameters dpl2reset(); soundTouch.clear(); diff --git a/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp b/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp index ce416af7e2..93b7cd5d09 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp +++ b/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp @@ -101,7 +101,7 @@ bool GeckoSockServer::GetAvailableSock(sf::SocketTCP &sock_to_fill) recv_fifo = std::queue(); send_fifo = std::queue(); } - clientThread = std::thread(std::mem_fn(&GeckoSockServer::ClientThread), this); + clientThread = std::thread(std::mem_fun(&GeckoSockServer::ClientThread), this); client_count++; waiting_socks.pop(); sock_filled = true; diff --git a/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp b/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp index 30054b274c..cc05bc10e1 100644 --- a/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp +++ b/Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp @@ -264,7 +264,7 @@ bool Wiimote::Connect() // Set LEDs SetLEDs(WIIMOTE_LED_1 << index); - m_wiimote_thread = std::thread(std::mem_fn(&Wiimote::ThreadFunc), this); + m_wiimote_thread = std::thread(std::mem_fun(&Wiimote::ThreadFunc), this); // This isn't as drastic as it sounds, since the process in which the threads // reside is normal priority. Needed for keeping audio reports at a decent rate diff --git a/Source/Core/Core/Src/NetPlayClient.cpp b/Source/Core/Core/Src/NetPlayClient.cpp index 7293b615b3..ef1edeeb7f 100644 --- a/Source/Core/Core/Src/NetPlayClient.cpp +++ b/Source/Core/Core/Src/NetPlayClient.cpp @@ -70,7 +70,7 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay is_connected = true; m_selector.Add(m_socket); - m_thread = std::thread(std::mem_fn(&NetPlayClient::ThreadFunc), this); + m_thread = std::thread(std::mem_fun(&NetPlayClient::ThreadFunc), this); } } else diff --git a/Source/Core/Core/Src/NetPlayServer.cpp b/Source/Core/Core/Src/NetPlayServer.cpp index 80e00c4656..61a61d00ae 100644 --- a/Source/Core/Core/Src/NetPlayServer.cpp +++ b/Source/Core/Core/Src/NetPlayServer.cpp @@ -38,7 +38,7 @@ NetPlayServer::NetPlayServer(const u16 port, const std::string& name, NetPlayUI* is_connected = true; m_selector.Add(m_socket); - m_thread = std::thread(std::mem_fn(&NetPlayServer::ThreadFunc), this); + m_thread = std::thread(std::mem_fun(&NetPlayServer::ThreadFunc), this); } else is_connected = false; diff --git a/Source/Core/InputCommon/Src/UDPWiimote.cpp b/Source/Core/InputCommon/Src/UDPWiimote.cpp index 83799f2a43..f14f9ed7e2 100644 --- a/Source/Core/InputCommon/Src/UDPWiimote.cpp +++ b/Source/Core/InputCommon/Src/UDPWiimote.cpp @@ -134,7 +134,7 @@ UDPWiimote::UDPWiimote(const char *_port, const char * name, int _index) : initBroadcastIPv6(); std::lock_guard lk(d->termLock); - d->thread = std::thread(std::mem_fn(&UDPWiimote::mainThread), this); + d->thread = std::thread(std::mem_fun(&UDPWiimote::mainThread), this); return; } From f69b6b595ef80acf5ce776a80b1df27033bc7fdf Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 24 Jan 2013 13:10:13 +0100 Subject: [PATCH 24/35] change projection_type to u32 Fix issue 5740 thx @ erwan_taf for debuging all the week --- Source/Core/VideoCommon/Src/Statistics.h | 2 +- .../VideoCommon/Src/VertexShaderManager.cpp | 61 ++++++++++--------- Source/Core/VideoCommon/Src/XFMemory.h | 15 ++++- 3 files changed, 46 insertions(+), 32 deletions(-) diff --git a/Source/Core/VideoCommon/Src/Statistics.h b/Source/Core/VideoCommon/Src/Statistics.h index 7238398b42..e173bfc682 100644 --- a/Source/Core/VideoCommon/Src/Statistics.h +++ b/Source/Core/VideoCommon/Src/Statistics.h @@ -43,7 +43,7 @@ struct Statistics int numUniquePixelShaders; - float proj_0, proj_1, proj_2, proj_3, proj_4, proj_5, proj_6; + float proj_0, proj_1, proj_2, proj_3, proj_4, proj_5; float gproj_0, gproj_1, gproj_2, gproj_3, gproj_4, gproj_5; float gproj_6, gproj_7, gproj_8, gproj_9, gproj_10, gproj_11, gproj_12, gproj_13, gproj_14, gproj_15; diff --git a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp index 84340c6b98..1dce567b0d 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp @@ -350,26 +350,28 @@ void VertexShaderManager::SetConstants() if (bProjectionChanged) { bProjectionChanged = false; + + float *rawProjection = xfregs.projection.rawProjection; - if (xfregs.rawProjection[6] == 0) + switch(xfregs.projection.type) { - // Perspective + case GX_PERSPECTIVE: - g_fProjectionMatrix[0] = xfregs.rawProjection[0] * g_ActiveConfig.fAspectRatioHackW; + g_fProjectionMatrix[0] = rawProjection[0] * g_ActiveConfig.fAspectRatioHackW; g_fProjectionMatrix[1] = 0.0f; - g_fProjectionMatrix[2] = xfregs.rawProjection[1]; + g_fProjectionMatrix[2] = rawProjection[1]; g_fProjectionMatrix[3] = 0.0f; g_fProjectionMatrix[4] = 0.0f; - g_fProjectionMatrix[5] = xfregs.rawProjection[2] * g_ActiveConfig.fAspectRatioHackH; - g_fProjectionMatrix[6] = xfregs.rawProjection[3]; + g_fProjectionMatrix[5] = rawProjection[2] * g_ActiveConfig.fAspectRatioHackH; + g_fProjectionMatrix[6] = rawProjection[3]; g_fProjectionMatrix[7] = 0.0f; g_fProjectionMatrix[8] = 0.0f; g_fProjectionMatrix[9] = 0.0f; - g_fProjectionMatrix[10] = xfregs.rawProjection[4]; + g_fProjectionMatrix[10] = rawProjection[4]; - g_fProjectionMatrix[11] = xfregs.rawProjection[5]; + g_fProjectionMatrix[11] = rawProjection[5]; g_fProjectionMatrix[12] = 0.0f; g_fProjectionMatrix[13] = 0.0f; @@ -394,24 +396,24 @@ void VertexShaderManager::SetConstants() SETSTAT_FT(stats.gproj_13, g_fProjectionMatrix[13]); SETSTAT_FT(stats.gproj_14, g_fProjectionMatrix[14]); SETSTAT_FT(stats.gproj_15, g_fProjectionMatrix[15]); - } - else - { - // Orthographic Projection - g_fProjectionMatrix[0] = xfregs.rawProjection[0]; + break; + + case GX_ORTHOGRAPHIC: + + g_fProjectionMatrix[0] = rawProjection[0]; g_fProjectionMatrix[1] = 0.0f; g_fProjectionMatrix[2] = 0.0f; - g_fProjectionMatrix[3] = xfregs.rawProjection[1]; + g_fProjectionMatrix[3] = rawProjection[1]; g_fProjectionMatrix[4] = 0.0f; - g_fProjectionMatrix[5] = xfregs.rawProjection[2]; + g_fProjectionMatrix[5] = rawProjection[2]; g_fProjectionMatrix[6] = 0.0f; - g_fProjectionMatrix[7] = xfregs.rawProjection[3]; + g_fProjectionMatrix[7] = rawProjection[3]; g_fProjectionMatrix[8] = 0.0f; g_fProjectionMatrix[9] = 0.0f; - g_fProjectionMatrix[10] = (g_ProjHack1.value + xfregs.rawProjection[4]) * ((g_ProjHack1.sign == 0) ? 1.0f : g_ProjHack1.sign); - g_fProjectionMatrix[11] = (g_ProjHack2.value + xfregs.rawProjection[5]) * ((g_ProjHack2.sign == 0) ? 1.0f : g_ProjHack2.sign); + g_fProjectionMatrix[10] = (g_ProjHack1.value + rawProjection[4]) * ((g_ProjHack1.sign == 0) ? 1.0f : g_ProjHack1.sign); + g_fProjectionMatrix[11] = (g_ProjHack2.value + rawProjection[5]) * ((g_ProjHack2.sign == 0) ? 1.0f : g_ProjHack2.sign); g_fProjectionMatrix[12] = 0.0f; g_fProjectionMatrix[13] = 0.0f; @@ -424,7 +426,7 @@ void VertexShaderManager::SetConstants() */ g_fProjectionMatrix[14] = 0.0f; - g_fProjectionMatrix[15] = (g_ProjHack3 && xfregs.rawProjection[0] == 2.0f ? 0.0f : 1.0f); //causes either the efb copy or bloom layer not to show if proj hack enabled + g_fProjectionMatrix[15] = (g_ProjHack3 && rawProjection[0] == 2.0f ? 0.0f : 1.0f); //causes either the efb copy or bloom layer not to show if proj hack enabled SETSTAT_FT(stats.g2proj_0, g_fProjectionMatrix[0]); SETSTAT_FT(stats.g2proj_1, g_fProjectionMatrix[1]); @@ -442,18 +444,21 @@ void VertexShaderManager::SetConstants() SETSTAT_FT(stats.g2proj_13, g_fProjectionMatrix[13]); SETSTAT_FT(stats.g2proj_14, g_fProjectionMatrix[14]); SETSTAT_FT(stats.g2proj_15, g_fProjectionMatrix[15]); - SETSTAT_FT(stats.proj_0, xfregs.rawProjection[0]); - SETSTAT_FT(stats.proj_1, xfregs.rawProjection[1]); - SETSTAT_FT(stats.proj_2, xfregs.rawProjection[2]); - SETSTAT_FT(stats.proj_3, xfregs.rawProjection[3]); - SETSTAT_FT(stats.proj_4, xfregs.rawProjection[4]); - SETSTAT_FT(stats.proj_5, xfregs.rawProjection[5]); - SETSTAT_FT(stats.proj_6, xfregs.rawProjection[6]); + SETSTAT_FT(stats.proj_0, rawProjection[0]); + SETSTAT_FT(stats.proj_1, rawProjection[1]); + SETSTAT_FT(stats.proj_2, rawProjection[2]); + SETSTAT_FT(stats.proj_3, rawProjection[3]); + SETSTAT_FT(stats.proj_4, rawProjection[4]); + SETSTAT_FT(stats.proj_5, rawProjection[5]); + break; + + default: + ERROR_LOG(VIDEO, "unknown projection type: %d", xfregs.projection.type); } - PRIM_LOG("Projection: %f %f %f %f %f %f\n", xfregs.rawProjection[0], xfregs.rawProjection[1], xfregs.rawProjection[2], xfregs.rawProjection[3], xfregs.rawProjection[4], xfregs.rawProjection[5]); + PRIM_LOG("Projection: %f %f %f %f %f %f\n", rawProjection[0], rawProjection[1], rawProjection[2], rawProjection[3], rawProjection[4], rawProjection[5]); - if ((g_ActiveConfig.bFreeLook || g_ActiveConfig.bAnaglyphStereo ) && xfregs.rawProjection[6] == 0) + if ((g_ActiveConfig.bFreeLook || g_ActiveConfig.bAnaglyphStereo ) && xfregs.projection.type == GX_PERSPECTIVE) { Matrix44 mtxA; Matrix44 mtxB; diff --git a/Source/Core/VideoCommon/Src/XFMemory.h b/Source/Core/VideoCommon/Src/XFMemory.h index ee3c3b0fdc..fc199b8c32 100644 --- a/Source/Core/VideoCommon/Src/XFMemory.h +++ b/Source/Core/VideoCommon/Src/XFMemory.h @@ -61,6 +61,9 @@ #define LIGHTATTN_NONE 2 #define LIGHTATTN_DIR 3 +#define GX_PERSPECTIVE 0 +#define GX_ORTHOGRAPHIC 1 + #define XFMEM_SIZE 0x8000 #define XFMEM_POSMATRICES 0x000 #define XFMEM_POSMATRICES_END 0x100 @@ -235,6 +238,12 @@ struct Viewport float farZ; }; +struct Projection +{ + float rawProjection[6]; + u32 type; // only GX_PERSPECTIVE or GX_ORTHOGRAPHIC are allowed +}; + struct XFRegisters { u32 error; // 0x1000 @@ -257,10 +266,10 @@ struct XFRegisters u32 unk5; // 0x1015 u32 unk6; // 0x1016 u32 unk7; // 0x1017 - u32 MatrixIndexA; // 0x1018 - u32 MatrixIndexB; // 0x1019 + u32 MatrixIndexA; // 0x1018 + u32 MatrixIndexB; // 0x1019 Viewport viewport; // 0x101a - 0x101f - float rawProjection[7]; // 0x1020 - 0x1026 + Projection projection; // 0x1020 - 0x1026 u32 unk8[24]; // 0x1027 - 0x103e NumTexGen numTexGen; // 0x103f TexMtxInfo texMtxInfo[8]; // 0x1040 - 0x1047 From 2db0c4270eda2e652bb39e394aa8a576785a2354 Mon Sep 17 00:00:00 2001 From: lioncash Date: Thu, 24 Jan 2013 08:21:08 -0500 Subject: [PATCH 25/35] Fix a potential memory leak on non-windows systems. Also added a FIXME to BPStructs.cpp and BPMemLoader.cpp --- Source/Core/Common/Src/FileUtil.cpp | 12 ++++++++++++ Source/Core/VideoCommon/Src/BPStructs.cpp | 1 + .../Plugins/Plugin_VideoSoftware/Src/BPMemLoader.cpp | 1 + 3 files changed, 14 insertions(+) diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index d7b248a722..d74c99b7a2 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -512,12 +512,24 @@ bool DeleteDirRecursively(const std::string &directory) if (IsDirectory(newPath)) { if (!DeleteDirRecursively(newPath)) + { + #ifndef _WIN32 + closedir(dirp); + #endif + return false; + } } else { if (!File::Delete(newPath)) + { + #ifndef _WIN32 + closedir(dirp); + #endif + return false; + } } #ifdef _WIN32 diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp index 9ba2afbbd1..add40d99c3 100644 --- a/Source/Core/VideoCommon/Src/BPStructs.cpp +++ b/Source/Core/VideoCommon/Src/BPStructs.cpp @@ -519,6 +519,7 @@ void BPWritten(const BPCmd& bp) for (u32 i = 0; i < tmem_cfg.preload_tile_info.count; ++i) { + // FIXME: Duplicate conditions. if (tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE || tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE) break; diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/BPMemLoader.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/BPMemLoader.cpp index 6a17a40eb1..f0674a96cc 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/BPMemLoader.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/BPMemLoader.cpp @@ -137,6 +137,7 @@ void SWBPWritten(int address, int newvalue) for (int i = 0; i < tmem_cfg.preload_tile_info.count; ++i) { + // FIXME: Duplicate conditions if (tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE || tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE) break; From 73eb98ed8e85e2c3fdeca440e7aed50117bac8f8 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 24 Jan 2013 10:31:08 -0600 Subject: [PATCH 26/35] Move swap control to the host specific GLInterface files. --- Source/Core/DolphinWX/Src/GLInterface/EGL.cpp | 6 ++++++ Source/Core/DolphinWX/Src/GLInterface/EGL.h | 1 + Source/Core/DolphinWX/Src/GLInterface/GLX.cpp | 9 +++++++++ Source/Core/DolphinWX/Src/GLInterface/GLX.h | 1 + .../DolphinWX/Src/GLInterface/InterfaceBase.h | 1 + Source/Core/DolphinWX/Src/GLInterface/WGL.cpp | 7 +++++++ Source/Core/DolphinWX/Src/GLInterface/WGL.h | 1 + Source/Core/DolphinWX/Src/GLInterface/WX.cpp | 13 ++++++++++++ Source/Core/DolphinWX/Src/GLInterface/WX.h | 1 + Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 19 +----------------- .../Plugin_VideoSoftware/Src/SWmain.cpp | 20 ++++--------------- 11 files changed, 45 insertions(+), 34 deletions(-) diff --git a/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp index b8716ab467..942b60fc1e 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp @@ -26,6 +26,12 @@ void cInterfaceEGL::UpdateFPSDisplay(const char *text) { XStoreName(GLWin.dpy, GLWin.win, text); } + +void cInterfaceEGL::SwapInterval(int Interval) +{ + eglSwapInterval(GLWin.egl_dpy, Interval); +} + void cInterfaceEGL::Swap() { eglSwapBuffers(GLWin.egl_dpy, GLWin.egl_surf); diff --git a/Source/Core/DolphinWX/Src/GLInterface/EGL.h b/Source/Core/DolphinWX/Src/GLInterface/EGL.h index c4b6a00b6c..fe127fe0ba 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/EGL.h +++ b/Source/Core/DolphinWX/Src/GLInterface/EGL.h @@ -34,6 +34,7 @@ private: cX11Window XWindow; public: friend class cX11Window; + void SwapInterval(int Interval); void Swap(); void UpdateFPSDisplay(const char *Text); bool Create(void *&window_handle); diff --git a/Source/Core/DolphinWX/Src/GLInterface/GLX.cpp b/Source/Core/DolphinWX/Src/GLInterface/GLX.cpp index ef60873531..5745823cbf 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/GLX.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/GLX.cpp @@ -27,6 +27,15 @@ void cInterfaceGLX::UpdateFPSDisplay(const char *text) { XStoreName(GLWin.dpy, GLWin.win, text); } + +void cInterfaceGLX::SwapInterval(int Interval) +{ + if (glXSwapIntervalSGI) + glXSwapIntervalSGI(Interval); + else + ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate)."); +} + void cInterfaceGLX::Swap() { glXSwapBuffers(GLWin.dpy, GLWin.win); diff --git a/Source/Core/DolphinWX/Src/GLInterface/GLX.h b/Source/Core/DolphinWX/Src/GLInterface/GLX.h index 73a6690ec5..83bb14a507 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/GLX.h +++ b/Source/Core/DolphinWX/Src/GLInterface/GLX.h @@ -31,6 +31,7 @@ private: cX11Window XWindow; public: friend class cX11Window; + void SwapInterval(int Interval); void Swap(); void UpdateFPSDisplay(const char *Text); bool Create(void *&window_handle); diff --git a/Source/Core/DolphinWX/Src/GLInterface/InterfaceBase.h b/Source/Core/DolphinWX/Src/GLInterface/InterfaceBase.h index 3e4f10fcd4..c2d1ffc54b 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/InterfaceBase.h +++ b/Source/Core/DolphinWX/Src/GLInterface/InterfaceBase.h @@ -29,6 +29,7 @@ public: virtual bool MakeCurrent() = 0; virtual void Shutdown() = 0; + virtual void SwapInterval(int Interval) { } virtual u32 GetBackBufferWidth() { return s_backbuffer_width; } virtual u32 GetBackBufferHeight() { return s_backbuffer_height; } virtual void SetBackBufferDimensions(u32 W, u32 H) {s_backbuffer_width = W; s_backbuffer_height = H; } diff --git a/Source/Core/DolphinWX/Src/GLInterface/WGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/WGL.cpp index c97cb48bdf..ce1bb3d946 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/WGL.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/WGL.cpp @@ -27,6 +27,13 @@ static HDC hDC = NULL; // Private GDI Device Context static HGLRC hRC = NULL; // Permanent Rendering Context +void cInterfaceWGL::SwapInterval(int Interval) +{ + if (WGLEW_EXT_swap_control) + wglSwapIntervalEXT(Interval); + else + ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate)."); +} void cInterfaceWGL::Swap() { SwapBuffers(hDC); diff --git a/Source/Core/DolphinWX/Src/GLInterface/WGL.h b/Source/Core/DolphinWX/Src/GLInterface/WGL.h index 184ddd475f..18b8b2afb0 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/WGL.h +++ b/Source/Core/DolphinWX/Src/GLInterface/WGL.h @@ -28,6 +28,7 @@ class cInterfaceWGL : public cInterfaceBase { public: + void SwapInterval(int Interval); void Swap(); void UpdateFPSDisplay(const char *Text); bool Create(void *&window_handle); diff --git a/Source/Core/DolphinWX/Src/GLInterface/WX.cpp b/Source/Core/DolphinWX/Src/GLInterface/WX.cpp index d5415c8ed9..16de6369a7 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/WX.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/WX.cpp @@ -23,6 +23,19 @@ #include "../GLInterface.h" #include "WX.h" +void cInterfaceWX::SwapInterval(int Interval) +{ + // WX interface only used on Apple +#ifdef __APPLE__ +#if defined USE_WX && USE_WX + NSOpenGLContext *ctx = GLWin.glCtxt->GetWXGLContext(); +#else + NSOpenGLContext *ctx = GLWin.cocoaCtx; +#endif + [ctx setValues: &Interval forParameter: NSOpenGLCPSwapInterval]; +#endif +} + void cInterfaceWX::Swap() { GLWin.glCanvas->SwapBuffers(); diff --git a/Source/Core/DolphinWX/Src/GLInterface/WX.h b/Source/Core/DolphinWX/Src/GLInterface/WX.h index 7772f864e5..82304942ea 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/WX.h +++ b/Source/Core/DolphinWX/Src/GLInterface/WX.h @@ -35,6 +35,7 @@ class cInterfaceWX : public cInterfaceBase { public: + void SwapInterval(int Interval); void Swap(); void UpdateFPSDisplay(const char *Text); bool Create(void *&window_handle); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index e3c35a6511..cd924acd8a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -327,25 +327,8 @@ Renderer::Renderer() s_backbuffer_height = (int)GLInterface->GetBackBufferHeight(); // Handle VSync on/off -#ifdef __APPLE__ int swapInterval = g_ActiveConfig.bVSync ? 1 : 0; -#if defined USE_WX && USE_WX - NSOpenGLContext *ctx = GLWin.glCtxt->GetWXGLContext(); -#else - NSOpenGLContext *ctx = GLWin.cocoaCtx; -#endif - [ctx setValues: &swapInterval forParameter: NSOpenGLCPSwapInterval]; -#elif defined _WIN32 - if (WGLEW_EXT_swap_control) - wglSwapIntervalEXT(g_ActiveConfig.bVSync ? 1 : 0); - else - ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate)."); -#elif defined(HAVE_X11) && HAVE_X11 - if (glXSwapIntervalSGI) - glXSwapIntervalSGI(g_ActiveConfig.bVSync ? 1 : 0); - else - ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate)."); -#endif + GLInterface->SwapInterval(swapInterval); // check the max texture width and height GLint max_texture_size; diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp index 4c88a89ab6..332e83d0e8 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp @@ -141,28 +141,16 @@ void VideoSoftware::Shutdown() void VideoSoftware::Video_Prepare() { GLInterface->MakeCurrent(); - // Init extension support. - { + // Init extension support. + // Required for WGL SwapInterval #ifndef USE_GLES if (glewInit() != GLEW_OK) { ERROR_LOG(VIDEO, "glewInit() failed!Does your video card support OpenGL 2.x?"); return; } - - // Handle VSync on/off -#ifdef _WIN32 - if (WGLEW_EXT_swap_control) - wglSwapIntervalEXT(VSYNC_ENABLED); - else - ERROR_LOG(VIDEO, "no support for SwapInterval (framerate clamped to monitor refresh rate)Does your video card support OpenGL 2.x?"); -#elif defined(HAVE_X11) && HAVE_X11 - if (glXSwapIntervalSGI) - glXSwapIntervalSGI(VSYNC_ENABLED); - else - ERROR_LOG(VIDEO, "no support for SwapInterval (framerate clamped to monitor refresh rate)"); -#endif #endif - } + // Handle VSync on/off + GLInterface->SwapInterval(VSYNC_ENABLED); HwRasterizer::Prepare(); SWRenderer::Prepare(); From 52ead255342796ea3be71aa1666dd2447f96e204 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 24 Jan 2013 10:39:38 -0600 Subject: [PATCH 27/35] Cleans up EGL. Removes printf output with INFO_LOG and ERROR_LOG --- Source/Core/DolphinWX/Src/GLInterface/EGL.cpp | 126 +++++++++--------- 1 file changed, 60 insertions(+), 66 deletions(-) diff --git a/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp index 942b60fc1e..a00df0cffa 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp @@ -49,37 +49,37 @@ bool cInterfaceEGL::Create(void *&window_handle) s_backbuffer_height = _theight; const char *s; - EGLint egl_major, egl_minor; + EGLint egl_major, egl_minor; - GLWin.dpy = XOpenDisplay(NULL); + GLWin.dpy = XOpenDisplay(NULL); - if (!GLWin.dpy) { - printf("Error: couldn't open display\n"); - return false; - } + if (!GLWin.dpy) { + ERROR_LOG(VIDEO, "Error: couldn't open display\n"); + return false; + } - GLWin.egl_dpy = eglGetDisplay(GLWin.dpy); - if (!GLWin.egl_dpy) { - printf("Error: eglGetDisplay() failed\n"); - return false; - } + GLWin.egl_dpy = eglGetDisplay(GLWin.dpy); + if (!GLWin.egl_dpy) { + ERROR_LOG(VIDEO, "Error: eglGetDisplay() failed\n"); + return false; + } - if (!eglInitialize(GLWin.egl_dpy, &egl_major, &egl_minor)) { - printf("Error: eglInitialize() failed\n"); - return false; - } + if (!eglInitialize(GLWin.egl_dpy, &egl_major, &egl_minor)) { + ERROR_LOG(VIDEO, "Error: eglInitialize() failed\n"); + return false; + } - s = eglQueryString(GLWin.egl_dpy, EGL_VERSION); - printf("EGL_VERSION = %s\n", s); + s = eglQueryString(GLWin.egl_dpy, EGL_VERSION); + INFO_LOG(VIDEO, "EGL_VERSION = %s\n", s); - s = eglQueryString(GLWin.egl_dpy, EGL_VENDOR); - printf("EGL_VENDOR = %s\n", s); + s = eglQueryString(GLWin.egl_dpy, EGL_VENDOR); + INFO_LOG(VIDEO, "EGL_VENDOR = %s\n", s); - s = eglQueryString(GLWin.egl_dpy, EGL_EXTENSIONS); - printf("EGL_EXTENSIONS = %s\n", s); + s = eglQueryString(GLWin.egl_dpy, EGL_EXTENSIONS); + INFO_LOG(VIDEO, "EGL_EXTENSIONS = %s\n", s); - s = eglQueryString(GLWin.egl_dpy, EGL_CLIENT_APIS); - printf("EGL_CLIENT_APIS = %s\n", s); + s = eglQueryString(GLWin.egl_dpy, EGL_CLIENT_APIS); + INFO_LOG(VIDEO, "EGL_CLIENT_APIS = %s\n", s); // attributes for a visual in RGBA format with at least // 8 bits per color and a 24 bit depth buffer @@ -108,29 +108,29 @@ bool cInterfaceEGL::Create(void *&window_handle) if (GLWin.parent == 0) GLWin.parent = RootWindow(GLWin.dpy, GLWin.screen); - XVisualInfo visTemplate; - int num_visuals; - EGLConfig config; - EGLint num_configs; - EGLint vid; + XVisualInfo visTemplate; + int num_visuals; + EGLConfig config; + EGLint num_configs; + EGLint vid; - if (!eglChooseConfig( GLWin.egl_dpy, attribs, &config, 1, &num_configs)) { - printf("Error: couldn't get an EGL visual config\n"); - exit(1); - } + if (!eglChooseConfig( GLWin.egl_dpy, attribs, &config, 1, &num_configs)) { + ERROR_LOG(VIDEO, "Error: couldn't get an EGL visual config\n"); + return false; + } - if (!eglGetConfigAttrib(GLWin.egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) { - printf("Error: eglGetConfigAttrib() failed\n"); - exit(1); - } + if (!eglGetConfigAttrib(GLWin.egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) { + ERROG_LOG(VIDEO, "Error: eglGetConfigAttrib() failed\n"); + return false; + } - /* The X window visual must match the EGL config */ - visTemplate.visualid = vid; - GLWin.vi = XGetVisualInfo(GLWin.dpy, VisualIDMask, &visTemplate, &num_visuals); - if (!GLWin.vi) { - printf("Error: couldn't get X visual\n"); - exit(1); - } + /* The X window visual must match the EGL config */ + visTemplate.visualid = vid; + GLWin.vi = XGetVisualInfo(GLWin.dpy, VisualIDMask, &visTemplate, &num_visuals); + if (!GLWin.vi) { + ERROR_LOG(VIDEO, "Error: couldn't get X visual\n"); + return false; + } GLWin.x = _tx; GLWin.y = _ty; @@ -144,33 +144,27 @@ bool cInterfaceEGL::Create(void *&window_handle) eglBindAPI(EGL_OPENGL_API); #endif GLWin.egl_ctx = eglCreateContext(GLWin.egl_dpy, config, EGL_NO_CONTEXT, ctx_attribs ); - if (!GLWin.egl_ctx) { - printf("Error: eglCreateContext failed\n"); - exit(1); - } + if (!GLWin.egl_ctx) { + ERROR_LOG(VIDEO, "Error: eglCreateContext failed\n"); + return false; + } - GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.win, NULL); - if (!GLWin.egl_surf) { - printf("Error: eglCreateWindowSurface failed\n"); - exit(1); - } + GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.win, NULL); + if (!GLWin.egl_surf) { + ERROR_LOG(VIDEO, "Error: eglCreateWindowSurface failed\n"); + return false; + } - if (!eglMakeCurrent(GLWin.egl_dpy, GLWin.egl_surf, GLWin.egl_surf, GLWin.egl_ctx)) { - - printf("Error: eglMakeCurrent() failed\n"); - return false; - } + if (!eglMakeCurrent(GLWin.egl_dpy, GLWin.egl_surf, GLWin.egl_surf, GLWin.egl_ctx)) { + ERROR_LOG(VIDEO, "Error: eglMakeCurrent() failed\n"); + return false; + } - printf("GL_VENDOR: %s\n", glGetString(GL_VENDOR)); - printf("GL_RENDERER: %s\n", glGetString(GL_RENDERER)); - printf("GL_VERSION: %s\n", glGetString(GL_VERSION)); - printf("GL_EXTENSIONS: %s\n", glGetString(GL_EXTENSIONS)); - /* Set initial projection/viewing transformation. - * We can't be sure we'll get a ConfigureNotify event when the window - * first appears. - */ - glViewport(0, 0, (GLint) _twidth, (GLint) _theight); + INFO_LOG(VIDEO, "GL_VENDOR: %s\n", glGetString(GL_VENDOR)); + INFO_LOG(VIDEO, "GL_RENDERER: %s\n", glGetString(GL_RENDERER)); + INFO_LOG(VIDEO, "GL_VERSION: %s\n", glGetString(GL_VERSION)); + INFO_LOG(VIDEO, "GL_EXTENSIONS: %s\n", glGetString(GL_EXTENSIONS)); window_handle = (void *)GLWin.win; return true; } From 10418d449fc1d04bb39fcc28afda0e19f14441da Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 24 Jan 2013 10:53:37 -0600 Subject: [PATCH 28/35] Removed the need for this temporary variable. --- Source/Core/DolphinWX/Src/GLInterface/EGL.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp index a00df0cffa..304eb92059 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp @@ -48,7 +48,6 @@ bool cInterfaceEGL::Create(void *&window_handle) s_backbuffer_width = _twidth; s_backbuffer_height = _theight; - const char *s; EGLint egl_major, egl_minor; GLWin.dpy = XOpenDisplay(NULL); @@ -69,17 +68,10 @@ bool cInterfaceEGL::Create(void *&window_handle) return false; } - s = eglQueryString(GLWin.egl_dpy, EGL_VERSION); - INFO_LOG(VIDEO, "EGL_VERSION = %s\n", s); - - s = eglQueryString(GLWin.egl_dpy, EGL_VENDOR); - INFO_LOG(VIDEO, "EGL_VENDOR = %s\n", s); - - s = eglQueryString(GLWin.egl_dpy, EGL_EXTENSIONS); - INFO_LOG(VIDEO, "EGL_EXTENSIONS = %s\n", s); - - s = eglQueryString(GLWin.egl_dpy, EGL_CLIENT_APIS); - INFO_LOG(VIDEO, "EGL_CLIENT_APIS = %s\n", s); + INFO_LOG(VIDEO, "EGL_VERSION = %s\n", eglQueryString(GLWin.egl_dpy, EGL_VERSION)); + INFO_LOG(VIDEO, "EGL_VENDOR = %s\n", eglQueryString(GLWin.egl_dpy, EGL_VENDOR)); + INFO_LOG(VIDEO, "EGL_EXTENSIONS = %s\n", eglQueryString(GLWin.egl_dpy, EGL_EXTENSIONS)); + INFO_LOG(VIDEO, "EGL_CLIENT_APIS = %s\n", eglQueryString(GLWin.egl_dpy, EGL_CLIENT_APIS)); // attributes for a visual in RGBA format with at least // 8 bits per color and a 24 bit depth buffer @@ -120,7 +112,7 @@ bool cInterfaceEGL::Create(void *&window_handle) } if (!eglGetConfigAttrib(GLWin.egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) { - ERROG_LOG(VIDEO, "Error: eglGetConfigAttrib() failed\n"); + ERROR_LOG(VIDEO, "Error: eglGetConfigAttrib() failed\n"); return false; } @@ -160,7 +152,6 @@ bool cInterfaceEGL::Create(void *&window_handle) return false; } - INFO_LOG(VIDEO, "GL_VENDOR: %s\n", glGetString(GL_VENDOR)); INFO_LOG(VIDEO, "GL_RENDERER: %s\n", glGetString(GL_RENDERER)); INFO_LOG(VIDEO, "GL_VERSION: %s\n", glGetString(GL_VERSION)); From 2cc1a97a66c2d96357e777cd507acaaac888116f Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Fri, 25 Jan 2013 03:07:50 -0500 Subject: [PATCH 29/35] Properly sort multi-disc games by title. --- Source/Core/DolphinWX/Src/GameListCtrl.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 2312d6afa3..3d6f82b4c5 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -94,6 +94,18 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is switch(sortData) { case CGameListCtrl::COLUMN_TITLE: + if (!strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str())) + { + File::IOFile file(iso1->GetFileName(),"rb"); + u8 discNum; + file.Seek(6,0); + file.ReadBytes(&discNum, 1); + file.Close(); + if (discNum == 1) + return 1 * t; + else + return -1 * t; + } return strcasecmp(iso1->GetName(indexOne).c_str(), iso2->GetName(indexOther).c_str()) * t; case CGameListCtrl::COLUMN_NOTES: From 74a5ad542b44a18751acc19e4d1229d640cc4c0f Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Fri, 25 Jan 2013 13:00:53 -0500 Subject: [PATCH 30/35] Do not automatically refresh the game list for games that have "Emulation issues" written in their gameini after we open/close the iso properties. Fixes issue 5932. --- Source/Core/DolphinWX/Src/ISOProperties.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index 2083c39201..6a673b95d1 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -999,7 +999,6 @@ void CISOProperties::LoadGameConfig() if (!sTemp.empty()) { EmuIssues->SetValue(wxString(sTemp.c_str(), *wxConvCurrent)); - bRefreshList = true; } EmuIssues->Enable(EmuState->GetSelection() != 0); @@ -1085,6 +1084,11 @@ bool CISOProperties::SaveGameConfig() GameIni.Set("Video", "PH_ZFar", PHack_Data.PHZFar); GameIni.Set("EmuState", "EmulationStateId", EmuState->GetSelection()); + + std::string sTemp; + GameIni.Get("EmuState","EmulationIssues", &sTemp); + if (EmuIssues->GetValue() != sTemp) + bRefreshList = true; GameIni.Set("EmuState", "EmulationIssues", (const char*)EmuIssues->GetValue().mb_str(*wxConvCurrent)); PatchList_Save(); From eb07c005e39433a514fbd648fc39f5dc28a2f9db Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 25 Jan 2013 13:55:05 -0600 Subject: [PATCH 31/35] Move the cmake option lines to the top of the Cmake file for easy viewing in vim. --- CMakeLists.txt | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 255e3c95eb..8efd8c495d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,19 @@ # cmake_minimum_required(VERSION 2.6) +option(USE_GLES "Enables GLES, disables OGL" OFF) +option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF) + +option(FASTLOG "Enable all logs" OFF) +option(OPROFILING "Enable profiling" OFF) +option(OPENMP "Enable OpenMP parallelization" ON) +option(ENCODE_FRAMEDUMPS "Encode framedumps in AVI format" ON) +######################################## +# Optional Targets +# TODO: Add DSPSpy and TestSuite. +option(DSPTOOL "Build dsptool" OFF) +option(UNITTESTS "Build unitests" OFF) + # Update compiler before calling project() if (APPLE) # Use clang compiler @@ -217,14 +230,12 @@ if(CMAKE_BUILD_TYPE STREQUAL Release) add_definitions(-fomit-frame-pointer) endif(CMAKE_BUILD_TYPE STREQUAL Release) -option(FASTLOG "Enable all logs" OFF) if(FASTLOG) add_definitions(-DDEBUGFAST) endif() # For now GLES and EGL are tied to each other. # Enabling GLES also disables the OpenGL plugin. -option(USE_GLES "Enables GLES, disables OGL" OFF) if(USE_GLES) message("GLES rendering enabled") add_definitions(-DUSE_GLES) @@ -248,7 +259,6 @@ if(NOT OPENGL_GLU_FOUND) message(FATAL_ERROR "GLU is required but not found") endif() -option(OPENMP "Enable OpenMP parallelization" ON) if(OPENMP) include(FindOpenMP OPTIONAL) if(OPENMP_FOUND) @@ -331,7 +341,6 @@ else() add_definitions(-DHAVE_XRANDR=0) endif(XRANDR_FOUND) -option(ENCODE_FRAMEDUMPS "Encode framedumps in AVI format" ON) if(ENCODE_FRAMEDUMPS) check_libav() endif() @@ -353,7 +362,6 @@ else() set(PORTAUDIO_FOUND FALSE) endif(PORTAUDIO) -option(OPROFILING "Enable profiling" OFF) if(OPROFILING) check_lib(OPROFILE opagent opagent.h) check_lib(BFD bfd bfd.h) @@ -511,7 +519,6 @@ else() add_subdirectory(Externals/CLRun) endif() -option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF) if(NOT DISABLE_WX) include(FindwxWidgets OPTIONAL) FIND_PACKAGE(wxWidgets COMPONENTS core aui adv) @@ -607,12 +614,6 @@ file(WRITE ${PROJECT_BINARY_DIR}/Source/Core/Common/Src/scmrev.h ) include_directories("${PROJECT_BINARY_DIR}/Source/Core/Common/Src") -######################################## -# Optional Targets -# TODO: Add DSPSpy and TestSuite. -option(DSPTOOL "Build dsptool" OFF) -option(UNITTESTS "Build unitests" OFF) - ######################################## # Start compiling our code # From f660077d06fb8bc37d20de4a7ad7f70738a0242a Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Fri, 25 Jan 2013 20:11:17 -0600 Subject: [PATCH 32/35] Remove deprecated method for accessing a gtk widgets window. Fix a debug build compiler warning. --- Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp | 7 +++++++ Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.h | 7 ------- Source/Core/DolphinWX/Src/X11Utils.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp index 485a5e7e52..6fe6b81613 100644 --- a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp +++ b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp @@ -41,6 +41,13 @@ inline double round(double x) { return (x-floor(x))>0.5 ? ceil(x) : floor(x); } #include "../../Movie.h" +namespace +{ +// :) +auto const TAU = 6.28318530717958647692; +auto const PI = TAU / 2.0; +} + namespace WiimoteEmu { diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.h b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.h index 2a773d8978..36f0da406b 100644 --- a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.h +++ b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.h @@ -30,13 +30,6 @@ #include #include -namespace -{ -// :) -auto const TAU = 6.28318530717958647692; -auto const PI = TAU / 2.0; -} - // Registry sizes #define WIIMOTE_EEPROM_SIZE (16*1024) #define WIIMOTE_EEPROM_FREE_SIZE 0x1700 diff --git a/Source/Core/DolphinWX/Src/X11Utils.cpp b/Source/Core/DolphinWX/Src/X11Utils.cpp index da21c41cb2..f032f81e96 100644 --- a/Source/Core/DolphinWX/Src/X11Utils.cpp +++ b/Source/Core/DolphinWX/Src/X11Utils.cpp @@ -124,12 +124,12 @@ void EWMH_Fullscreen(Display *dpy, int action) #if defined(HAVE_WX) && HAVE_WX Window XWindowFromHandle(void *Handle) { - return GDK_WINDOW_XID(GTK_WIDGET(Handle)->window); + return GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(Handle))); } Display *XDisplayFromHandle(void *Handle) { - return GDK_WINDOW_XDISPLAY(GTK_WIDGET(Handle)->window); + return GDK_WINDOW_XDISPLAY(gtk_widget_get_window(GTK_WIDGET(Handle))); } #endif From 1e006b5b99cc520798988dc9b810d9b1ecae384d Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Fri, 25 Jan 2013 21:28:04 -0500 Subject: [PATCH 33/35] Better implementation of revision 2cc1a97a66c2. Works with .gcz files now. --- Source/Core/DiscIO/Src/Volume.h | 1 + Source/Core/DiscIO/Src/VolumeGC.cpp | 7 +++++++ Source/Core/DiscIO/Src/VolumeGC.h | 1 + Source/Core/DolphinWX/Src/GameListCtrl.cpp | 9 ++------- Source/Core/DolphinWX/Src/ISOFile.cpp | 4 +++- Source/Core/DolphinWX/Src/ISOFile.h | 2 ++ 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Source/Core/DiscIO/Src/Volume.h b/Source/Core/DiscIO/Src/Volume.h index c90ee4a381..557c71c31f 100644 --- a/Source/Core/DiscIO/Src/Volume.h +++ b/Source/Core/DiscIO/Src/Volume.h @@ -43,6 +43,7 @@ public: virtual std::string GetApploaderDate() const = 0; virtual bool SupportsIntegrityCheck() const { return false; } virtual bool CheckIntegrity() const { return false; } + virtual bool IsDiscTwo() const { return false; } enum ECountry { diff --git a/Source/Core/DiscIO/Src/VolumeGC.cpp b/Source/Core/DiscIO/Src/VolumeGC.cpp index 51fac285fc..09e2c5eaa9 100644 --- a/Source/Core/DiscIO/Src/VolumeGC.cpp +++ b/Source/Core/DiscIO/Src/VolumeGC.cpp @@ -137,4 +137,11 @@ u64 CVolumeGC::GetSize() const return 0; } +bool CVolumeGC::IsDiscTwo() const +{ + bool discTwo; + Read(6,1, (u8*) &discTwo); + return discTwo; +} + } // namespace diff --git a/Source/Core/DiscIO/Src/VolumeGC.h b/Source/Core/DiscIO/Src/VolumeGC.h index 5fd18ea96a..4221df9493 100644 --- a/Source/Core/DiscIO/Src/VolumeGC.h +++ b/Source/Core/DiscIO/Src/VolumeGC.h @@ -39,6 +39,7 @@ public: std::string GetApploaderDate() const; ECountry GetCountry() const; u64 GetSize() const; + bool IsDiscTwo() const; private: IBlobReader* m_pReader; diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 3d6f82b4c5..51b5bb2554 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -96,14 +96,9 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is case CGameListCtrl::COLUMN_TITLE: if (!strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str())) { - File::IOFile file(iso1->GetFileName(),"rb"); - u8 discNum; - file.Seek(6,0); - file.ReadBytes(&discNum, 1); - file.Close(); - if (discNum == 1) + if (iso1->IsDiscTwo()) return 1 * t; - else + else if (iso2->IsDiscTwo()) return -1 * t; } return strcasecmp(iso1->GetName(indexOne).c_str(), diff --git a/Source/Core/DolphinWX/Src/ISOFile.cpp b/Source/Core/DolphinWX/Src/ISOFile.cpp index 2d4b202272..1e4164b7aa 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.cpp +++ b/Source/Core/DolphinWX/Src/ISOFile.cpp @@ -36,7 +36,7 @@ #include "ChunkFile.h" #include "../resources/no_banner.cpp" -#define CACHE_REVISION 0x10E +#define CACHE_REVISION 0x10F #define DVD_BANNER_WIDTH 96 #define DVD_BANNER_HEIGHT 32 @@ -91,6 +91,7 @@ GameListItem::GameListItem(const std::string& _rFileName) m_UniqueID = pVolume->GetUniqueID(); m_BlobCompressed = DiscIO::IsCompressedBlob(_rFileName.c_str()); + m_IsDiscTwo = pVolume->IsDiscTwo(); // check if we can get some infos from the banner file too DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(pVolume); @@ -235,6 +236,7 @@ void GameListItem::DoState(PointerWrap &p) p.Do(m_BlobCompressed); p.Do(m_pImage); p.Do(m_Platform); + p.Do(m_IsDiscTwo); } std::string GameListItem::CreateCacheFilename() diff --git a/Source/Core/DolphinWX/Src/ISOFile.h b/Source/Core/DolphinWX/Src/ISOFile.h index fe7d3d6c6c..e58dcf7713 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.h +++ b/Source/Core/DolphinWX/Src/ISOFile.h @@ -48,6 +48,7 @@ public: bool IsCompressed() const {return m_BlobCompressed;} u64 GetFileSize() const {return m_FileSize;} u64 GetVolumeSize() const {return m_VolumeSize;} + bool IsDiscTwo() const {return m_IsDiscTwo;} #if defined(HAVE_WX) && HAVE_WX const wxImage& GetImage() const {return m_Image;} #endif @@ -87,6 +88,7 @@ private: bool m_BlobCompressed; std::vector m_pImage; u32 m_ImageSize; + bool m_IsDiscTwo; bool LoadFromCache(); void SaveToCache(); From efe8c754249a9d43a6093655f265a912b30a0f09 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 25 Jan 2013 21:30:29 -0500 Subject: [PATCH 34/35] Duplicate condition fix. Thanks j4ck.fr0st --- Source/Core/VideoCommon/Src/BPStructs.cpp | 3 +-- Source/Plugins/Plugin_VideoSoftware/Src/BPMemLoader.cpp | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp index add40d99c3..af263235cd 100644 --- a/Source/Core/VideoCommon/Src/BPStructs.cpp +++ b/Source/Core/VideoCommon/Src/BPStructs.cpp @@ -519,9 +519,8 @@ void BPWritten(const BPCmd& bp) for (u32 i = 0; i < tmem_cfg.preload_tile_info.count; ++i) { - // FIXME: Duplicate conditions. if (tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE || - tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE) + tmem_addr_odd + TMEM_LINE_SIZE > TMEM_SIZE) break; memcpy(texMem + tmem_addr_even, src_ptr, TMEM_LINE_SIZE); diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/BPMemLoader.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/BPMemLoader.cpp index f0674a96cc..f05f9f8b57 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/BPMemLoader.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/BPMemLoader.cpp @@ -135,11 +135,10 @@ void SWBPWritten(int address, int newvalue) // AR and GB tiles are stored in separate TMEM banks => can't use a single memcpy for everything u32 tmem_addr_odd = tmem_cfg.preload_tmem_odd * TMEM_LINE_SIZE; - for (int i = 0; i < tmem_cfg.preload_tile_info.count; ++i) + for (unsigned int i = 0; i < tmem_cfg.preload_tile_info.count; ++i) { - // FIXME: Duplicate conditions if (tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE || - tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE) + tmem_addr_odd + TMEM_LINE_SIZE > TMEM_SIZE) break; memcpy(texMem + tmem_addr_even, src_ptr, TMEM_LINE_SIZE); From a8d4c78cec87e864cfa5410f14687d13308e38d7 Mon Sep 17 00:00:00 2001 From: "kostamarino@hotmail.com" Date: Sat, 26 Jan 2013 12:12:47 +0200 Subject: [PATCH 35/35] Gameini database update. Fixes issue 5135. --- Data/User/GameConfig/G2TE52.ini | 13 +++++++++++-- Data/User/GameConfig/G3AP69.ini | 2 +- Data/User/GameConfig/GAZD69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GAZE69.ini | 13 +++++++++++-- Data/User/GameConfig/GAZF69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GAZH69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GAZI69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GAZJ69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GAZM69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GAZP69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GAZS69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GH4D69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GH4E69.ini | 15 ++++++++++++--- Data/User/GameConfig/GH4F69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GH4H69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GH4I69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GH4J69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GH4M69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GH4P69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GH4S69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GHLE69.ini | 11 ++++++++++- Data/User/GameConfig/GHLJ69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GHLP69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GHLX69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GHLY69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GHLZ69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GHSE69.ini | 2 +- Data/User/GameConfig/GHSJ69.ini | 18 ++++++++++++++++++ Data/User/GameConfig/GHSP69.ini | 18 ++++++++++++++++++ Data/User/GameConfig/GHSX69.ini | 18 ++++++++++++++++++ Data/User/GameConfig/GHSY69.ini | 2 +- Data/User/GameConfig/GKYE01.ini | 9 ++++++++- Data/User/GameConfig/GKYJ01.ini | 17 +++++++++++++++++ Data/User/GameConfig/GKYP01.ini | 13 ++++++++++++- Data/User/GameConfig/GM8E01.ini | 2 -- Data/User/GameConfig/GQWE69.ini | 13 +++++++++++-- Data/User/GameConfig/GQWJ69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GQWP69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GQWX69.ini | 16 ++++++++++++++++ Data/User/GameConfig/GUME52.ini | 4 ++-- Data/User/GameConfig/GUMP52.ini | 4 ++-- Data/User/GameConfig/R2GEXJ.ini | 3 ++- Data/User/GameConfig/R2GJAF.ini | 4 ++-- Data/User/GameConfig/R2GP99.ini | 4 ++-- Data/User/GameConfig/R3ME01.ini | 14 ++++++++++++-- Data/User/GameConfig/R3MP01.ini | 20 ++++++++++++++++++++ Data/User/GameConfig/RBWE01.ini | 2 ++ Data/User/GameConfig/RBWJ01.ini | 2 ++ Data/User/GameConfig/RBWP01.ini | 2 ++ Data/User/GameConfig/RHDE8P.ini | 4 ++-- Data/User/GameConfig/RHDJ8P.ini | 4 ++-- Data/User/GameConfig/RHDP8P.ini | 4 ++-- Data/User/GameConfig/SX3J01.ini | 2 ++ Data/User/GameConfig/SX3P01.ini | 2 ++ 54 files changed, 591 insertions(+), 34 deletions(-) create mode 100644 Data/User/GameConfig/GAZD69.ini create mode 100644 Data/User/GameConfig/GAZF69.ini create mode 100644 Data/User/GameConfig/GAZH69.ini create mode 100644 Data/User/GameConfig/GAZI69.ini create mode 100644 Data/User/GameConfig/GAZJ69.ini create mode 100644 Data/User/GameConfig/GAZM69.ini create mode 100644 Data/User/GameConfig/GAZP69.ini create mode 100644 Data/User/GameConfig/GAZS69.ini create mode 100644 Data/User/GameConfig/GH4D69.ini create mode 100644 Data/User/GameConfig/GH4F69.ini create mode 100644 Data/User/GameConfig/GH4H69.ini create mode 100644 Data/User/GameConfig/GH4I69.ini create mode 100644 Data/User/GameConfig/GH4J69.ini create mode 100644 Data/User/GameConfig/GH4M69.ini create mode 100644 Data/User/GameConfig/GH4P69.ini create mode 100644 Data/User/GameConfig/GH4S69.ini create mode 100644 Data/User/GameConfig/GHLJ69.ini create mode 100644 Data/User/GameConfig/GHLP69.ini create mode 100644 Data/User/GameConfig/GHLX69.ini create mode 100644 Data/User/GameConfig/GHLY69.ini create mode 100644 Data/User/GameConfig/GHLZ69.ini create mode 100644 Data/User/GameConfig/GHSJ69.ini create mode 100644 Data/User/GameConfig/GHSP69.ini create mode 100644 Data/User/GameConfig/GHSX69.ini create mode 100644 Data/User/GameConfig/GKYJ01.ini create mode 100644 Data/User/GameConfig/GQWJ69.ini create mode 100644 Data/User/GameConfig/GQWP69.ini create mode 100644 Data/User/GameConfig/GQWX69.ini create mode 100644 Data/User/GameConfig/R3MP01.ini diff --git a/Data/User/GameConfig/G2TE52.ini b/Data/User/GameConfig/G2TE52.ini index 506768e485..b90db9f401 100644 --- a/Data/User/GameConfig/G2TE52.ini +++ b/Data/User/GameConfig/G2TE52.ini @@ -1,7 +1,16 @@ # G2TE52 - Tony Hawk's Underground 2 [Core] Values set here will override the main dolphin settings. -TLBHack=1 +TLBHack = 1 [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationStateId = 1 +EmulationStateId = 4 +EmulationIssues = [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/G3AP69.ini b/Data/User/GameConfig/G3AP69.ini index ed15e3bbba..04ea1cba46 100644 --- a/Data/User/GameConfig/G3AP69.ini +++ b/Data/User/GameConfig/G3AP69.ini @@ -1,4 +1,4 @@ -# G3AE69 - The Lord of the Rings, The Third Age +# G3AP69 - The Lord of the Rings, The Third Age [Core] Values set here will override the main dolphin settings. TLBHack = 1 [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. diff --git a/Data/User/GameConfig/GAZD69.ini b/Data/User/GameConfig/GAZD69.ini new file mode 100644 index 0000000000..c8516a71ea --- /dev/null +++ b/Data/User/GameConfig/GAZD69.ini @@ -0,0 +1,16 @@ +# GAZD69 - Harry Potter : POA +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Videos are messed up, skip them. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GAZE69.ini b/Data/User/GameConfig/GAZE69.ini index 5168f7c0a0..0e84a9479a 100644 --- a/Data/User/GameConfig/GAZE69.ini +++ b/Data/User/GameConfig/GAZE69.ini @@ -1,7 +1,16 @@ # GAZE69 - Harry Potter : POA [Core] Values set here will override the main dolphin settings. -TLBHack=1 +TLBHack = 1 [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationStateId = 1 +EmulationStateId = 4 +EmulationIssues = Videos are messed up, skip them. [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GAZF69.ini b/Data/User/GameConfig/GAZF69.ini new file mode 100644 index 0000000000..e933511c09 --- /dev/null +++ b/Data/User/GameConfig/GAZF69.ini @@ -0,0 +1,16 @@ +# GAZF69 - Harry Potter : POA +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Videos are messed up, skip them. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GAZH69.ini b/Data/User/GameConfig/GAZH69.ini new file mode 100644 index 0000000000..f00c317941 --- /dev/null +++ b/Data/User/GameConfig/GAZH69.ini @@ -0,0 +1,16 @@ +# GAZH69 - Harry Potter : POA +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Videos are messed up, skip them. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GAZI69.ini b/Data/User/GameConfig/GAZI69.ini new file mode 100644 index 0000000000..2e56ee50ec --- /dev/null +++ b/Data/User/GameConfig/GAZI69.ini @@ -0,0 +1,16 @@ +# GAZI69 - Harry Potter : POA +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Videos are messed up, skip them. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GAZJ69.ini b/Data/User/GameConfig/GAZJ69.ini new file mode 100644 index 0000000000..91a6e20741 --- /dev/null +++ b/Data/User/GameConfig/GAZJ69.ini @@ -0,0 +1,16 @@ +# GAZJ69 - Harry Potter to Azkaban no Shuujin +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Videos are messed up, skip them. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GAZM69.ini b/Data/User/GameConfig/GAZM69.ini new file mode 100644 index 0000000000..edcde989b1 --- /dev/null +++ b/Data/User/GameConfig/GAZM69.ini @@ -0,0 +1,16 @@ +# GAZM69 - Harry Potter : POA +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Videos are messed up, skip them. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GAZP69.ini b/Data/User/GameConfig/GAZP69.ini new file mode 100644 index 0000000000..62e235c67b --- /dev/null +++ b/Data/User/GameConfig/GAZP69.ini @@ -0,0 +1,16 @@ +# GAZP69 - Harry Potter : POA +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Videos are messed up, skip them. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GAZS69.ini b/Data/User/GameConfig/GAZS69.ini new file mode 100644 index 0000000000..493976126f --- /dev/null +++ b/Data/User/GameConfig/GAZS69.ini @@ -0,0 +1,16 @@ +# GAZS69 - Harry Potter : POA +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Videos are messed up, skip them. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GH4D69.ini b/Data/User/GameConfig/GH4D69.ini new file mode 100644 index 0000000000..aa043328ab --- /dev/null +++ b/Data/User/GameConfig/GH4D69.ini @@ -0,0 +1,16 @@ +# GH4D69 - Harry Potter and the Goblet of Fire +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GH4E69.ini b/Data/User/GameConfig/GH4E69.ini index 717593cf73..53f2bf092e 100644 --- a/Data/User/GameConfig/GH4E69.ini +++ b/Data/User/GameConfig/GH4E69.ini @@ -1,7 +1,16 @@ -# GH4E69 - Goblet Of Fire +# GH4E69 - Harry Potter and the Goblet of Fire [Core] Values set here will override the main dolphin settings. -TLBHack=1 +TLBHack = 1 [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationStateId = 1 +EmulationStateId = 4 +EmulationIssues = [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GH4F69.ini b/Data/User/GameConfig/GH4F69.ini new file mode 100644 index 0000000000..162bbcd94d --- /dev/null +++ b/Data/User/GameConfig/GH4F69.ini @@ -0,0 +1,16 @@ +# GH4F69 - Harry Potter and the Goblet of Fire +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GH4H69.ini b/Data/User/GameConfig/GH4H69.ini new file mode 100644 index 0000000000..f348f1f777 --- /dev/null +++ b/Data/User/GameConfig/GH4H69.ini @@ -0,0 +1,16 @@ +# GH4H69 - Harry Potter and the Goblet of Fire +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GH4I69.ini b/Data/User/GameConfig/GH4I69.ini new file mode 100644 index 0000000000..b3bb4acb13 --- /dev/null +++ b/Data/User/GameConfig/GH4I69.ini @@ -0,0 +1,16 @@ +# GH4I69 - Harry Potter and the Goblet of Fire +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GH4J69.ini b/Data/User/GameConfig/GH4J69.ini new file mode 100644 index 0000000000..8427cb7a75 --- /dev/null +++ b/Data/User/GameConfig/GH4J69.ini @@ -0,0 +1,16 @@ +# GH4J69 - Harry Potter to Honoo no Goblet +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GH4M69.ini b/Data/User/GameConfig/GH4M69.ini new file mode 100644 index 0000000000..d26c2c8bf7 --- /dev/null +++ b/Data/User/GameConfig/GH4M69.ini @@ -0,0 +1,16 @@ +# GH4M69 - Harry Potter and the Goblet of Fire +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GH4P69.ini b/Data/User/GameConfig/GH4P69.ini new file mode 100644 index 0000000000..7f59479c96 --- /dev/null +++ b/Data/User/GameConfig/GH4P69.ini @@ -0,0 +1,16 @@ +# GH4P69 - Harry Potter and the Goblet of Fire +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GH4S69.ini b/Data/User/GameConfig/GH4S69.ini new file mode 100644 index 0000000000..277c978f4a --- /dev/null +++ b/Data/User/GameConfig/GH4S69.ini @@ -0,0 +1,16 @@ +# GH4S69 - Harry Potter and the Goblet of Fire +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GHLE69.ini b/Data/User/GameConfig/GHLE69.ini index 2b8afab705..907ea760cb 100644 --- a/Data/User/GameConfig/GHLE69.ini +++ b/Data/User/GameConfig/GHLE69.ini @@ -1,7 +1,16 @@ # GHLE69 - Harry Potter and the Sorcerer's Stone [Core] Values set here will override the main dolphin settings. +TLBHack = 1 [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. EmulationStateId = 4 -EmulationIssues = Missing text sometimes +EmulationIssues = Text missing in D3D9, use D3D11 or Opengl instead. [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GHLJ69.ini b/Data/User/GameConfig/GHLJ69.ini new file mode 100644 index 0000000000..5f9ecffaaa --- /dev/null +++ b/Data/User/GameConfig/GHLJ69.ini @@ -0,0 +1,16 @@ +# GHLJ69 - Harry Potter to Kenja no Ishi +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Text missing in D3D9, use D3D11 or Opengl instead. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GHLP69.ini b/Data/User/GameConfig/GHLP69.ini new file mode 100644 index 0000000000..9cc3ba9db2 --- /dev/null +++ b/Data/User/GameConfig/GHLP69.ini @@ -0,0 +1,16 @@ +# GHLP69 - Harry Potter and the Philosopher's Stone +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Text missing in D3D9, use D3D11 or Opengl instead. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GHLX69.ini b/Data/User/GameConfig/GHLX69.ini new file mode 100644 index 0000000000..5bf5d65db3 --- /dev/null +++ b/Data/User/GameConfig/GHLX69.ini @@ -0,0 +1,16 @@ +# GHLX69 - Harry Potter and the Sorcerer's Stone +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Text missing in D3D9, use D3D11 or Opengl instead. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GHLY69.ini b/Data/User/GameConfig/GHLY69.ini new file mode 100644 index 0000000000..b6ecff05dc --- /dev/null +++ b/Data/User/GameConfig/GHLY69.ini @@ -0,0 +1,16 @@ +# GHLY69 - Harry Potter and the Sorcerer's Stone +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Text missing in D3D9, use D3D11 or Opengl instead. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GHLZ69.ini b/Data/User/GameConfig/GHLZ69.ini new file mode 100644 index 0000000000..a84cd6a874 --- /dev/null +++ b/Data/User/GameConfig/GHLZ69.ini @@ -0,0 +1,16 @@ +# GHLZ69 - Harry Potter and the Sorcerer's Stone +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Text missing in D3D9, use D3D11 or Opengl instead. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GHSE69.ini b/Data/User/GameConfig/GHSE69.ini index 8640caac26..ca829d891b 100644 --- a/Data/User/GameConfig/GHSE69.ini +++ b/Data/User/GameConfig/GHSE69.ini @@ -2,7 +2,7 @@ [Core] Values set here will override the main dolphin settings. [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. EmulationStateId = 4 -EmulationIssues = HLE sound glitches, videos require real XFB +EmulationIssues = Needs Real Xfb for videos to display. [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. [Video] diff --git a/Data/User/GameConfig/GHSJ69.ini b/Data/User/GameConfig/GHSJ69.ini new file mode 100644 index 0000000000..44b9d741fd --- /dev/null +++ b/Data/User/GameConfig/GHSJ69.ini @@ -0,0 +1,18 @@ +# GHSJ69 - Harry Potter to Himitsu no Heya +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Needs Real Xfb for videos to display. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] +[Video_Settings] +UseXFB = True +UseRealXFB = True diff --git a/Data/User/GameConfig/GHSP69.ini b/Data/User/GameConfig/GHSP69.ini new file mode 100644 index 0000000000..06ea951767 --- /dev/null +++ b/Data/User/GameConfig/GHSP69.ini @@ -0,0 +1,18 @@ +# GHSP69 - Harry Potter: Chamber Of Secrets +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Needs Real Xfb for videos to display. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] +[Video_Settings] +UseXFB = True +UseRealXFB = True diff --git a/Data/User/GameConfig/GHSX69.ini b/Data/User/GameConfig/GHSX69.ini new file mode 100644 index 0000000000..b030198aff --- /dev/null +++ b/Data/User/GameConfig/GHSX69.ini @@ -0,0 +1,18 @@ +# GHSX69 - Harry Potter: Chamber Of Secrets +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Needs Real Xfb for videos to display. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] +[Video_Settings] +UseXFB = True +UseRealXFB = True diff --git a/Data/User/GameConfig/GHSY69.ini b/Data/User/GameConfig/GHSY69.ini index 7fc51c7467..1d484a2598 100644 --- a/Data/User/GameConfig/GHSY69.ini +++ b/Data/User/GameConfig/GHSY69.ini @@ -2,7 +2,7 @@ [Core] Values set here will override the main dolphin settings. [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. EmulationStateId = 4 -EmulationIssues = HLE sound glitches, videos require real XFB +EmulationIssues = Needs Real Xfb for videos to display. [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. [Video] diff --git a/Data/User/GameConfig/GKYE01.ini b/Data/User/GameConfig/GKYE01.ini index 36e4128b6c..bb79983dd3 100644 --- a/Data/User/GameConfig/GKYE01.ini +++ b/Data/User/GameConfig/GKYE01.ini @@ -6,5 +6,12 @@ EmulationIssues = [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. [Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = [Gecko] - +[Video_Hacks] +EFBEmulateFormatChanges = True diff --git a/Data/User/GameConfig/GKYJ01.ini b/Data/User/GameConfig/GKYJ01.ini new file mode 100644 index 0000000000..623a0be1e3 --- /dev/null +++ b/Data/User/GameConfig/GKYJ01.ini @@ -0,0 +1,17 @@ +# GKYJ01 - Kirby Air Ride +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 5 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] +[Video_Hacks] +EFBEmulateFormatChanges = True diff --git a/Data/User/GameConfig/GKYP01.ini b/Data/User/GameConfig/GKYP01.ini index f3bf060e4f..f5366146a0 100644 --- a/Data/User/GameConfig/GKYP01.ini +++ b/Data/User/GameConfig/GKYP01.ini @@ -1,6 +1,17 @@ # GKYP01 - Kirby Air Ride [Core] Values set here will override the main dolphin settings. [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationStateId = 4 +EmulationStateId = 5 +EmulationIssues = [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] +[Video_Hacks] +EFBEmulateFormatChanges = True diff --git a/Data/User/GameConfig/GM8E01.ini b/Data/User/GameConfig/GM8E01.ini index 122e83ccfe..0cc96edc53 100644 --- a/Data/User/GameConfig/GM8E01.ini +++ b/Data/User/GameConfig/GM8E01.ini @@ -38,7 +38,6 @@ $Have Wave Beam $Have Plasma Beam 4200183C 00230001 $Have Phazon Beam -01165C8D 08000000 70458245 00000080 087A55A9 000000C5 00458245 0000007C @@ -100,4 +99,3 @@ SafeTextureCacheColorSamples = 512 EFBCopyEnable = True EFBToTextureEnable = False [Video_Enhancements] - diff --git a/Data/User/GameConfig/GQWE69.ini b/Data/User/GameConfig/GQWE69.ini index 4bcef05b38..6fe5409d4f 100644 --- a/Data/User/GameConfig/GQWE69.ini +++ b/Data/User/GameConfig/GQWE69.ini @@ -1,7 +1,16 @@ # GQWE69 - Quidditch World Cup [Core] Values set here will override the main dolphin settings. +TLBHack = 1 [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationIssues = Black screen -EmulationStateId = 1 +EmulationIssues = +EmulationStateId = 4 [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GQWJ69.ini b/Data/User/GameConfig/GQWJ69.ini new file mode 100644 index 0000000000..5ab51bb3b7 --- /dev/null +++ b/Data/User/GameConfig/GQWJ69.ini @@ -0,0 +1,16 @@ +# GQWJ69 - Quidditch World Cup +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationIssues = +EmulationStateId = 4 +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GQWP69.ini b/Data/User/GameConfig/GQWP69.ini new file mode 100644 index 0000000000..b380c45e79 --- /dev/null +++ b/Data/User/GameConfig/GQWP69.ini @@ -0,0 +1,16 @@ +# GQWP69 - Quidditch World Cup +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationIssues = +EmulationStateId = 4 +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GQWX69.ini b/Data/User/GameConfig/GQWX69.ini new file mode 100644 index 0000000000..64692b9bc1 --- /dev/null +++ b/Data/User/GameConfig/GQWX69.ini @@ -0,0 +1,16 @@ +# GQWX69 - Quidditch World Cup +[Core] Values set here will override the main dolphin settings. +TLBHack = 1 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationIssues = +EmulationStateId = 4 +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GUME52.ini b/Data/User/GameConfig/GUME52.ini index 396010c826..f53bfb3282 100644 --- a/Data/User/GameConfig/GUME52.ini +++ b/Data/User/GameConfig/GUME52.ini @@ -2,8 +2,8 @@ [Core] Values set here will override the main dolphin settings. MMU = 1 [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationIssues = Needs MMU to run, it gives a black screen after the intro video though. -EmulationStateId = 2 +EmulationIssues = Needs MMU to run, and it runs slow. +EmulationStateId = 3 [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. [Video] diff --git a/Data/User/GameConfig/GUMP52.ini b/Data/User/GameConfig/GUMP52.ini index 4265749160..fc0867e23f 100644 --- a/Data/User/GameConfig/GUMP52.ini +++ b/Data/User/GameConfig/GUMP52.ini @@ -2,8 +2,8 @@ [Core] Values set here will override the main dolphin settings. MMU = 1 [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationIssues = Needs MMU to run, it gives a black screen after the intro video though. -EmulationStateId = 2 +EmulationIssues = Needs MMU to run, and it runs slow. +EmulationStateId = 3 [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. [Video] diff --git a/Data/User/GameConfig/R2GEXJ.ini b/Data/User/GameConfig/R2GEXJ.ini index e23427e158..40208d8153 100644 --- a/Data/User/GameConfig/R2GEXJ.ini +++ b/Data/User/GameConfig/R2GEXJ.ini @@ -1,7 +1,7 @@ # R2GEXJ - FRAGILE DREAMS [Core] Values set here will override the main dolphin settings. [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationIssues = +EmulationIssues = Minimap needs emulate format changes to work. EmulationStateId = 4 [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. @@ -18,3 +18,4 @@ UseXFB = True UseRealXFB = False [Video_Hacks] DlistCachingEnable = False +EFBEmulateFormatChanges = True diff --git a/Data/User/GameConfig/R2GJAF.ini b/Data/User/GameConfig/R2GJAF.ini index d93e14ce7a..ff4a1885cd 100644 --- a/Data/User/GameConfig/R2GJAF.ini +++ b/Data/User/GameConfig/R2GJAF.ini @@ -1,7 +1,7 @@ # R2GJAF - FRAGILE [Core] Values set here will override the main dolphin settings. [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationIssues = +EmulationIssues = Minimap needs emulate format changes to work. EmulationStateId = 4 [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. @@ -16,6 +16,6 @@ PH_ZFar = [Video_Settings] UseXFB = True UseRealXFB = False -[Video_Enhancements] [Video_Hacks] DlistCachingEnable = False +EFBEmulateFormatChanges = True diff --git a/Data/User/GameConfig/R2GP99.ini b/Data/User/GameConfig/R2GP99.ini index 6f2140a5c2..a35a2d475c 100644 --- a/Data/User/GameConfig/R2GP99.ini +++ b/Data/User/GameConfig/R2GP99.ini @@ -1,7 +1,7 @@ # R2GP99 - FRAGILE DREAMS [Core] Values set here will override the main dolphin settings. [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationIssues = +EmulationIssues = Minimap needs emulate format changes to work. EmulationStateId = 4 [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. @@ -18,4 +18,4 @@ UseXFB = True UseRealXFB = False [Video_Hacks] DlistCachingEnable = False - +EFBEmulateFormatChanges = True diff --git a/Data/User/GameConfig/R3ME01.ini b/Data/User/GameConfig/R3ME01.ini index 28547c72d7..312d6a15f1 100644 --- a/Data/User/GameConfig/R3ME01.ini +++ b/Data/User/GameConfig/R3ME01.ini @@ -1,10 +1,20 @@ # R3ME01 - Metroid Prime Trilogy [Core] Values set here will override the main dolphin settings. [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationStateId = 1 -EmulationIssues = +EmulationStateId = 4 +EmulationIssues = Disable EuRGB60(PAL60) to avoid a black bar appearing. [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. [Video] ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = [Gecko] +[Video_Hacks] +EFBToTextureEnable = False +EFBCopyEnable = True +[Wii] +DisableWiimoteSpeaker = 1 diff --git a/Data/User/GameConfig/R3MP01.ini b/Data/User/GameConfig/R3MP01.ini new file mode 100644 index 0000000000..291ac8df38 --- /dev/null +++ b/Data/User/GameConfig/R3MP01.ini @@ -0,0 +1,20 @@ +# R3MP01 - Metroid Prime Trilogy +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 4 +EmulationIssues = Disable EuRGB60(PAL60) to avoid a black bar appearing. +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] +[Video_Hacks] +EFBToTextureEnable = False +EFBCopyEnable = True +[Wii] +DisableWiimoteSpeaker = 1 diff --git a/Data/User/GameConfig/RBWE01.ini b/Data/User/GameConfig/RBWE01.ini index 60b08e73c4..9e8d586cf4 100644 --- a/Data/User/GameConfig/RBWE01.ini +++ b/Data/User/GameConfig/RBWE01.ini @@ -14,3 +14,5 @@ PH_ZNear = PH_ZFar = [Gecko] [Video_Enhancements] +[Wii] +DisableWiimoteSpeaker = 1 diff --git a/Data/User/GameConfig/RBWJ01.ini b/Data/User/GameConfig/RBWJ01.ini index 8efad9729f..bf95ff65c8 100644 --- a/Data/User/GameConfig/RBWJ01.ini +++ b/Data/User/GameConfig/RBWJ01.ini @@ -14,3 +14,5 @@ PH_ZNear = PH_ZFar = [Gecko] [Video_Enhancements] +[Wii] +DisableWiimoteSpeaker = 1 diff --git a/Data/User/GameConfig/RBWP01.ini b/Data/User/GameConfig/RBWP01.ini index 36b0b3bc98..f6282130a5 100644 --- a/Data/User/GameConfig/RBWP01.ini +++ b/Data/User/GameConfig/RBWP01.ini @@ -14,3 +14,5 @@ PH_ZNear = PH_ZFar = [Gecko] [Video_Enhancements] +[Wii] +DisableWiimoteSpeaker = 1 diff --git a/Data/User/GameConfig/RHDE8P.ini b/Data/User/GameConfig/RHDE8P.ini index 4a2fd1499c..b49ec93cb8 100644 --- a/Data/User/GameConfig/RHDE8P.ini +++ b/Data/User/GameConfig/RHDE8P.ini @@ -1,8 +1,8 @@ # RHDE8P - THE HOUSE OF THE DEAD 2 AND 3 RETURN [Core] Values set here will override the main dolphin settings. [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationStateId = 3 -EmulationIssues = Only Hotd 3 works. XFB is needed for dx9. +EmulationStateId = 4 +EmulationIssues = [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. [Video] diff --git a/Data/User/GameConfig/RHDJ8P.ini b/Data/User/GameConfig/RHDJ8P.ini index 784933d971..63e818f737 100644 --- a/Data/User/GameConfig/RHDJ8P.ini +++ b/Data/User/GameConfig/RHDJ8P.ini @@ -1,8 +1,8 @@ # RHDJ8P - THE HOUSE OF THE DEAD 2 AND 3 RETURN [Core] Values set here will override the main dolphin settings. [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationStateId = 3 -EmulationIssues = Only Hotd 3 works. XFB is needed for dx9. +EmulationStateId = 4 +EmulationIssues = [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. [Video] diff --git a/Data/User/GameConfig/RHDP8P.ini b/Data/User/GameConfig/RHDP8P.ini index f6a1f98430..e932c173fb 100644 --- a/Data/User/GameConfig/RHDP8P.ini +++ b/Data/User/GameConfig/RHDP8P.ini @@ -1,8 +1,8 @@ # RHDP8P - THE HOUSE OF THE DEAD 2 AND 3 RETURN [Core] Values set here will override the main dolphin settings. [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. -EmulationStateId = 3 -EmulationIssues = Only Hotd 3 works. XFB is needed for dx9. +EmulationStateId = 4 +EmulationIssues = [OnFrame] Add memory patches to be applied every frame here. [ActionReplay] Add action replay cheats here. [Video] diff --git a/Data/User/GameConfig/SX3J01.ini b/Data/User/GameConfig/SX3J01.ini index c9a05a2493..276118af1a 100644 --- a/Data/User/GameConfig/SX3J01.ini +++ b/Data/User/GameConfig/SX3J01.ini @@ -15,3 +15,5 @@ PH_ZFar = [Gecko] [Video_Settings] SafeTextureCacheColorSamples = 0 +[Wii] +DisableWiimoteSpeaker = 1 diff --git a/Data/User/GameConfig/SX3P01.ini b/Data/User/GameConfig/SX3P01.ini index f75f762001..94b5c6ef16 100644 --- a/Data/User/GameConfig/SX3P01.ini +++ b/Data/User/GameConfig/SX3P01.ini @@ -15,3 +15,5 @@ PH_ZFar = [Gecko] [Video_Settings] SafeTextureCacheColorSamples = 0 +[Wii] +DisableWiimoteSpeaker = 1