Commit Graph
58 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5 44b832f755 Debugger: add game.speed.get/set for fast-forward and a speed percentage
Both mechanisms already existed and just weren't reachable from the WebSocket
API: PSP_CoreParameter().fastForward for unlimited, and an FPSLimit mode plus a
target frame rate for everything else. FrameTimingLimit() in sceDisplay.cpp is
where they all resolve to a single number.

The one thing worth being careful about is which knob to drive. Reusing
CUSTOM1/CUSTOM2 - the user's own alternative speeds - would have meant writing
g_Config.iFpsLimit1, which is persisted per game, so a debugger session would
permanently overwrite whatever speed the user had configured. Same class of
mistake as a debug setting leaking into the saved config. So this gets its own
FPSLimit::DEBUGGER mode and a debuggerFpsLimit field on CoreParameter, which
isn't persisted and is value-initialized on every boot. Two things fall out for
free: the analog-speed handler already backs off for any mode it doesn't own
(EmuScreen.cpp), and a debugger can't leave a game slowed down after a restart.

Percentages are relative to 60 FPS, the same convention GameSettingsScreen uses
when presenting the alternative speeds, so "200%" means one thing across the
app. Unlimited is fastForward rather than percent 0, so there's a single way to
express it.

The response reports limitFps straight from FrameTimingLimit(), exposed for the
purpose. That's the number the frame timing actually consumes, so a client never
has to reconstruct the interaction between fast-forward, this override and the
user's own hotkeys - which is exactly the sort of thing that goes stale.

Requests fail rather than being quietly ignored when something else owns the
speed: achievements hardcore mode, or netplay without the "allow speed control
while connected" option. Being ignored with a successful response is the worst
outcome for an automation client.

Verified against a running headless instance: percent 200 with fast-forward off
resolves to limitFps 120, fast-forward takes it to 0 while remembering the 200
underneath, an explicit null clears it, and out-of-range or empty requests are
rejected. The throttle *behaviour* is not verified end to end - a debug,
software-rendered headless build runs this game at about 1% of real time, so it
never reaches any of these targets and the limit can't be observed. That path is
shared with the existing CUSTOM1/CUSTOM2 speeds and unchanged.

sceNet.h is forward-declared rather than included: it reaches windows.h through
proAdhoc.h, which redefines the OPTIONAL macro that collides with
DebuggerParamType::OPTIONAL - the hazard this file's header comment already
warns about.

pspautotests 314/314, UnitTest 55/55.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
2026-08-18 13:42:13 +02:00
Henrik Rydgård 54618c67c6 Headless improvements 2026-07-29 16:27:33 +02:00
Henrik Rydgård 6cfea96e58 Remove D3D9 support, to make future changes easier 2025-06-10 15:07:16 +02:00
Henrik Rydgård 8e206d891f Add some paranoid checking to avoid a weird crash seen in logs 2025-05-15 20:40:26 +02:00
Henrik Rydgård 751e4fad2e Move more of GPU init to the loader thread. Some log cleanup. 2025-05-15 11:43:37 +02:00
Henrik Rydgård 42a58eaeb7 Clean up and reorder the boot process a bit, return better errors on bad files. 2025-03-30 01:07:12 +01:00
Henrik Rydgård e2e99caeee Some minor reordering, reduce the calls to Identify_File 2025-03-26 09:24:14 +01:00
Henrik Rydgård dd8f9b682f Don't crash on trying to re-record a GE dump 2024-11-01 20:27:09 +01:00
Henrik Rydgård 7bb1914fd3 Add FrameTiming.cpp/h (with no real contents) 2023-08-13 17:57:43 +02:00
Unknown W. Brackets 00d84695d8 headless: Rename collectEmuLog for clarity.
This is still used when running tests outside headless, so leaving in
CoreParameter.
2023-03-26 10:21:07 -07:00
Unknown W. Brackets 76ef95a841 headless: Remove printfEmuLog, simplify output. 2023-03-26 10:17:34 -07:00
Henrik Rydgård 89c96142a1 Really not sure how we can detect whether a depth deswizzle is needed :( Hopefully temporary flag... 2022-08-21 09:58:58 +02:00
Unknown W. Brackets c15c4a6967 UI: Add analog speed limit mapping.
Only shows up as a setting if mapped, to avoid cluttering settings.
2022-07-04 19:14:05 -07:00
Unknown W. Brackets 2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
Henrik Rydgård 928bc88b01 Rename Unthrottle to Fast-forward globally 2021-08-18 09:28:13 +02:00
Henrik Rydgård 025bcb1673 Introduce Path, start using it all over the place.
Still lots left to convert!

Convert GetSysDirectory to return Path.

More buildfixing

Remove unnecessary Path( constructors
2021-05-13 10:39:16 +02:00
Unknown W. Brackets 3c9ab13672 GPU: Remove NULL GPU.
We can use the software GPU without a backend now, and this is in every
way superior and will result in better tests/headless behavior.
2021-01-02 09:36:13 -08:00
Henrik Rydgård 44ec286ba4 Framebuffer: Keep the render scale factor around, no need to recompute it. 2020-11-06 09:11:57 +01:00
Unknown W. Brackets 5871ab0538 UI: Stop caching the draw context in coreParam.
This is possibly getting outdated in some paths of graphics reinit, and
then causing crashes.  Let's just always get it from the graphicsContext.
2019-09-28 21:58:15 -07:00
Henrik Rydgård 4cfc6ee272 Merge pull request #11187 from unknownbrackets/alt-speed
Add second alternate speed and buttons for alt speed
2018-06-24 13:41:12 +02:00
Unknown W. Brackets 95f270778e Core: Allow toggle between 2 custom speeds.
In addition to virtual keys for each speed separately.
2018-06-23 10:59:18 -07:00
Unknown W. Brackets 0d4bd341e9 Windows: Separate Pause and Break actions.
It was confusing that "Pause" made PPSSPP appear to hang.

This has the side effect of making "Break on Load" work outside Windows.
2018-06-23 10:14:36 -07:00
Henrik Rydgard b9b3a022fb Switch another enum to enum class 2017-03-02 12:36:54 +01:00
Henrik Rydgård f86b9f7900 Guess what? More renaming 2016-12-27 11:59:06 +01:00
Henrik Rydgård 10393f5d4e Move Thin3D into the Draw namespace. 2016-12-27 11:58:03 +01:00
Henrik Rydgard ce8aae5ed1 Make the IRJit core selectable in developer tools 2016-05-08 01:43:27 +02:00
Henrik Rydgard d399c4a470 Initial commit for IRJit 2016-05-07 13:58:29 +02:00
Henrik Rydgard e611915a52 Rename some GPU classes and enums to fix some consistency issues between the backends. 2016-04-10 10:21:48 +02:00
Henrik Rydgard 29bc07eb0a SoftGPU with Vulkan runs but displays black 2016-03-20 20:04:49 +01:00
Henrik Rydgard c64064024d Initial vulkan code.
This was squashed from nine commits but using old versions of Vulkan.
2016-03-20 19:18:35 +01:00
Henrik Rydgard 15de6e6b98 GraphicsContext: Abstract away things like swapbuffers etc before adding even more backends.
Needed to prevent clutter all over the codebase.

Does not go all the way yet, goal would be a common render loop between platforms but not there yet.
2016-01-01 14:40:16 +01:00
Henrik Rydgard b07b002040 Introduce "Compatibility Flags".
These should be used very restrictively, see comment in Compatibility.h.

Should help #8004, by disabling depth rounding in Fight Night round 3.
2015-09-27 01:23:20 +02:00
Unknown W. Brackets 967b589778 Consistently use FileLoader for standard ISOs. 2014-11-23 13:59:56 -08:00
Unknown W. Brackets 63b5ec3d85 Allow specifying a root path for host0:/.
This way, similar to the PSP, we can have a root path outside the test.
2014-04-19 21:43:09 -07:00
Henrik Rydgard 8b6b491820 Remove obsolete outputWidth/outputHeight 2014-02-10 12:44:35 +01:00
Henrik Rydgård 40bd1fa650 Add freeze-frame to developer menu. Only useful for developing, like when using nVidia PerfHud. 2013-11-15 13:11:44 +01:00
Unknown W. Brackets 712b582d26 Remove coreParam.disableG3Dlog and enableDebugging.
One was uninitialized, the other one unused.
2013-11-09 11:02:12 -08:00
Henrik Rydgard b10e2bce3c Add FXAA antialiasing on non-mobile. Works best when render resolution = window size. 2013-09-26 12:41:59 +02:00
Ced2911 c332a4af58 Endian and PPC support 2013-08-16 14:34:15 +02:00
Unknown W. Brackets e7c7c5b3db Add a setting to launch a separate CPU thread. 2013-08-09 22:41:30 -07:00
Unknown W. Brackets b17b23f1f2 Add a function to run the CPU core. 2013-08-04 15:23:38 -07:00
Henrik Rydgard 51daa1f878 Delete the "Use Media Engine" option. 2013-06-08 22:53:36 +02:00
Henrik Rydgard 3b07090682 Give GameInfo some new powers, like deleting savedata (no UI yet) and computing file sizes. Recognize directories with EBOOT.PBP in them as "games" in their own right, makes things a little cleaner. 2013-06-08 17:52:51 +02:00
Henrik Rydgard 1c09548395 Default fpsLimit mode to standard (we forgot to zero it). Fixes #2100. 2013-06-05 22:43:07 +02:00
Henrik Rydgard 1f50096d7f Don't save recent history from testrunner 2013-05-23 12:49:34 +02:00
Steven Cherry ddf8b26c87 Fixed Config saving
Fps limit now saves in configuration. It can also be edited there to
allow for any value of fps.
2013-05-11 09:03:33 -05:00
Steven Cherry e7622ebbd6 Custom Fps Limiter
First time contributing. Set FPS limit on second page of graphics
settings. Press Tab key or on 360 controller, press left stick to toggle
between 3 states.
2013-05-09 19:36:23 -05:00
Henrik Rydgard 2301ad0b7c X360 controller: Left thumb speedup, right thumb menu, keyboard still works 2013-03-31 11:30:50 +02:00
Henrik Rydgard 57d4544ef4 Basic testrunner for Android.
Running it as-is reveals that clo and rotrv are broken in ARMJIT.
2013-03-07 00:10:53 +01:00
Henrik Rydgard 37f998407b Replace "Core" with "Jit" in ini. Don't show Open dialog by default (use Ctrl+A or Ctrl+O to open it).
Delete "Slightly Faster Interpreter".
2013-02-16 09:49:33 +01:00