Commit Graph
50585 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 89cb09ad79 Modules: Find the caller's module by address, fix self stop/unload
pspautotests modules/selfunload and modules/idlist show:

- sceKernelGetModuleId and the self stop/unload calls act on the module the caller's code is in,
  not the module that created the thread.
- Address lookups cover text_addr up to the text, data and bss sizes, and refuse kernel addresses
  from user mode (ILLEGAL_ADDR).
- sceKernelStopUnloadSelfModule takes (argSize, argp, status, option) and exits with 0. It was
  unimplemented for user mode and given the wrong arguments for kernel mode.
- When module_stop returns 0, the module is unloaded and the calling thread exits with its exit
  code. A return of 1 gives CAN_NOT_STOP; any other nonzero value gives NOT_REMOVABLE. In both
  cases the module stays started and the status gets the value.
- GetModuleIdList refuses a NULL or kernel count pointer.
- text_size leaves out .MIPS.abiflags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 17:00:15 +01:00
Henrik Rydgård 893eb1cb27 Merge pull request #23012 from hrydgard/ge-pace-30fps
Add a "Limit framerate to 30 fps" setting, and a compat flag for it
2026-11-09 16:43:19 +01:00
Henrik Rydgård a7da7a6b7d Merge pull request #23011 from hrydgard/xmb-settings-persist
Keep more XMB settings, fix the Character Set error
2026-11-09 16:42:32 +01:00
Henrik RydgårdandClaude Opus 5.5 d50bb4d0dd Translate the 30 fps limit setting
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 13:35:50 +01:00
Henrik RydgårdandClaude Opus 5.5 8fbc3adfed Add a "Limit framerate to 30 fps" setting, and a compat flag for it
Many games drop to 30fps when they miss a vblank, and on the PSP some of them
nearly always do. In PPSSPP the GE is fast enough that they spend much of their
time at 60 instead, and some things misbehave (Midnight Club).

With the limit on, the GE takes until just after the vblank two on from the one
the previous frame was done in, so the frame goes up every other vblank whether
the game flips as soon as it's done, waits for a vblank first, or latches the
flip. A new frame starts at the first list after a flip, or at a list that
starts after a vblank, for games that enqueue their lists from the vblank
interrupt and never flip (Midnight Club: LA Remix).

Auto applies it to games with the LimitFrameRateTo30 compat flag, the two
Midnight Club games for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 13:25:30 +01:00
Henrik Rydgård b1549195eb Merge pull request #23010 from hrydgard/libretro-d3d11-v2
libretro: Negotiate version 2 of the D3D11 render interface
2026-11-09 12:50:25 +01:00
Henrik RydgårdandClaude Opus 5.5 afa254133e Headless: Set the registry category version from the installed firmware
Headless has no config to keep the version the app stores on install, so
it stayed 1 and every XMB boot ran the registry upgrade, rewriting the
defaults of all keys added since 1.50, mapped settings included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:43:39 +01:00
Henrik RydgårdandClaude Opus 5.5 3c7beeaaee sceReg: Keep the UMD Video, slideshow, character set and password settings
- Fixes #22920

Map the XMB's /CONFIG/VIDEO keys (UMD menu, audio and subtitle language,
volume, L/R button, sequential playback, title display), the slideshow
speed, CHARACTER_SET/oem and ansi, and the lock password to new config
settings, so they survive a restart. The languages and password are BIN
keys, stored in the config as text ("en", "0000"); a setting of the wrong
length or with unprintable bytes isn't used. Defaults are the values of
our registry dump. Also fix two key names in the mapping comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:43:39 +01:00
Henrik RydgårdandClaude Opus 5.5 45a5e3b722 sceIo: Accept the code page devctl on fatms0: too
devctl 0x02425856 sets the code page for 8.3 names (fatms.prx in 6.61
passes the word to sceCodepage). It was only handled on ms0:, and on
fatms0: fell through to the unimplemented path, whose
SCE_KERNEL_ERROR_UNSUP is the 80020325 the XMB showed after changing
System Settings > Character Set. Also check the argument like fatms does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:43:39 +01:00
Henrik Rydgård c6950d22ee Merge pull request #23007 from hrydgard/more-ui-fixes
More UI fixes
2026-11-09 11:59:40 +01:00
Henrik RydgårdandClaude Opus 5.5 c1128ce35a libretro: Negotiate version 2 of the D3D11 render interface
Under version 1, a frontend that presents from another thread (RetroArch's
threaded video, now its default) can only hand the core a deferred context,
which can't map a staging texture or read anything back. Texture uploads that
go through a staging texture failed there ("Failed to create DrawPixels
texture"), and so would every readback.

Version 2 shares the immediate context by taking turns. We hold it for the
whole of retro_run and around savestates, reset and unload, wait for the
frame's sync index before taking it, copy the frame into a texture per sync
index and hand that over with set_texture, and let go of it before
video_refresh. A frontend without the negotiation hands out version 1, which
works as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 11:39:27 +01:00
Henrik RydgårdandClaude Opus 5.5 b185d746ee D3D11: Unbind the GS/HS/DS stages at the start of each frame
- Fixes #22748

thin3d never uses these stages, so it never set them. A libretro frontend
shares the immediate context with us, and recent RetroArch leaves its sprite
geometry shader bound after drawing its frame, so every one of our draws went
through it and the core output was black (with threaded video off, where the
core draws on the frontend's context).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 11:28:25 +01:00
Henrik Rydgård c3ab986b74 Merge pull request #23006 from hrydgard/remove-gl-skip-mode
OpenGL: Remove skip mode
2026-11-09 11:13:44 +01:00
Henrik Rydgård 1ef159f3e4 Prettify some popups. 2026-11-09 11:06:53 +01:00
Henrik RydgårdandClaude Opus 5.5 8587463502 UI: Keep the pause screen out of a hidden navigation bar's area
With the navigation bar hidden, a swipe from the edge brings it back for
a while, over the pause screen's buttons on that edge. Android now also
reports where the navigation bar is when it's hidden, and a screen can
reserve that area with ReserveHiddenNavBar(). The pause screen does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 11:02:56 +01:00
Henrik RydgårdandClaude Opus 5.5 5d9ff611f6 OpenGL: Remove skip mode
Since the native EGL path, the Android context stays current on the
render thread until the render manager and the draw context are gone, and
it's destroyed with every surface. So the GL calls skip mode avoided
after the emu thread exits (Android was the only platform that set it)
can just run, and nothing it would have leaked outlives the context.

It was also a trap: a shader created while it was on was never compiled,
but not marked failed either, so a program linked from it later failed
with "missing shader". Reports of that stopped with 3cb6ada66a, which
already took most of its uses away.

ThreadEnd still frees the steps that never got submitted without running
them, now called a dry run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:41:02 +01:00
Henrik Rydgård a7d80b680a Merge pull request #23003 from Narugakuruga/patch-40
Update Chinese translations, add translation document in English
2026-11-09 10:38:23 +01:00
Henrik Rydgård 33de146e23 Merge pull request #23005 from hrydgard/android-fixed-surface-rotation
Android: Re-fix a hardware scaled surface when the view is resized
2026-11-09 10:36:42 +01:00
Henrik RydgårdandClaude Opus 5.5 366e0c795c Android: Re-fix a hardware scaled surface when the view is resized
With a display resolution set (iAndroidHwScale), the surface has a fixed
size, and a rotation doesn't change it, so no surfaceChanged came to
re-fix it there. Landscape kept rendering into the portrait-sized buffer.
A layout listener on the SurfaceView now re-measures and re-fixes it,
which brings a surfaceChanged with the new size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:10:55 +01:00
Henrik Rydgård 79e845c4d0 Merge pull request #23004 from hrydgard/color-test-screen
UI: Add a color test screen to Developer tools > Tests
2026-11-09 09:47:53 +01:00
Henrik RydgårdandClaude Opus 5.5 4189eb1cc6 UI: Color test: Make the gamma check lines one pixel at any DPI scale
pixel_in_dps_y is the inverse of a pixel's height in UI coordinates, so use the ratio of the resolutions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 09:26:18 +01:00
Henrik RydgårdandClaude Opus 5.5 679588b17e UI: Add a color test screen to Developer tools > Tests
Smooth R, G, B and gray ramps, gray steps over the whole range and near
black and white, color bars, two hue wheels (fading to white and to
black), and 1-pixel black and white lines around 128 and 188 patches,
showing whether a resampled image is averaged in linear light or encoded.
The header names the backend and whether VR is on, for comparing outputs.
Also --start-screen=colortest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 09:23:27 +01:00
Narugakuruga 5f3ab12a8b Add UI translation guide in English
Use mimo v2.6 pro
2026-11-09 16:07:48 +08:00
Henrik Rydgård f5c7f5c2f0 Merge pull request #23001 from hrydgard/flow-layout
UI: Add FlowLayout, use it for the game browser toolbar
2026-11-09 08:58:58 +01:00
Narugakuruga 6987656f46 Update Chinese translations in zh_CN.ini
Trying to understand control/graphics setting and RA integration by checking the code, RA documents and MIMO v2.6 documents.
2026-11-09 12:43:18 +08:00
Henrik Rydgård 4a9fa00e5a Merge pull request #23000 from hrydgard/clean-up-reporting
Clean up outdated reporting, fix the custom driver UI
2026-11-08 23:56:25 +01:00
Henrik RydgårdandClaude Opus 5.5 b77e8f8d83 UI: Test FlowLayout's wrapping, padding, weights and row gravity
UIContext's destructor now copes with a context that was never given a
draw context, so a test can measure views with one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-08 23:38:06 +01:00
Henrik RydgårdandClaude Opus 5.5 db9e1aa30f UI: Add FlowLayout, use it for the game browser toolbar
FlowLayout lays out its children left to right at their natural size and
starts a new row when the next one doesn't fit, instead of squeezing
them. Weighted children fill what's left of their row. Like LinearLayout,
it has SetPadding for space inside its edges.

On narrow screens the toolbar buttons used to run off the edge; now they
wrap onto a second row.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-08 23:38:06 +01:00
Henrik RydgårdandClaude Opus 5.5 bac036a628 UI: Don't let LinearLayout grow past an AT_MOST limit for weighted children
After measuring the weighted children, the measured size could grow beyond
the AT_MOST size the parent allowed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-08 23:38:06 +01:00
Henrik Rydgård 50334e059e Fix the visual design of the custom driver screen 2026-11-08 23:28:13 +01:00
Henrik Rydgård 2646314c92 Make round corners propagate properly into viewgroups 2026-11-08 23:27:59 +01:00
Henrik Rydgård af13eb38e0 Fix InfoItem to behave well when rightText is missing, supporting multiline properly. 2026-11-08 23:27:59 +01:00
Henrik RydgårdandClaude Opus 5.5 11b44aef04 Don't report palette formats the float depal shader can't do
It's only used without integer shader math (GLSL 1.x), on old devices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 23:27:59 +01:00
Henrik RydgårdandClaude Opus 5.5 1cccda985f Don't report __KernelStopThread on a thread that's gone
At shutdown the kernel objects are cleared before the net module stops
its Apctl thread, so this fired from nearly every game that used it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 23:27:59 +01:00
Henrik RydgårdandClaude Opus 5.5 6e5b54142e Stop reporting more things we already know about
From going through what report.ppsspp.org still gets from v1.20.4 and
later. The logging stays:

- Module load options: invalid positions are rejected (and reported)
  before this, the rest is handled.
- Savedata versions 1-3 are normal, only higher ones are rejected.
- sceNetAdhocMatchingInit, sceIoAssign and the screenshot dialog's init:
  every call was reported.
- sceKernelStopUnloadSelfModuleWithStatus is implemented, like the
  version without status, which already wasn't reported.
- Thread attributes we ignore, morph and spline vertex types, BREAK, and
  the POPS emulator invalidating code near the PC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 23:27:59 +01:00
Henrik Rydgård 4fabe3fe0a Remove outdated reporting 2026-11-08 23:27:59 +01:00
Henrik Rydgård 9d5e39b33c Merge pull request #22997 from hrydgard/content-uri-open-error
Android storage: Don't treat a failed content URI open as a handle
2026-11-08 18:34:30 +01:00
Henrik RydgårdandClaude Opus 5.5 be50e76471 Android storage: Open content URIs through the cached provider client
Like the queries. Opening a file through the content resolver takes and
drops a stable reference to the provider for each call, and is a few ms
slower: opening for a read or an overwrite went from about 25 and 12 ms
to 22 and 10.5 ms in the storage test, on a phone's SD card. If the
provider has died, it falls back to the resolver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 18:09:21 +01:00
Henrik RydgårdandClaude Opus 5.5 c2612c143b Android storage: CreateDir succeeds when the folder is already there
Creating a taken name on a content URI now fails with ALREADY_EXISTS
(instead of making "name (1)"), so CreateDir failed whenever its
existence check missed the folder, by a race or a failed query. It
promises true for a folder that's already there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:09:15 +01:00
Henrik Rydgård 9dc79eb81d Merge pull request #22994 from hrydgard/adhoc-discover
sceNetAdhocDiscover: Run the library's state machine; peers become visible when a PSP's would
2026-11-08 16:49:52 +01:00
Henrik RydgårdandClaude Opus 5.5 1860f9c604 Instance sync: Yield for up to 5 ms before sleeping
A short sleep takes 15.6 ms on Windows by default, and the pair tests
waited in one about every emulated millisecond, so they ran at about
PSP speed there instead of 8x-16x. joinrace, the longest, hit the
120 s wall timeout. On a Mac with the sleep made 15.6 ms long, joinrace
times out the same way, and with this change it takes as long as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:23:29 +01:00
Henrik Rydgård 469032de46 Merge pull request #22993 from hrydgard/adhoc-pdprecv-buffer
Ad hoc, Inet, MP3: Take buffers that run past the end of memory
2026-11-08 15:59:32 +01:00
Henrik RydgårdandClaude Opus 5.5 44d21b6975 Android storage: Don't treat a failed content URI open as a handle
Opening a content URI now fails with a StorageError (-2 for a file that
isn't there) rather than always -1, and DirectoryFileHandle::Open only
checked for -1. So opening a missing file on the memory stick succeeded,
with fd -2. Seeking it fails, and on 32-bit ReadEntireFile took that as a
4 GB file and the resize threw, which is how saving new savedata crashed.

ReadEntireFile now also catches a failed seek on 32-bit, where it isn't
negative as an s64, and sizes the vector can't hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:08:01 +01:00
Henrik RydgårdandClaude Opus 5.5 41a02ffcb3 sceMp3LowLevelDecode: Don't require room for 1152 samples
Since b1ffcde9fc the output buffer had to hold 1152 stereo samples, but
an MPEG-2 or 2.5 frame makes 576, so a buffer near the end of memory
that fits the frame failed. When the buffer can't take the biggest
frame, decode aside and copy only what the frame made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:42:58 +01:00
Henrik RydgårdandClaude Opus 5.5 77fed58257 sceNetAdhocMatching: Don't copy from a missing SendData or SelectTarget buffer
Since 74178a8106 a data or opt buffer that runs past the end of memory
is passed on as NULL, and SendData and SelectTarget then copied dataLen
or optLen bytes from it, crashing the emulator. Return INVALID_ARG, as
CancelTargetWithOpt already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:42:58 +01:00
Henrik RydgårdandClaude Opus 5.5 13cf93c75f sceNetInet: Take receive buffers that run past the end of memory
Recv, Recvfrom and Recvmsg wanted the game's whole buffer length to be
valid memory (5610c9ff9b), checked again on every retry of a blocked
call. That length is only how much the game can take, as with PdpRecv
and PtpRecv, whose buffers a PSP takes past the end of memory
(pspautotests net/adhoc/pdp and ptp). Now only the start has to be
valid, and the host is given no more than fits. Sends still need all of
the data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:42:58 +01:00
Henrik RydgårdandClaude Opus 5.5 60d531f9ef sceNetAdhoc: Take a PdpRecv buffer that runs past the end of memory
Since 74178a8106 the PdpRecv syscall wants the game's whole buffer
length to be valid memory. Gods Eater Burst receives into the end of the
scratchpad (0x00013800) with a length of 2049, one byte past it, so every
receive failed with INVALID_ARG and its multiplayer session never got
the other side's datagrams.

A PSP takes such a buffer, and with nothing waiting leaves the length
alone (pspautotests net/adhoc/pdp). Handle it the way 185bbd5b5d does
for PtpRecv: receive no more than fits in memory, and give the game its
length back if the call fails without waiting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:42:58 +01:00
Henrik Rydgård fc84ce6555 Merge pull request #22992 from hrydgard/module-start-stop-results
Modules: Match start/stop results, state checks and QueryModuleInfo checks
2026-11-08 14:35:09 +01:00
Henrik Rydgård c04b85d035 Merge pull request #22991 from hrydgard/rtl-text
Lay out right-to-left text consistently across text drawers, fix fa_IR/ar_AE strings
2026-11-08 14:33:53 +01:00
Henrik Rydgård ef02d2f87d Merge pull request #22996 from hrydgard/translation-terminology-revert
Translations: Put back translators' wording in mostly human translations
2026-11-08 14:25:40 +01:00