feat(libSceWebBrowserDialog): implement sceWebBrowserDialogOpenForPredeterminedContent #5904

Merged
pushkarreddyy merged 2 commits from upstream-pr/5904 into main 2026-10-16 20:30:53 +00:00
pushkarreddyy commented 2026-10-14 15:12:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-14T15:12:07Z.


What

Implements sceWebBrowserDialogOpenForPredeterminedContent in libSceWebBrowserDialog.prx:

  • Replaces the throwing NotImplemented_nid_no_patch(__func__) stub with the common dialog lifecycle transition matching sceWebBrowserDialogOpen.
  • Validates the dialog initialization status: returns COMMON_DIALOG_ERROR_NOT_INITIALIZED (0x80B80003) if uninitialized, or COMMON_DIALOG_ERROR_BUSY (0x80B80007) if already running.
  • Rejects null parameter pointers with COMMON_DIALOG_ERROR_ARG_NULL (0x80B8000D).
  • Advances the state machine to COMMON_DIALOG_STATUS_FINISHED and returns 0 (COMMON_DIALOG_OK).
  • Extends GuestWebBrowserDialog.cpp to verify uninitialized rejection, null argument rejection, successful state advancement to finished, and user cancelled result reporting.
  • Documents technical debt in docs/dev/debt/libSceWebBrowserDialog.md.

Target context: Minecraft Bedrock (PPSA17221, #5744). The title imports sceWebBrowserDialogOpenForPredeterminedContent from libSceWebBrowserDialog.prx.

Tested

  • Windows 11 (MinGW-w64 GCC 15.2.0, Release).
  • Verified GuestWebBrowserDialog.cpp test suite passes with full lifecycle coverage.
  • Verified python tools/check_conventions.py --base origin/main passes with 0 findings and 0 errors.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA17221 #5744
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4860030555 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5904). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-14T15:12:07Z. --- ### What Implements `sceWebBrowserDialogOpenForPredeterminedContent` in `libSceWebBrowserDialog.prx`: - Replaces the throwing `NotImplemented_nid_no_patch(__func__)` stub with the common dialog lifecycle transition matching `sceWebBrowserDialogOpen`. - Validates the dialog initialization status: returns `COMMON_DIALOG_ERROR_NOT_INITIALIZED` (`0x80B80003`) if uninitialized, or `COMMON_DIALOG_ERROR_BUSY` (`0x80B80007`) if already running. - Rejects null parameter pointers with `COMMON_DIALOG_ERROR_ARG_NULL` (`0x80B8000D`). - Advances the state machine to `COMMON_DIALOG_STATUS_FINISHED` and returns 0 (`COMMON_DIALOG_OK`). - Extends `GuestWebBrowserDialog.cpp` to verify uninitialized rejection, null argument rejection, successful state advancement to finished, and user cancelled result reporting. - Documents technical debt in `docs/dev/debt/libSceWebBrowserDialog.md`. Target context: Minecraft Bedrock (PPSA17221, #5744). The title imports `sceWebBrowserDialogOpenForPredeterminedContent` from `libSceWebBrowserDialog.prx`. ### Tested - Windows 11 (MinGW-w64 GCC 15.2.0, Release). - Verified `GuestWebBrowserDialog.cpp` test suite passes with full lifecycle coverage. - Verified `python tools/check_conventions.py --base origin/main` passes with 0 findings and 0 errors. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: PPSA17221 #5744 - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-14 15:12:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T15:12:56Z.


Progress report (c842491 → 7f03455)

📈 System libraries: 88.86% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceWebBrowserDialog sceWebBrowserDialogOpenForPredeterminedContent
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6171619222 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5904#issuecomment-6171619222). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-14T15:12:56Z. --- <!-- progress-report --> ### Progress report (c842491 → 7f03455) 📈 **System libraries**: 88.86% (+0.03%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceWebBrowserDialog | `sceWebBrowserDialogOpenForPredeterminedContent` | </details>
github-actions[bot] commented 2026-10-14 21:48:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T21:48:50Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6361 docs/dev/debt/libSceWebBrowserDialog.md docs/dev/debt/libSceWebBrowserDialog.md
PR 6447 docs/dev/debt/libSceWebBrowserDialog.md

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestWebBrowserDialog.cpp
PR 6447 core/libs/prx/libSceWebBrowserDialog/Export.cpp
docs/dev/debt/libSceWebBrowserDialog.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6179239398 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5904#issuecomment-6179239398). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-14T21:48:50Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6361](https://www.github.com/boykopovar/AnyPS5/pull/6361) | `docs/dev/debt/libSceWebBrowserDialog.md` | | `docs/dev/debt/libSceWebBrowserDialog.md` | | [PR 6447](https://www.github.com/boykopovar/AnyPS5/pull/6447) | | | `docs/dev/debt/libSceWebBrowserDialog.md` | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestWebBrowserDialog.cpp` | | [PR 6447](https://www.github.com/boykopovar/AnyPS5/pull/6447) | `core/libs/prx/libSceWebBrowserDialog/Export.cpp`<br>`docs/dev/debt/libSceWebBrowserDialog.md` |
pushkarreddyy commented 2026-10-15 13:33:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-15T13:33:35Z.


@oneandonlydean @adriadam10 Rebased clean on latest origin/main (8dc92ae29) with all CI checks passing green. Implements sceWebBrowserDialogOpenForPredeterminedContent for dialog transitions (PPSA17221). Ready for review when convenient, thanks!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6193331562 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5904#issuecomment-6193331562). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-15T13:33:35Z. --- @oneandonlydean @adriadam10 Rebased clean on latest origin/main (8dc92ae29) with all CI checks passing green. Implements sceWebBrowserDialogOpenForPredeterminedContent for dialog transitions (PPSA17221). Ready for review when convenient, thanks!
milescoviello commented 2026-10-15 15:33:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-15T15:33:58Z.


A second title that stops on this function: Metal Gear Solid 4 (PPSA18194, Master Collection 01.004.003). Its Unity launcher calls it from the manual cover screen, the one with an "Open Online Manual" button hint.

Linux (Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti, NVIDIA 595.99), relinked with --to-intel --executable mgs4/mgs4.elf, our fixed pad sequence, on a second launch so the launcher already has its save data:

  • main ff23657f3: 2 of 2 runs stop at 30–31 s with sceWebBrowserDialogOpenForPredeterminedContent not implemented.
  • main ff23657f3 + this PR (eac580a54): 2 of 2 get past it. At about 42 s the launcher reaches ExitAndStartNewProject Path = /app0/mgs4/mgs4.elf, where main's LoadExec ends the process (#6237).
  • main b4a4fcac0 + this PR + #6237, with a throwaway print in the dialog exports: the launcher calls Initialize → OpenForPredeterminedContent (non-null param, first word 0x30) → GetResult → Terminate twice, then starts mgs4.elf. The game shows the KONAMI logo and plays its TV channel intro at about 60 FPS until the 240 s limit.

So finishing at once with the user-canceled result is enough for this launcher. #6092 makes the same change without the null check. I only ran this PR's head.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6195899380 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5904#issuecomment-6195899380). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-15T15:33:58Z. --- A second title that stops on this function: Metal Gear Solid 4 (PPSA18194, Master Collection 01.004.003). Its Unity launcher calls it from the manual cover screen, the one with an "Open Online Manual" button hint. Linux (Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti, NVIDIA 595.99), relinked with `--to-intel --executable mgs4/mgs4.elf`, our fixed pad sequence, on a second launch so the launcher already has its save data: - `main` ff23657f3: 2 of 2 runs stop at 30–31 s with `sceWebBrowserDialogOpenForPredeterminedContent not implemented`. - `main` ff23657f3 + this PR (eac580a54): 2 of 2 get past it. At about 42 s the launcher reaches `ExitAndStartNewProject Path = /app0/mgs4/mgs4.elf`, where `main`'s LoadExec ends the process (#6237). - `main` b4a4fcac0 + this PR + #6237, with a throwaway print in the dialog exports: the launcher calls `Initialize` → `OpenForPredeterminedContent` (non-null param, first word `0x30`) → `GetResult` → `Terminate` twice, then starts `mgs4.elf`. The game shows the KONAMI logo and plays its TV channel intro at about 60 FPS until the 240 s limit. So finishing at once with the user-canceled result is enough for this launcher. #6092 makes the same change without the null check. I only ran this PR's head. AI-assisted: yes
jotitadev commented 2026-10-15 19:12:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-15T19:12:47Z.

Review: COMMENTED


Linux run: head eac580a54 merged onto main 44df21632 (clean merge). Adds a Linux run to the Windows one in the description.

Machine: Ubuntu 26.04, Intel i7-8700, GCC 15.2, full build, non-GPU tests (Release, BUILD_TESTING=ON).

  • Build: full build passes.
  • guest_web_browser_dialog: passes with the PR. With only the test change on main it aborts with "sceWebBrowserDialogOpenForPredeterminedContent not implemented".
  • Non-GPU suite (ctest -E "^agc"): no regressions; the only failures are file_writer_binary and file_writer_text, which fail on main on this machine too.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5538586313 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5904#pullrequestreview-5538586313). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-15T19:12:47Z. **Review:** COMMENTED --- **Linux run: head `eac580a54` merged onto `main` `44df21632` (clean merge).** Adds a Linux run to the Windows one in the description. Machine: Ubuntu 26.04, Intel i7-8700, GCC 15.2, full build, non-GPU tests (Release, `BUILD_TESTING=ON`). - **Build:** full build passes. - **`guest_web_browser_dialog`:** passes with the PR. With only the test change on `main` it aborts with "sceWebBrowserDialogOpenForPredeterminedContent not implemented". - Non-GPU suite (`ctest -E "^agc"`): no regressions; the only failures are `file_writer_binary` and `file_writer_text`, which fail on `main` on this machine too. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
pushkarreddyy commented 2026-10-16 15:05:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-16T15:05:27Z.


@oneandonlydean @adriadam10 Cleanly rebased on latest main (e0e3ced1e) with all checks passing green. Ready for review/merge when convenient!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6218390063 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5904#issuecomment-6218390063). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-16T15:05:27Z. --- @oneandonlydean @adriadam10 Cleanly rebased on latest main (e0e3ced1e) with all checks passing green. Ready for review/merge when convenient!
adriadam10 commented 2026-10-16 18:54:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T18:54:23Z.


Re-checked on current main: build and ctest (33 tests in scope) green, and guest_web_browser_dialog fails without the change. The state/error ordering matches the existing sceWebBrowserDialogOpen.

Added one commit on top: the technical debt line was cut off mid-sentence and didn't say that the real export takes a second argument (the allow-list of up to twenty addresses, per SharpProspero docs/dialogs.md). It is not read here, so no address filtering is modelled; the line now says so.

Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6222543028 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5904#issuecomment-6222543028). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-16T18:54:23Z. --- Re-checked on current `main`: build and ctest (33 tests in scope) green, and `guest_web_browser_dialog` fails without the change. The state/error ordering matches the existing `sceWebBrowserDialogOpen`. Added one commit on top: the technical debt line was cut off mid-sentence and didn't say that the real export takes a second argument (the allow-list of up to twenty addresses, per SharpProspero `docs/dialogs.md`). It is not read here, so no address filtering is modelled; the line now says so. Merging once CI is green.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!5904
No description provided.