Commit Graph
24671 Commits
Author SHA1 Message Date
jpolo1224 cdb7310a74 Merge branch 'pr539' into jit-android-catchup-gv7 2026-08-04 21:35:10 -04:00
Starlightbotanist 7c39516f6a Android: replace shader preset accordions with folder browser
Show only the current shader directory's immediate folders and presets, with an Up row for parent navigation. Promote the redundant shaders_slang wrapper contents into the browser root while preserving other installed packs and user presets.

Add active-path markers, stable controller focus and scroll restoration for full settings and in-game menus, plus a vector folder icon.
2026-08-04 21:34:47 -04:00
jpolo1224 7eb414260a Android: community batch — stick sprint button, overlays, second screen, save-state delete
Pressure modifier now applies to buttons that are ALREADY held: the range was only
read when a press was emitted, so the gesture these games actually use — hold the
button, then ease off — did nothing (MGS2 cancels a shot on a half-pressed Square).

Macro turbo holds each state for at least 24ms. The pad is sampled on the VM's own
schedule, so the fastest frequencies were emitting presses that fell between two
samples and never registered, which read as the turbo being dead.

Extra button on the on-screen left stick, for sprint/jump. The stick locks the
gesture onto the pointer that started on it, so a separate widget could never be
reached by a finger gliding up off the stick; the stick hit-tests the zone itself
and keeps emitting deflection, making run-and-sprint one thumb motion.

Landscape render position (Center/Top), for foldables and clamshell controllers
whose screens open downward. Reuses the vertical-align switch that was gated to
portrait.

Custom internal resolution as a percentage of native, for steps the presets miss.
A value matching no preset also stops displaying as "0.25x" while the GS runs
something else.

RetroArch overlay artwork: import a pack and draw it between the game frame and
the touch controls, so it layers with a shader preset and never covers a button.

Second-display panel (Ayn Thor, Retroid dual screen): FPS, battery, clock and
buttons for save/load state, fast-forward, pause and screenshot.

Battery low and temperature warnings, off the sticky battery broadcast.

Delete a save state from the in-game picker by long-pressing its slot.

Point the PCSX2 CheatDB source at its current home; the old address is gone.
2026-08-04 21:34:01 -04:00
pstef 38ba87f359 Test: pin the multiplier deficit in the upper binade
The Booth predicate is keyed to fixed bit positions of ft, but the
truncation column moves one bit between the binades -- and every
zero-tail row I measured sat in the lower binade, at fs = 2^23. So the
region where the decrement fires with the product in the upper binade
had never been observed on silicon. The fpmul3 capture already had it.
The counts and the row provenance are at the tables.

One dead end worth recording, since the data invites it: do not split
this by binade, split it by T. fs = 0xFFFFFF looks like the predicate
carries no information there (0.1907% low with Booth on, 0.1976% with it
off), but it has exactly one T == 0 row, so that is measuring the
unmodelled 0 < tail < deficit class instead. At fs = 0x800001, lower
binade and also almost entirely that class, Booth is strictly necessary:
13,248/13,248 on, 0/262,144 off.
2026-08-04 21:13:34 +02:00
pstef e1f3048cc4 Optimization: pin the multiplier's predicate mask
emitDefectiveFmul materialised the 0x2AA Booth-digit mask on every
mode-3 multiply (mov + fmov). It is now placed into d10 for the whole
JIT session by _DynGen_EnterRecompiledCode, next to the s8/s9 clamp
scalars and under the same AAPCS64 argument: the low 64 bits of d8-d15
are callee-saved, so a pinned constant survives every C call with no
compile-time tracking. Six instructions become four:

    cmtst d30, d11, d10        ; d11 = narrow guest ft, d10 = the parked mask
    fmul  d0, d0, d1
    fcmeq d31, d0, #0.0
    bic   v30.8b, v30.8b, v31.8b
    add   d0, d0, d30

Why a pinned callee-saved register beats a caller-saved one behind a
liveness flag, and why q10 specifically, is on NEON_RESERVED_FPU_MULMASK
in iCore-arm64.h. It costs one of the six call-surviving FPR homes.
2026-08-04 21:13:32 +02:00
pstef bfc99f2bf3 Accuracy: give clamp mode 3 the EE multiplier's one-ULP deficit
The console's multiply array does not round correctly. When the exact
product has nothing below the single's ULP to absorb it, the result
comes back exactly one step closer to zero -- and whether it does is
decided by ft's mantissa alone, so mul.s is not commutative. iFPUd, the
eeClampMode:3 codegen, computed the IEEE product; the interpreter has
modelled the law since the previous commit.

Six instructions per multiply, at both emit sites: recMULop, and
recMaddsub's multiply stage, which round through different helpers. The
mechanism, the FPCR dependency it rests on, and the one term of the
measured predicate it knowingly drops are documented at
emitDefectiveFmul.

kGuardMaskWitnesses moved on 35 of its 72 rows -- fs is 1.0 throughout,
so every product there is zero-tailed. Each was re-derived against the
measured law rather than re-pinned against the emitter that moved it;
the one row where the dropped boundary term decides is called out at the
table.
2026-08-04 21:11:59 +02:00
pstef 9d7d11cd0e Fix: model the EE multiplier's one-ULP deficit in the interpreter
The console's multiply array is not a correctly-rounding multiplier: it
comes back exactly one step closer to zero on a large fraction of
operands, and which operands depends on operand order. Upstream states
the rule in a comment (x86/iFPU.cpp) and never tests it; FpuMulHack is
a one-point sample of it.  What is modelled, what deliberately is not,
and where the rule was measured are at eeMulDefectiveFt.

All six multiply forms route their product through the new eeMulProduct,
which also localises the fpuDouble() calls the sites used to make
inline. MADDA/MSUBA gain a temp for it; the accumulate itself is
unchanged, and still does not round-trip the product through fpuDouble
the way MADD/MSUB do.

MulSFpuMulHackOffGivesNativeProduct asserted the opposite -- that the
IEEE product is the console's. Silicon returns 0x3F490FDA for those
operands and 0x3F490FDB reversed, so the gamefix matched hardware in
both orders all along.

The deficit only reaches what fpuDouble() hands it. An exponent-0xff
operand is clamped to +/-Fmax before the multiply and the product
saturates at FLT_MAX, so this engine still has no EE top binade; that
gap is fpuDouble's and is untouched here.
2026-08-04 20:26:32 +02:00
pstef 8e91a17905 Optimization: widen straight out of the operand register, dropping the copy
Every full-mode widening site paid an Fmov to copy an allocator-resident
operand into a temp before ToDouble, for one reason: ToDouble's
exponent-0xff has to place the exponent-lowered single somewhere before
Fcvt, and it parked it in the register it was reading.

ToDoubleFrom(dst, src) puts it in the destination's S lane -- a temp the
caller already owns -- so it never writes the source. ToDouble(idx) is
now ToDoubleFrom(idx, idx) and emits the same instructions it always did.

Instructions removed on the common path: 2 per MUL.S/MULA.S, 3 per
MADD/MSUB/MADDA/MSUBA (both operands plus the ACC), 2 per
C.EQ/C.LT/C.LE, 2 per DIV.S. recDIVhelper1 now takes the operand registers
separately from its two write-only temps; its zero-divisor block reads
fs/ft in place.
2026-08-04 20:23:38 +02:00
pstef b8b5c176aa Optimization: keep the MADD product wide between its roundings
recMaddsub rounded the product to a PS2 single with ToPS2FPU_Full and then
widened it straight back with ToDouble thirteen instructions later. Nothing
observed the narrow form in between except the guard mask, which only reads
exponent fields -- and those are as extractable from bits 52..62 of a double as
from bits 23..30 of a single.

Two new emitters make the round trip unnecessary: ToPS2FPU_Wide rounds to EE
precision without changing format, and FPU_ADD_SUB_D is the guard mask on
doubles.

Shaves off about 5 executed instructions per MADD/MSUB/MADDA/MSUBA, not
the 19 the round trip costs: the multiply stage still needs its flag
branches, because the O flag is what recMaddsub branches on. Output is
unchanged.
2026-08-04 20:21:55 +02:00
pstef ebf7124f25 Test: pin the MADD family's guard mask and rounding
Two new tests exist so that the format-churn work that follows has
something to fail against.
2026-08-04 20:19:38 +02:00
jpolo1224 156a778cf9 Android: import external save-state files into a slot 2.6.6.3 2026-08-03 09:45:34 -04:00
Jeen c0c53cce8e Revert "iOS: add the number row"
This reverts commit 5ecec1ed64.
2026-08-03 10:12:07 +02:00
Jeen b8e1f56394 Revert "iOS: translate the number row strings"
This reverts commit 328bc24b03.
2026-08-03 10:12:07 +02:00
Jeen 9173a47688 Revert "iOS: make the visual slider bracket release itself"
This reverts commit e71fc0789f.
2026-08-03 10:12:07 +02:00
Jeen 120cd0b697 Revert "iOS: put the audio and pacing numbers on the number row"
This reverts commit 0f437e758b.
2026-08-03 10:12:07 +02:00
Jeen 7a402860fb Revert "iOS: put the appearance and emulator numbers on the number row"
This reverts commit b2bb95c709.
2026-08-03 10:12:07 +02:00
Jeen 036831af65 Revert "iOS: put the graphics and per game numbers on the number row"
This reverts commit d557b139cc.
2026-08-03 10:12:07 +02:00
Jeen 0e9132d761 Revert "iOS: put the virtual pad sliders on the number row"
This reverts commit 440f7c94b7.
2026-08-03 10:12:07 +02:00
Jeen ebd694b828 Revert "iOS: put the dynamic background sliders on the number row"
This reverts commit aa7afae16f.
2026-08-03 10:12:07 +02:00
Jeen 57339b68c2 Revert "iOS: put the in game speed control on the number row"
This reverts commit 16da198d78.
2026-08-03 10:12:07 +02:00
Jeen a020e798ec Revert "iOS: fix what the audit found in the number row"
This reverts commit 1e0a91c8b7.
2026-08-03 10:12:07 +02:00
J1coding 1e0a91c8b7 iOS: fix what the audit found in the number row
Six things, found by reviewing the change rather than by using it.

Opening the keyboard and closing it again used to rewrite the setting.
The field starts as the rounded readout, so committing it back dropped
whatever precision the stored value had beyond the decimals on show. A
background slider holding 1.234 became 1.23 just for being looked at. It
only writes now if you actually changed the text.

A typed value was lost if you tapped Save on the per game panel with the
keyboard still up, because the panel reads its staged value straight away
and the draft had not been committed yet. Worse, if the typed value was
your only change, Save was greyed out and did nothing. Digits now reach
the value as you type, once what you have typed is inside the range, so
half typed numbers still do not snap to a bound.

German was a ten times error. It groups on a full stop and points on a
comma, and the grouping separator was stripped first, so a typed 0.5
became 05.

Arabic could not be typed into at all. Its digits are Arabic Indic and
would not parse back, so nothing committed. The field always edits in
Latin digits now; the readout stays in the chosen language.

The swipe sensitivity control printed its name twice, once on the toggle
and again on the row below it.

Also dropped a degrees format nothing used, and cut the header comment
down. It was listing the types this replaced, which is a changelog entry
rather than something a future reader can look up.
2026-08-03 09:33:29 +02:00
J1coding 16da198d78 iOS: put the in game speed control on the number row
The last raw slider. Fast Forward Speed baked its value into a readout
row of its own and had no bounds; it is the same control as everything
else now, with the quick buttons still underneath.
2026-08-03 09:33:29 +02:00
J1coding aa7afae16f iOS: put the dynamic background sliders on the number row
All 199 of them, in two pieces.

The 105 that hand the row a string they formatted themselves go through
an adapter, so their call sites are untouched and their readouts are
byte identical. The 94 that went through controlSlider now name a shared
format instead of passing a formatting closure, which is what lets them
show their bounds for the first time.

Two readouts genuinely move. The percent helper truncated where the
shared format rounds, so a value like 0.675 reads 68 rather than 67, and
the signed one printed a plus in front of zero.

Glow blur keeps one decimal place. The points format is whole numbers,
and letting it round would have turned 12.5 into 13 on a row where half
points are the point.

The preview overlay's live readout moves to the number row's own
reporting channel, which is the same three arguments, so the HUD is
unchanged.

Also stopped an opaque readout from offering to be typed into. The string
is one somebody else built, so the keyboard would have opened on digits
that were not the ones on screen and written them back on dismissal. That
was a hole in the row rather than in these screens, so it is fixed there.
2026-08-03 09:33:29 +02:00
J1coding 440f7c94b7 iOS: put the virtual pad sliders on the number row
Thirty five rows across the thumbstick, gyro, crosshair and tap timing
sections. DynamicControlSlider becomes an adapter over the shared row, so
its call sites did not have to move.

Pad Opacity, Analog Stick Size and Phone Rumble Strength were three hand
rolled sliders that baked the value into the title, which is a different
rhythm from every other row in the app. Two of them also truncated the
percentage, so a slider sitting on 70 reported 69.

The accessibilityElement combine on the old slider is gone. It flattened
the row into one element and took the adjustable trait with it, so
VoiceOver read about thirty controls as static text rather than as
sliders you can change.

These sliders now bracket their drags like the graphics ones do, so they
no longer let a graphics reload fire mid drag, and every readout can be
typed into.

Two rows keep their own formatting. Negative deadzone reads as a phrase
with a translated noun rather than a number in a unit, and swipe
sensitivity is in degrees per point, which has no shared format.
2026-08-03 09:33:29 +02:00