Repository navigation
NFSU2 Revived v1.0.4
What's New in v1.0.4
1. Runtime D3D9 Redundant-State Deduplication & CPU Bridge Acceleration
- GOT-Hooked D3D9 Shadow State Filter (
libnfsu2_roam.so):- Hooked
dispatchGuestD3D9via.got.plt(with inline prologue fallback and-funwind-tablesfor safe C++ exception unwinding) to eliminate tens of thousands of redundant Direct3D 9 calls per frame before they cross into the COM bridge and Vulkan command stream. - Deduplicates identical
SetRenderState,SetSamplerState,SetTextureStageState,SetTexture,SetVertexDeclaration,SetFVF,SetVertexShader,SetPixelShader,SetStreamSource,SetStreamSourceFreq,SetIndices,LightEnable,SetSoftwareVertexProcessing,SetTransform,SetViewport,SetVertexShaderConstantF, andSetPixelShaderConstantFcalls with zero syscalls. - Preserves 100% visual accuracy with full
BeginStateBlock/EndStateBlock/StateBlock::Applybypass and invalidation, render-target /StretchRect/Resetinvalidation, and resource-release handle-recycling epoch checks. - Feeds live
Presentframe timestamps intolibgraphics_cache.sotelemetry and logs periodic filter hit-rate statistics (NFSU2-D3D9Filter).
- Hooked
- Mid-Frame Render-Thread Handover Reduction (
3 ms → 16 ms):- Widened
checkGuestProgress's render-thread cooperative slice from3 msto16 mswhile keeping worker thread slices (500 µs) andPresentyields untouched, eliminating 4–9+ mid-frame scheduling handovers per frame (saving ~2–3+ ms/frame of mutex wait).
- Widened
2. Native-Aspect Resolution Settings & Removal of 1280x720 Default
- Removed Hardcoded
1280x720Slot from In-Game Display Settings:- Hooked
configureAndroidResolutionModes,nfs_android_resolution, anddxvk::wsi::getDisplayModevia.got.pltso in-game Display Settings exposes only clean native-aspect percentage modes (25%,50%,75%,100%, plus any custom Launcher percentage such as60%or80%). - Disabled unused resolution slots cleanly so
1280x720no longer appears in the Resolution list or gets selected on device reset, and starts the game directly on the matching percentage slot.
- Hooked
- Aspect-Preserving Resolution Scaling & Widescreen Guard:
- Updated
GameOptions.renderSize()and native slot scaling to preserve the device's physical display aspect ratio when clamping low scales (such as25%on 720p/HD+ screens) to the320×240minimum and8192×8192maximum bounds. - Hooked
nfs_widescreen_set_resolutionto guards_aspect,HUD_SCALE_X, andfHudPosXagainst non-display aspect distortion so changing Display Settings never snaps into a stretched 4:3 / 16:9 ratio. - Disabled the legacy
roam_resolution_navmenu-arrow hijack that previously overwrote0x870d1cto slot 4 (1280x720) when pressing Right in Display Settings.
- Updated
3. Immediate Vulkan Presentation Mode (VSync Off)
- Zero-Wait Present Mode Preference:
- Switched
MESA_VK_WSI_PRESENT_MODEfrommailboxtoimmediateindxvk_tuner.rs. - Updated native Vulkan swapchain presentation mode priority in
native_vk.rstoVK_PRESENT_MODE_IMMEDIATE_KHR → VK_PRESENT_MODE_MAILBOX_KHR → VK_PRESENT_MODE_FIFO_KHRfor lowest input latency and uncapped frame delivery.
- Switched
4. Performance Regression Fixes (Issues #173 & #179)
- Restored
libgraphics_cache.so&libroam_rs.soPackaging & Dynamic Linkage:- Fixed unresolved Android NDK linker errors in
graphics_cache(vulkan_driver.rs) androam_rs(msg.rs) by resolvinglibnfsu2_android.so/libnfsu2_roam.sosymbols via runtimedlsym. - Removed
continue-on-error: truefrom Rust module compilation in GitHub Actions CI and added explicit library verification checks so missing.soartifacts can never silently ship.
- Fixed unresolved Android NDK linker errors in
- Per-Thread CPU Affinity & Hook Installation Safety:
- Fixed
perf_cores/roam_affinitypinning every thread in the process onto only the 2 Prime cores (which starved Vulkan/DXVK/audio worker threads); affinity now binds only the calling render thread (sched_setaffinity(0, ...)) while allowing background threads to scale across all performance cores. - Guarded
arm64_inline_hookagainst duplicate installation and added thread-safe locking aroundroam_android_install_hooks().
- Fixed
- SELinux-Safe GPU Governor & Telemetry Overhead Removal:
- Cached SELinux-denied sysfs nodes in
gpu_governor.rs,GpuClockGovernor.java, andtelemetry.rsso non-root Android 14/15/16 devices no longer spam kernel audit denials every second. - Replaced background
logcatsubprocess polling inDiagnosticOverlay.javawith direct native telemetry reads.
- Cached SELinux-denied sysfs nodes in
5. Version Bump
- Bumped app
versionCodeto 104 andversionNameto 1.0.4.
Full Changelog: v1.0.3...v1.0.4