Skip to content

DVD file overlay support#216

Merged
encounter merged 14 commits into
mainfrom
26-05-15-dvd-overlay
May 30, 2026
Merged

DVD file overlay support#216
encounter merged 14 commits into
mainfrom
26-05-15-dvd-overlay

Conversation

@PJB3005

@PJB3005 PJB3005 commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Previous PR: #190

Fixes #163

PJB3005 and others added 13 commits May 15, 2026 17:31
Fixes #163

Basically allows games to "overlay" a set of file paths over the DVD. These are provided as a flat list of absolute paths, and when an overlayed file is read, the game gets the ability to provide its own read/seek callbacks.

The current implementation rebuilds the FST. This means EntryNums will not be consistent with the original disc, but it does avoid rewriting a significant chunk of the existing DVD code that relies on the FST.
Game now assigns entrynums for added files, and original disc entrynums are preserved.
Dusklight was using integer indexes for the userdata of overlay files. This meant file 0 was a null void*, and that meant the DVD code didn't treat it as an overlaid file.

Add an extra bool to avoid getting confused like this.
Since I kinda would like to eventually allow mods to be loaded without game restart (where practical)
Comment thread cmake/aurora_dvd.cmake
target_include_directories(aurora_dvd PUBLIC include)
target_link_libraries(aurora_dvd PUBLIC nod::nod ${AURORA_SDL3_TARGET})
target_link_libraries(aurora_dvd PRIVATE fmt::fmt)
target_link_libraries(aurora_dvd PUBLIC nod::nod fmt::fmt ${AURORA_SDL3_TARGET})

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make this dependency public?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fixes an import issue with system fmt headers

Comment thread lib/dolphin/dvd/fst.cpp
Comment on lines +276 to +280
if (currentDir >= 0 && static_cast<size_t>(currentDir) < s_fstEntries.size() && s_fstEntries[currentDir].isDir) {
s_currentDir = currentDir;
s_currentPath = currentPath;
return true;
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's unlikely to be a big deal but maybe log a warning if this fails? As that would indicate that the cwd got "corrupted"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@encounter encounter merged commit 7dd107e into main May 30, 2026
12 checks passed
@PJB3005 PJB3005 deleted the 26-05-15-dvd-overlay branch May 30, 2026 23:12
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.

Feature request: file mod support using an overlay

2 participants