Skip to content

fix(libSceCommonDialog): report ALREADY_SYSTEM_INITIALIZED on repeated initialization - #8870

Closed
klosixgaming-arch wants to merge 1 commit into
boykopovar:mainfrom
klosixgaming-arch:fix/commondialog-already-system-initialized
Closed

klosixgaming-arch wants to merge 1 commit into
boykopovar:mainfrom
klosixgaming-arch:fix/commondialog-already-system-initialized

Conversation

@klosixgaming-arch

Copy link
Copy Markdown
Contributor

What

Report COMMON_DIALOG_ERROR_ALREADY_SYSTEM_INITIALIZED (0x80B80002) instead of 0x80B80004 when sceCommonDialogInitialize is called repeatedly.

Tested

  • Windows 11, WinLibs GCC 15.2.0
  • guest_common_dialog_tests (passes 100%)
  • tools/check_conventions.py --base origin/main (passes with 0 errors)
  • TEKKEN DARK RESURRECTION (PPSA31371):
    • Previously halted on boot with:
      (REQUIRE(ret == SCE_OK || ret == SCE_COMMON_DIALOG_ERROR_ALREADY_SYSTEM_INITIALIZED) FAILED) Could not initialize CommonDialog (80B80004)
      ./PSPHD/src/Sce/SaveDataMultiDialog.cpp(16): DEBUG STOP.
      FATAL: unhandled exception 0xc000001d on thread 23612 'EmuCorePSP'
      
    • With this change, passes SaveDataMultiDialog and save data discovery ([SAVEDATA:native] dirNameSearch ... hit=0 set=0 -> 0x00000000) and boots into the title screen ("Press START to play!").

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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: RTX 5090 (NVIDIA 572.70)
  • AI-assisted: yes. Written with AI assistance and reviewed by me.

…d initialization

sceCommonDialogInitialize returned COMMON_DIALOG_ERROR_ALREADY_INITIALIZED
(0x80B80004) when called repeatedly. TEKKEN DARK RESURRECTION (PPSA31371)
initializes the common dialog subsystem via its SaveDataMultiDialog component
and asserts ret == SCE_OK || ret == SCE_COMMON_DIALOG_ERROR_ALREADY_SYSTEM_INITIALIZED,
stopping on boot with:
  (REQUIRE(ret == SCE_OK || ret == SCE_COMMON_DIALOG_ERROR_ALREADY_SYSTEM_INITIALIZED) FAILED) Could not initialize CommonDialog (80B80004)
  ./PSPHD/src/Sce/SaveDataMultiDialog.cpp(16): DEBUG STOP.

The system-level common dialog initialization reports
COMMON_DIALOG_ERROR_ALREADY_SYSTEM_INITIALIZED (0x80B80002) on repeated calls,
as expected by Sony's PSPHD runtime. Return 0x80B80002 when g_initialized is
already set.

Tested with TEKKEN DARK RESURRECTION (PPSA31371), which now boots past common
dialog and save data initialization to the title screen ("Press START to play!").

AI-assisted: yes. Written with AI assistance and reviewed by me.
@klosixgaming-arch

Copy link
Copy Markdown
Contributor Author

duplicates open PR #8618

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.

1 participant