From 8eb6f9002e2663eababd0ade685e9f8107531cd2 Mon Sep 17 00:00:00 2001 From: rog Date: Mon, 12 Nov 2012 20:20:34 -0500 Subject: [PATCH 1/4] Fixes interpreter when not recording or playing back a movie. --- 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 13f5ed26e8..28c082ce70 100644 --- a/Source/Core/Core/Src/Movie.cpp +++ b/Source/Core/Core/Src/Movie.cpp @@ -131,7 +131,7 @@ void Init() g_bFrameStep = false; g_bFrameStop = false; bSaveConfig = false; - + iCPUCore = SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore; if (IsPlayingInput()) { ReadHeader(); From 16060290c2dc3cac5c1cb4643d460bb778cc121d Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Tue, 13 Nov 2012 09:37:44 +0100 Subject: [PATCH 2/4] Fix missing notes in musics with DSPHLE. Tales of Symphonia and Skies of Arcadia Legends now have working musics with DSPHLE. Some other games with the same symptoms (missing instruments) should probably be fixed by that change too. --- .../Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp index da4b10f34e..c63929fe8f 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp @@ -172,8 +172,6 @@ void CUCode_AX::MixAdd(short* _pBuffer, int _iSize) if (!ReadPB(blockAddr, PB)) break; - ProcessUpdates(PB); - if (m_CRC != 0x3389a79e) VoiceHacks(PB); @@ -335,6 +333,24 @@ bool CUCode_AX::AXTask(u32& _uMail) PBaddr[numPBaddr] = HLEMemory_Read_U32(uAddress); numPBaddr++; + // HACK: process updates right now instead of waiting until + // Premix is called. Some games using sequenced music (Tales of + // Symphonia for example) thought PBs were unused because we + // were too slow to update them and set them as running. This + // happens because Premix is basically completely desync-ed + // from the emulation core (it's running in the audio thread). + // Fixing this would require rewriting most of the AX HLE. + u32 block_addr = uAddress; + AXPB pb; + while (block_addr) + { + if (!ReadPB(block_addr, pb)) + break; + ProcessUpdates(pb); + WritePB(block_addr, pb); + block_addr = (pb.next_pb_hi << 16) | pb.next_pb_lo; + } + m_addressPBs = HLEMemory_Read_U32(uAddress); // left in for now uAddress += 4; soundStream->GetMixer()->SetHLEReady(true); From 764cd455b35d8b1dc9328a8cc12846b1967fc3b9 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Tue, 13 Nov 2012 10:22:56 +0100 Subject: [PATCH 3/4] Revert "fix Snow Leopard compatibility" This change broke compilation on some OSX 10.7 configurations. This reverts commit b2e2e49fe49715a3dd77f138b8365046550d99b2. --- CMakeLists.txt | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8d484e68a..37e4f14f5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,12 @@ cmake_minimum_required(VERSION 2.6) # Update compiler before calling project() if (APPLE) # Use clang compiler - set(CMAKE_C_COMPILER "clang") - set(CMAKE_CXX_COMPILER "clang++") + set(CMAKE_C_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang") + set(CMAKE_CXX_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++") + if (NOT EXISTS "${CMAKE_CXX_COMPILER}") + set(CMAKE_C_COMPILER "clang") + set(CMAKE_CXX_COMPILER "clang++") + endif() endif() project(dolphin-emu) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests) @@ -122,6 +126,10 @@ if(UNIX AND NOT APPLE) endif() if(APPLE) + # Ignore MacPorts and Fink and any other locally installed packages that + # might prevent building a distributable binary. + set(CMAKE_SYSTEM_PREFIX_PATH /usr) + set(ENV{PATH} /usr/bin:/bin:/usr/sbin:/sbin) # Some of our code contains Objective C constructs. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c") @@ -136,7 +144,7 @@ if(APPLE) # This is inserted into the Info.plist as well. # Note that the SDK determines the maximum version of which optional # features can be used, not the minimum required version to run. - set(OSX_MIN_VERSION "10.6") + set(OSX_MIN_VERSION "10.5.4") set(TARGET_FLAGS "${TARGET_FLAGS} -mmacosx-version-min=${OSX_MIN_VERSION}") set(SYSROOT_LEGACY_PATH "/Developer/SDKs/MacOSX10.6.sdk") set(SYSROOT_PATH "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk") @@ -145,9 +153,9 @@ if(APPLE) elseif(EXISTS "${SYSROOT_LEGACY_PATH}/") set(TARGET_SYSROOT ${SYSROOT_LEGACY_PATH}) endif() - if(TARGET_SYSROOT) + if(${TARGET_SYSROOT}) set(TARGET_FLAGS "${TARGET_FLAGS} -isysroot ${TARGET_SYSROOT}") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mmacosx-version-min=${OSX_MIN_VERSION} -Wl,-syslibroot,${TARGET_SYSROOT}") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-syslibroot,${TARGET_SYSROOT}") endif() # Do not warn about frameworks that are not available on all architectures. # This avoids a warning when linking with QuickTime. @@ -480,7 +488,7 @@ endif() option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF) if(NOT DISABLE_WX) include(FindwxWidgets OPTIONAL) - FIND_PACKAGE(wxWidgets COMPONENTS core aui adv gl) + FIND_PACKAGE(wxWidgets COMPONENTS core aui adv) if(wxWidgets_FOUND) EXECUTE_PROCESS( From e4d18e3a8b7cd37cb90f277548ab45caa0efba81 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Tue, 13 Nov 2012 16:50:42 +0100 Subject: [PATCH 4/4] Bound the iteration on the PB list when processing updates. Fixes freezes introduced in 3.0-807 with DSPHLE on some AX games. Apparently logic doesn't apply inside the HW/DSPHLE/UCodes directory. --- Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp index c63929fe8f..74c9d24db4 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp @@ -342,7 +342,7 @@ bool CUCode_AX::AXTask(u32& _uMail) // Fixing this would require rewriting most of the AX HLE. u32 block_addr = uAddress; AXPB pb; - while (block_addr) + for (int i = 0; block_addr && i < NUMBER_OF_PBS; i++) { if (!ReadPB(block_addr, pb)) break;