Revert "chatgpt-cutoff" -- unreviewed HDD rewrite with a live drive-corruption risk - #237
Conversation
…th a live drive-corruption risk This reverts commit d14f3e7 (direct push, no PR, no review), which rolled to testers on 07-18. The GOALS are good and will be re-landed properly -- APA + BDM-ATA coexistence on the shared ATA stack (R3Z-style, the audit report's xhdd/bdmfs_fatfs auto-mount theory for Vapor's APA listing bug is worth pursuing), module-state reset across sysReset, and the gDeinitAtaSelected park-suppression. But the execution ships several regressions and one unacceptable risk: 1. DRIVE-CORRUPTION RISK (the reason this cannot wait): it deleted hddDetectNonSonyFileSystem(), the upstream exFAT/MBR/GPT safety guard, and now loads the APA driver ps2hdd.irx UNCONDITIONALLY on any disk -- trusting an unverified claim that its init is read-only for non-APA disks. The guard's own comment: loading APA modules on a non-APA disk "runs the risk of corrupting the HDD as it will try to write APA partition data." This fork has a real exFAT-corruption report in its history. An unreviewed removal of an upstream data-safety guard cannot sit on the rolling build. 2. FifthFox's "401: HardDisk Drive not detected" on every boot (SCPH-700012 slim, reported 07-19 on the rolling build that contains this commit): the old loader LATCHED a failure once per session (load count stayed >= 1 -> later calls returned BUSYLOADING silently); the rewrite resets hddModulesLoading = 0 on failure so every later probe re-fires the error toast. It also removed the F-12 APA/BDM-ATA load reconcile, so a config carrying both flags now activates the APA probe where it was previously force-disabled -- new 401 exposure on HDD-less consoles. 3. HDD_APA_UNAVAILABLE is a one-way latch with NO re-probe path: one transient hddCheck() hiccup permanently hides the APA tab for the session -- a brand-new way to produce exactly the "APA games not listing" bug this commit set out to fix. 4. hddNeedsUpdate flips menuItem.visible (GUI state) from the IO thread; a hard 1-second DelayThread in every first HDD module load; a 250x10ms busy-wait; and repo pollution (a ChatGPT audit report + 11 PNGs committed to the repository root). The wins return as reviewed, build-verified PRs on top of this revert. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe change restructures HDD module loading and teardown, adds partition-format safeguards, reconciles conflicting APA and BDM HDD settings, updates device-setting interlocks and boot notifications, removes obsolete ATA-state APIs, and deletes the audit report. ChangesHDD backend lifecycle
Configuration and GUI reconciliation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant _loadConfig
participant CONFIG_OPL
participant guiShowNotifications
_loadConfig->>_loadConfig: detect conflicting HDD backend settings
_loadConfig->>CONFIG_OPL: persist corrected settings
_loadConfig->>guiShowNotifications: set reconciliation popup flag
guiShowNotifications-->>_loadConfig: clear popup after timeout
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request refactors HDD and BDM module management in OPL to resolve conflicts between APA and BDM-ATA backends, introducing mutual exclusivity in the GUI and adding safety checks to prevent loading APA modules on MBR/GPT drives. However, several critical issues were identified in the review: removing the module state resets during a system reset causes desynchronization that breaks subsequent device access; the new filesystem detection logic incorrectly blocks the initialization and formatting of blank or unformatted drives; and a failure in module loading leaves the load count in an invalid state, permanently preventing future retries.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| sysReset(); | ||
| hddResetModuleState(); | ||
| bdmResetModuleState(); | ||
|
|
There was a problem hiding this comment.
Deleting hddResetModuleState() and bdmResetModuleState() from the reset() function causes a critical desynchronization between the EE-side module loading state and the actual IOP state after an in-process sysReset() (such as when exiting the NBD server). Since the IOP is reset, all loaded modules are gone, but the EE-side variables (like hddModulesLoaded and iUSBModLoaded) still remain. Consequently, subsequent attempts to access BDM or HDD devices will skip loading the required modules, rendering these devices completely non-functional. Please restore these functions and their calls in reset().
| sysReset(); | |
| hddResetModuleState(); | |
| bdmResetModuleState(); | |
| sysReset(); | |
| hddResetModuleState(); | |
| bdmResetModuleState(); |
References
- When handling removable media or card swaps, ensure that static loading or caching flags are reset when the media is removed or absent.
| if (hddDetectNonSonyFileSystem() != 0) { | ||
| // Drive is MBR/GPT style, or unknown, bail out or risk corrupting the drive. | ||
| LOG("HDDSUPPORT LoadSupportModules bailing out early...\n"); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Using hddDetectNonSonyFileSystem() != 0 as a bailout condition prevents loading the APA/PFS modules on completely blank or unformatted hard drives, as they will return -1 (unrecognized partition data). This makes it impossible for OPL to detect, format, or initialize new drives. Additionally, any transient read error will also cause a silent bailout without displaying a proper error message to the user. Changing the check to == 1 ensures that we only bail out when we are certain of a non-Sony filesystem (MBR or GPT), while allowing blank/unformatted drives to proceed to hddCheck() where they can be properly handled and formatted.
| if (hddDetectNonSonyFileSystem() != 0) { | |
| // Drive is MBR/GPT style, or unknown, bail out or risk corrupting the drive. | |
| LOG("HDDSUPPORT LoadSupportModules bailing out early...\n"); | |
| return; | |
| } | |
| if (hddDetectNonSonyFileSystem() == 1) { | |
| // Drive is MBR/GPT style, bail out or risk corrupting the drive. | |
| LOG("HDDSUPPORT LoadSupportModules bailing out early...\n"); | |
| return; | |
| } |
| if (retLoadModule < 0) { | ||
| LOG("HDD: No HardDisk Drive detected.\n"); | ||
| setErrorMessageWithCode(_STR_HDD_NOT_CONNECTED_ERROR, ERROR_HDD_IF_NOT_DETECTED); | ||
| retStatus = HDD_LOADMODULES_STATUS_ERROR; | ||
| } else { | ||
| retStatus = HDD_LOADMODULES_STATUS_NOERROR; | ||
| hddModulesLoaded = 1; | ||
| } |
There was a problem hiding this comment.
If retLoadModule < 0 (module loading fails), hddModulesLoadCount is left at 1 (or incremented). On any subsequent call to hddLoadModules(), the function will enter the else block, increment the count, and permanently return HDD_LOADMODULES_STATUS_BUSYLOADING without ever attempting to reload the modules. This prevents the user from retrying HDD initialization if the first attempt failed. Resetting hddModulesLoadCount = 0 on failure resolves this issue and allows future retries.
| if (retLoadModule < 0) { | |
| LOG("HDD: No HardDisk Drive detected.\n"); | |
| setErrorMessageWithCode(_STR_HDD_NOT_CONNECTED_ERROR, ERROR_HDD_IF_NOT_DETECTED); | |
| retStatus = HDD_LOADMODULES_STATUS_ERROR; | |
| } else { | |
| retStatus = HDD_LOADMODULES_STATUS_NOERROR; | |
| hddModulesLoaded = 1; | |
| } | |
| if (retLoadModule < 0) { | |
| LOG("HDD: No HardDisk Drive detected.\n"); | |
| setErrorMessageWithCode(_STR_HDD_NOT_CONNECTED_ERROR, ERROR_HDD_IF_NOT_DETECTED); | |
| retStatus = HDD_LOADMODULES_STATUS_ERROR; | |
| hddModulesLoadCount = 0; | |
| } else { | |
| retStatus = HDD_LOADMODULES_STATUS_NOERROR; | |
| hddModulesLoaded = 1; | |
| } |
References
- When handling removable media or card swaps, ensure that static loading or caching flags are reset when the media is removed or absent.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/opl.c (1)
2652-2657: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winClear the module-loaded flags on reset.
sysReset()only reboots the IOP and resets the DEV9 bookkeeping; the EE-side HDD/BDM load flags stay set and still gate reloads. Afterreset(), a later load path can skip reloading modules that the IOP just dropped.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/opl.c` around lines 2652 - 2657, Update reset() to clear the EE-side HDD/BDM module-loaded flags after sysReset(), so subsequent load paths reload modules dropped by the IOP; preserve the existing mcInit(MC_TYPE_XMC) behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/hddsupport.c`:
- Line 242: Update hddDetectNonSonyFileSystem to use internal linkage by
declaring it static, and change its empty parameter list to (void). Keep its
existing behavior unchanged.
- Around line 198-239: In the failure branch of the hdd module-loading function,
reset hddModulesLoadCount to zero so subsequent calls can retry instead of
remaining busy. Also unwind any partial module-loading state created by the
current load attempt, ensuring hddModulesLoaded remains false and any
successfully loaded modules are cleaned up using the existing unload mechanism.
---
Outside diff comments:
In `@src/opl.c`:
- Around line 2652-2657: Update reset() to clear the EE-side HDD/BDM
module-loaded flags after sysReset(), so subsequent load paths reload modules
dropped by the IOP; preserve the existing mcInit(MC_TYPE_XMC) behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: c7989bbe-8c47-43ec-9a81-f7b29e5d0ff9
⛔ Files ignored due to path filters (11)
delivered/eth.pngis excluded by!**/*.pngdelivered/fav.pngis excluded by!**/*.pngdelivered/hdd.pngis excluded by!**/*.pngdelivered/hdd_bd.pngis excluded by!**/*.pngdelivered/ilk_bd.pngis excluded by!**/*.pngdelivered/m4s_bd.pngis excluded by!**/*.pngdelivered/mmce.pngis excluded by!**/*.pngdelivered/udp_bd.pngis excluded by!**/*.pngdelivered/udp_fs.pngis excluded by!**/*.pngdelivered/usb.pngis excluded by!**/*.pngdelivered/usb_bd.pngis excluded by!**/*.png
📒 Files selected for processing (8)
REPORT_RIPTOPL_VCD_THEMES_IGR_AUDIT.mdinclude/bdmsupport.hinclude/hddsupport.hinclude/opl.hsrc/bdmsupport.csrc/gui.csrc/hddsupport.csrc/opl.c
💤 Files with no reviewable changes (2)
- REPORT_RIPTOPL_VCD_THEMES_IGR_AUDIT.md
- include/bdmsupport.h
📜 Review details
⏰ Context from checks skipped due to timeout. (19)
- GitHub Check: merge-variants
- GitHub Check: merge-debug-ps2dev-latest
- GitHub Check: build-variants-ps2dev-latest (EXTRA_FEATURES=0, PADEMU=0)
- GitHub Check: build-debug (DTL_T10000=1, :v20250725-2)
- GitHub Check: build
- GitHub Check: build-debug-ps2dev-latest (iopcore_debug)
- GitHub Check: build-debug (eesio_debug, :v20250725-2)
- GitHub Check: build-variants-ps2dev-latest (EXTRA_FEATURES=1, PADEMU=1)
- GitHub Check: build-debug (ingame_ppctty_debug, :v20250725-2)
- GitHub Check: build-debug-ps2dev-latest (DTL_T10000=1)
- GitHub Check: build-debug (iopcore_ppctty_debug, :v20250725-2)
- GitHub Check: build-variants (EXTRA_FEATURES=1, PADEMU=0)
- GitHub Check: build-variants (EXTRA_FEATURES=0, PADEMU=0)
- GitHub Check: build-variants-ps2dev-latest (EXTRA_FEATURES=1, PADEMU=0)
- GitHub Check: build-debug-ps2dev-latest (iopcore_ppctty_debug)
- GitHub Check: build-debug-ps2dev-latest (eesio_debug)
- GitHub Check: build-debug (ingame_debug, :v20250725-2)
- GitHub Check: build-variants (EXTRA_FEATURES=1, PADEMU=1)
- GitHub Check: build-ps2dev-latest
🧰 Additional context used
🪛 ast-grep (0.44.1)
src/hddsupport.c
[warning] 245-245: Multiplication in an allocation size can overflow and under-allocate; use calloc (which checks for overflow) or validate the product before allocating.
Context: malloc(512 * 2)
Note: [CWE-190] Integer Overflow or Wraparound.
(alloc-size-overflow-c)
🪛 Cppcheck (2.21.0)
src/hddsupport.c
[style] 242-242: The function 'hddDetectNonSonyFileSystem' should have static linkage since it is not used outside of its translation unit.
(staticFunction)
[style] 287-287: The function 'hddLoadSupportModules' should have static linkage since it is not used outside of its translation unit.
(staticFunction)
🔇 Additional comments (13)
include/hddsupport.h (1)
94-94: LGTM!src/hddsupport.c (2)
287-366: LGTM!
1139-1191: LGTM!src/opl.c (4)
198-199: LGTM!
1337-1338: LGTM!
1691-1710: LGTM!
1799-1808: LGTM!include/opl.h (2)
218-219: LGTM!
260-260: LGTM!src/gui.c (3)
305-366: LGTM!
1234-1241: LGTM!
1289-1295: LGTM!src/bdmsupport.c (1)
1330-1351: LGTM!
| if (hddModulesLoadCount == 0) { | ||
| // Increment the load count as soon as possible to prevent thread scheduling from allowing another thread to | ||
| // call into here and try to double load modules. | ||
| hddModulesLoadCount = 1; | ||
|
|
||
| // DEV9 must be loaded, as HDD.IRX depends on it. Even if not required by the I/F (i.e. HDPro) | ||
| sysInitDev9(); | ||
| hddDev9RefHeld = 1; | ||
| } | ||
|
|
||
| // try to detect HD Pro Kit (not the connected HDD), | ||
| // if detected it loads the specific ATAD module | ||
| hddHDProKitDetected = hddCheckHDProKit(); | ||
| if (hddHDProKitDetected) { | ||
| LOG("[ATAD_HDPRO]:\n"); | ||
| retLoadModule = sysLoadModuleBuffer(&hdpro_atad_irx, size_hdpro_atad_irx, 0, NULL); | ||
| LOG("[XHDD]:\n"); | ||
| sysLoadModuleBuffer(&xhdd_irx, size_xhdd_irx, 6, "-hdpro"); | ||
| // try to detect HD Pro Kit (not the connected HDD), | ||
| // if detected it loads the specific ATAD module | ||
| hddHDProKitDetected = hddCheckHDProKit(); | ||
| if (hddHDProKitDetected) { | ||
| LOG("[ATAD_HDPRO]:\n"); | ||
| retLoadModule = sysLoadModuleBuffer(&hdpro_atad_irx, size_hdpro_atad_irx, 0, NULL); | ||
| LOG("[XHDD]:\n"); | ||
| sysLoadModuleBuffer(&xhdd_irx, size_xhdd_irx, 6, "-hdpro"); | ||
| } else { | ||
| LOG("[BDM]:\n"); | ||
| sysLoadModuleBuffer(&bdm_irx, size_bdm_irx, 0, NULL); | ||
| LOG("[ATAD]:\n"); | ||
| retLoadModule = sysLoadModuleBuffer(&ps2atad_irx, size_ps2atad_irx, 0, NULL); | ||
| LOG("[XHDD]:\n"); | ||
| sysLoadModuleBuffer(&xhdd_irx, size_xhdd_irx, 0, NULL); | ||
| } | ||
|
|
||
| if (retLoadModule < 0) { | ||
| LOG("HDD: No HardDisk Drive detected.\n"); | ||
| setErrorMessageWithCode(_STR_HDD_NOT_CONNECTED_ERROR, ERROR_HDD_IF_NOT_DETECTED); | ||
| retStatus = HDD_LOADMODULES_STATUS_ERROR; | ||
| } else { | ||
| retStatus = HDD_LOADMODULES_STATUS_NOERROR; | ||
| hddModulesLoaded = 1; | ||
| } | ||
| } else { | ||
| LOG("[BDM]:\n"); | ||
| sysLoadModuleBuffer(&bdm_irx, size_bdm_irx, 0, NULL); | ||
| LOG("[ATAD]:\n"); | ||
| retLoadModule = sysLoadModuleBuffer(&ps2atad_irx, size_ps2atad_irx, 0, NULL); | ||
| // wLaunchELF-R3Z deliberately leaves a one-second settle window after ATA_BD | ||
| // becomes resident and before the APA stack touches it. Both BDM-ATA and APA | ||
| // share this same physical driver, so do this once at its first load. | ||
| if (retLoadModule >= 0) | ||
| DelayThread(1000 * 1000); | ||
| LOG("[XHDD]:\n"); | ||
| sysLoadModuleBuffer(&xhdd_irx, size_xhdd_irx, 0, NULL); | ||
| hddModulesLoadCount++; | ||
| if (!hddModulesLoaded) | ||
| retStatus = HDD_LOADMODULES_STATUS_BUSYLOADING; | ||
| } | ||
|
|
||
| if (retLoadModule < 0) { | ||
| // Leave the attempt retryable without powering DEV9 down. sysShutdownDev9's DDIOC_OFF is a | ||
| // terminal hardware stop, not a reversible reference release within the current IOP session. | ||
| hddModulesLoading = 0; | ||
| LOG("HDD: No HardDisk Drive detected.\n"); | ||
| setErrorMessageWithCode(_STR_HDD_NOT_CONNECTED_ERROR, ERROR_HDD_IF_NOT_DETECTED); | ||
| return HDD_LOADMODULES_STATUS_ERROR; | ||
| LOG("HDDSUPPORT LoadModules done\n"); | ||
| return retStatus; | ||
| } |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show the relevant file region with line numbers.
sed -n '150,260p' src/hddsupport.c
echo '---'
# Find uses of hddModulesLoadCount / hddModulesLoaded / hddShutdown to understand lifecycle.
rg -n "hddModulesLoadCount|hddModulesLoaded|HDD_LOADMODULES_STATUS_BUSYLOADING|hddShutdown|hddLoadModules" src/hddsupport.cRepository: NathanNeurotic/Open-PS2-Loader
Length of output: 5001
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the rest of the lifecycle around shutdown/reset.
sed -n '260,380p' src/hddsupport.c
echo '---'
sed -n '1120,1215p' src/hddsupport.cRepository: NathanNeurotic/Open-PS2-Loader
Length of output: 8039
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Look for any reinitialization or rollback of the load counter elsewhere.
rg -n "hddModulesLoadCount\s*=|hddModulesLoaded\s*=|busyloading|load count" srcRepository: NathanNeurotic/Open-PS2-Loader
Length of output: 663
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Print the exact load/shutdown functions with line numbers.
nl -ba src/hddsupport.c | sed -n '188,260p'
echo '---'
nl -ba src/hddsupport.c | sed -n '1130,1210p'Repository: NathanNeurotic/Open-PS2-Loader
Length of output: 208
Reset the load counter on the error path
hddModulesLoadCount is set to 1 before loading, but the failure branch never clears it. That leaves later calls stuck in HDD_LOADMODULES_STATUS_BUSYLOADING while hddModulesLoaded is still false, so a transient probe failure can’t retry until shutdown drains the count to zero. Reset the counter here; if any module was already loaded on this path, unwind that state too.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/hddsupport.c` around lines 198 - 239, In the failure branch of the hdd
module-loading function, reset hddModulesLoadCount to zero so subsequent calls
can retry instead of remaining busy. Also unwind any partial module-loading
state created by the current load attempt, ensuring hddModulesLoaded remains
false and any successfully loaded modules are cleaned up using the existing
unload mechanism.
| } | ||
|
|
||
| // Returns 1 for MBR/GPT, 0 for APA, and -1 if an error occured | ||
| int hddDetectNonSonyFileSystem() |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Confirm hddDetectNonSonyFileSystem is TU-local (no header decl, no cross-file use).
rg -nP '\bhddDetectNonSonyFileSystem\b' --type=c --type=cpp -g '*.h'
rg -nP '\bhddDetectNonSonyFileSystem\b' -C2Repository: NathanNeurotic/Open-PS2-Loader
Length of output: 168
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== File list =="
git ls-files | rg '(^|/)hddsupport\.(c|h)$|(^|/)src/.*hddsupport'
echo
echo "== All references to hddDetectNonSonyFileSystem =="
rg -n --hidden --no-messages '\bhddDetectNonSonyFileSystem\b' .
echo
echo "== Outline of src/hddsupport.c =="
ast-grep outline src/hddsupport.c --view expanded || true
echo
echo "== Relevant excerpt from src/hddsupport.c =="
nl -ba src/hddsupport.c | sed -n '220,310p'
echo
echo "== Relevant excerpt from src/hddsupport.h if present =="
if [ -f src/hddsupport.h ]; then nl -ba src/hddsupport.h | sed -n '1,220p'; fiRepository: NathanNeurotic/Open-PS2-Loader
Length of output: 4003
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf 'Files matching hddsupport:\n'
git ls-files | rg 'hddsupport'
printf '\nSearch for the symbol in tracked text files:\n'
rg -n --hidden --no-messages 'hddDetectNonSonyFileSystem' $(git ls-files)Repository: NathanNeurotic/Open-PS2-Loader
Length of output: 980
Make hddDetectNonSonyFileSystem static — it’s only used within src/hddsupport.c and isn’t declared in include/hddsupport.h, so give it internal linkage and change the empty parameter list to (void).
🧰 Tools
🪛 Cppcheck (2.21.0)
[style] 242-242: The function 'hddDetectNonSonyFileSystem' should have static linkage since it is not used outside of its translation unit.
(staticFunction)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/hddsupport.c` at line 242, Update hddDetectNonSonyFileSystem to use
internal linkage by declaring it static, and change its empty parameter list to
(void). Keep its existing behavior unchanged.
Source: Linters/SAST tools
Why revert now
d14f3e73went directly to master (no PR, no review) and shipped to testers via Rolling on 07-18. Its goals are good — APA + BDM-ATA coexistence, R3Z-style module residency — and they'll be re-landed properly. But as shipped:1. Live drive-corruption risk (the urgent one). It deleted
hddDetectNonSonyFileSystem()— upstream's exFAT/MBR/GPT safety guard — and now loads the APA driverps2hdd.irxunconditionally on any disk, trusting an unverified claim that its init is read-only for non-APA disks. The guard's own comment says loading APA modules on a non-APA disk "runs the risk of corrupting the HDD as it will try to write APA partition data," and this fork has a real exFAT-corruption report in its history. That cannot sit on the rolling build.2. FifthFox's "401: HardDisk Drive not detected" every boot (slim SCPH-700012, reported 07-19 on the build containing this commit): the old loader latched a failure once per session; the rewrite resets
hddModulesLoading = 0on failure so every later probe re-fires the toast. It also removed the F-12 load reconcile, so a config carrying both HDD flags now activates the APA probe where it was previously force-disabled — new 401 exposure on HDD-less consoles.3.
HDD_APA_UNAVAILABLEis a one-way latch with no re-probe — one transienthddCheck()hiccup permanently hides the APA tab for the session: a brand-new way to produce exactly the "APA games not listing" bug it set out to fix.4. IO-thread mutation of
menuItem.visible(GUI state), a hard 1-secondDelayThreadon every first HDD load, a 250×10ms busy-wait, and repo pollution (ChatGPT report + 11 PNGs at the repo root).What happens to the good ideas
hddResetModuleState/bdmResetModuleStateon sysReset and thegDeinitAtaSelectedpark-suppression are candidates to re-land as reviewed PRs.Clean
make cleanbuild, exit 0.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Documentation