Skip to content

DVD file overlay support#190

Closed
PJB3005 wants to merge 5 commits into
encounter:mainfrom
PJB3005:26-05-15-dvd-overlay
Closed

DVD file overlay support#190
PJB3005 wants to merge 5 commits into
encounter:mainfrom
PJB3005:26-05-15-dvd-overlay

Conversation

@PJB3005

@PJB3005 PJB3005 commented May 15, 2026

Copy link
Copy Markdown
Collaborator

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.

PJB3005 added 2 commits May 15, 2026 17:31
Fixes encounter#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.
@KillzXGaming

Copy link
Copy Markdown

I think an option to recalculate entry nums would be important for some games (Mario Party 4 for example needs this in my testing as it has hardcoded entry num loading) but I am not sure if order is consistent between games. For that game, it is ordered as lowercase alphabetically, Maybe an optional callback to calculate these would be fine.

In my testing, the first file would not load. if (entry.overlayData) when the file index is 0 for the first file overlay, it gets skipped.

@PJB3005

PJB3005 commented May 22, 2026

Copy link
Copy Markdown
Collaborator Author

I think an option to recalculate entry nums would be important for some games (Mario Party 4 for example needs this in my testing as it has hardcoded entry num loading) but I am not sure if order is consistent between games. For that game, it is ordered as lowercase alphabetically, Maybe an optional callback to calculate these would be fine.

I'll just rewrite the branch to keep the original game entrynums in place. That'll mean that added files won't have logical entry nums but I really doubt games care about that.

@PJB3005 PJB3005 marked this pull request as draft May 27, 2026 22:27
PJB3005 added 2 commits May 28, 2026 00:39
Game now assigns entrynums for added files, and original disc entrynums are preserved.
@PJB3005 PJB3005 mentioned this pull request May 29, 2026
@PJB3005 PJB3005 closed this May 29, 2026
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