Skip to content

setup: detect any recompiled BIOS stem and stop the first-run setup loop - #343

Open
Alexbeav wants to merge 1 commit into
RetroPortingToolKit:masterfrom
Alexbeav:pr/setup-host-bios-deadlock-upstream-20260910
Open

setup: detect any recompiled BIOS stem and stop the first-run setup loop#343
Alexbeav wants to merge 1 commit into
RetroPortingToolKit:masterfrom
Alexbeav:pr/setup-host-bios-deadlock-upstream-20260910

Conversation

@Alexbeav

Copy link
Copy Markdown
Contributor

Summary

Focused port of the fork's fix/setup-host-bios-deadlock feature onto current
master, prepared as a single squashed change because the fork line and
upstream share no merge base (patch-port route, decided 2026-09-10).

The setup host only accepted OpenBIOS and SCPH1001 style stems. A kit that
pins another recompiled retail BIOS stem could loop through first-run setup
without ever finishing. This change:

  • accepts any recompiled BIOS stem the codegen host produced
    (runtime/include/psx_bios_known_images.h),
  • checks the setup host before validating a chosen BIOS (runtime/src/main.cpp),
  • makes the first-run loop breaker explain its cause instead of looping,
  • decodes CLI subprocess output as UTF-8 rather than the ANSI codepage
    (psxrecomp_cli.py),
  • registers the two new CTest entries so they actually run
    (recompiler/CMakeLists.txt),
  • names the recursive submodule init in the rbengine preflight
    (runtime/runtime.cmake).

Port notes

  • Two conflicts against current master, both resolved: the CTest
    registrations (the two names exist only in this change) and the recomp-ui
    guidance text (takes the new wording).
  • Cubic review P3 finding on the fork PR fixed here as well: the sibling
    PSX_NETPLAY FATAL_ERROR at runtime/runtime.cmake now names
    git submodule update --init --recursive, matching the corrected message.

Evidence and limits

  • python -m py_compile passes for psxrecomp_cli.py and the new
    runtime/tests/test_codegen_host_bios_stems.py.
  • The new test skips in a tree without RECOMP_UI_ROOT; a full run needs a
    tree with recomp-ui present and a built codegen host. No full runtime
    build, native run, or retail route is claimed in this PR.
  • The fork-side review (cubic) ran on the pre-port branch; findings were
    addressed there and are carried in this port.

Developed with AI assistance (Cline session, 2026-09-10); the changes were
validated as described above before opening this PR.

Focused port of the fork's fix/setup-host-bios-deadlock feature (10 commits) onto current upstream master, per the 2026-09-10 decision to port rather than rebase (the fork line and upstream share no merge base).

Content: the codegen host accepts any recompiled BIOS stem instead of only OpenBIOS/SCPH1001 (psx_bios_known_images.h); the runtime checks the setup host before validating a chosen BIOS and the first-run loop breaker reports a cause-specific reason; the CLI decodes subprocess output as UTF-8; --setup-selfcheck verifies a headless setup; the rbengine preflight names the recursive init. Two port conflicts resolved: the new CTest registrations in recompiler/CMakeLists.txt are kept (the names exist only in this change), and runtime.cmake takes the new recomp-ui guidance text. Cubic P3 finding fixed: the sibling PSX_NETPLAY FATAL_ERROR now also names --recursive.

Evidence: python syntax checks pass for psxrecomp_cli.py and the new tests; runtime/tests/test_codegen_host_bios_stems.py runs or skips only on a missing RECOMP_UI_ROOT. No full runtime build or retail route is claimed here. Developed with AI assistance (Cline, 2026-09-10).
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