Commit Graph
15899 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 a361dfc490 Drop unused Config.h and SmallDataConvert.h includes
Config.h is edited about 100 times a year and each edit recompiled 198
files; now 172. SmallDataConvert.h pulls in arm_neon.h and was included by
headers that don't use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:13:42 +02:00
Henrik Rydgård f8c1e39315 Merge pull request #22535 from hrydgard/tvos-support
Apple tvOS support prototype (and CI)
2026-10-13 10:03:15 +02:00
Acts1631 8220a0f855 Validate ZIP paths after stripping their common prefix
ExtractZipContents checked each archive path for parent components
before removing stripChars. A name could become ../ only after
stripping and escape the install directory, allowing a crafted archive
to overwrite files in sibling PSP directories.

Validate both archive and output paths, and apply stripping consistently
when checking for overwrites.
2026-10-12 22:17:53 -04:00
Henrik RydgårdandClaude Opus 5.5 5b05b34b4e tvOS: Fewer ifdefs, capability checks instead
The Siri Remote setup builds on iOS too, the device type comes from the
interface idiom, and requests for things the platform says it lacks are
refused by checking the property. What's left ifdeffed is API tvOS doesn't
have at all. Reports say tvOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:21:14 +02:00
Henrik RydgårdandClaude Opus 5.5 9512d619da tvOS: Read the Siri Remote's ring buttons, memstick in Caches/PPSSPP
The 2nd generation remote's ring has real direction buttons and a center
button, which take GCSupportsMultipleMicroGamepads. Its buttonA is pressed
along with all of them, which gave stray enters. Swiping is off for now, it
fought with the ring. The memory stick moves into a folder of its own, out
of the way of what the system keeps in Caches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:59:30 +02:00
Henrik RydgårdandClaude Opus 5.5 b58dd17c2e iOS: Show paths in the app's container as ~/...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:52:48 +02:00
Henrik RydgårdandClaude Opus 5.5 3a8a1799ee Add a tvOS build of the app
Shares the iOS frontend, with camera, location, motion, photo/document
pickers, share sheet, clipboard, microphone, battery and rotation compiled
out. The view controller is a GCEventViewController, so controllers only
reach us through GCController, and the Siri Remote is read as a micro
gamepad and sent as arrow/enter/escape/back keys. tvOS has no persistent
storage besides NSUserDefaults, so the memory stick lives in Caches for now.

Configure with -DIOS_PLATFORM=TVOS. The MoltenVK submodule gets the tvOS
slice from the same stock v1.4.2 release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:06:55 +02:00
Henrik RydgårdandClaude Opus 5.5 60c06d4f03 Darwin: Reserve space for the memory views instead of probing for it
On iOS, the base search stepped up from 0x100000000 in 8MB increments,
right through the app's binary and early heap: about 100 failed
vm_remaps (each logged twice) every time a game started. On macOS,
Find4GBBase freed its probe allocation before the views were mapped.

Now the kernel picks a free range of exactly the span the views need,
which stays reserved and inaccessible, and the views are mapped over it
with VM_FLAGS_OVERWRITE. One try, no race, and the gaps between views
fault. Unmasked (macOS), ask for 4GB alignment first, which lets the
ARM64 JIT pointerify. The old search remains as a fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:08:03 +02:00
Henrik RydgårdandClaude Opus 5.5 4daa789c5e MemMap: Fix the view index in Memory_TryBase's cleanup loop
It checked views[i], the view that failed, instead of views[j], so after
a failed try it could release views it should skip, or skip ones it
should release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:08:03 +02:00
Henrik Rydgård b419238f81 Merge pull request #22526 from hrydgard/crash-review-jni-ui
Claude code review: Fix crashes in the Android JNI layer and UI screen lifetimes
2026-10-12 18:17:01 +02:00
Henrik Rydgård 7bef6ccdda Merge pull request #22524 from LunaMoo/GOWpatchfix
Fix gow vortex patch by making sure changed register value get's used
2026-10-12 17:13:53 +02:00
Henrik Rydgård e1c76b68e5 Merge pull request #22523 from hrydgard/coded-arms-accurate-splines
Add AccurateSplines compat flag, enable for Coded Arms
2026-10-12 17:12:24 +02:00
LunaMoo bbbe195bdf fix gow vortex patch by making sure changed register value get's used in JIT 2026-10-12 16:40:43 +02:00
Henrik RydgårdandClaude Opus 5.5 46e576a402 Attach the NPDRM ISO dump thread to JNI
It does file I/O, which goes through Java for a content URI memstick, and
getEnv() asserts on an unattached thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:33:00 +02:00
Henrik RydgårdandClaude Opus 5.5 54b83bf850 SaveState: Drop queued operations at shutdown
Process() doesn't run while achievements block execution at boot, so
exiting then left the auto-load queued. The next game ran it, loading the
previous game's state, and calling back into the deleted EmuScreen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:32:59 +02:00
Henrik RydgårdandClaude Opus 5.5 531a75f045 Add AccurateSplines compat flag, enable for Coded Arms
- Fixes #21391

Makes the hardware backends tessellate Bezier patches and splines with the
GE-exact evaluation the software renderer uses. Fixes the z-fighting glow
under the floor grates in Coded Arms.

AGENTS.md: Put "- Fixes #N" first in commit messages

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 14:04:38 +02:00
Henrik Rydgård 6b203f050d Merge pull request #22521 from hrydgard/savedata-zip-root
Install savedata zips that contain a single save folder's files in the root
2026-10-12 13:58:02 +02:00
Henrik Rydgård 8d8009840e Merge pull request #22511 from hrydgard/android-inputbox-fixes
Claude code review: Android inputbox fixes
2026-10-12 13:20:25 +02:00
Henrik Rydgård 04f5994ea6 Create .nomedia files in the NAND directory when installing firmware
Avoids Android looking for images.
2026-10-12 12:43:36 +02:00
Henrik RydgårdandClaude Opus 5.5 abeb890d0f Install savedata zips that contain a single save folder's files in the root
Some shared saves are zipped without their folder, with the zip named after it
instead (ULUS10019000.zip). Detect these by a root PARAM.SFO with a
SAVEDATA_DIRECTORY, which holds the folder name (game ID + save name), and
extract into that folder.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 12:27:24 +02:00
Henrik RydgårdandClaude Opus 5.5 ae68a7e73f Coded Arms: Contagion: Read back the stencil the crosshair checks
The crosshair turns red, and lock-on works, when stencil bit 3 is set at
the centre of the frame, which the game tests by reading the pixel from
VRAM with the CPU (#17936). Hook that and read back the stencil of that
row into the alpha bytes in RAM. The alpha the hardware backends keep
doesn't follow stencil everywhere, so reading color isn't enough.

Adds PerformReadbackStencilToMemory for this (8888 only for now).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 12:15:56 +02:00
Henrik Rydgård 42afcc9fd7 Merge pull request #22516 from hrydgard/savestate-stress
Savestate stress test - results and fixes
2026-10-12 11:22:32 +02:00
Henrik Rydgård fd778f6599 Merge pull request #22515 from hrydgard/ssx-video
SSX On Tour: Recognize the game's memcpy, so its videos show
2026-10-12 10:59:05 +02:00
Henrik RydgårdandClaude Opus 5.5 18816b111a Savestate: Put back hooked instructions some old states saved as hook ops
Some old states have replacement hook ops in memory. Since hooks moved out of
memory, those changed the functions' hashes on load, so they weren't hooked
again, and the CPU hit the op as an illegal instruction. Restore the
instructions this session hooked at the same addresses, as the old hooking did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 10:52:46 +02:00
Henrik RydgårdandClaude Opus 5.5 9bc239f081 OSK: Skip the old wstring in savestates as bytes
Its characters are as wide as the saving platform's wchar_t, so states saved on
Windows failed the length check on platforms with a 4-byte wchar_t.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 10:52:46 +02:00
Henrik RydgårdandClaude Opus 5.5 d5db77b736 Sas: End a voice with a bad VAG position on state load instead of failing
States from before 2018 saved idle voices uninitialized, so the position can be
garbage, which made the bounds check reject the whole state (Metal Gear Acid 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 10:52:46 +02:00
Henrik RydgårdandClaude Opus 5.5 8662d85d70 Headless: add --frame-stats, flips per emulated second after a state load
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 10:52:46 +02:00
Henrik Rydgård 53047f7cab Merge pull request #22510 from hrydgard/misc-improvements
Misc compat flag updates
2026-10-12 10:25:35 +02:00
Henrik RydgårdandClaude Opus 5.5 b83f2ba7c6 Debugger: Add hle.func.hash, to get a function's hash for ReplaceTables
Returns the analyzed function's start, size and code hash at an address,
and the name of the hardcodedHashes entry already matching it, if any.
Replaces patching a printf into HashFunctions() in the docs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 10:06:16 +02:00
Henrik RydgårdandClaude Opus 5.5 1f89313034 SSX On Tour: Recognize the game's memcpy, so its videos show
The game converts each video frame into RAM and copies it into the
framebuffer with its own memcpy, which we didn't recognize. The hardware
backends never saw the copy and kept showing the last frame the GE drew.
Same function in the EU (ULES00192) and Korean (ULKS46038) versions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 09:39:46 +02:00
Henrik Rydgård 0ee8b5adf8 Merge pull request #22509 from hrydgard/buzz-video
Upload video frames written partway into a framebuffer. Fixes Buzz Master Quiz videos
2026-10-11 23:21:39 +02:00
Henrik RydgårdandClaude Opus 5.5 75865683bb Upload video frames written partway into a framebuffer
Buzz! Master Quiz converts its question videos (sceMpegBaseCscAvcRange)
straight into the middle of the frame it has drawn, at 84,69. The
framebuffer upload only matched writes starting at a framebuffer's
address, so the hardware backends never showed the video. Pass the
written width along and draw just that rectangle into the framebuffer.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 22:50:57 +02:00
Henrik Rydgård 38528d4790 Remove obsolete JitInvalidationHack
See #22494
2026-10-11 22:06:06 +02:00
Henrik Rydgård 4e2d3ab8d0 Merge remote-tracking branch 'origin/master' into loadmodule-deferred 2026-10-11 20:00:41 +02:00
Henrik Rydgård 5a3393c0a4 Merge pull request #22508 from hrydgard/savedata-no-memstick
Savedata, sceIo: Behave like hardware with the memory stick removed
2026-10-11 19:59:21 +02:00
Henrik RydgårdandClaude Opus 5.5 2f21ca6837 Savedata, sceIo: Behave like hardware with the memory stick removed
With "Memory Stick inserted" off, the savedata modes that show no dialog now
fail with their own "no memory stick" error, as recorded on a PSP with the
stick pulled out (pspautotests utility/savedata/nomemstick). ms0: opens, stats
and directory opens fail with SCE_KERNEL_ERROR_NODEV.

SOCOM: Fireteam Bravo 2's boot-time AUTOLOAD loaded its save anyway, or said
there was no data rather than no memory stick.

test.py gets a test_flags table for tests that need their own headless flags;
this one runs with --no-memstick.

Fixes #21846

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:30:39 +02:00
Henrik RydgårdandClaude Opus 5.5 0583bdf335 CmdLine: Fix inverse booleans, add --no-memstick
An inverse boolean option was inverted twice, so --windowed forced fullscreen
on. --no-memstick runs with the memory stick removed, for testing that from
headless (which otherwise always inserts one).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:30:38 +02:00
Henrik RydgårdandClaude Opus 5.5 4fda53a62e sceKernelLoadModule: Put the module in memory when the wait ends
We copied the module into memory at the start of the call, then made the caller
wait for the read. On hardware the module's bytes only arrive at the end, and
until then other threads can use that memory (pspautotests modules/loadrace).

SOCOM: Fireteam Bravo 2 EU (UCES00543) relies on this. Its loader EBOOT loads
SOCOMPSP.PRX on one thread while another builds a GU display list in a 0x40-byte
buffer at the end of its .bss. That list overruns into the free memory right after
it, which is where the game module goes. On hardware the module load later
overwrites the overrun; for us, the overrun overwrote the module's first
instructions, and the game crashed as soon as it started.

The load now runs from a CoreTiming event at the end of the wait. Pending loads
are saved in savestates.

Fixes #18842

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:08:11 +02:00
Henrik Rydgård 0ce2330b97 Merge pull request #22505 from hrydgard/fix-savestate-zip-install
Fix installing save state zips with certain structures
2026-10-11 18:58:41 +02:00
Henrik RydgårdandClaude Opus 5.5 1b1e3aba1f Fix installing save state zips
Save state zips are detected with stripChars past the last slash, since
the whole directory is stripped. ExtractZipContents then computed a
negative directory length, created a directory named after each file,
failed to open it for writing and reported "Storage full".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 18:27:30 +02:00
Henrik Rydgård e46bd61e2e When taking a screenshot, clear all notifications except achievements. 2026-10-11 17:40:01 +02:00
Henrik RydgårdandClaude Opus 5.5 81efd601f0 iOS: Merge the Metal view controller into the base one
With the GL view controller gone, PPSSPPViewControllerMetal was the only
subclass of PPSSPPBaseViewController. They're now one class,
PPSSPPViewController, in ios/ViewController.mm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:13:29 +02:00
Henrik RydgårdandClaude Opus 5.5 ebab68ac0a iOS: Remove availability checks for versions below the 15.0 minimum
Also drops what they guarded: the pre-14 UIImagePickerController and
document picker fallbacks, the psychic paper entitlement workaround
(fixed in 13.5), and the CS_EXECSEG_ALLOW_UNSIGNED JIT probe, which
returned false on everything from 14.4 on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:13:29 +02:00
Henrik RydgårdandClaude Opus 5.5 5704b972e7 iOS: Remove OpenGL support from the app
The app now always uses the Metal view controller with Vulkan (MoltenVK),
for both the App Store and sideload builds. The GL view controller is gone,
and Common/GPU/OpenGL (except GLFeatures, used by the shader generators) and
GPU/GLES are no longer compiled for it. PPSSPP_API_ANY_GL is now off for
all of iOS except the libretro core, which still uses GLES.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:13:28 +02:00
Henrik RydgårdandClaude Opus 5.5 24ea7c4193 Everybody's Golf: Read back the screen under the loading spinner
The spinner copies the displayed framebuffer under it into the transparent
texels of its frames, which came out as stale VRAM around the disc. Hook it
after it gets the framebuffer and read back the rows it covers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 15:10:34 +02:00
Henrik RydgårdandClaude Opus 5.5 94d943664e Everybody's Golf: Hook the player portrait copy too
The first game builds its portrait like Golf 2 and Tennis, but its copy
function keeps y and h in different registers and loads the framebuffer pointer
at a different offset. Move the readbacks into a helper and add a hook for this
layout.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 15:06:24 +02:00
Henrik RydgårdandClaude Opus 5.5 6f56798c44 Everybody's Tennis: Hook the player portrait copy too
Tennis builds its portraits like Everybody's Golf 2: it memcpys a 64x64 rect of
the framebuffer and sets each texel's alpha bit from depth read straight from
VRAM, so the circles in the corners came out empty. Its copy function is
scheduled differently and hashes differently, so add it as a second entry for
the same hook, which is renamed to fit both.

Fixes #17826.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 15:00:40 +02:00
Henrik RydgårdandClaude Opus 5.5 fbcec91074 Debugger: Send whole pixels in gpu.buffer.* base64 responses
StreamBufferToBase64 sent width * height bytes, so any buffer with more than one
byte per pixel came back truncated: half a D16 depth buffer, a quarter of a
D32F or 8888 one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 14:50:19 +02:00
Henrik RydgårdandClaude Opus 5.5 9720041ecf Debugger: Add game.state.load
Queues loading a savestate file, for scripting repros that load a state partway
through a run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 14:50:19 +02:00
Henrik RydgårdandClaude Opus 5.5 648766dad4 Everybody's Golf 2: Read back color and depth for the player portraits
The game builds each 64x64 portrait by memcpying a rect of the framebuffer one
partial row at a time, then setting each texel's alpha bit from the depth
buffer, which it reads directly from VRAM. Neither got read back: the row
copies don't line up with a framebuffer, and depth is never downloaded.

Hook the copy function to read back both, whole rows at a time. That needed two
fixes to requested depth copies: they were dropped when the depth buffer lies
above all color buffers, and only an exact full-buffer size matched.

The portrait texture now matches the software renderer, though it still
doesn't show up on screen with Vulkan.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 13:25:10 +02:00