diff --git a/CMakeLists.txt b/CMakeLists.txt index ba98a0bc2..a69529235 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -750,7 +750,8 @@ add_custom_target( ExtractAssets DEPENDS TorchExternal WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMAND ${TORCH_EXECUTABLE} o2r baserom.z64 + # [port] Stamp bk.o2r with the project version so VerifyArchiveVersion() accepts it; without -u it reads as {0,0,0} and re-extracts every launch. + COMMAND ${TORCH_EXECUTABLE} o2r baserom.z64 -u ${PROJECT_VERSION} COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/bk.o2r" "${CMAKE_BINARY_DIR}/bk.o2r" ) diff --git a/docs/BUILDING.md b/docs/BUILDING.md index 65d0ee921..afc63f9d2 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -103,7 +103,7 @@ pacman -S clang git cmake ninja lsb-release sdl2 libpng libzip nlohmann-json tin #### Fedora ```sh # using gcc -dnf install gcc gcc-c++ git cmake ninja-build lsb_release SDL2-devel libpng-devel libzip-devel libzip-tools nlohmann-json-devel tinyxml2-devel spdlog-devel boost-devel libogg-devel libvorbis-devel +dnf install gcc gcc-c++ git cmake ninja-build lsb_release SDL2-devel SDL2_net SDL2_net-devel libpng-devel libzip-devel libzip-tools nlohmann-json-devel tinyxml2-devel spdlog-devel boost-devel libogg-devel libvorbis-devel # or using clang dnf install clang git cmake ninja-build lsb_release SDL2-devel libpng-devel libzip-devel libzip-tools nlohmann-json-devel tinyxml2-devel spdlog-devel boost-devel libogg-devel libvorbis-devel diff --git a/src/core1/graphics_thread.c b/src/core1/graphics_thread.c index 4df502bf2..08809ae40 100644 --- a/src/core1/graphics_thread.c +++ b/src/core1/graphics_thread.c @@ -492,7 +492,8 @@ void thread5_entry(void *arg) { } ThreadWatchdog_Beat(WATCHDOG_THREAD5); // [port] one beat per serviced message thread5_checkAndExecutePreNMI(); - if ((uintptr_t)msg.ptr < 100) { + // [port] OSMesg is an 8-byte union and OS_MESG_32 leaves its high bytes garbage, so discriminate on .data32 (the event code), not the full .ptr, which mis-read events as task pointers and dropped SP events (the post-import freeze). + if (msg.data32 < 100) { if (msg.data32 == THREAD5_MESSAGE_EVENT_SYNC) { thread5_handleSyncEvent(); } else if (msg.data32 == THREAD5_MESSAGE_EVENT_VI_RETRACE) { thread5_handleVIRetraceEvent(); } else if (msg.data32 == THREAD5_MESSAGE_EVENT_DP) { thread5_handleDPEvent(); }