Skip to content

feat: load Depot assets relative to the launched DOL - #135

Merged
capz merged 1 commit into
mainfrom
feat/dol-relative-content
Nov 21, 2026
Merged

capz merged 1 commit into
mainfrom
feat/dol-relative-content

Conversation

@capz

@capz capz commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Why

AnimalTown duplicates the SDK's launcher-path parsing and device mounting. This misses Swiss aliases, keeps an obsolete Slot A restriction, and leaves game code responsible for mount ownership. The new DolphinDotNet API can resolve the DOL's actual containing directory and keep its filesystem alive for later asynchronous asset reads.

Main AnimalTown changes

  1. SDK-owned resolution. ContentBootstrap calls LaunchContent.Mount with the application validator and explicitly configured fallback locations. The domain's custom ContentSelection, ContentDevice, IContentMounts and alias parser are removed.
  2. One retained session. After validation, startup selects ContentPaths once and retains the successful LaunchContent in a static field for the process lifetime. Existing model, texture, configuration and save-artwork readers continue using the same immutable root.
  3. DOL-relative folders. For example, sdb:/games/My Town/default.dol selects cardb:/games/My Town/. Spaces and UTF-8 directories are handled by the SDK.
  4. Application validation remains. A bounded, exact content.id comparison is shared with package generation through ContentIdentity. Validation opens identity data through the SDK session and closes the stream before accepting it. A matching build with missing payload throws immediately instead of borrowing another installation.
  5. Profile separation remains explicit. Depot sets DvdSource=GcLoader for Swiss dvd:/ hints and requires a DOL source. Disc builds ignore launcher filenames and select the current FST disc root. Updater availability stays tied to the compiled distribution profile.
  6. Coordinated pins. SDK, asset tool and both content/job smoke runtimes use published 0.1.0-preview.376.1; all engine references use published 0.1.0-preview.52.1, with regenerated NuGet lockfiles.
  7. Delivery notes and test routing. Document the storage policy and Dolphin limitation; add the required four-line request summary.

The successful selection is handed to existing consumers as follows (error handling is in the source):

var selected = result.Content!;
try { ContentPaths.Select(selected.RootPath); }
catch { selected.Dispose(); throw; }
content = selected; // retained beyond startup and town unload

Storage behavior to review

Situation Behavior
Recognized DOL path Use its exact device/directory; missing or mismatched content does not fall through.
sd:/ or sdc:/ Authoritative SD2SP2 selection, replacing the old generic-sd:/ ambiguity.
sda:/ / carda:/ Explicit Slot A SD Gecko support; existing save selection can use Slot B or no-save mode.
Depot Swiss dvd:/.../default.dol Resolve the GC Loader app directory without mounting a physical/ODE disc.
Missing, relative or unsupported metadata Bounded apps/animaltown/ fallback: SP2 → Slot B → GC Loader.
Malformed path Reject before mount discovery.
Exact identity, incomplete payload Stop and report the incomplete installation.
Disc executable Require its identified current disc; never borrow an SD app.

Ordinary path strings are still path strings, not generation-bound handles. The retained mount and immutable root preserve their existing lifetime contract. Directly opening a DOL in Dolphin does not expose the host PC directory; the emulator must still provide a supported guest-visible volume.

Validation

Rebased onto main at 171858e, preserving atlas-page streaming checks and offline-job validation routing. Both engine packages now restore from public NuGet as 0.1.0-preview.52.1 (repository commit c0ed77142af447c23dc42414d8428e816e6c5e07), with the exact SDK/runtime dependency 0.1.0-preview.376.1. All project lockfiles were regenerated from published packages.

Local validation on rebased head 30bfff9:

  • Validation routing: 79 cases; selection integration: 8 cases; versioning: 84 cases.
  • 347,358 rendering checks; 4,713,186 gameplay/render/texture checks; 889 memory-card adapter checks.
  • All selected asset/package/tooling and native patch suites passed.
  • 52 production content-startup AOT cases passed across disc/Depot profiles, including launcher aliases, content identity, retained mount lifetime, streamed atlas pages and GC-stressed late reads.
  • Job-system production AOT, native shadows/lights, paths, texture paging and voice checks passed.
  • Backend integration passed separately against a fresh PostgreSQL database: split storage, legacy migration, authentication, ownership, idempotency, rollback, friendship/blocking, escrow, grants and atomic town-shop purchases. The combined local runner could not create its own database because the build container lacks Docker, so this same-head backend run supplied that coverage.
  • Game managed build and fresh native-source generation passed. Existing nullable warnings remain.
  • Clean GitHub Build and release CI passed on this exact head, including version policy, console/backend/native checks, release packaging, Dolphin memory-card/temporary-play validation, and artifact publication.
  • git diff --check passed.

Physical adapter, launcher and hot-plug qualification remains separate; host storage fixtures do not claim hardware coverage.

@capz
capz force-pushed the feat/dol-relative-content branch 2 times, most recently from 5d0e96a to 484e1c6 Compare November 20, 2026 22:53
@capz
capz force-pushed the feat/dol-relative-content branch from 484e1c6 to 30bfff9 Compare November 21, 2026 10:26
@capz
capz marked this pull request as ready for review November 21, 2026 10:26
@capz
capz merged commit f5cc386 into main Nov 21, 2026
2 of 4 checks passed
@capz
capz deleted the feat/dol-relative-content branch November 21, 2026 10:55
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