Common dialogs: 21 libraries redefine the status and error codes, and 14 return 0x80B80007 for BUSY #15643

Closed
opened 2026-11-03 22:50:04 +00:00 by LeandroLP23 · 0 comments
LeandroLP23 commented 2026-11-03 22:50:04 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-11-03T22:50:04Z.


Twenty-one dialog libraries define the common dialog status and error codes for themselves, and they disagree on BUSY.

The codes

COMMON_DIALOG_STATUS_*, COMMON_DIALOG_ERROR_* and COMMON_DIALOG_RESULT_USER_CANCELED are redefined in an anonymous namespace in each of 21 libraries (main 1c8c0efc8c):

libSceCdlgG2P, libSceCdlgPlayerReview, libSceGameCustomDataDialog, libSceHmdSetupDialog, libSceInvitationDialog, libSceLoginDialog, libSceMsgDialog.native, libSceNetCtlApDialog, libSceNpAuthAuthorizedAppDialog, libSceNpCommerce, libSceNpFriendListDialog, libSceNpProfileDialog, libSceNpSnsFacebookDialog, libScePlayerSelectionDialog, libScePs2EmuMenuDialog, libSceSigninDialog, libSceSocialScreenDialog, libSceUsbStorageDialog, libSceVrServiceDialog, libSceVrSetupDialog, libSceWebBrowserDialog.

libSceCommonDialog/CommonDialog.hpp, which most of them already include, defines only COMMON_DIALOG_OK, ALREADY_SYSTEM_INITIALIZED and ALREADY_INITIALIZED.

The values mostly agree. The exception is BUSY:

BUSY Libraries
0x80B80007 libSceCdlgG2P, libSceCdlgPlayerReview, libSceGameCustomDataDialog, libSceHmdSetupDialog, libSceNetCtlApDialog, libSceNpAuthAuthorizedAppDialog, libSceNpFriendListDialog, libSceNpSnsFacebookDialog, libScePlayerSelectionDialog, libSceSigninDialog, libSceSocialScreenDialog, libSceUsbStorageDialog, libSceVrServiceDialog, libSceWebBrowserDialog (14), plus kErrBusy in libSceMsgDialog
0x80B80008 libSceInvitationDialog (#11379, "in shadPS4's order")

shadPS4's commondialog.h gives RESULT_NONE = 0x80B80007 and BUSY = 0x80B80008. So the 14 libraries most likely return RESULT_NONE where they mean busy. docs/dev/debt/libSceMsgDialog.md already lists 0x80b80007 (busy) as not measured. Neither value has been measured on a console here.

libScePlayGoDialog returns 0x80B80007 too, as ERROR_INVALID_STATE, from scePlayGoDialogOpen while the dialog is running. That is the same busy case under another name, so it goes with the BUSY decision (corrected after kaiffeetasse's comment below, which also has the full inventory: 25 files in 24 library directories).

Behaviour

Six libraries have the same GetResult (libSceGameCustomDataDialog, libSceHmdSetupDialog, libSceNpFriendListDialog, libSceNpSnsFacebookDialog, libSceSocialScreenDialog, libSceVrServiceDialog), and four the same Open (libSceGameCustomDataDialog, libSceSigninDialog, libSceSocialScreenDialog, libSceVrServiceDialog). Most of the rest are close variants of one status machine on a std::atomic<int> g_status.

Proposal

  1. Define the codes once in CommonDialog.hpp, with BUSY = 0x80B80008 and RESULT_NONE = 0x80B80007 as shadPS4 lists them, and drop the per-library copies. This changes what the 14 libraries return for busy, and their tests that expect 0x80B80007 change with it.
  2. Then add a small shared state helper there for the common Initialize / Open / GetStatus / GetResult / Close / Terminate paths. Each library keeps its exports and calls the helper.

szambonurek-88 has 14 open pull requests (#15378-#15394) that each change GetResult in one of these libraries, to return ARG_NULL for an unwritable result. Step 2 would conflict with all of them, so I'd do step 1 first and step 2 after those land, putting their check in the shared GetResult. Step 1 touches only the constant blocks.

Questions:

  • Is shadPS4 enough of a source to switch BUSY to 0x80B80008, or should it wait for a console measurement?
  • Do you want step 2 at all, or only the shared codes?

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6192580722 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/15643). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-11-03T22:50:04Z. --- Twenty-one dialog libraries define the common dialog status and error codes for themselves, and they disagree on `BUSY`. ### The codes `COMMON_DIALOG_STATUS_*`, `COMMON_DIALOG_ERROR_*` and `COMMON_DIALOG_RESULT_USER_CANCELED` are redefined in an anonymous namespace in each of 21 libraries (`main` `1c8c0efc8c`): libSceCdlgG2P, libSceCdlgPlayerReview, libSceGameCustomDataDialog, libSceHmdSetupDialog, libSceInvitationDialog, libSceLoginDialog, libSceMsgDialog.native, libSceNetCtlApDialog, libSceNpAuthAuthorizedAppDialog, libSceNpCommerce, libSceNpFriendListDialog, libSceNpProfileDialog, libSceNpSnsFacebookDialog, libScePlayerSelectionDialog, libScePs2EmuMenuDialog, libSceSigninDialog, libSceSocialScreenDialog, libSceUsbStorageDialog, libSceVrServiceDialog, libSceVrSetupDialog, libSceWebBrowserDialog. `libSceCommonDialog/CommonDialog.hpp`, which most of them already include, defines only `COMMON_DIALOG_OK`, `ALREADY_SYSTEM_INITIALIZED` and `ALREADY_INITIALIZED`. The values mostly agree. The exception is `BUSY`: | `BUSY` | Libraries | |---|---| | `0x80B80007` | libSceCdlgG2P, libSceCdlgPlayerReview, libSceGameCustomDataDialog, libSceHmdSetupDialog, libSceNetCtlApDialog, libSceNpAuthAuthorizedAppDialog, libSceNpFriendListDialog, libSceNpSnsFacebookDialog, libScePlayerSelectionDialog, libSceSigninDialog, libSceSocialScreenDialog, libSceUsbStorageDialog, libSceVrServiceDialog, libSceWebBrowserDialog (14), plus `kErrBusy` in libSceMsgDialog | | `0x80B80008` | libSceInvitationDialog (#11379, "in shadPS4's order") | shadPS4's [`commondialog.h`](https://github.com/shadps4-emu/shadPS4/blob/main/src/core/libraries/system/commondialog.h) gives `RESULT_NONE = 0x80B80007` and `BUSY = 0x80B80008`. So the 14 libraries most likely return `RESULT_NONE` where they mean busy. `docs/dev/debt/libSceMsgDialog.md` already lists `0x80b80007` (busy) as not measured. Neither value has been measured on a console here. libScePlayGoDialog returns `0x80B80007` too, as `ERROR_INVALID_STATE`, from `scePlayGoDialogOpen` while the dialog is running. That is the same busy case under another name, so it goes with the `BUSY` decision (corrected after kaiffeetasse's comment below, which also has the full inventory: 25 files in 24 library directories). ### Behaviour Six libraries have the same `GetResult` (libSceGameCustomDataDialog, libSceHmdSetupDialog, libSceNpFriendListDialog, libSceNpSnsFacebookDialog, libSceSocialScreenDialog, libSceVrServiceDialog), and four the same `Open` (libSceGameCustomDataDialog, libSceSigninDialog, libSceSocialScreenDialog, libSceVrServiceDialog). Most of the rest are close variants of one status machine on a `std::atomic<int> g_status`. ### Proposal 1. Define the codes once in `CommonDialog.hpp`, with `BUSY = 0x80B80008` and `RESULT_NONE = 0x80B80007` as shadPS4 lists them, and drop the per-library copies. This changes what the 14 libraries return for busy, and their tests that expect `0x80B80007` change with it. 2. Then add a small shared state helper there for the common `Initialize` / `Open` / `GetStatus` / `GetResult` / `Close` / `Terminate` paths. Each library keeps its exports and calls the helper. szambonurek-88 has 14 open pull requests (#15378-#15394) that each change `GetResult` in one of these libraries, to return `ARG_NULL` for an unwritable result. Step 2 would conflict with all of them, so I'd do step 1 first and step 2 after those land, putting their check in the shared `GetResult`. Step 1 touches only the constant blocks. Questions: - Is shadPS4 enough of a source to switch `BUSY` to `0x80B80008`, or should it wait for a console measurement? - Do you want step 2 at all, or only the shared codes? AI-assisted: yes (Claude Code)
Sign in to join this conversation.
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#15643
No description provided.