Commit Graph

111 Commits

Author SHA1 Message Date
sal063 5d2144f559 Merge pull request #23 from Dipshet/fix-sinkrate
Fix accelerated sink rate on unlocked FPS
2026-07-11 20:15:19 +03:00
Dipshet fc54d92a2c Fix accelerated sink rate on 60 fps
Add mid-asm hook ac6PathDropHook at 0x82304F40 scaling the drop by
frame_ms/33.3ms, which cancels the amplification.
2026-07-11 19:50:09 +03:00
sal063 7c8512b0c2 Merge pull request #21 from Dipshet/fix-physics
Fix physics
2026-07-09 23:05:23 +03:00
Dipshet 365394fe48 Default the low-latency presentation preset on and texture swaps off 2026-07-09 22:55:50 +03:00
Dipshet d9828e08c4 Fix integer frame-delta bias at high fps (ac6_delta_precision)
The game builds its per-frame sim delta as floor(elapsed * 3000) + 1, capped at
100. The floor plus the +1 guard bias the delta high by (1 - frac) every frame,
which is invisible at the native 30fps (the cap absorbs it) but becomes a
systematic speed-up once the unlock frees the frame rate: about +2% at 60fps
and +10% at 300fps.

Add a hook on the delta computation that carries the fractional remainder
across frames, so the summed integer deltas track real elapsed time exactly
instead of rounding up every frame. Gated by ac6_delta_precision (default on)
and only active while the unlock's divisor remap is.
2026-07-09 22:40:40 +03:00
Dipshet 2b52e5e2c8 Add dynamic vblank pacing for the FPS unlock (ac6_dynamic_vblank)
With the unlock forcing single-vblank presents, frame-locked content (menus,
hangar, in-engine cutscenes) free-runs far too fast while only gameplay should.
Pace the guest vblank dynamically: free-run only while the 3D world is being
rendered, otherwise force the native 60Hz.

"World is rendering" is detected from the GPU side - the command processor
stamps a heartbeat (NotifyWorldCompositorDraw) whenever a draw uses the
world/effects compositor pixel shader (ucode 17e5e4ac3e713245), which runs
every frame of 3D but never in the 2D front-end. The present timing hook then
sets a guest-vblank Hz override via the new GraphicsSystem hook. Only engages
under the unlock; ac6_dynamic_vblank=false restores the plain always-on unlock.
2026-07-09 22:38:29 +03:00
Dipshet 175480efb7 Fix aircraft acceleration/deceleration at high FPS
The flight model's longitudinal force/speed-command accumulator and the
accel/brake trigger command are stepped by fixed per-frame constants with no
delta, so with ac6_unlock_fps active the plane accelerates and brakes
proportionally faster at higher frame rates.

Wrap the two flight-model functions (rex_sub_823046A0 force step,
rex_sub_82329B40 input shaping) and rescale each accumulator's net per-call
change by frame_time / 33.3ms, reproducing the native 30fps continuous-time
dynamics at any frame rate. Bit-exact pass-through at <=30fps; applies to
player and AI aircraft. Gated by ac6_fps_physics_fix (default on) and only
active while the unlock's timing hooks are (ac6::TimingHooksActive).
2026-07-09 22:33:39 +03:00
sal063 b627fc8eca Merge pull request #20 from Dipshet/fix-sunflare
Fix cull the sun-flare's spurious second billboard (flare "square")
2026-07-08 21:00:08 +03:00
Dipshet 2c7ee7ea68 Fix cull the sun-flare's spurious second billboard (flare "square")
The sun lens-flare draw (VS ADF9AFC4C10921B9 emits two billboards:
V0-V3 = the visible glow quad, V4-V7 = a malformed quad that mis-renders
in the emulator as a faint  bright rectangle in the sky (the "square").

Cull it in the vertex shader using the translator's existing kill-vertex
mechanism: in CompleteVertexOrDomainShader, for this ucode hash
(plain host VS only), vertices with SV_VertexID >= ac6_flare_drop_index_min
(default 4) get a NaN output position, so the rasterizer discards the primitive.
The real glow (V0-V3) is untouched.

cvars: ac6_flare_drop_quad2 (bool, default true), ac6_flare_drop_index_min
(int32, default 4). Baked at shader translation.
2026-07-08 20:54:59 +03:00
sal063 b30cdf003d Merge pull request #18 from Dipshet/fix-deswizzle
Fix AC6 resolution scalar >1x mosaic and cloud/effects de-swizzle streaks
2026-07-08 08:56:09 +03:00
sal063 fe6f6449ff Merge pull request #19 from Dipshet/fix-trails
Fix invisible missile/jet trails (stale vertex-buffer residency)
2026-07-08 08:55:29 +03:00
Dipshet bb4f4855ac Fix invisible missile/jet trails (stale vertex-buffer residency)
Missile/jet trail position history is a fixed guest-address ring, so its
vertex fetch constants never change and the command processor's
vertex_buffer_states_ address cache skipped RequestRange forever, the GPU
copy of the trail history froze at zero (trails invisible) while CPU memory was
correct.

Register a physical-memory invalidation callback that flags when the CPU writes
watched GPU-visible memory, and drop the cached vertex-buffer states at the next
draw so the ring's pages get re-uploaded. Also notify those callbacks from the
access-violation page-recovery path (xmemory), since a recovered page becomes
read-write and would otherwise never fault again to report the write. Gated by
ac6_fix_trails (default ON).
2026-07-08 02:14:02 +03:00
Dipshet 313fd236ee Fix AC6 >1x mosaic and cloud/effects de-swizzle streaks
Upscale mosaic. At draw-resolution scale > 1, AC6's deferred
EDRAM restore passes do integer pixel-address math on the PsParamGen
position. Its leftover sub-guest-pixel fraction scrambles into an 8x8
mosaic. Floor the param-gen position (param_gen_integer_guest_position)
and re-add the host sub-pixel at the fetch (param_gen_host_subpixel_restore).
Inert at 1x.

De-swizzle scramble. Some AC6 restore/resample passes
manually de-swizzle the Xenos EDRAM sub-tile layout of their source, which
is only correct on tiled data. The emulator detiles everything to linear,
so the de-swizzle always scrambles, streaking the cloud/effects pipeline.
For allowlisted shader hashes (ac6_neutralize_deswizzle_hashes) the sample
coordinate is replaced with the identity host-texel UV (a 1:1 copy).
2026-07-08 01:28:57 +03:00
sal063 06868b3780 Merge pull request #17 from Schryzon/dev-test-msvc
Fix MSVC compilation flags and improve build script
2026-07-05 21:25:01 +03:00
Schryzon bdc9658b8b Fix MSVC compilation flags, improve build script, and update README 2026-07-04 23:57:35 +08:00
sal063 ac9b24890a Delete default.xex.i64 2026-06-15 17:47:38 +03:00
salh c2e2fbfbbc Add 60fps cutscene clamp for in-engine cinematics
Suspend the FPS unlock while a demo-manager Exec (DD sub_82184460 / EM sub_821856F8) ticks, so the frame-locked IngameCinematics Sequencer plays at native ~30fps instead of double speed. Adds ac6_cutscene_clamp CVar (default on).
2026-06-15 16:03:43 +03:00
salh 0d7a528395 Fix codegen teardown and skip dispatch thread in tool mode 2026-05-30 11:56:35 +03:00
salh ead11217b7 Upgraded to RexGlue v0.8 and edited a bit of the Audio code 2026-05-29 22:17:02 +03:00
salh 0fddc26760 Added audio decompilation tool. Decodes only voicelines and BGM pack and movie packs for now. SFXs are stored under a different format not yet explored 2026-05-02 14:43:09 +03:00
salh 64f8efbb2b Restore AC6 mode-1 decoder dump hook via midasm at 0x821CCC5C
Recovers the Apr 23 hand-edit (lost in subsequent refactors) and re-wires
it as a TOML midasm hook so codegen regeneration can no longer drop it.
Hook fires immediately after the guest decompressor (bl 0x822CF510)
returns, reads the entry record via r11 (codec at +1, csize at +8,
usize at +12), source offset from *(r31+22888), entry tag from r10, and
calls Ac6DumpPacDecodedEntry with the decoded buffer at r4. With
AC6_DUMP_PAC_DECODED=1, all 800 compressed entries now drop as
FHM-magic'd entry_*_mode1_*.bin in out/ac6_pac_runtime_dump/.

Also adds streamer-worker dispatch probes (AC6_TRACE_PAC_WORK_ITEMS),
PPC stack walking on PAC reads (AC6_TRACE_PAC_STACKS), the AC6 PAC
index parser, the chunk-coalescing dump fallback, and a user-facing
walkthrough at docs/ac6_asset_extraction_walkthrough.txt.
2026-05-01 21:22:14 +03:00
salh 96e10d2b6e Removed a whole lot of Dead legacy code. Add a performence that is enabled by Default. 2026-04-30 10:57:35 +03:00
salh 9c1d548dc4 Optimize active capture path and enable release LTO 2026-04-29 09:05:48 +03:00
salh 121c910b57 Add AC6 PAC extraction and texture export tooling 2026-04-24 17:01:15 +03:00
salh d56edb4afe Set Texture swap dump and render_capture to false to fix any preformence issues 2026-04-22 18:09:32 +03:00
salh a0884cbf3a Hardened Failure handling. Added Clearer instructions for building 2026-04-22 16:55:39 +03:00
salh 34d8c0185e Improve texture swap modding workflow 2026-04-22 16:22:41 +03:00
salh d3bb76be61 Integrate rexglue 0.7.5 and 0.7.6 improvements 2026-04-22 14:30:40 +03:00
salh db811bd0ba Support legacy DDS texture swaps and add Xenos format reference 2026-04-22 02:09:19 +03:00
salh 3d3579d290 Implement texture swap dump and replace pipeline 2026-04-22 01:06:53 +03:00
sal063 8c1388304d Merge pull request #1 from ggmini/dev-test
Updated extract-xiso download commands to work with current release
2026-04-21 10:23:32 +03:00
salh 93f0cc7bc4 Track working runtime graphics config 2026-04-20 23:56:57 +03:00
salh c6835e305a Force resolution scale to 1 at startup 2026-04-20 23:45:17 +03:00
Gregory Munro 89c41dc462 Merge branch 'sal063:dev-test' into dev-test 2026-04-20 22:23:48 +02:00
salh 701eb202eb Fix graphics diagnostics and restore default runtime settings 2026-04-20 23:13:53 +03:00
ggmini 71fc35cc6a Updated extract-xiso download commands to work with current release 2026-04-20 21:01:25 +02:00
salh d6a1733648 Fix unescaped parentheses in setup_and_build.bat 2026-04-20 21:32:25 +03:00
salh 90ae3f8f8b Update build section in setup_and_build.bat to include codegen 2026-04-20 19:12:56 +03:00
salh 9af6f59938 Fix texture format bounds checking to prevent rendering corruption (black triangles) 2026-04-20 18:56:20 +03:00
salh d9f1c20d60 Fix vendored FFmpeg avconfig.h include path visibility 2026-04-20 18:48:47 +03:00
salh c57016c272 Track vendored simde x86 headers 2026-04-20 17:23:49 +03:00
salh 41f58b5a1f Fix vendored FFmpeg headers on clean clones 2026-04-20 15:49:18 +03:00
salh 26c84988e7 Add setup_and_build.bat script 2026-04-20 06:43:35 +03:00
salh d57857d157 fix(gpu): correct pacing for guest vblank counter 2026-04-19 13:18:27 +03:00
salh 882d20f686 Refactor native graphics backend and fix build errors 2026-04-19 13:05:54 +03:00
sal063 0a1c92d048 Delete Plan.md 2026-04-18 16:23:27 +03:00
sal063 d27552b931 Removed extra files 2026-04-18 16:18:16 +03:00
sal063 80cc634fb6 Delete docs/native_graphics_migration/AC6_NATIVE_GRAPHICS_RENDER_API_REMOVAL_MAP.md 2026-04-18 16:17:56 +03:00
sal063 f16b38ff23 ] 2026-04-18 16:17:49 +03:00
salh ff5e84b763 renderer: implement real D3D12 backend and translation mocks 2026-04-18 15:37:30 +03:00