Commit Graph
20 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 455209b43e Net: Fix use-after-pop, the resolver after loads, inet sockaddr/poll
- The apctl, NpAuth and NpMatching2 event loops kept references to the
  front of their deque after popping it, so callbacks could get the
  next event's arguments. NpMatching2 also dereferenced its optional
  opt param when it was null.
- The resolver was left stopped after any savestate load or reboot,
  which broke Outrun 2006 (it relies on it starting out running).
- Getpeername/Getsockname with a namelen under 2 copied a negative size.
  They now write the PSP's 16-byte sockaddr truncated to namelen, with
  sa_len 16, as pspautotests net/inet/poll shows on hardware.
- Poll handed an fd that isn't open (-1) to FD_SET. It now reports
  POLLNVAL for it and counts it, as on hardware (net/inet/poll).
  Setsockopt read past a local u32 for larger options, and passed a
  negative optlen to the host. A zero cmsg_len looped forever.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 08:43:28 +01:00
Henrik RydgårdandClaude Opus 5.5 7dd1475ed7 HLE: Pass the MIPSState to syscalls and their implementations
HLEFunc and ReplaceFunc now take the MIPSState they run on. The dispatch
paths (both interpreters and every JIT backend) pass in the state they
belong to, and CallSyscall*, hleFinishSyscall and the HLE mips call
machinery use it instead of currentMIPS.

The wrappers in FunctionWrappers.h take the function as `auto` and call it
through HLECall, which also accepts an implementation with an extra leading
MIPSState * parameter and passes the state to it. Any other signature still
fails to compile, as before. PARAM/RETURN now refer to a local `mips`.

The HLE functions (and replacement functions) that used currentMIPS now take
the state that way. Callers outside a syscall's own frame - CoreTiming
events, the adhoc matching thread, dialogs, PPGe, the debugger UIs - pass
currentMIPS or &mipsr4k explicitly. The kernel's thread internals still use
currentMIPS.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 15:45:14 +02:00
Henrik Rydgård c5e4d0d90d Rename the get-memory-pointer functions to make it clear where CPU exceptions can happen. 2026-08-12 14:06:16 +02:00
Henrik Rydgård 3bd41376da More memory cleanup 2026-08-11 20:12:10 +02:00
Henrik Rydgård 05b82d6ce4 Allow passing in a custom resolver to HTTPRequest and Connection. This inverts the bad dependency. 2025-08-06 00:16:34 +02:00
Henrik Rydgård 4e25f44eef Rename some module-related functions to include HLE where appropriate 2025-03-31 11:17:50 +02:00
Nemoumbra ef11d80b84 UPnP logs, wrong NpMatching2 syscall name, more names 2025-01-10 23:34:11 +03:00
Henrik Rydgård b13987e233 Move some code out from sceNet into sceNp and sceNp2 2025-01-09 09:06:23 +01:00
Henrik Rydgård 3e98f16e6b static-ify a bunch of functions 2025-01-05 23:43:44 +01:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Herman Semenov c20cb3f4be Minor optimize methods std::string using param as char with simpler implementation 2024-04-10 17:57:05 +03:00
Henrik Rydgård eb14c87a71 Allow configuring the game language separately from the PPSSPP UI language, with a new setting. 2023-07-23 11:30:04 +02:00
Henrik Rydgård ecea3844b0 Improved progress bar popups for downloads
Now shows the filename, and also there's a delay mode where they'll only
be visible if the download takes more than a second, plus they can be
named.
2023-07-18 15:13:44 +02:00
Unknown W. Brackets 8f96405ee5 Net: Remove usage of Memory::WriteStruct().
This also validates pointer write size better.
2022-09-03 10:44:11 -07:00
Henrik Rydgård 5f230ee998 Fix some compiler warnings 2022-08-06 18:19:27 +02:00
ANR2ME 0b3fdf0cef Use safe_string when printing %s with Memory::GetCharPointer. 2022-08-06 11:22:38 +07:00
ANR2ME 48deb37cc8 Fix logging warning issue. 2022-08-06 03:11:59 +07:00
ANR2ME 4c9e1dec1a Fix include issue. 2022-08-04 16:35:30 +07:00
ANR2ME 31ea7a6a95 Updated copyright's year. 2022-08-04 16:34:05 +07:00
ANR2ME 41de63f13c Moving sceNpMatching2-stuff to sceNp2.cpp/h.
PS: Register_sceNpMatching2 not being added to HLETables because currently the callback didn't work properly yet and could crash the game.
2022-08-04 16:12:29 +07:00