Commit Graph
14 Commits
Author SHA1 Message Date
Mihawk 858129fb26 Pad script OPTION lines set a core option as the Quick Menu does 2026-10-01 08:44:28 -04:00
Mihawk 33cdcc73d7 input_ps5.cpp: clang-format (the format gate) 2026-09-30 19:04:52 -04:00
Mihawk a744584a62 Pad script MARK lines count frames more than 40 ms after the one before
A 30 fps frame that missed its slot on the 60 Hz display: the benchmarks'
measure of a steady 30.
2026-09-30 10:45:27 -04:00
Mihawk f661b8dd00 Pad script: trigger axes, quick screenshots, state slots, frame marks
For the GTA IV test drives: a scripted L2 or R2 pulls the trigger axes
too (the profile binds them there, so a core reading the triggers saw
nothing); a SCREENSHOT is encoded on the task thread at zlib's fastest
level (port patch 0100; a 4K frame at level 9 held a thread about 20 s);
SAVE_STATE and LOAD_STATE take a slot number for that action only, so a
run can start from a second saved scene without replacing the first;
MARK prints the core's new frames and the longest gap between two since
the last MARK (port patch 0101 counts them), a run's frame rate over
exact script times. Two port patches more: the count test's 223.
2026-09-30 02:01:45 -04:00
Mihawk 7446ade44b RPCS3: the game patch database with frame-rate patches on; write route probe
The title stages RPCS3's game patch database (the fork's bin/patches) in
system/RPCS3/patches, and the core turns each game's frame-rate patch on when
content loads ("Frame-rate patches", on by default; docs/RPCS3_PORT.md).

The platform probe's "routes" word times 1 GiB written with write() and
through a shared mapping, in /app0 and in the folder by its own path: which
route or path the title's writes are held back on after their burst.

The test pad script can push a stick all the way (LS_ and RS_ with UP, DOWN,
LEFT or RIGHT), for runs that walk a game's character somewhere.
2026-09-29 08:15:17 -04:00
Mihawk 2096666eb7 RPCS3: save states and every setting as core options; GTA IV 1.00 boots
The core's .info offers basic save states (RPCS3 savestates, kept in memory),
and the fork's RPCS3 settings are core options by section (docs/RPCS3_PORT.md).
The fork's pin also carries two RSX fixes GTA IV needs: a FIFO whose command
buffer is in local memory (system mode 0x200; GTA IV 1.00 stopped at its first
commands, RPCS3 issue #14194) and a ZCULL late fault that unlocks its page
(the 16K-page freeze of RPCS3 issue #19610).

The test pad script gains SAVE_STATE, LOAD_STATE and SCREENSHOT actions (the
last saves /app0/pad-shot-<n>.png), for runs that start from a known scene and
runs that walk through a game's screens.
2026-09-29 07:58:37 -04:00
Mihawk 67907d0159 Core threads count as finished after their destructors; the pad script's STOP
The loader counted a core thread as running until its start routine returned,
and RPCS3's threads end in pthread_exit, so 122 were "still running" at every
Close Content: the core stayed mapped and the reload mapped a second copy. A
core thread now counts itself finished from its first-registered thread_local
destructor, which runs last of them whether it returns or calls pthread_exit,
and one that returns ends through ps5_pthread_exit, so its destructors run
while its TLS is whole. The loader allows 20 ms after the count reaches zero
for the key destructors that follow. RPCS3 unloads at Close Content and
reloads at the same base; PPSSPP's battery still passes.

RetroArch forgets --max-frames when a core closes, so the pad script's STOP
ends a run that reloaded content, as the frame limit does, with its
screenshot.

God of War HD at 300%: twelve minutes without a crash, 71 of 71 windows at
100%, and the Close Content + reload battery passes (docs/PHASE_LOG.md).
2026-09-29 01:02:40 -04:00
MihawkandClaude Opus 5.5 f2ccb4416f Release 0021's replaced textures; a pad-script RELOAD; Profiles 8 and 9
Patch 0021 creates wide default and blank textures after upstream's 1x1
and 4x4 ones and stores them in the same slots, so the small ones --
image, memory and view each -- leaked on every swapchain change and
video init. Profile 9's four reloads showed the driver's direct-memory
count growing by 13 mappings a reload. Patch 0092 releases each small
texture before its slot is reused; the count now grows by 2 a reload
with the bytes flat (evidence/dolphin-p9-reload-before, -after).

The pad script gains `<seconds> RELOAD`, which loads /app0/args.txt's
core and content again as the menu's history does, for the reload
stress. There is no CLOSE: unloading a core from the input poll, inside
retro_run, crashed Dolphin, so scripts close through the Quick Menu.

PHASE_LOG records Profile 8 (cold and warm shader cache) and Profile 9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 07:57:08 -04:00
MihawkandClaude Opus 5.5 6a47e3e551 Keep the last frame on screen across video reinits; recheck every core; fix FBNeo's screenshot
The black half-second on menu open/close, content close/load and video
reinits was the driver closing VideoOut with each swapchain and switching
the output 120 -> 60 -> 120 Hz. main.cpp now retains VideoOut
(../PS5_Vulkan 49679c9, ps5vk_display_retain) and releases it on quit.
Measured with a pad script (evidence/display-retention): menu handovers
7 ms instead of 297-344 ms, close content 280 ms and History 437 ms with
the previous image on screen instead of a blank panel and a mode switch;
0 black presents; quit restores the default mode.
/app0/ps5vk-no-retain.txt restores the old behaviour for comparison.

Every core rechecked at 119.88 Hz on the current driver
(evidence/core-recheck-current-driver): FCEUmm, Snes9x, mGBA (GBA .7z,
GB), FBNeo, Genesis Plus GX (MD, SMS, GG); 1,200 frames, exit
screenshot colours checked, audio errors=0, status 0.

FBNeo's screenshot crashed on a null call. Patch 0086: the scaler
allocated ~97 MB of intermediate frames a same-size conversion never
reads, failed beside FBNeo's 170 MB core, and the screenshot called an
unset converter. They are now allocated only for scaling, and a
conversion that cannot be set up fails the screenshot. Patch count
188 -> 193 (0086 is five edits).

Test aids: /app0/pad-script.txt (timed button presses), a crash report
in trace.txt (rip, rsp, return address, stack words; the console's
mcontext has rip at word 26 and rsp at 29) and the core base in the
loader's ready line, which together symbolised the FBNeo crash.

tools/verify.sh PASS (5 gates), 37 captures replay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 21:08:02 -04:00
Mihawk fa28bf1ae4 Fix thumbnail colours and input after resetting defaults
Preserve the requested RGBA format in asynchronous image loading. Default the native joypad to ps5 and refresh controller autoconfiguration after a live reset clears bindings.

Three new regression tests failed before the fixes and pass afterward. All five tools/verify.sh gates passed with 74 tests and 278 frontend sources. Patch inventory is 179, including five configuration.c edits. Owner accepted the uploaded build: Perfect. Commit.

Evidence: evidence/thumbnail-input-defaults/; replay with bash tools/verify.sh format evidence. Accepted build: e11018a79a62ce91fa723deaad6939c1e48a47bace21b3527ae84f4452148451. Current logging unchanged; no PS5_Vulkan edits.
2026-09-19 21:00:27 -04:00
Mihawk dae9006c37 Fix PS5 menu analog navigation and input binding capture
Register ps5_joypad with raw buttons/axes and a built-in controller profile.
Route controls through RetroArch's binding helpers and stop OR-ing hardcoded
pad state back into remapped input. Preserve held samples across the extra
binding-screen poll and keep disconnect/interception handling.

Add three upstream edits (105 -> 108): joypad declaration, registration and
built-in profile. No new dependency or toolchain flag. Host tests exercise
upstream mapping/analog helpers, native polling/lifecycle and ELF registration.

Validation: tools/verify.sh (all five gates, 37 tests, 17 evidence records).
Fresh patch replay: 107 applied + one existing marker; second pass unchanged.
Console: tools/run-title.sh --no-build --watch 120; owner confirmed flawless
stick navigation and binding capture, then confirmed manual close.
Follow-up: tools/run-title.sh --no-build --no-deploy --watch 30; full window
alive and script-closed, zero Vulkan refusals/API failures.
Evidence: evidence/native-joypad/{capture,expectation}.json.
Build: e6211dea9fd0bb512e83a9979a6a44c0c8c5fdf175564c753e3fd2a25067e0a9.
PS5_Vulkan unchanged.
2026-09-19 13:35:42 -04:00
Mihawk 62d0a4747d Keep development logs while buffering GPU timing off the frame loop
Retain frontend INFO/WARN/ERROR, driver errors, startup trace and klog.
Restore frontend log setup after rebuilt arguments, mark its build identity,
and retrieve it with each run. Remove periodic frame and button chatter;
log menu texture handover once. Profiling is opt-in, bounded and written only
after capture; validate per-frame partitions and presentation-return cadence.

Verified: bash tools/verify.sh (all gates, 28 tests); fresh vendor patch
replay/idempotence (86 edits). Two 60-second captures completed: first at
59.940238 FPS with maximum interval 16.905813 ms; fresh frontend logging
exposed three late texture-probe stalls, then those probes were limited.
Final refined build launched with zero refusals, logged handover once and
returned 0 before profiling completed; no final timing claim is made.
User requested ending performance investigation and proceeding to XMB.

Evidence: evidence/vulkan-buffered-logging/{capture,expectation}.json
Replay: python3 tools/evidence.py compare evidence/
Console: bash tools/run-title.sh --no-build --gpu-profile 60 --watch 80
Analysis: python3 tools/analyze-gpu-profile.py klog/gpu-profile-<stamp>.tsv
2026-09-19 11:30:05 -04:00
Mihawk eb8214d8c8 Record where the config-path crash lives, and keep the guard it is not
Markers bracket the crash to command_event() before its switch reaches
CMD_EVENT_CONTROLLER_INIT. The marker directly before that call prints; three
markers after it never do, including the first instruction of
command_event_init_controllers and the case label itself. The register dump is
byte-identical across every config-loading run (rip: 0, rdi/rsi/r13 inside one
0x138-byte frame), so the fault is deterministic and one frame deeper than the call
site.

patches/series 0007 guards the core's retro_set_controller_port_device callback,
which upstream calls unguarded and which only dynamic_dummy.c's empty stub makes
survivable. It is verified compiled in (test %rax,%rax; je before call *%rax) and
the crash is unchanged, so it is committed as a genuine missing check and not as a
fix - the comment says exactly that.

File logging is configured and inert, for a structural reason worth recording:
retroarch_main_init initialises the logger after it parses the config, so a crash
during init happens before any log file exists. log_to_file, log_to_file_timestamp
and log_dir are now in config/retroarch.cfg for the day the config is read; they
need no build flag, because rarch_log_file_init is compiled unconditionally.

The config-path fix (0006) stays parked. input_driver returns to "null", since the
ps5 driver is only reachable through the config file that cannot be read yet.

Two process faults are recorded in docs/FINDINGS.md because both cost real time: a
patch park done by slicing the script by text emptied parked/config-path.patch.py
and removed the 0006 entry while build/ra-conf still had it applied (both recovered
with git checkout), and probe lines inserted after command_event's getters split a
multi-line #if block and broke the link.

gates: bash tools/verify.sh -> PASS (format unit build integration evidence).
reproduce: bash tools/run-title.sh --watch 10 -> title runs, menu visible.
2026-09-18 19:39:27 -04:00
Mihawk 8969e2eb38 Write and register the console's pad input driver, and name the two faults blocking it
src/input_ps5.cpp is a complete input_driver_t for this console: the DualSense is
read with scePadInit/scePadOpen/scePadRead and the 120-byte sample layout
../ProsperoLight verified on hardware, the pad's button words are mapped onto
RetroArch's numbering (CIRCLE is RetroArch's A, so CIRCLE confirms a menu entry),
sticks and triggers are reported as axes, and the table is registered in
input_drivers[] before input_null. tests/test_frontend.py pins the registration
from the frontend object's relocations and the button pairing by reading the map
out of the object the title links.

Two faults were found in front of it, both upstream of the driver.

RetroArch's built-in test input driver is on by default (HAVE_TEST_DRIVERS=yes in
qb/config.params.sh), and while it is on video_driver_init_input returns before
initialising any real input driver whenever the configured driver is not "test".
No input driver was ever initialised, so current_data stayed NULL and every button
read answered 0. --disable-test_drivers is now in tools/retroarch-sources.sh.

The title's -c never reached RetroArch. Content loading rebuilds argv from the
frontend's environment and kept only ["retroarch", "--menu"], so the config file
was never read at all - measured as
  probe config_parse_file: path="(null)"
  probe config_load: after parse input="null" video="ext"
This title has therefore been running on compiled defaults since it first built,
with --verbose dropped as well. A guarded one-line fix restores the title's own
config path.

That fix is parked rather than committed into patches/series: with the config
actually read, the title dies on launch with SIGSEGV, rip=0 - a call through a
null function pointer - both with input_driver="ps5" and with "null", and before
ps5_input_init is entered. Markers through drivers_init and
video_driver_init_internal show the entire video path completing, so the fault is
after driver initialisation. The change and its reasoning are in
parked/config-path.patch.py, and config/retroarch.cfg keeps input_driver="null" so
the title keeps running and showing its menu.

The pad does not work yet and the picture is still one menu frame. What is solid:
the driver exists, is registered, is unit-tested, and the two faults that were
silently blocking every input path are named with their measurements.

gates: bash tools/verify.sh -> PASS (format unit build integration evidence),
13 host tests. reproduce: bash tools/run-title.sh --watch 12.
2026-09-18 18:45:13 -04:00