Android batches touch moves and joystick axis events until the next UI
vsync, up to a frame of latency. On API 30+, ask for them unbatched.
Non-pointer sources only apply to the focused view, so the surface view
now stays focused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A press and release that both land between two sceCtrl samples were
lost. Now the next sample sees the button pressed. Idea from Azahar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- various bug fixes
- allow disabling enet when creating relay and adhocctl server objects
- pdp_peek_next_size can now be used to check whether a pdp session has no packet or an upcoming 0 size packet
The game runs without its disc there, so a state saved from it would keep that broken
environment. Saves are refused, and so is --save-state together with a state to boot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The count is opens of files missing from the disc, and reads and seeks on handles whose file
was dropped as the state loaded, from the load on. It tells how far a game booted without its
disc has strayed from its usual path. headless_bench.py takes bare .ppst files and directories
of them (--state-dir), and reports the count with the timings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Running a .ppst boots a placeholder program, with the disc ID and boot type peeked from the
state, then loads the state over it. An ISO game gets a disc with nothing on it, which the
mounts now load into by name. Meant for measuring performance with states that can be kept
without the games; the app still refuses to boot a state.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SaveStart (still version 6) also stores whether the game was booted from an ISO, a PBP, an
ELF or a disc directory. PeekBootInfo decompresses only the start of a state to read them with
the disc ID, so a boot from a state alone can be set up before the state is loaded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mounts were stored by position with no size, so adding, removing or reordering one broke
every older state, or silently fed sections to the wrong filesystem. Now a load pairs them by
prefix, skips a mount it doesn't have, and leaves one the state doesn't have as it is. Older
states load as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixed width, at the start of the first section, so the game a state belongs to can be read
without loading it, to boot from a state alone. A load into a different game is logged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The icon-with-text drawing helpers and the large list dimensions move
with it, exported since DirButton uses them too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- sceRegGetKeys looped to the requested count instead of the category's,
reading past the key list, and its size check could overflow.
sceRegGetKeyValue wrote an INT to a buffer smaller than 4 bytes, which
the ByName variant already refused.
- Savestates now wait for async IO even while stepping, when a plain
sync returned at once and a read in flight could land in the loaded
memory.
- A bad POPS layout index in a savestate fails the load instead of
indexing past the table.
- sceNpDrm's EDATA check stored ReadFile's s64 result in a size_t, so an
error passed the length check. The PGD ioctl handed uninitialized
stack bytes to pgd_open when the file was short.
- A negative chnnlsv key length from the guest context indexed before
the key buffer.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- The ringbuffer's packets * packetSize went straight into the media
engine's allocations. It's clamped to what a savestate can hold, and
the put callback's return value is clamped before it sizes the
validation demuxer. A ringbuffer with no packets no longer divides by
zero.
- sceMpegAvcCsc with a range starting past the frame gave a negative
width. sceMpegBaseCsc* reject a stride that overflows the size math,
and the MJPEG output size could overflow 32 bits.
- MpegDemux clamps the header's stream offset, and doesn't push PES
payload past what's been read. read16/read24/readPts relied on the
unspecified evaluation order of | for their byte order. A negative
stream offset made every later savestate fail to load.
- Atrac: DecodeForSas clamps the split packet so the second copy stays
in the stack buffer. A zero frame size from the file is rejected
before it's divided by. decodeTemp_ is reallocated when SetData
changes the channel count. The standalone decoder only has buffers
for two channels, so it clamps the count it's given.
AtracSasBindContextAndGetID indexed with a negative ID and
dereferenced a missing context.
- Psmf's player tempbuf path could read past the 64KB buffer from the
stream table or EP map offset.
- sceMpegDelete didn't forget the context's PMP state, so a new context
at the same address skipped the PMP codec setup and crashed.
Releasing an Atrac ID or setting its data now waits for a SAS mix in
progress, which can be decoding from it on the SAS thread.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pspautotests net/adhoc/sizes measures, roughly: PdpSend takes 50 us plus
20 ns a byte (to a peer, to everyone, to nobody or to itself), PdpRecv
of waiting data 15 us plus 11 ns a byte, PtpSend 95 us plus 70 ns a
byte, PtpRecv 25 us plus 12 ns a byte, and PollSocket 20 us plus 1 us a
socket. We charged 10-50 us whatever the size, and nothing at all for a
PdpSend to a MAC nobody has.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Logging after the panel closed showed the app still active but no key window,
so keys beeped until the window was clicked. Making the window key in the
completion handler doesn't stick (the sheet is still attached then), so do it
on the next runloop pass. The Dock bounce isn't needed, and only
[NSApp activate] is kept, for the case where the app did lose activation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keyboard focus still didn't come back after a panel closed. The panel runs
out of process, and SDL's own Cocoa file dialog works around the same thing
by activating the Dock and then the app again, so do that too.
SDL handles input for its windows itself, so the sheet didn't stop clicks
and keys from reaching the UI under it. Drop presses and motion in
ProcessSDLEvent while a panel is open.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The open and save panels were run with runModal and no owner window, and
after one closed, focus didn't return to the SDL window. Attach them as
sheets to the key (or main) window instead, which also stops them from
blocking inside SDL's event pump.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pspautotests net/inet/sizes measures, roughly: a send over WiFi takes
125 us plus 40 ns a byte, a receive of waiting data 35 us plus 14 ns a
byte, and poll and select grow worse than linearly with the number of
sockets, from 13 us for one to about 700 us for 64. We charged a flat
4 us to receive, nothing to send, and 11-15 us to poll and select,
whatever the size. The costs are now rough functions of the bytes and
sockets, for all the send and receive calls including sendmsg and
recvmsg.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The barrier divided the cycle count by the current clock's cycles per millisecond, so a game that
changes the CPU clock (Pangya: Fantasy Golf does on its network screens) jumped its count by up to a
fifth of everything so far, and from then on ran in lockstep at the wrong ratio: the other instance
waited for up to half a minute, then the two ran 266:222 apart in emulated time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gpu.buffer.screenshot failed with "Could not download output" while a game had the display off
(sceDisplaySetFrameBuf with 0) and there was no backbuffer to read instead, as in headless Vulkan.
Pangya: Fantasy Golf does that around its loading screens, which ended the game scripts waiting
for its next screen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pacer only slept when the emulated clock was ahead of the wall clock since the start of the run,
so any wall time it stood still (at the instance sync, waiting for the slower instance, or in the
relay's wait for a PTP connect) became credit, spent running flat out afterwards. Two instances in
step then sprinted together, and the real latency of the next exchange turned into emulated
seconds: in pair/ptppoll the client's 2 s PtpRecv timed out 7 ms of wall time after it started,
before the host had even sent. The pair tests timed out in connects and receives this way, mostly
on Windows runners.
Now the pacing baseline moves along when an instance is over 5 ms behind. Relay pair/ptppoll went
from failing 14 of 16 runs here to passing 16 of 16.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Custom drivers that target Mali's kbase kernel interface exist now, and
AdrenoTools can load them the same way it loads Turnip. Offer the driver
manager when /dev/mali0 exists, not just /dev/kgsl-3d0, like Dolphin does
(dolphin-emu/dolphin#14958).
The manager is now called "Custom driver manager", and the Turnip flags
are only shown on Adreno.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>