Skip to content

ac-games (plan11): Animal Crossing past its aborts; delta romfs; DLC check

All runs: Mac, headless, scripted (nobody played). Data built from Testing Material with napple build ... --updates 2097152 --dlc all --update-romfs delta --data-only (base v0 + 3.0.1 update as delta + the 3 DLC NSPs: 01006F800232712C, ...712D, ...73E8).

Fixes

  1. v0 abort after nfp:user (SetTerminateResult 0x2a2): the nfp:user IUser table used wrong command numbers. The guest's cmd 19 is GetState (switchbrew numbering: 17/18 attach activate/deactivate, 19 GetState, 20 GetDeviceState, 23 AttachAvailabilityChangeEvent), but we answered an event handle with no state, and the SDK aborted. Table renumbered; nfc:user got its own INfc table (2 GetState, 3 IsNfcEnabled, 100.. ). services/offline.c. Verified: v0 boots 45 s, exit 0.
  2. Delta romfs (0x7d202): fs.c only knew romfs.bin. It now opens <data-dir>/romfs.delta/{romfs.json,romfs.reloc,patch.bin} over the sibling build dir's romfs.bin (base_dir) and composes reads through the RLC1 extent table (binary search, reads split at extent ends). services/fs.c. Verified: 3.0.1 delta (10.4 GB virtual romfs, 8874 extents) boots 45 s, exit 0, with 4.5 GB patch + 6.6 GB base; the delta dir stores about half of the materialized size.
  3. DLC / aoc:u: build reports 3 DLC; the guest calls List(3), PrepareAddOnContent = cmd 7 (not 6), BaseId(5), fsp cmd 202 OpenDataStorageByDataId(0x01006f80023273e8), then cmd 11 (NotifyMountAddOnContent), which was unimplemented and aborted the boot (0x7d202 follow-up: "IPC command aoc:u:11 not implemented"). The aoc:u table now follows switchbrew: 6 PrepareByApplicationId, 7 Prepare, 8 ListChangedEvent, 9 LostErrorCode, 10 ListChangedEventWithProcessId, 11/12 Notify(Un)Mount, 13/14 WithProcessId. services/misc.c. Logged: aoc: 3 add-on content item(s) found, indices 300, 301, 1000 (= title id - base - 0x1000), PrepareAddOnContent(1000): ... ready, two OpenDataStorageByDataId ... 01006f80023273e8 storages (623 MB). Only the big DLC (73E8) is mounted by the game in the first 45 s; 712C/712D (780-byte romfs) were listed but not opened.

Verified vs not

  • verified (scripted, 45 s headless): AC v0 (+3 DLC listed) exit 0; AC 3.0.1 delta + DLC exit 0; LAS and SMO exit 0, 0 CRASH.
  • tested: runtime make test, test-host, test-services (30 suites, 0 failed; new delta-storage check in test_svc_fs_dataid, new cmd 6/7/11 checks in test_svc_aoc); cargo test --release ok.
  • not run: 3.0.3 update; a fs cmd 30 path with real AC (the game uses 202); anything past the first 45 s (no one played).
  • NFP/NFC semantics: state Initialized, no devices; device calls are not implemented.

Files

Napple/runtime/src/services/{fs.c,misc.c,offline.c}, Napple/runtime/tests/{test_svc_fs_dataid.c,test_svc_aoc.c}, this note.

Follow-up: DLC discovery (orchestrator correction)

The DLC NSPs sit in AnimalCrossing+Updates+DLC/Animal Crossing New Horizons [01006F8002327XXX][3 DLCs]/. The CLI never scanned folders (it takes explicit files), so the earlier "0 DLC" came from passing only the 3 top-level files; classification of the AddOnContent CNMT type was fine (3 DLC detected). napple build now accepts folders and expands them recursively to .nsp/.xci/.nsz/.xcz (crates/napple-build/src/cli.rs). Studio's own scan is Swift and was not checked. Verified: napple build "<AnimalCrossing+Updates+DLC folder>" -k prod.keys --firmware fw.zip --updates all --dlc all --update-romfs delta --data-only gives 3 versions + 3 DLC (16 GB); 3.0.3 (ff1d1c05670db602) boots 45 s, exit 0: aoc:u Count = 3, indices 300/301/1000, Prepare(1000) -> fsp cmd 202 data id 01006f80023273e8 (623 MB storage). fs cmd 30 is not used by this game.