Commit Graph
50172 Commits
Author SHA1 Message Date
Rularia 5c7632d99b Update MIPSAnalyst.cpp 2026-11-01 22:08:57 +08:00
Henrik Rydgård fb93fad41c Merge pull request #22880 from hrydgard/gamebutton-cleanup
GameButton code cleanup
2026-11-01 11:42:50 +01:00
Henrik Rydgård 7bbbe813e0 Merge pull request #22879 from hrydgard/dependabot/github_actions/actions/setup-java-6.1.0
build(deps): bump actions/setup-java from 6.0.1 to 6.1.0
2026-11-01 11:38:37 +01:00
Henrik Rydgård ec1246b221 Deduplicate text rendering code from GameButton 2026-11-01 10:49:59 +01:00
Henrik Rydgård b11a2b173e inline the image drawing functions 2026-11-01 10:29:43 +01:00
Henrik Rydgård ede471aee6 Merge DirButton into GameButton 2026-11-01 10:24:34 +01:00
dependabot[bot] ae7c593b87 build(deps): bump actions/setup-java from 6.0.1 to 6.1.0
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 6.0.1 to 6.1.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v6.0.1...v6.1.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-01 08:45:43 +00:00
Henrik Rydgård 3f5a79bfbc Simplify 2026-11-01 09:33:44 +01:00
Henrik RydgårdandClaude Opus 5.5 42d3206bcf Move GameButton out of GameBrowser.cpp into its own file
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>
2026-11-01 00:06:19 +01:00
Henrik Rydgård 659e05c0a3 Merge pull request #22874 from hrydgard/mac-file-panel-sheets
Mac: Show file panels as sheets, and restore keyboard focus after them
2026-11-01 00:04:04 +01:00
Henrik Rydgård 77904479f9 Refactor work 2026-10-31 23:37:48 +01:00
Henrik Rydgård fd42bb6dcb Merge pull request #22873 from hrydgard/adhoc-size-timing
sceNetAdhoc: PDP, PTP and PollSocket: Time cost approximations
2026-10-31 22:50:45 +01:00
Henrik RydgårdandClaude Opus 5.5 fc2a33ba94 sceNetAdhoc: PDP and PTP sends and receives, and PollSocket, take longer the more they handle
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>
2026-10-31 22:26:55 +01:00
Henrik RydgårdandClaude Opus 5.5 bcd6d250e6 Mac: Restore focus after the file panel's sheet is gone
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>
2026-10-31 22:25:05 +01:00
Henrik RydgårdandClaude Opus 5.5 cb121270bd Mac: Reactivate the app after a file panel, and drop input while one is up
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>
2026-10-31 22:18:50 +01:00
Henrik RydgårdandClaude Opus 5.5 7ed8e590ea Mac: Show file panels as sheets on the window, so focus returns to it
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>
2026-10-31 22:13:39 +01:00
Henrik Rydgård 45657cc9ba Merge pull request #22872 from hrydgard/inet-size-timing
sceNetInet: Send, receive, poll and select: time cost approximations
2026-10-31 22:00:15 +01:00
Henrik RydgårdandClaude Opus 5.5 7cee9c8065 sceNetInet: Send, receive, poll and select take longer the more they handle
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>
2026-10-31 21:38:50 +01:00
Henrik Rydgård 22e67da85c More code cleanup 2026-10-31 19:53:51 +01:00
Henrik Rydgård cae4375f74 Merge pull request #22868 from hrydgard/instance-sync-clock
Instance sync: Count milliseconds in emulated time, not cycles
2026-10-31 19:42:50 +01:00
Henrik Rydgård 5314b1436a Merge pull request #22870 from hrydgard/display-off-screenshot
Debugger: A screenshot of a display that's off is black
2026-10-31 19:42:41 +01:00
Henrik Rydgård 333c6f877b Merge pull request #22869 from hrydgard/mali-custom-drivers
Android: Allow custom Vulkan drivers on Mali too
2026-10-31 19:10:49 +01:00
Henrik RydgårdandClaude Opus 5.5 422f5ed3e5 Instance sync: Count milliseconds in emulated time, not cycles
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>
2026-10-31 19:02:56 +01:00
Henrik RydgårdandClaude Opus 5.5 1815cf065e Debugger: A screenshot of a display that's off is black
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>
2026-10-31 19:02:12 +01:00
Henrik Rydgård 3626497c76 Merge pull request #22871 from hrydgard/headless-realtime-no-catchup
Headless: Don't let --realtime catch up on wall time it stood still
2026-10-31 19:01:43 +01:00
Henrik RydgårdandClaude Opus 5.5 7da0e75b5e Headless: Don't let --realtime catch up on wall time it stood still
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>
2026-10-31 18:02:15 +01:00
Henrik RydgårdandClaude Opus 5.5 1ec41f052f Translate the custom driver manager strings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:50:28 +01:00
Henrik RydgårdandClaude Opus 5.5 5a667638a1 Driver manager: Tell people to only install drivers for their GPU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:48:33 +01:00
Henrik RydgårdandClaude Opus 5.5 3ac74353d2 Driver manager: Explain what custom drivers are
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:46:00 +01:00
Henrik RydgårdandClaude Opus 5.5 60b053d7be Android: Allow custom Vulkan drivers on Mali too
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>
2026-10-31 16:44:27 +01:00
Henrik Rydgård 840e2e3dc8 Merge pull request #22867 from hrydgard/adhoc-network-sim
Ad hoc: Options to simulate a slow network
2026-10-31 16:03:59 +01:00
Henrik RydgårdandClaude Opus 5.5 7d17f071d2 Ad hoc: Make the transport when ad hoc starts
Transport() returned one of two static transports, picked on each call. Now SetupAdhocRelayMode()
makes the one for the session, wrapped in the network simulation when its options are on, and
sceNetAdhocTerm frees it after the sockets. The simulation owns the transport it wraps and no longer
needs to check each call whether it's on.

The friend finder thread binds its server connection by serverHasRelay itself, since it can run with
no transport (adhocctl stays connected through sceNetAdhocTerm), as can the adhocctl poll.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:55:26 +01:00
Henrik RydgårdandClaude Opus 5.5 64624ef32a Ad hoc: Options to simulate a slow network
--adhoc-delay, --adhoc-jitter and --adhoc-loss (AdhocSimDelayMs, AdhocSimJitterMs and
AdhocSimLossPercent in the ini) delay and drop ad hoc traffic, in emulated time, to find games that
can't cope with a real network's latency.

They're a transport, NetSimTransport, around whichever one is in use, so they work the same for the
relay and P2P. PDP datagrams are held on arrival; PTP sends are held before they go, and a "lost" one
goes a retransmit interval later instead. PtpSendNow is new in the transports, for those delayed sends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:10:57 +01:00
Henrik Rydgård 383f99111f Break out the icon picker, some renaming 2026-10-31 13:36:16 +01:00
Henrik Rydgård 1c1c0b206c Merge pull request #22864 from hrydgard/adhoc-relay-perf
Ad hoc: Relay without fixed real-time waits
2026-10-31 12:57:02 +01:00
Henrik Rydgård 92e0c07a6f Merge pull request #22865 from hrydgard/fix-windows-warnings
Windows: Fix a batch of MSVC warnings from CI
2026-10-31 12:41:17 +01:00
Henrik Rydgård b2e83d3a7c Merge pull request #22863 from hrydgard/adhoc-buffer-checks
sceNetAdhoc: Check the game's ad hoc buffers by their full length
2026-10-31 12:16:16 +01:00
Henrik Rydgård a2531aeba9 Merge pull request #22862 from hrydgard/net-misc-checks
HLE: Check more guest buffers by their full length
2026-10-31 12:15:54 +01:00
Henrik RydgårdandClaude Opus 5.5 371452db9c Update aemu_postoffice to the ppsspp branch
Upstream main and the ppsspp branch are the same commit now. The one new
change is in the standalone server's main loop, which PPSSPP doesn't build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:14:51 +01:00
Henrik RydgårdandClaude Opus 5.5 c7ecab3027 test.py: Run relay pair/vanish on macOS CI again
It passed on the macOS runner three times out of three after the fix for
relay sends and receives off the network.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:04:22 +01:00
Henrik RydgårdandClaude Opus 5.5 bbf4d05045 adhoc_multi.py: --udp, to talk to the relay over UDP (enet)
PPSSPP's built-in server doesn't support UDP, so this needs a standalone
aemu_postoffice server running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:01:20 +01:00
Henrik RydgårdandClaude Opus 5.5 6079a8264f sceNetAdhoc: Relay without fixed real-time waits
aemu_postoffice is now at upstream main, which has the relay performance
fixes: the built-in relay server waits for traffic and pumps as soon as
it arrives instead of sleeping 1 ms between pumps, and pumps on its own
thread instead of waking three workers twice each per pump; closing a
session no longer sleeps 50 ms (the delay is now an option, 0 here,
where everything but a PTP connect's thread, which is joined before its
session closes, runs on the CPU thread); connects and blocking waits for
the server's replies wait on the socket instead of sleeping or spinning.
Unread PTP data is also delivered before a close now.

The pair tests through the relay used to barely gain from speed (29 s at
600%, 22 s at 1600%); now 19 s and 11 s, as fast as P2P at 600%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:01:20 +01:00
Henrik RydgårdandClaude Opus 5.5 74178a8106 sceNetAdhoc: Check the game's ad hoc buffers by their full length
Calls that checked one byte of a buffer, then used the game's length:
- GetPeerList and GetAddrByName cleared that many bytes; GetPdpStat and
  GetPtpStat filled that many entries. Clamped to valid memory.
- PollSocket read and wrote count entries.
- GetNameByAddr, GetPeerInfo, Join, GetGameModeInfo and UpdateReplica
  wrote or read whole structs.
- PtpSend and PtpRecv used the whole data length.
- PdpSend and PdpRecv took host pointers from generic wrappers. Their
  syscalls now check the game's buffers and pass NULL for bad ones,
  which the calls already reject, since game mode calls the functions
  with host buffers.
- Matching SelectTarget, CancelTargetWithOpt and SendData copied the
  whole opt or data length. GetMembers cleared a NULL buffer when given
  a bad one.

Also: the matching thread list is savestated without the contexts, so a
context's index may be past its end after a load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:50:17 +01:00
Henrik RydgårdandClaude Opus 5.5 b238eb2125 sceKernelCreateLwMutex: Reject a misaligned work area
A 6.60 PSP returns SCE_KERNEL_ERROR_ILLEGAL_ADDR for one (checked with a
throwaway test; the other bad addresses hang the PSP, so they can't go in
pspautotests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:39:19 +01:00
Henrik RydgårdandClaude Opus 5.5 0a778a13ff HLE: Check more guest buffers by their full length, and an empty insert
Calls that checked one byte of a game's buffer and then wrote or read the
whole thing, or trusted a negative length:
- sceNetEtherNtostr/Strton, the apctl BSS descriptor calls, GetState and
  sceNetGetDropRate.
- sceNpAuthGetTicket wrote its whole ticket whatever the length; it's
  now built locally and written once the buffer is known to hold it.
  sceNpAuthGetTicketParam checked its limits after copying, and walked
  ticket params past the ticket's end.
- sceNp2's communication ID and passphrase, a negative maxServerIds, and
  an unchecked unknown1Ptr.
- sceParseUri's work area and scheme string, sceParseHttp's negative
  header length and value address, and ReadVariableSizedStruct's size.
- sceKernelCreateLwMutex initialized the work area without checking it
  at all, and the other LwMutex calls checked one byte of it.
- sceNetAdhocctlGetScanInfo cleared the length the game gave, of a
  buffer checked by one byte (or any length, negative ones included).

Also: a game mode join inserted at begin() + 1 into a possibly empty
list of players.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:26:03 +01:00
Henrik Rydgård c0e750726f Merge pull request #22860 from hrydgard/adhoc-discover-ptpmsg
Ad hoc: PDP receive queues of the socket's buffer size, select() in the ad hoc server
2026-10-31 11:00:36 +01:00
Henrik RydgårdandClaude Opus 5.5 63e661baf3 test.py: Run the single-console ad hoc tests at 800%
Their first login to the server they start takes real time, a few hundred
ms on the Windows runner, and a group request gives up after 5 emulated
seconds: at 1600% every P2P one failed to create its group there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:10:52 +01:00
Henrik RydgårdandClaude Opus 5.5 67ad6c260d sceNetAdhoc: Off the network, relay PTP send and recv don't depend on the relay
A console that has left the network sends into the air and receives
nothing, but the relay checked whether it was disabled first. On the
Windows runner the host of pair/vanish finished and took its relay with
it, the client's reconnect failed and disabled the relay, and the
client's PTP send and recv afterwards came back DISCONNECTED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:10:52 +01:00
Henrik RydgårdandClaude Opus 5.5 32070e633c test.py: Skip relay pair/vanish on macOS CI for now
Only there, the host's matching drops the departed client without a
TIMEOUT event. The instances stay in step (no sync warnings in the log),
and it passes on a Mac and on the other runners.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 09:37:32 +01:00
Henrik RydgårdandClaude Opus 5.5 58b84a89a7 Windows: Fix a batch of MSVC warnings from CI
Signed/unsigned comparisons, bool/int mixes and narrowing in our own code,
plus duplicate NOMINMAX defines. The UWP Common/Core/UI projects now define
_CRT_NO_POSIX_ERROR_CODES like the desktop ones, so SocketCompat.h no longer
redefines the errno macros there. ImMemView's byte search no longer strdup()s
the query (it leaked on the error path).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 09:30:13 +01:00