331 Commits
Author SHA1 Message Date
jpolo1224 069f8a44f3 Android 2.6.5.1: Local Link LAN play, async GS readback, pause/rotation/settings fixes
Crash and correctness
- Fix a crash when backgrounding the app mid-game: onPause flushed the Vulkan
  pipeline cache from the UI thread while the GS thread was creating pipelines
  into the same VkPipelineCache. Vulkan requires that handle to be externally
  synchronised, so this was a driver-level data race and crashed on Adreno and
  Xclipse alike. The flush now runs on the GS thread, posted via the CPU thread
  so it does not race the EE-owned MTGS ring.
- Fix an unbounded out-of-bounds vertex read in the GSRendererHW sprite-merge
  paving path: the inner loop advanced i instead of j, so j stayed loop-invariant
  and the scan walked past m_vertex->tail.
- Fix per-game settings being silently ignored: gamesettings/<serial>_<CRC>.ini
  loads into a higher-priority layer than anything the app writes, and saves made
  from the library never regenerated it, so any key already in that file
  overrode the user permanently. Only the category-Reset path rewrote it, which
  is why Reset appeared to be the only thing that worked.
- Fix screen rotation: the BIOS followed the launcher rotation instead of the
  renderer's (it has no GameInfo, and the tier was keyed on that), and the
  launcher stayed locked in a game's orientation after exit because the cleanup
  lived only inside stop()'s vmRunLoopActive-guarded branch, which loses a race
  against the VM thread's own finally. Rotation tier is now an explicit flag and
  the cleanup runs on every terminal path.
- Discard the Vulkan pipeline blob whenever the SPIR-V cache is discarded. It was
  validated only against the device header (vendor/device/pipelineCacheUUID),
  which is identical across an app update, so a SHADER_CACHE_VERSION bump kept
  every pipeline built from the old shaders and nothing pruned it.
- Make eeRecExitRequested atomic: it was a plain bool written from the JNI thread
  and read on the CPU thread.
- OpenGL: restore GL_PACK_ALIGNMENT after readback, add the missing memory
  barrier after the CAS dispatch, and initialise GLState::depth_mask to GL's
  actual default.
- DEV9: log the GetNetAdapter default: bail and the InitNet skip. Both returned
  silently, so a settings mistake surfaced as missing hardware three layers away.

Local Link (new)
- New DEV9 backend bridging emulated PS2 Ethernet between devices over
  authenticated local UDP, so games with a built-in LAN / System Link mode can
  play together. Ported from EmuCoreX (sashkinbro) with the wire format
  unchanged, so peers remain compatible across both forks.
- Network mode picker (Online / Host / Join), host address readout, auto-derived
  peer ids, generated room codes, hostname support alongside numeric IPv4, and a
  link to the supported-games list. Fully controller-navigable.

Performance
- Asynchronous hardware download mode (experimental, opt-in): non-blocking
  GPU->CPU readback so the EE thread no longer waits on the GS thread. Ported
  from EmuCoreX. Appending Asynchronous to GSHardwareDownloadMode makes the enum
  non-ordered, so the relational comparisons on it are replaced with
  IsHardwareDownloadReadbackEnabled / IsHardwareDownloadEEThreadRead.
- Affinity Control Mode (experimental, opt-in): EE/VU/GS priority orders plus a
  Performance Cores mode. Android otherwise leaves these threads unpinned.
- Raise the texture-replacement cache ceiling from 6 to 16 GB; RAM/2 remains the
  real limiter, so this only binds at 12 GB RAM and up.
- Low Latency frame pacing is no longer the default, with a one-time migration
  for installs that took the earlier flip.

Features
- Auto renderer resolves to Vulkan HW on Adreno.
- Auto Progressive Scan (per-game): holds Triangle+Cross through boot.
- OLED black as a modifier over any accent colour, including Custom and RGB.
- Optional system keyboard instead of the built-in on-screen one.

Game compatibility
- Everybody's Golf 4 / Hot Shots Golf Fore! hwDownloadMode across all regions
  (PR #421, XDarkFallenX).
- Delta Force: Black Hawk Down (PR #401, XDarkFallenX).
- Reduced input latency and input handling improvements (PR #403, Splaser).

RetroAchievements
- Inject the client version from a build-time secret kept out of public source,
  with a stock-PCSX2 fallback for secret-less builds, so third parties cannot
  copy the client identity. Covers the iOS token too.
2026-07-25 00:48:56 -04:00
jpolo1224 4d67c416ad DEV9: keep Android DNS empty so fast-forward networking works
Android's Auto DNS returned an empty list before 2.6.4; 2.6.4 started falling
back to public resolvers (1.1.1.1 / 8.8.8.8), which the console reaches over a
real UDP round-trip through the sockets forward path. Fast-forward outruns that
round-trip's wall-clock timing and DNS fails (#379). Restore the pre-2.6.4
behaviour by leaving Android out of the public-resolver fallback; iOS is
unchanged, and the separate GetAdapterAuto gateway-probe skip stays.
2026-07-20 23:24:59 -04:00
jpolo1224 e43707d64c DEV9: use the Android sockets path for adapter selection and DNS
The mobile fallbacks were gated on TARGET_OS_IPHONE only. On Android
GetAdapterAuto still required a host default gateway, which the app
sandbox cannot read out of /proc/net/route, so auto-selection failed and
InitNet force-disabled Ethernet for the session - reported as
"connection device not found" with the interface plainly visible in the
picker. GetDNS likewise returned an empty list because there is no
/etc/resolv.conf.

Extend both gates to __ANDROID__: select on a usable IPv4 interface and
fall back to public resolvers. iOS and desktop behaviour is unchanged.
2026-07-20 14:05:32 -04:00
Brian DegenhardtandClaude Opus 4.8 5cbcadaa1e Fix desktop/Android build breaks from the ios/pr-ready merge
The ios/pr-ready merge (04ea993e99) introduced two independent
regressions in the shared core:

1. DEV9/AdapterUtils.cpp included Apple-only <TargetConditionals.h>
   unconditionally under __POSIX__, so every non-Apple POSIX target
   (Linux, Android, FreeBSD) failed to compile. Guard the include with
   __APPLE__; TARGET_OS_IPHONE is only consulted to keep iOS out of the
   BSD-socket block, and on non-Apple it correctly evaluates to 0.

2. SPU2::RegisterNEONBackend() is called from spu2.cpp on every arm64
   target (guarded by __aarch64__ / _M_ARM64), but spu2_neon.cpp was
   only added to the build for Android/iOS -- so desktop arm64
   (macOS/Linux/Windows) failed to link with an undefined symbol.
   Compile spu2_neon.cpp on all ARCH_ARM64 targets. The NEON reverb
   backend stays opt-in (SPU2/NeonReverbSIMD, default off).

   While wiring it up for desktop:
   - Drop the unused spu2_neon_mixer/_reverb_ex/_dcfilter includes from
     spu2_neon.cpp. They hold helpers for a mixer.cpp/ReaVerb.cpp
     integration that hasn't happened, and use the MSVC-only
     __forceinline keyword unguarded (breaks clang). The TU only needs
     the reverb FIR plus the SVE2 hook.
   - Guard spu2_optimize.h's x86-only <xmmintrin.h>/_mm_prefetch off
     MSVC-on-ARM64 (falls back to the no-op prefetch).

Verified locally: clean Release build + link on Linux arm64
(RegisterNEONBackend now defined in the binary).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 16:32:50 -07:00
Jeen 14fc29c0cd iOS: gate macOS-only APIs behind TARGET_OS_IPHONE and add frontend link stubs
Gate all macOS-only system APIs behind TARGET_OS_IPHONE checks across the shared core: ApplicationServices, IOKit, mouse APIs, AppKit, MetalFX, CDVD Darwin sources, USB, discord-rpc, cubeb CoreAudio HAL, and BSD networking headers in DEV9. Port TARGET_OS_IPHONE guards for DEV9 AdapterUtils with iOS fallbacks for sockaddr_dl, rt_msghdr, and sysctl. Add ARMSX2_ROOT to the include path for the frontend's common include style. Drop the global _M_ARM64 define that triggered fast_float MSVC intrin.h inclusion since __aarch64__ covers the core paths. Gate MTLFeatureSet_macOS_GPUFamily1_v1 behind !TARGET_OS_IPHONE. Fix missing unistd.h and gate pthread_jit_write_protect_np which is unavailable on iOS. Add stubs for DarwinMisc JIT diagnostics, Achievements stats and info APIs, Discord_Register, Host capture callbacks, and the host hotkeys map so the frontend links cleanly. Merge upstream master.
2026-07-12 16:38:59 +02:00
Oleg Tolmatcev 16b6572826 Misc: another COM code cleanup 2026-07-03 16:08:58 -04:00
Sean Brar b006366ea3 DEV9: Warn about Linux PCAP capabilities 2026-05-16 19:32:13 -04:00
Sean Brar bb35bed104 DEV9: Isolate raw PCAP packet IO 2026-05-13 12:17:27 -04:00
oltolm 647b2b1cbd dev9: remove unnecessary cast 2026-02-19 14:17:30 +01:00
SternXD d983b2b066 Copyright: Change year from 2002-2025 to 2002-2026 2026-01-15 00:22:32 +01:00
TheLastRar 34f2328a79 DEV9: Add missing RedtapeWindows include 2025-11-29 22:54:16 +01:00
TheLastRar 2569193b05 DEV9: Make socket auto adapter name translatable 2025-11-29 22:54:16 +01:00
Ty 89de00ac36 DEV9: Implicit size_t to int conversion warning fix 2025-11-24 18:07:25 -05:00
Ty 615cd00147 DEV9 / ATA: Fix u64 to u32 implicit casting warning 2025-11-21 18:20:58 -05:00
TheLastRar 4a94cb6cbd DEV9: Remove using namespace in TAPAdapter header 2025-11-05 16:44:10 -05:00
TheLastRar 07be6bb5ae DEV9: Ignore UDP socket ICMP errors on recv
These where already ignored on send
2025-04-18 02:39:06 +02:00
TheLastRar 39b4905ef1 DEV9: Fix race condition when handling closed socket connections 2025-04-18 02:39:06 +02:00
TheLastRar 6c49a5aa9d DEV9: Fix race condition in UDP sockets 2025-04-18 02:39:06 +02:00
TheLastRar aaeff2ea0f DEV9: Deduplicate some UDP sockets code 2025-04-18 02:39:06 +02:00
TheTechnician27 23fd57f641 Copyright: Change year from 2002-2024 to 2002-2025 2025-01-20 05:07:26 +01:00
TheLastRar de9d08075e Misc: Don't use deprecated fmt/core.h header 2025-01-17 04:35:29 +01:00
TheLastRar 5de1c60d50 DEV9: Apply const within in PacketReader 2024-12-07 09:22:26 +01:00
TheLastRar a8a170ebe6 DEV9: Apply const to basic payload types
Propagate const into PacketReader classes as needed
Provide non-const editor version for pcap
2024-12-07 09:22:26 +01:00
TheLastRar f91f39afcd DEV9: Fix race-condition while handling closed connection 2024-12-05 11:32:24 -05:00
TheLastRar f317ba327c DEV9: Correct alignment calculation in Sockets 2024-12-05 11:32:24 -05:00