Commit Graph
844 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5 05f5668dfe Save symbols outside any module to a per-game file, and only save real names
Module symbols are keyed by module+crc so they're shared by every game that
loads that module. But symbols the user attaches to addresses that aren't in
any module - the heap, the stack, scratchpad, a hardware register, typically
after a memory.search - describe one game's own memory layout and are worthless
to any other game. Those now go to PSP/SYSTEM/SYMBOLS/<gameID>_syms.ppsym.

They're module index 0 ("absolute"), which already round-trips through the
existing per-module code: GetModuleRelativeAddr/GetModuleAbsoluteAddr are
identity for it, so the file format is unchanged, just with absolute addresses.
SaveModuleSymbols only needed to stop requiring a ModuleEntry. Auto-load/save
hang off CPU_Init/CPU_Shutdown rather than module load/unload, gated on the same
bAutoSaveLoadSymbols setting - and deliberately not on SYSPROP_HAS_DEBUGGER,
which only the Windows port reports true for, so LoadSymbolsIfSupported next to
it does nothing at all on headless. hle.game.saveSymbols/loadSymbols expose it.

Four things found while doing it:

- Symbols outside any module were being dropped on the floor. AddFunction/
  AddData/AddLabel take moduleIndex -1 as "work it out", pass it to
  GetModuleIndex(), and store whatever comes back - but that returns -1 when no
  module contains the address, and -1 is never an active module, so the symbol
  never reached the active maps: invisible to every lookup and to any save.
  hle.data.add had spotted this and normalized -1 to 0 locally; nothing else
  did, so e.g. hle.func.add outside a module silently did nothing. Fixed
  centrally in a new ResolveModuleIndex() the three of them share.
  (This only became reachable with the GetModuleIndex() fix in 29a38af37e -
  before that it returned a wrong-but-valid module index instead.)

- The saved files were almost entirely noise. Every function the analyzer finds
  is named z_un_<addr> and every import stub zz_<name>, both regenerated from
  scratch on each load. One real module wrote 13KB - 443 unnamed functions and
  64 stub names - for the four names a human had actually chosen. Worse, on the
  next run those were loaded back as authoritative and would beat the module's
  own symbols to the address. Now only names that aren't regenerated get saved,
  and a module with none writes no file at all (and removes a stale one, so
  deleting a symbol sticks). That module's file went 13020 -> 81 bytes.

- LoadModuleSymbols trusted the addresses in the file. It's meant to be
  hand-edited and can outlive the build it came from, so relative addresses past
  the end of the module are now skipped with a warning instead of landing at
  nonsense addresses.

- AddFunction and AddData both erased the map entry they were updating and then
  read back through the now-dangling iterator to refresh the active copy. Only
  latent: the refresh is guarded on the active copy's module matching the new
  one, which is false exactly when the erase happens. Re-point the iterator at
  the entry's new home instead, so it can't rot if that guard ever changes.
  AddLabel already did the equivalent correctly, via a local copy.

Filename sanitizing goes through SanitizeString with a new FileName restriction
rather than being open-coded; unlike the existing restrictions it substitutes
'_' instead of dropping, so two module names can't collapse onto one file.

Verified end to end on headless with cpu_alu.prx: named a function inside the
module and data/functions in scratchpad and the heap, let it exit, checked both
files, rebooted and confirmed all of it came back at the right addresses.
Unit tests 51/51, pspautotests 314/314.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
2026-08-17 16:53:48 +02:00
Henrik RydgårdandClaude Sonnet 5 29a38af37e Per-module symbol save/load, module identity via crc, GetModuleIndex fix
SymbolMap:
- Fix GetModuleIndex(): it only checked the end of an active module's range
  (via activeModuleEnds.upper_bound), never the start, so an address sitting
  in the gap before a module was silently misattributed to it. Added
  GetModuleIndexByName() as a companion lookup.
- AddModule() gains an optional crc param, stored per ModuleEntry. Reactivating
  a module by name now also requires the crc to agree when both sides know it,
  so two unrelated binaries that happen to share a name no longer get merged
  into one symbol table (addresses the old TODO at the top of SymbolMap.h).
- AddLabel()/AddFunction() gain an updateName param (default false, preserving
  existing "first writer wins" behavior) so a trusted source - like a loaded
  symbol file - can be allowed to overwrite a name that a lower-confidence
  automatic pass already assigned.
- New SaveModuleSymbols()/LoadModuleSymbols()/GetModuleSymbolsPath(): save or
  restore one module's functions/data/labels to/from a small human-editable
  text file, addressed relative to the module (so the file stays valid however
  the module ends up positioned on a later run). Keyed by
  PSP/SYSTEM/SYMBOLS/<moduleName>_<crc>.ppsym - deliberately by module+crc
  rather than by game, so it's shared by every game/homebrew that loads the
  exact same module. A "# game <id> <title>" comment records who last saved
  it, informational only.

WebSocket debugger: hle.module.saveSymbols/loadSymbols expose the above.

sceKernelModule.cpp: auto-load a module's saved symbols right after it's
registered with the symbol map (both the real ELF-load path and the
savestate-load path), and auto-save on unload (before UnloadModule(), while
its symbols are still active) - gated behind the new bAutoSaveLoadSymbols
config setting (default off), with a matching Developer Tools checkbox and
a --auto-save-load-symbols command-line override for headless use.

Includes some in-progress cleanup already staged: DescribeAddress now calls
g_symbolMap->GetDescription() directly instead of through the now-removed
MIPSDebugInterface::getDescription() wrapper.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
2026-08-17 16:01:23 +02:00
nmkd 8e9a8b8d76 Allow disabling dithering when using software rendering 2026-08-16 15:27:41 +02:00
Henrik Rydgård db30fabf03 Add a setting (defaulting to false) for enabling file handler plugins 2026-08-03 11:24:36 +02:00
Henrik Rydgård 34454f9d03 Claude's crazy exception handler hack 2026-07-27 23:41:13 +02:00
Henrik Rydgård 3139d7ccfe Add command line parameters for controlling the behavior on memory/instruction exceptions 2026-07-27 18:37:26 +02:00
Henrik Rydgård 993c3a9c67 Avoid accurately computing disk space on iOS and Android (where it can be slow). Add a setting. 2026-07-14 22:22:29 +02:00
Henrik Rydgård 61e1ef8f7a Remove the "Software skinning" option. Now always on. 2026-07-14 17:02:57 +02:00
Henrik Rydgård 5f7281bd8e Remove old vestiges of geometry shader support 2026-07-08 18:25:08 +02:00
Henrik Rydgård 623545bd24 Delete the "Hardware tessellation" feature.
Very hard to maintain and debug, not worth it.
2026-06-16 16:17:14 +02:00
Henrik Rydgård 5265422c0e Remove the old "Fragment ubershader" setting. It's been on by default for years and is not really an ubershader. 2026-06-10 09:54:52 +02:00
Henrik Rydgård 36bdde68f9 Delete the "Lazy texture cache" option 2026-06-09 23:49:54 +02:00
jasaaved 95006cf1d3 Changed bFullScreenExclusive to bAllowFullScreenExclusive
There's no guarantee VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT will enter Fullscreen exclusive (FSE). Under the right conditions, the driver and/or DWM can grant FSE. Adding "allow" to the FSE setting should make this a bit clearer.
2026-06-04 12:54:52 -07:00
jasaaved 0c23cdaf3d Windows Vulkan: default to borderless fullscreen, add exclusive option
Vulkan swapchain now explicitly sets VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT by default, enabling proper borderless fullscreen behavior with benefits including better Alt+Tab, VRR/G-Sync/FreeSync, and Auto HDR support.
2026-06-03 17:15:13 -07:00
Henrik Rydgård 2d7ebe0835 Merge pull request #21688 from RRDVD/cross-shaped-anti-deadzone
Add Steam Input-style advanced deadzone controls to analog calibration
2026-06-03 10:40:47 +02:00
Henrik Rydgård 33ae88af6d Delete option "Disable range culling". No games are known to require it anymore. 2026-05-31 23:31:06 +02:00
Eloren1 23aef44ae1 UI: Add load state confirmation option 2026-05-31 19:32:41 +03:00
Henrik Rydgård 8b84fd555d Apply triangle near-clipping in software transform.
Fixes, but only in SW transform, #10914

Re-enable range culling, oops.
2026-05-30 19:07:59 +02:00
David Cottingham b585a1fcf4 Address review: remove redundant outer/output anti-deadzone controls 2026-05-22 18:51:08 -10:00
David Cottingham 043b0a437c Add Steam Input-style advanced deadzone controls to analog calibration 2026-05-16 19:09:25 -10:00
Henrik Rydgård bc62602935 Add checkboxes to enable/disable the three input backends.
Can probably serve as a workaround for #21494
2026-05-01 21:28:25 +02:00
Henrik Rydgård 56ca89a6e3 Adhoc: Don't show player ports by default (control with developer setting) 2026-04-16 12:48:14 -06:00
Henrik Rydgård 49d3d3dc37 Settings and dev settings: Preserve the current tab. Minor UI tweaks. 2026-04-06 12:09:40 -06:00
Henrik Rydgård 8304d8622a Hide the save/load indicator by default, add a (developer) setting. Also sneak in an adhoc server list bug fix.
Fixes #21523
2026-04-06 10:04:09 -06:00
Guido Cella 4413c7b10f Implement pause on lost focus on SDL
This option was Windows exclusive and this commit implements it on SDL
as well.

It is hidden on mobile devices because it makes no sense there.
2026-04-01 15:39:34 +02:00
Henrik Rydgård 620c6ae049 Add UI for adding and removing custom servers from the adhoc server screen 2026-03-09 11:57:31 +01:00
Henrik Rydgård b0a3d5753a Remove an obsolete setting 2026-03-07 09:19:31 +01:00
Henrik Rydgård 04b86a0d87 Address Kethen's feedback 2026-03-06 13:34:16 +01:00
Henrik Rydgård 1a95e9e4e9 Fetch the public adhoc server list from metadata.ppsspp.org/adhoc-servers.json 2026-03-06 13:25:07 +01:00
Henrik Rydgård 3d50bf4b7d Add categories to the server list 2026-03-06 13:25:07 +01:00
Henrik Rydgård 0d8358827b Move the pre-loaded adhoc server address list logic to sceNetAdhoc.cpp
Yes, that file is growing too big...
2026-03-05 10:05:08 +01:00
Henrik Rydgård 2052ebc60c Fix switching of audio devices on Windows.
Fixes #21337
2026-03-04 14:41:59 +01:00
Henrik Rydgård e780e32f98 Controls: Add a setting for the threshold used to map analog stick inputs to digital buttons 2026-03-02 22:50:15 +01:00
Henrik Rydgård 9097dd935a Somewhat improve the UI of the adhoc server list 2026-02-26 17:17:42 +01:00
Henrik Rydgård 9cb4e45de3 Add two new relay adhoc servers to the list 2026-02-26 17:17:42 +01:00
Katharine Chui 3e11b33e6f coding style fixes
- fix switch case formatting
- use utility function equals to compare strings that can be std::string_view
- do not default initialize strings with ""
2026-02-19 01:14:02 +01:00
Katharine Chui b3b9e90403 expand adhoc server list
Add various data fields and logic to handle:
- automatic adhoc data mode handling
- future UI expension on server list
- future support for automatically downloaded/user provided server list
2026-02-18 19:22:38 +01:00
Henrik Rydgård 4477396045 AdHoc relay server: Replace checkbox with "Auto" / "On" / "Off" 2026-02-18 19:18:42 +01:00
Henrik Rydgård ab4ca14773 Add a simple utility to help bug reporting: Copy ppsspp.ini to clipboard 2026-02-17 10:18:08 +01:00
Henrik Rydgård a5029a23de Various tweaks to the update reminder UI. Now works in portrait. 2026-02-14 12:04:30 +01:00
Henrik Rydgård 03535ffced Cleanups and fixes 2026-02-14 11:18:27 +01:00
Henrik Rydgård 1e93693f73 Revert "Remove the upgrade reminder"
This reverts commit a1a9278047.
2026-02-14 11:17:29 +01:00
Henrik Rydgård 60f0f79273 On Android, rename "Full screen" to "Hide navigation bar" 2026-02-11 17:40:52 +01:00
Henrik Rydgård 238cb2983c Android: Default immersive mode to false.
Screens are so wide now that we can afford the space.
2026-02-08 11:01:44 +01:00
Henrik Rydgård 801d379f74 Gesture control: Prevent pressing touch buttons while performing a gesture. 2026-02-06 13:10:20 +01:00
Henrik Rydgård f546dc3835 Add an Enable checkbox to tilt control, add mappable control
- Fixes #20830
2026-02-05 09:44:11 +01:00
Henrik Rydgård 03a7df74fa Have two independent gesture control zones 2026-02-04 15:01:06 +01:00
Henrik Rydgård 03c901d0cc Prepare for multiple gesture mapping zones 2026-02-04 15:01:06 +01:00
Henrik Rydgård 51c3058cf6 Replace "ForceFullScreen" with a way to prevent specific settings from being saved. 2026-02-02 09:25:49 +01:00
Henrik Rydgård 46e82f3c63 Game screen: Add a button to reset the played time counter 2026-01-23 18:54:22 +01:00