fix: D-10 rc=-1 (pfs slot stripping), BOOT.ELF freeze (reboot_iop), CI build (FIO_MT_RDONLY)#396
Draft
Copilot wants to merge 7 commits intoBETA-10-playfrom
Draft
fix: D-10 rc=-1 (pfs slot stripping), BOOT.ELF freeze (reboot_iop), CI build (FIO_MT_RDONLY)#396Copilot wants to merge 7 commits intoBETA-10-playfrom
Copilot wants to merge 7 commits intoBETA-10-playfrom
Conversation
…o fix D-10 black screen SifExitIopHeap() hangs indefinitely when the IOP is busy, causing a permanent black screen. SifInitRpc/SifLoadFileInit/SifLoadFileExit before the BRAM copy also corrupt the IOP fileXio state the embedded loader needs after ExecPS2. Remove all six calls; keep only FlushCache(0)/FlushCache(2) before ExecPS2. The loader manages its own SIF lifecycle via SifInitRpc(0) in loader.c. Update DECISIONS, STATE, ROADMAP, QA_REGRESSION_MATRIX to reflect. Agent-Logs-Url: https://github.com/NathanNeurotic/POPSLoader/sessions/a4943d67-d41c-4b0f-9b9c-3849b61fb2fb Co-authored-by: NathanNeurotic <109461996+NathanNeurotic@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Extract active mission and constraints from repository
fix(elf.c): remove SIF teardown calls from ExecuteViaEmbeddedLoader — fixes D-10 black screen
Mar 29, 2026
…ze (reboot_iop=1) D-10 rc=-1 root cause: BuildPartitionScopedExecPath was stripping the pfs slot (pfs3:/ → pfs:/), then C tried to remount the same partition at pfs0: — the PS2 HDD driver rejects mounting a partition at a second slot when already mounted at pfs3: → -1 before the loader ever ran. Fix 1 (Lua): BuildPartitionScopedExecPath now returns pfs paths unchanged (slot preserved). For hdd:partition:pfsN:/... paths it extracts the pfs portion with slot intact. Fix 2 (C elf.c): build_hdd_embedded_loader_target now checks if the resolved pfs path is already accessible (can_open_exec_path) BEFORE attempting a partition remount. If accessible, uses it directly. Fix 3 (C elf.c): ExecuteHddBackedViaEmbeddedLoader passes empty partition_context to ExecuteViaEmbeddedLoader for pfs load paths. This makes loader.c's should_use_filexio_direct_load() return true, routing through fileXio (no IOP reset from the loader). POPSTARTER always performs its own IOP reset, so none is needed here. BOOT.ELF freeze: LaunchBootElf was setting reboot_iop=1 when HDD is loaded, causing SifIopReset with HDD IOP modules active → hang. Fix 4 (Lua ui.lua): always use reboot_iop=0; keep PrepareForColdExternalELFLaunch to unmount pfs slots when HDD loaded. Update DECISIONS, STATE, ROADMAP, QA_REGRESSION_MATRIX. Agent-Logs-Url: https://github.com/NathanNeurotic/POPSLoader/sessions/5c587ef6-adcb-4ee6-af95-6163f87b7e5e Co-authored-by: NathanNeurotic <109461996+NathanNeurotic@users.noreply.github.com>
Copilot
AI
changed the title
fix(elf.c): remove SIF teardown calls from ExecuteViaEmbeddedLoader — fixes D-10 black screen
fix(D-10/U-10): resolve HDD POPSTARTER rc=-1 and BOOT.ELF freeze after HDD init
Mar 29, 2026
FIO_MT_RDONLY was added to fileXio_rpc.h in a later SDK revision. CI's toolchain doesn't have it yet, causing a build error in mount_partition_context_on_pfs0. Add a #ifndef guard so the loader compiles on both old and new SDK versions. Agent-Logs-Url: https://github.com/NathanNeurotic/POPSLoader/sessions/05448afa-0c0a-4f54-bfaa-4e467c8b5b5f Co-authored-by: NathanNeurotic <109461996+NathanNeurotic@users.noreply.github.com>
Copilot
AI
changed the title
fix(D-10/U-10): resolve HDD POPSTARTER rc=-1 and BOOT.ELF freeze after HDD init
fix: D-10 rc=-1 (pfs slot stripping), BOOT.ELF freeze (reboot_iop), CI build (FIO_MT_RDONLY)
Mar 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three bugs fixed: HDD-backed POPSTARTER returning
rc=-1before the embedded loader ran, BOOT.ELF hanging after HDD init, and a CI build failure from an undeclared constant.D-10:
rc=-1— pfs slot stripped, double-mount rejectedBuildPartitionScopedExecPathwas normalisingpfs3:/APPS/…→pfs:/APPS/…. The C side then calledfileXioMount("pfs0:", partition, …)to remount — the PS2 HDD driver rejects mounting a partition at a second slot while it is already live atpfs3:→-1before the loader ever ran.Three-part fix:
BuildPartitionScopedExecPath(system.lua) — returnpfsN:/…paths unchanged; extractpfsN:/…with slot intact from compoundhdd:part:pfsN:/…forms.build_hdd_embedded_loader_target(elf.c) — checkcan_open_exec_path(resolved_path)first; if the pfs path is already accessible use it directly, skip remount.ExecuteHddBackedViaEmbeddedLoader(elf.c) — pass""aspartition_contextfor pfs load paths soshould_use_filexio_direct_load()returns true → fileXio branch, no IOP reset. POPSTARTER performs its own IOP reset.U-10: BOOT.ELF freeze after HDD init
LaunchBootElfsetreboot_iop = 1when HDD was loaded, routing throughSifIopResetwith HDD modules active → hang.LoadExecPS2(reboot_iop = 0) handles the handoff correctly.LaunchBootElf(ui.lua) — alwaysreboot_iop = 0;PrepareForColdExternalELFLaunch(unmounts pfs slots) still runs when HDD is loaded.CI build:
FIO_MT_RDONLYundeclared in loader.cmount_partition_context_on_pfs0(introduced via BETA-10-play merge) usesFIO_MT_RDONLY, which the CI toolchain'sfileXio_rpc.hdoesn't define yet.loader.c— guard-defineFIO_MT_RDONLY 0x01after the header include, matching the PS2 SDK constant value.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.