[Feature Request] Overlay content-directory system files over the configured system directory

Open
#20,105 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
c
Domain
backend

Research direction

Start by tracing how systemfiles_in_content_dir selects the system directory and how the frontend reports missing firmware; the issue does not name specific source files or tests. Then check how session content load and unload manage temporary directories. Done means the core sees a merged view with content files taking precedence, original BIOS files remain protected, firmware reporting agrees, and fallback uses the configured directory.

Written by the indexing model from the issue text.

Description

feature request

Summary

Add an optional system-files mode that combines the configured System/BIOS directory with the directory containing the loaded content, instead of replacing one directory with the other.

Problem

Currently, systemfiles_in_content_dir makes RetroArch provide the content directory as the system directory to the core. This is useful for game-specific firmware, but the core then no longer sees files that are only present in the configured System/BIOS directory. Users must either duplicate BIOS files beside content or choose between the global directory and the content directory.

Proposed behavior

Provide a separate mode (or extend the setting with a clearly defined mode) that presents a merged view of both directories to the core:

  • Files from the configured System/BIOS directory remain available.
  • Files in the content directory are overlaid on top of the configured directory; if both contain the same relative path/name, the content-directory file takes precedence.
  • The original BIOS files are never modified or replaced.
  • The core still receives one system-directory path through the existing libretro environment interface.
  • When no content is loaded, or the content directory cannot be determined, fall back to the configured System/BIOS directory.

For example, if the configured directory contains a, b, and c, and the game directory contains a replacement b, the core should see a, the content-specific b, and c.

Implementation considerations

RetroArch could construct a temporary merged directory for the session, using copies, links, or another portable mechanism, and clean it up when the content is unloaded. Any implementation should avoid writes from a core modifying the original BIOS files. Firmware/missing-BIOS reporting should use the same merged-directory and precedence rules so it agrees with what the core can actually access. The behavior should also be documented as distinct from the existing mode that uses only the content directory.

Benefits

This allows users to keep shared BIOS files in one central location while selectively supplying per-game firmware variants without duplicating all BIOS files or changing the global system directory.

Dominant language
C
Stars
14.6k
Forks
2.4k
Avg merge
2d 5h
Merged PRs (30d)
63

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libretro/RetroArch

All issues in libretro/RetroArch

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.