Skip to content

Arceuszada v1.2.0

Choose a tag to compare

@CarlosExabyte CarlosExabyte released this 20 Nov 15:34
· 3 commits to main since this release
3d44186

Pokémon Legends: Arceus Recomp — v1.2.0

This major update overhauls the static recompilation pipeline and Vulkan renderer, eliminating stretched models/vertex explosions, fixing deterministic mid-gameplay crashes, restoring -O1 code generation (cutting lasgame.dll down to 415.9 MB), achieving 0 Khronos Vulkan Validation errors, and adding clean hwopus audio, save stability fixes, and 90/120 FPS support.

What's Changed
Core Compiler, Jump-Table Scanner & Crash Fixes
Pure-C NSO0+LZ4 Jump-Table Scanner (jump_table_fix.h, gamebuild.c): Replaced heuristic C-level patching with a native binary scanner that parses all 4 ARM64 NSO modules (main, subsdk0, subsdk1, sdk), indexing 7,347+ internal jump-table targets (direct, delayed-BR, and hoisted ADRP).

Fixed Deterministic Gameplay Crash (0xC0000005 at f_710292b6cc+0x80f, fault_addr=0x19 / 0x119): Resolved missing split-function targets and stripped callee-saved epilogues that leaked stack/registers during indirect calls.

Restored -O1 Optimization (gamebuild.c, build_cache.cpp): Fixed overly aggressive cold_giant() thresholds that forced 93% of chunks into -O0. 84.5% of the game now compiles at -O1 -march=x86-64-v3, shrinking lasgame.dll from ~1.14 GB down to 415.9 MB and delivering a locked 60 FPS even in heavy 3D scenes (160k+ draws/2s). Stale build caches are now cleanly invalidated on identity mismatch.

Fixed Memory Corruption from Aspect-Ratio Patch (jump_table_fix.h): Scoped k_cam_ar2 strictly to the 3 actual camera projection functions (tanf/atanf), stopping accidental memory overwrites in 4 unrelated functions (std::unordered_map, 3D culling, and SDK rect logic).

Runtime & Memory Hardening (libc.c, dispatch.c, windows.c, kernel.c):

Restored native Switch SDK fiber-safe _cxa_guard* and nn::diag::AbortImpl behavior.

Removed unsafe raw pointer dereferencing in dispatch_slow and silent RIP == 0 skipping in vectored_handler that caused delayed corruption.

Switched Windows phys_unmap to memset instead of VirtualFree(..., MEM_DECOMMIT) while VK_EXT_external_memory_host buffers are active.

Graphics Pipeline & Vulkan Validation Overhaul (0 VUID Errors)
Fixed Stretched Polygons & Vertex Explosions (exec.c):

Expanded Transform Feedback (xm_back) tracking from 256 to 2,048 ranges with strictly adjacent coalescing—preventing dense hubs like Jubilife Village (300+ XFB buffers/frame) from merging gaps and overwriting live game RAM.

Added byte-exact per-frame xm_ranges[2048] lookups and restricted guest_direct() XFB redirection strictly to vertex streams (kind == 0), stopping vertex data from binding as index buffers.

Fixed Vulkan Synchronization & Mid-Draw Render Pass Breaks (exec.c): Replaced invalid TRANSFORM_FEEDBACK_BIT_EXT barriers and mid-draw vk_end_pass()/begin_pass() calls with a single pre-pass SSBO-to-vertex/compute barrier (xfb_barrier_if_needed()) and pre-compute xm_copy_back flush.

Full Khronos Validation Compliance (translate.c, shader.h, exec.c): Fixed all 62+ validation errors down to 0 VUID violations by implementing proper dual-source blending (location = 0, index = 0/1), gating alphaToCoverageEnable on alpha-writing shaders, and initializing gl_PointSize = 1.0f for POINT_LIST particle/XFB shaders.

Restored Animated Cutscenes & Dynamic VFX (textures.c): Re-enabled per-frame updates for dynamic textures (!b->dynamic)—fixing frozen animations such as the intro golden portal—and restored safe b->format fallback in vk_view_format.

Audio, High-FPS, Save & Horizon Services
Clean Audio & BGM (hwopus): Integrated libopus hardware-decoded audio, eliminating crackling and broken BGM.

High-Framerate Support (framepace.c): Expanded simulation timestep scaling (rt_arceus_step_ns) to support 30 / 60 / 90 / 120 FPS at native 1.0x speed.

Save Freeze Fix & Offline Services (fs.c, services/): Fixed post-save freezes, added missing swkbd overloads, implemented offline Horizon stubs (nifm, bcat, ldn, prepo, caps, time:su), and improved TLS/handle recycling.