PlayStation glyphs: --mono, a look close to the PS5's prompts; the DualSense d-pad; no black halo (PS-GLYPHS-MONO-DUALSENSE) #2666

Merged
leonida/mandy
ItsYusei99 merged 1 commit from ps-glyphs-dualsense into main 2026-11-30 07:12:10 +00:00

Pull request successfully merged and closed

ItsYusei99 commented 2026-11-30 00:35:19 +00:00

Claimed in the coordination issue as: PS-GLYPHS-MONO-DUALSENSE (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7265398247)

What and why

tools/ps_prompt_glyphs.py draws PlayStation button prompts in its own colours: dark discs, a light rim and coloured symbols. This PR adds a --mono option that draws them in a look very similar to the PS5's own prompts:

  • Keys and discs: white keys and discs with black symbols and letters (cross, circle, square, triangle, L1/L2/R1/R2, L3/R3, sticks, options, touchpad). This is the same layout the title's Xbox glyphs use, so they sit in the HUD the same way.
  • The d-pad is drawn as the DualSense's: four separate arrow keys pointing at the middle. The pressed ones are white and the rest grey; the plain d-pad and the all-four glyph are all white. Before, it was a solid cross, which reads as an Xbox d-pad and not a PlayStation one.
  • No black halo: the mono sprites have no see-through bounding box behind them. When a menu highlights an option, the title changes the glyph's colours, and that box (fill 0,0,0,0) showed as a black halo around the prompt. The drawings already span the glyphs' bounds, so their size is unchanged.

The default look (without --mono) is unchanged: same shapes, same box.

The drawings are still original, made from the tool's own primitives. Nothing is traced from the game or from Sony's art.

Tested

  • python -I tests/test_ps_prompt_glyphs.py: 10 passed. Three of them are new:
    • no glyph in the mono look has a box behind it;
    • the d-pad keys get the right colours for up, right, up/down, idle and all;
    • the mono movie builds.
  • python -I tests/test_pc_prompt_glyphs.py: 13 passed (it imports this module).
  • --selftest passes with and without --mono.
  • scripts/check_no_game_data.py on the three files: clean.
  • In the game, on the D3D12 runtime with a DualSense over USB, I built the movie with --mono --from-archive <data.rpf> and served it as ps_prompt_glyphs.gfx. The log shows prompt glyphs: PlayStation movie loaded and the title reads its glyph movie family="PlayStation". The HUD prompts (cross, circle, triangle, square, R1) show white keys with black symbols, and highlighted options show no halo. Not every menu was visited.

GPUs tested: NVIDIA RTX 4070 12 GB, driver 621.40, Windows 11 (in-game check only; the tests need no GPU)

AI-assisted: yes (Claude)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

Claimed in the coordination issue as: PS-GLYPHS-MONO-DUALSENSE (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7265398247) ### What and why `tools/ps_prompt_glyphs.py` draws PlayStation button prompts in its own colours: dark discs, a light rim and coloured symbols. This PR adds a `--mono` option that draws them in a look **very similar to the PS5's own prompts**: - **Keys and discs:** white keys and discs with black symbols and letters (cross, circle, square, triangle, L1/L2/R1/R2, L3/R3, sticks, options, touchpad). This is the same layout the title's Xbox glyphs use, so they sit in the HUD the same way. - **The d-pad is drawn as the DualSense's:** four separate arrow keys pointing at the middle. The pressed ones are white and the rest grey; the plain d-pad and the all-four glyph are all white. Before, it was a solid cross, which reads as an Xbox d-pad and not a PlayStation one. - **No black halo:** the mono sprites have no see-through bounding box behind them. When a menu highlights an option, the title changes the glyph's colours, and that box (fill `0,0,0,0`) showed as a black halo around the prompt. The drawings already span the glyphs' bounds, so their size is unchanged. The default look (without `--mono`) is unchanged: same shapes, same box. The drawings are still original, made from the tool's own primitives. Nothing is traced from the game or from Sony's art. ### Tested - `python -I tests/test_ps_prompt_glyphs.py`: 10 passed. Three of them are new: - no glyph in the mono look has a box behind it; - the d-pad keys get the right colours for up, right, up/down, idle and all; - the mono movie builds. - `python -I tests/test_pc_prompt_glyphs.py`: 13 passed (it imports this module). - `--selftest` passes with and without `--mono`. - `scripts/check_no_game_data.py` on the three files: clean. - In the game, on the D3D12 runtime with a DualSense over USB, I built the movie with `--mono --from-archive <data.rpf>` and served it as `ps_prompt_glyphs.gfx`. The log shows `prompt glyphs: PlayStation movie loaded` and `the title reads its glyph movie family="PlayStation"`. The HUD prompts (cross, circle, triangle, square, R1) show white keys with black symbols, and highlighted options show no halo. Not every menu was visited. GPUs tested: NVIDIA RTX 4070 12 GB, driver 621.40, Windows 11 (in-game check only; the tests need no GPU) AI-assisted: yes (Claude) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
OreoFR commented 2026-11-30 00:40:33 +00:00

Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest), main b8bd37111, PR head 4ae05e76c. MEASURED:

  • red (main + only tests/test_ps_prompt_glyphs.py): 3 failed / 10 (MonoLook::test_no_see_through_box_behind_a_glyph, test_the_dpad_is_four_keys_the_pressed_ones_white, test_the_mono_movie_builds; main's tool has no MONO).
  • green (main + this PR, merge --no-ff): 10/10 passed.
  • Merges cleanly with main and with #2566 (git merge-tree). The diff adds drawing code and a doc paragraph only; I found no embedded image data.

Not covered: how --mono looks in the title (needs a Windows run with LEONIDA_PROMPTS=playstation).

AI-assisted: Claude Code

Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest), main b8bd37111, PR head 4ae05e76c. MEASURED: - red (main + only `tests/test_ps_prompt_glyphs.py`): **3 failed / 10** (`MonoLook::test_no_see_through_box_behind_a_glyph`, `test_the_dpad_is_four_keys_the_pressed_ones_white`, `test_the_mono_movie_builds`; main's tool has no `MONO`). - green (main + this PR, `merge --no-ff`): **10/10 passed**. - Merges cleanly with main and with #2566 (`git merge-tree`). The diff adds drawing code and a doc paragraph only; I found no embedded image data. Not covered: how `--mono` looks in the title (needs a Windows run with `LEONIDA_PROMPTS=playstation`). AI-assisted: Claude Code
fiestorra commented 2026-11-30 00:53:17 +00:00

Verified on main b8bd37111 (Windows, Python 3.13): it applies cleanly, its tests pass, and the flag does what the title says at the CLI level.

git merge-tree origin/main refs/pull/2666/head   -> clean
cherry-pick (1 commit)                           -> clean
python3 -m pytest tests/test_ps_prompt_glyphs.py -q   -> 10 passed
python3 -I tools/ps_prompt_glyphs.py --selftest          -> ok: 13551 bytes, 5706 zlib bytes
python3 -I tools/ps_prompt_glyphs.py --selftest --mono   -> ok: 13095 bytes, 5535 zlib bytes

Two things I like about this one, and one thing I would check before merging:

  • the flag is additive: --mono produces a different atlas (13,095 bytes against 13,551) rather than changing the default, so nothing that already works moves;
  • it ships its own test file (43 lines) plus a doc line, so the behaviour is pinned where the code is.

Worth a look from the person who owns the glyph tooling: tests/ now has three prompt-glyph suites (test_pc_, test_ps_, test_xbox_prompt_glyphs.py). If --mono reproduces the Xbox look, the interesting question is whether the three should share the palette/look code instead of each carrying a copy - this PR is the right size on its own, but it is the second time the same shape appears.

Not tested: the atlas against a real console or the title; only the CLI's own selftest and the unit tests, no game data.

Written with an AI assistant.

Verified on `main` `b8bd37111` (Windows, Python 3.13): it applies cleanly, its tests pass, and the flag does what the title says at the CLI level. ``` git merge-tree origin/main refs/pull/2666/head -> clean cherry-pick (1 commit) -> clean python3 -m pytest tests/test_ps_prompt_glyphs.py -q -> 10 passed python3 -I tools/ps_prompt_glyphs.py --selftest -> ok: 13551 bytes, 5706 zlib bytes python3 -I tools/ps_prompt_glyphs.py --selftest --mono -> ok: 13095 bytes, 5535 zlib bytes ``` Two things I like about this one, and one thing I would check before merging: - the flag is **additive**: `--mono` produces a different atlas (13,095 bytes against 13,551) rather than changing the default, so nothing that already works moves; - it ships its own test file (43 lines) plus a doc line, so the behaviour is pinned where the code is. **Worth a look from the person who owns the glyph tooling:** `tests/` now has three prompt-glyph suites (`test_pc_`, `test_ps_`, `test_xbox_prompt_glyphs.py`). If `--mono` reproduces the Xbox look, the interesting question is whether the three should share the palette/look code instead of each carrying a copy - this PR is the right size on its own, but it is the second time the same shape appears. **Not tested:** the atlas against a real console or the title; only the CLI's own selftest and the unit tests, no game data. Written with an AI assistant.
fiestorra commented 2026-11-30 04:56:00 +00:00

Independent verification on this machine (Windows 11, Python 3.13.14), and the negative control bites.

It is not a docs change, despite where it started: it touches tools/ps_prompt_glyphs.py (+51/-1) and adds tests/test_ps_prompt_glyphs.py (+43).

1. It applies. merge-tree clean; 4ae05e76c cherry-picks onto main 1d22590b9 without a conflict.

2. Its test passes:

python3 -m pytest tests/test_ps_prompt_glyphs.py -q   -> 10 passed

3. The negative control fails on main's tool, which is what makes that number mean something. With the PR's test and tools/ps_prompt_glyphs.py reverted to main:

-> 3 failed, 7 passed
   FAILED MonoLook::test_no_see_through_box_behind_a_glyph
   FAILED MonoLook::test_the_dpad_is_four_keys_the_pressed_ones_white
   FAILED MonoLook::test_the_mono_movie_builds

So the three properties the commit adds - no see-through box behind a glyph, a D-pad of four keys with the pressed one white, and the --mono movie building - are all absent on main and present with the change. That is a real red->green, not a test that agrees with itself.

What I did not test: the rendered output by eye (this is a text/ANSI tool, and the assertions check the frame content rather than what a terminal shows), and the PS5 visual resemblance, which is a judgement call for whoever asked for the look.

Written with an AI assistant.

Independent verification on this machine (Windows 11, Python 3.13.14), and the negative control bites. **It is not a docs change**, despite where it started: it touches `tools/ps_prompt_glyphs.py` (+51/-1) and adds `tests/test_ps_prompt_glyphs.py` (+43). **1. It applies.** `merge-tree` clean; `4ae05e76c` cherry-picks onto `main` `1d22590b9` without a conflict. **2. Its test passes:** ``` python3 -m pytest tests/test_ps_prompt_glyphs.py -q -> 10 passed ``` **3. The negative control fails on `main`'s tool, which is what makes that number mean something.** With the PR's test and `tools/ps_prompt_glyphs.py` reverted to `main`: ``` -> 3 failed, 7 passed FAILED MonoLook::test_no_see_through_box_behind_a_glyph FAILED MonoLook::test_the_dpad_is_four_keys_the_pressed_ones_white FAILED MonoLook::test_the_mono_movie_builds ``` So the three properties the commit adds - no see-through box behind a glyph, a D-pad of four keys with the pressed one white, and the `--mono` movie building - are all **absent on `main` and present with the change**. That is a real red->green, not a test that agrees with itself. **What I did not test:** the rendered output by eye (this is a text/ANSI tool, and the assertions check the frame content rather than what a terminal shows), and the PS5 visual resemblance, which is a judgement call for whoever asked for the look. Written with an AI assistant.
MoonEyes commented 2026-11-30 07:12:07 +00:00

Merging. Head 4ae05e76c has red/green verdicts from reviewers other than the author (above), merges cleanly with main 5a7c02bd0, does not force a rebase of #2566, and carries a claim ID. The only red CI job, semantic-tests (test_interp_computed_ij_fallback, fixed by #2566), is also red on main. Neighbour tests rerun by me on main + PR (Windows 11): all pass. Merged by MoonEyes.

AI-assisted (Claude Code).

Merging. Head `4ae05e76c` has red/green verdicts from reviewers other than the author (above), merges cleanly with `main` `5a7c02bd0`, does not force a rebase of #2566, and carries a claim ID. The only red CI job, `semantic-tests` (`test_interp_computed_ij_fallback`, fixed by #2566), is also red on `main`. Neighbour tests rerun by me on `main` + PR (Windows 11): all pass. Merged by MoonEyes. AI-assisted (Claude Code).
Sign in to join this conversation.
No description provided.