Skip to content

fix(streaming): give standalone PPSSPP the broker's working state slot - #5256

Open
bercedev wants to merge 2 commits into
rommapp:masterfrom
bercedev:fix/ppsspp-state-capabilities
Open

bercedev wants to merge 2 commits into
rommapp:masterfrom
bercedev:fix/ppsspp-state-capabilities

Conversation

@bercedev

Copy link
Copy Markdown

Description

Closes #5230.

slot_capabilities("psp", "ppsspp") fell through to NO_CAPABILITIES, because psp isn't in the platform table and ppsspp wasn't in the emulator table. So a webstation container mapping psp: ppsspp got no save/load state buttons, only Save & Exit. The issue reports that romm-broker 0.15.0 saves and loads one working slot for PPSSPP over its state hotkeys, the same model as the retroarch and scummvm entries. This adds a ppsspp entry with that shape: no manual slots, the shared autosave slot 10, and no memory card (memory stick saves ride the save archive).

psp: retroarch is unchanged, since that still resolves through the retroarch entry.

Not in this PR: the comment about 3DS on RetroArch. There the 3ds platform entry, which describes standalone Azahar, wins over the retroarch emulator entry. Fixing it means deciding whether a platform or an emulator entry takes precedence (and known_to_lack_memory_card("3ds") reads the platform entry), so I left it for a separate change.

Checklist

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Tests

test_get_config_ships_capabilities_for_a_ppsspp_container checks the capabilities /api/streaming/config ships for a psp: ppsspp container and that slot 10 passes _assert_valid_slot while slot 3 doesn't. It fails on master.

pytest tests/endpoints/test_streaming.py   761 passed (PostgreSQL 18, Valkey 9.0.6)

I haven't run it against a real romm-broker; the slot model comes from the issue's report for broker 0.15.0.

AI assistance

I used Claude Code to read the capability tables, write the entry and the test, and run the tests above. I read the diff and the results before opening this.

A webstation container that maps psp to standalone PPSSPP fell through to
NO_CAPABILITIES, so the player offered only Save & Exit, even though the
broker saves and loads one working slot for it over the state hotkeys.
Add a ppsspp entry next to retroarch and scummvm with the same slot shape.

Closes rommapp#5230
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] Adds platform capability configuration for a new emulator.

The slot change has no established functional blocker, but the explicit comment requirements must be satisfied before merging.

Fix All in Claude CodeFindings

  1. P2 Comments break repository rules ▶
  2. P2 Guide hides save-state support ▶
Fix with agent prompt
### Issue 1
backend/tests/endpoints/test_streaming.py:416-418
The new test docstring includes the old behavior, an issue number, and a comparison with RetroArch. The repository requires one-sentence docstrings and keeps change history outside the code. Replace it with a sentence describing the expected PPSSPP behavior. Also shorten the new three-line comment in `capabilities.py` to the required one or two lines. These repository requirements must be satisfied before merging.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

### Issue 2
backend/handler/streaming/capabilities.py:158-161
This enables save states for PPSSPP, but the [supported-platform table](https://github.com/rommapp/docs/blob/HEAD/docs/using/emulator-streaming.md#supported-platforms) still lists no save states for PSP. Update that row alongside this change so users know standalone PPSSPP supports one working state.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds standalone PPSSPP to the emulator capability table with one working state at slot 10 and no memory-card route.

  • PPSSPP streaming gets one working save-state slot.

Reviews (1) · Last reviewed commit: "fix(streaming): give standalone PPSSPP t..." · Reviewed by Greptile

Comment on lines +416 to +418
"""A webstation container that maps psp to standalone PPSSPP got no states,
so the player offered only save and exit (#5230). Its broker saves and
loads the same one working slot as RetroArch."""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Comments break repository rules

The new test docstring includes the old behavior, an issue number, and a comparison with RetroArch. The repository requires one-sentence docstrings and keeps change history outside the code. Replace it with a sentence describing the expected PPSSPP behavior. Also shorten the new three-line comment in capabilities.py to the required one or two lines. These repository requirements must be satisfied before merging.

Rule Used: Comment discipline. A comment is one or two lines; a docstring is one sentence plus an Args:/Returns: block when the signature needs it. Flag: multi-paragraph rationale; change history or migration notes ("replaces the manual pattern", "this was drop... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: backend/tests/endpoints/test_streaming.py
Line: 416-418

Comment:
**Comments break repository rules**

The new test docstring includes the old behavior, an issue number, and a comparison with RetroArch. The repository requires one-sentence docstrings and keeps change history outside the code. Replace it with a sentence describing the expected PPSSPP behavior. Also shorten the new three-line comment in `capabilities.py` to the required one or two lines. These repository requirements must be satisfied before merging.

**Rule Used:** Comment discipline. A comment is one or two lines; a docstring is one sentence plus an Args:/Returns: block when the signature needs it. Flag: multi-paragraph rationale; change history or migration notes ("replaces the manual pattern", "this was drop... ([source](https://app.greptile.com/romm/-/custom-context?memory=43fcb307-60fc-4cf1-9be8-07a4b8f33a24))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 77bcf7e: the test docstring is one sentence about the expected PPSSPP behaviour, and the capabilities.py comment is two lines.

Comment on lines +158 to +161
"ppsspp": {
"max_slots": 0,
"has_autosave": True,
"autosave_slot": 10,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Guide hides save-state support

This enables save states for PPSSPP, but the supported-platform table still lists no save states for PSP. Update that row alongside this change so users know standalone PPSSPP supports one working state.

Prompt To Fix With AI
This is a comment left during a code review.
Path: backend/handler/streaming/capabilities.py
Line: 158-161

Comment:
**Guide hides save-state support**

This enables save states for PPSSPP, but the [supported-platform table](https://github.com/rommapp/docs/blob/HEAD/docs/using/emulator-streaming.md#supported-platforms) still lists no save states for PSP. Update that row alongside this change so users know standalone PPSSPP supports one working state.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code

@bercedev bercedev Oct 22, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. That table lives in rommapp/docs, so it can't change in this PR. Once this merges, the psp row in docs/using/emulator-streaming.md should read like DuckStation's, with one state that saving and resuming both use:

| `psp`               | PPSSPP      | One resume state            | -           | -         |

I'm happy to open that docs PR if you'd like.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works. Please open the docs PR once this merges; the row text accurately describes the single shared save/resume state. I’ll treat the docs update as out of scope for this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please open a separate docs PR after this merges. That row accurately describes PPSSPP’s one resume state. Thanks for offering to handle it.

I couldn’t post the reply because permission to submit it was not granted.

@bercedev

Copy link
Copy Markdown
Author

Thanks, both fair: the comment and the test docstring are now within the house length (77bcf7e), and the supported-platform table change is in rommapp/docs#179.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Emulator streaming: PPSSPP has no capabilities entry, so PSP sessions get no save/load state buttons

1 participant