2394 Commits
Author SHA1 Message Date
Henrik Rydgård a0873e5b0e Enable HTTPS on Linux, through naett's libcurl backend
naett has had a complete libcurl backend all along; we just never built it,
so Linux ran with HTTPS_NOT_AVAILABLE. That means no homebrew store over
HTTPS, and RetroAchievements talking to plain http://retroachievements.org.

libcurl is loaded with dlopen rather than linked, the same way we handle the
Vulkan loader, so it stays a soft dependency: we need the curl headers at
build time, but a build made here still starts on a machine without libcurl
installed - it just reports HTTPS as unavailable, exactly like today. Distro
packagers get the behavior they'd expect either way, and certificate
validation comes free from the system CA store.

New net::HTTPSAvailable() answers "did that work", and SDLMain folds it into
SYSPROP_SUPPORTS_HTTPS, which everything downstream already degrades on.

Four fixes to the backend itself, all noted in ext/naett/README-ppsspp.md:

- panic() called exit(1) on a pipe or curl_multi_perform failure. Taking the
  emulator down because a download failed isn't acceptable - the backend now
  disables itself and requests complete with naettGenericError.
- CURLINFO_RESPONSE_CODE writes a long into res->code, which is an int. Eight
  bytes into four, getting away with it only because the next field absorbs
  the zeroes.
- curl_easy_setopt is varargs and wants a long for these options; int literals
  and int variables are UB on LP64.
- naettPlatformCloseResponse called through a null function pointer when
  libcurl was missing. Found by testing that path, which segfaulted.

CI needs libcurl4-openssl-dev (curl-dev on Alpine) or it would quietly keep
building without HTTPS.
2026-09-02 17:42:04 +02:00
Henrik Rydgård 2096df52f5 Vendor naett in-tree, de-amalgamated
naett has been a submodule pinned at v0.3.3; upstream has had no commits since
April 2024, and we want to carry local changes (next up: a libcurl-backed HTTPS
path for Linux). It's ~1500 lines of MIT C, smaller than several things we
already vendor, so bring it in-tree and drop the submodule.

Also drop the generated single-file amalgam (naett.c) that every build system
was compiling, and build src/*.c directly instead - otherwise the file you edit
isn't the file that gets compiled, which is a trap for anyone patching this.
example/ and testrig/ (a whole Android Studio project) are gone with it.

Two changes were needed to make the sources build on their own, both noted in
ext/naett/README-ppsspp.md along with the upstream commit:

- naett_internal.h now includes naett.h, which the amalgam pulled in first.
- naett_linux.c now includes stdio.h/stdlib.h. It calls exit/calloc/realloc/
  free/fprintf without ever including either, and only got away with it because
  naett_core.c sat above it in the concatenation.

No functional change - Linux still has HTTPS_NOT_AVAILABLE set, so it doesn't
build naett at all yet.

Rename naett to naett-lib
2026-09-02 17:35:14 +02:00
Henrik Rydgård 5cffcd34ad Get rid of the confusing old USING_WIN_UI define. Make a more clear system property for headless. 2026-08-16 12:19:41 +02:00
Henrik Rydgård 2d0e54f422 Headless (and main): Improve crash reporting 2026-08-11 22:36:47 +02:00
Henrik Rydgård 22ac7ad119 MemFault: move RISC-V and LoongArch fault analysis out of HandleFault
The RISC-V branch had its instruction-decode logic (including a locally
defined info struct) written directly inline in HandleFault(), unlike
the other three architectures which each delegate to a dedicated
AnalyzeLoadStore function in their disassembler file. Move it into
ext/riscv-disas.h/.cpp as RiscVAnalyzeLoadStore, matching the existing
X86AnalyzeMOV/Arm64AnalyzeLoadStore/ArmAnalyzeLoadStore pattern.
2026-08-11 22:36:47 +02:00
Henrik Rydgård ebc151f8f2 Warning fixes 2026-08-11 22:36:47 +02:00
Thomas Lamb bf67ed300d Fix assembly/disassembly for various VFPU opcodes
Update armips for VFPU instruction parsing changes (Kingcom/armips#257)
- fix transposed matrix register encodings (e.g. `vmidt.p E220` was assembling to `vmidt.p E202`)
- fix immediate size for `vwbn.s` (is 8 bits, was limited to 5 bits)
- fix `vd` register size for `vsocp.s/p`
- fix `vhtfm2.p` and `vhtfm3.t` encoding
- add missing instruction `vhtfm4.q`

Fix `v(h)tfmX` disassembly (handle irregular vector size encoding)

Fix `vsocp.s/p` disassembly (`vd` is double the size of `vs`)
2026-08-11 10:10:56 -04:00
Henrik Rydgård 8d2c1e7a66 Make the ImDebugger a bit less crash prone outside of games 2026-08-07 22:40:05 +02:00
Henrik Rydgård 25a146a11c Make the PPSSPP UI fit inside the imgui desktop 2026-08-07 17:56:09 +02:00
Henrik Rydgård 9c8a4035ef Buildfix, restore lost check 2026-08-07 11:27:45 +02:00
Henrik Rydgård da567f6a89 Discord cleanup 2026-08-07 08:49:29 +02:00
Katharine Chui c46c47522a bump aemu_postoffice
- check for remote disconnect during adhoc 'can send?' poll
- cleanup some compile time warnings
2026-07-26 14:43:00 +02:00
Henrik RydgårdandClaude Sonnet 5 e8f85f7804 Fix missing zstd include/link deps in Common and basis_universal
Common and basis_universal call zstd functions directly but never
declared the dependency after being split into their own
CMakeLists.txt files, relying on directory-scope include_directories()
that no longer reached them. Worked on Linux via system zstd.h, but
broke the Android NDK build which has no such fallback.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XMv4XdM5dThs9Avr5FPXRv
2026-07-24 20:49:29 +02:00
Henrik RydgårdandClaude Sonnet 5 bb6164e799 Move ten inline vendor libraries out of root CMakeLists.txt into ext/
gason, vma, cityhash, 7zip (ext/lzma-sdk), basis_universal, pugixml,
kirk (ext/libkirk), sfmt19937, xbrz, and xxhash were each defined with
a small add_library() block directly in the root CMakeLists.txt, even
though ext/CMakeLists.txt already exists and handles every other vendor
library (freetype, imgui, naett, discord-rpc, libchdr, zstd, miniupnp,
armips, glew, snappy, ...) via add_subdirectory(). Gave each one its
own ext/<name>/CMakeLists.txt to match that established pattern; xxhash
stays a loose file pair in ext/ (it never had its own directory) so its
add_library() lives directly in ext/CMakeLists.txt instead.

ext/libkirk/CMakeLists.txt already existed but was dead - nothing
add_subdirectory()'d it, and its source list was stale (missing
amctrl.c/.h, which the live inline definition in root had). Replaced
its contents with the current, correct list instead of leaving two
diverging definitions around.

Dropped several target_include_directories()/include_directories()
calls that came along with these (e.g. cityhash, kirk, xbrz, xxhash,
and the lzma-sdk one for 7zip): traced their actual consumers and found
each library's own sources resolve their sibling headers via the
default same-directory quote-include rule, and every external consumer
already uses the full "ext/<name>/..." path resolved through the global
root include - so these were dead weight regardless of position.

Replaced two single-value alias variables (LIB7ZIP_LIBRARY, always
"7zip"; BASISU_LIBRARIES, always "basis_universal") with their target
names directly in Common/CMakeLists.txt, rather than trying to carry
them across the new add_subdirectory boundary - plain set() variables
don't propagate back up out of a child scope without PARENT_SCOPE, so
keeping them as-was would have silently broken Common's link line.

Verified with a fully clean rebuild (removed build/ entirely), a
HEADLESS=ON UNITTEST=ON build, and a LIBRETRO=ON build.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSNaZnHCjmryS3ziVN9gZU
2026-07-24 20:16:07 +02:00
Katharine Chui 01849c251e use new aemu_postoffice apis during polling 2026-07-19 11:30:27 +02:00
Katharine Chui ff83e8c896 bump aemu_postoffice
- Make GetPdpStat behave more like in P2P mode
  - Now fetches accumulated ready to be received amount of data
    instead of only the immediate to be received Pdp block
- Make GetPtpStat behave more like in P2P mode
  - Now fetches accumulated ready to be received amount of data
    instead of the size of the next server send block
- Make PtpRecv behave more like in P2P mode
  - Fix block like behavior where whole server send block has
    to be consumed before getting data from the next send block
  - Fix block like bahavior where sender sends in small PtpSend
    calls while receiver receive with less frequent but bigger
    buffer PtpRecv causes bloat(and eventually server kick)
    on relay
2026-07-19 11:30:27 +02:00
Thomas Lamb d1656d425a Improve debugger assemble/disassemble compatiblity
Update armips for VFPU instruction parsing changes:
- Kingcom/armips#255
- Kingcom/armips#256

Remove brackets from VFPU instruction `vpfx*` params

Rename VFPU instruction `vuc2i.s` to `vuc2ifs.s`

Add brackets to VFPU instruction `vpfxd` saturation operations (i.e. [0:1] & [-1:1])

Rename FPU instructions `c.$OP` to `c.$OP.s`

Fix VFPU instruction `vuc2ifs.s` `vd` size in disassembly

Replace `CC[imm3]` with `imm3` in VFPU instructions `vcmov*` & `bv*` disassembly
2026-07-07 20:30:51 -04:00
Henrik Rydgård a6325cecef Bump rcheevos to latest develop 2026-07-01 22:39:53 +02:00
Henrik Rydgård 8b0ddf88fe Qt buildfix, gitignore in ext 2026-06-16 11:49:40 +02:00
Henrik Rydgård 1e62cb7fc1 Finish the SDL3 port on Mac, update CI to 26.04 2026-06-16 11:39:57 +02:00
Henrik Rydgård ea8a648737 Refactor UI shader presets, prepare for some updates to the ImGe debugger 2026-06-14 11:08:56 +02:00
Henrik Rydgård 054a10d46b Fix imgui being upside down on some backends.
Fixes #21761
2026-06-01 10:53:41 +02:00
Kevin Reinholz bc2648edb1 Add experimental cmake port of ppsspp-ffmpeg as a standard module built from source 2026-05-29 19:06:04 -07:00
Henrik Rydgård 6f0a16a4a4 Fix Y flip 2026-05-18 14:14:25 +02:00
Henrik Rydgård 074beaa0f8 Bump rcheevos again 2026-05-13 18:41:21 +02:00
Henrik Rydgård 09d58584ed Bump rcheevos to latest 2026-05-01 12:12:48 +02:00
Henrik Rydgård fd7c5cdd6b Add pugixml dependency 2026-04-16 12:12:12 -06:00
Katharine Chui 8b95d96516 bump aemu_postoffice
- Take steps to avoid SIGPIPE being generated on unix platforms
2026-04-16 14:17:21 +02:00
Kevin Reinholz 4a5dd4caa6 Fix build with system rapidjson. Attempt to break out the lib7zip support--this fixes build on amd64 FreeBSD 2026-04-09 16:44:45 -07:00
Henrik Rydgård 5c082f8a2a Merge pull request #21499 from lrzlin/loong-handler
loongarch: Implement excepetion handler and JIT bug fix
2026-03-30 11:12:15 -06:00
Lin Runze 53338cf029 loongarch: Implement excepetion handler and JIT bug fix 2026-03-30 18:35:54 +08:00
Henrik Rydgård 116c31e7d9 Add the LZMA sdk 2026-03-27 14:34:15 -06:00
Kevin Reinholz d404040b21 Merge branch 'master' into master 2026-03-13 19:00:00 -07:00
Henrik Rydgård ce393a180b Update aemu_postoffice with the latest fixes. 2026-03-12 17:43:26 +01:00
Henrik Rydgård dcd4851171 CMakeLists.txt: Try to make sure freetype doesn't try to build in its source dir. May fix the next release on flathub. 2026-03-11 11:05:33 +01:00
Kevin Reinholz f020bcdd75 Create option to build with system freetype, libchdr, and rapidjson instead of bundled modules. Add a couple of FreeBSD-specific tweaks to CMakeLists.txt while at it 2026-03-10 18:03:06 -07:00
Katharine Chui 20424bc5bc Handle adhoc relay conection a bit better
- bump aemu_postoffice
  - timeout TCP connection attempts at 5s to not block the library user too much
  - set send and receive buffer sizes after connection to avoid some blocking cases on some platforms with small defaults (windows?)
- pop OSD message when relay connection fails
2026-03-05 19:09:51 +01:00
Henrik Rydgård c74e21243d Add support for installing plugins directly from zip files 2026-02-25 14:28:57 +01:00
Henrik Rydgård a3878c2148 Update libchdr to latest 2026-02-24 00:56:45 +01:00
Henrik Rydgård 5a5c7028b9 Assorted warning fixes and data initialization to please valgrind 2026-02-19 11:24:46 +01:00
Henrik Rydgård 72640514b5 Update rcheevos to v12.3.0 2026-02-18 09:56:46 +01:00
Katharine Chui e0f757c79d bump aemu_postoffice
Improve nonblock relay recv operation responsiveness, it helped a
few games on PSP get back to full speed during multiplayer, might
help severely underpowered devices on PPSSPP as well.
2026-02-16 15:15:21 +01:00
Henrik Rydgård 330a638281 Add ability to copy function hash from the disassembly view
See #4179
2026-02-09 19:26:43 +01:00
Henrik Rydgård a92ff89d5f Clean up the OSD click callback code 2026-02-09 13:08:44 +01:00
Katharine Chui 5eb672d674 bump aemu_postoffice
fix a bug in library re-init spotted by hrydgard

https://discord.com/channels/293316141479362560/478294170662862852/1469845794294333451
2026-02-08 03:50:32 +01:00
Katharine Chui f3e11110ed bump aemu_postoffice
extend max pdp block size, due to user report of the following in
dissidia:

07:53:752 MatchingEven I[SCENET]: HLE\sceNetAdhocMatching.cpp:1188 EventLoop[1]: Matching Event [1=HELLO][00:02:02:02:02:02] OptSize=4696
2026-02-06 11:43:32 +01:00
Henrik Rydgård 7b1ba55e72 Prevent touch controls from fading away while being held.
Fixes #20531
2026-02-04 00:00:38 +01:00
Henrik Rydgård d6ebfed432 Fix some bugs and warnings from a pass of static analysis 2026-01-29 17:41:54 +01:00
Henrik Rydgård 24f2deeb2e Improve file identification.
Fixes #21154
2026-01-28 10:21:09 +01:00
Katharine Chui e5b9c17c1b aemu_postoffice: do not aggressively write recv buffers
some games lie about buffer sizes, and will crash if the whole
buffer was blindly written
2026-01-26 19:00:42 +01:00