Skip to content

Slim iOS build: selected DLC reaches the game folder and the app finds it - #212

Merged
v0lumehi merged 1 commit into
mainfrom
v0lumehi/slim-dlc
Oct 29, 2026
Merged

v0lumehi merged 1 commit into
mainfrom
v0lumehi/slim-dlc

Conversation

@v0lumehi

@v0lumehi v0lumehi commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Fixes #202. Thank you, @imlfl, for the precise trace. Every claim in it held up in the code.

Symptom: with the default slim IPA, selected DLC was in neither the IPA nor games/<id>/, so saves that need it could not load.

Cause, two parts:

  • Launcher: <work>/aoc was copied to games/<id>/aoc only in the success callback of the folder-packing process. The stamp reuse, image reuse and image copy branches returned before it.
  • Runtime: main.m set DM_AOC_DIR only from <App>/aoc, which a slim IPA does not have. The per-game folder was never looked at.

Fix:

  • ContentView.swift: one placeAddOnContent step, called from all four ways the archive step can end.
  • Patch 0003 (main.m): when the per-game folder is in use and has an aoc/, DM_AOC_DIR points there. It is set before the <App>/aoc fallback and never over an explicit DM_AOC_DIR. The layout is what hle_fs.c aoc_dir() reads (<index>.img), which is what the launcher writes (aoc/2.img).
  • build_ipa.sh is unchanged. This part relates to iOS: find a game's DLC (aoc/) in Documents before the app bundle seedds/nxnative#486 (DLC from Documents/aoc): the two stay compatible, because ours only fills DM_AOC_DIR when it is not set. The patch's Reason says so.

Checked

  • Tests: swift build -c release and swift test (361 tests, new AddOnContentCopyTests), patches.py check, scripts/tests, dm/ios/tests (new check in test_romfs_startup.py), compile_check.py for 010015100B514000.
  • Visual QA: no UI change. No new strings.
  • Run on a device or Mac: not run on a device. The runtime part is covered by a source-order test only.

Scope

  • No vendored file is edited directly: the change is in patch 0003, and patches.py check passes
  • Not sent to seedds/nxnative: 0003 is the fork's iOS per-game folder feature (pending), and the aoc line goes with it
  • No keys, game files or data extracted from a game in the change or the attachments

…s it

Symptom: with the slim IPA, selected DLC was in neither the IPA nor games/<id>/,
so saves that need it could not load (#202).

Cause: the launcher copied <work>/aoc to games/<id>/aoc only in the success
callback of the folder-packing process. The stamp reuse, image reuse and image
copy branches returned before it. And main.m set DM_AOC_DIR only from
<App>/aoc, which a slim IPA does not have.

Fix: one placeAddOnContent step, called from all four ways the archive step
ends. main.m (patch 0003) points DM_AOC_DIR at Documents/games/<id>/aoc when the
per-game folder is in use and has one, before <App>/aoc and never over an
explicit value. The layout is the one hle_fs.c aoc_dir reads (<index>.img).
Compatible with seedds/nxnative#486 (Documents/aoc).

Checks: swift build and swift test (361 tests), compile_check.py for
010015100B514000, patches.py check, scripts/tests, dm/ios/tests. Not tested
on a device.

Fixes #202
@v0lumehi
v0lumehi merged commit d3b55f9 into main Oct 29, 2026
10 checks passed
@v0lumehi
v0lumehi deleted the v0lumehi/slim-dlc branch October 29, 2026 18:05
@v0lumehi

Copy link
Copy Markdown
Collaborator Author

@LNPANDY merged as a fix. A note for the release notes, since it changes what the iOS app does: patch 0003 now points DM_AOC_DIR at Documents/games/<id>/aoc when the per-game folder is in use, before the app bundle's aoc/, and the launcher copies DLC images there on every path of the archive step. Slim builds with DLC then load DLC-dependent saves again. Not yet tested on a device, so a confirmation from @imlfl on the next build would help.

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.

iOS slim build omits selected DLC; DLC-dependent saves cannot load

1 participant