Skip to content

feat(player): let multi-disc games boot every disc at once - #3988

Draft
gantoine wants to merge 1 commit into
masterfrom
feat/emulatorjs-multi-disc-playback
Draft

feat(player): let multi-disc games boot every disc at once#3988
gantoine wants to merge 1 commit into
masterfrom
feat/emulatorjs-multi-disc-playback

Conversation

@gantoine

Copy link
Copy Markdown
Member

Description

Closes #3985.

EmulatorJS supports multi-disc playback, but the player always booted a single file, so a multi-disc game could only be played one disc at a time.

The plumbing was already in place on both ends: asking /api/roms/{id}/content/... for no file in particular returns every file zipped together with a generated .m3u, and EmulatorJS renders its in-game Disk switcher whenever the booted playlist holds more than one disc. This PR just exposes that path in the UI.

  • The v2 disc selector gets an explicit All discs entry (and loses clearable, which was an unlabelled version of the same thing).
  • The choice is persisted per game next to the existing per-file one, and is dropped as stale if the rom later stops being multi-file.
  • Sets that ship their own .m3u default to all-discs, matching the backend's own definition of a multi-disc release (Rom.has_m3u_file). Every other multi-file rom keeps booting a single file: pulling a whole set can mean hundreds of extra MB over the wire and in the browser cache, so it stays opt-in.
  • New play.all-discs key translated across all 18 locales.

Player.vue (v1) is the shared emulator component v2 mounts, so it is the one that persists the choice; the change there is limited to writing the new value instead of deleting the key. v1's Base.vue is otherwise untouched and behaves exactly as before.

Known limitation, worth calling out: on the pinned EmulatorJS 4.2.3 a set of .chd discs still boots disc 1, because its ISO/CHD branch takes priority over the cue/m3u branch and the playlist is ignored. Upstream master reordered those checks, so a version bump lights CHD sets up with no further frontend work. Cue/bin multi-disc sets work today.

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Verification: vue-tsc clean, full vitest suite green (593 tests, including 15 for the disc-resolution util), production build OK, both i18n checkers pass, trunk fmt && trunk check clean. Not yet exercised in a browser against a real multi-disc game — that check is still worth doing before merge, which is why this is a draft.

Screenshots (if applicable)

N/A — a new entry in the existing disc dropdown.


AI assistance disclosure

This PR was written with AI assistance (Claude Code, Opus 5). The agent investigated the issue, designed and implemented the change, wrote the unit tests, and ran the static checks listed above. All of it was reviewed by me before opening.

The EmulatorJS player always booted a single file, so multi-disc games
could only be played one disc at a time. Booting a multi-file rom whole
downloads it as a zip with a generated .m3u, which EmulatorJS boots with
its in-game disc switcher.

Adds an explicit "All discs" entry to the v2 disc selector, persisted
alongside the per-file choice. Sets that ship their own .m3u default to
it; every other multi-file rom keeps booting a single file so downloads
don't silently grow by a disc.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gantoine gantoine added the on-hold Pending further research or blocked by another issue label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on-hold Pending further research or blocked by another issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Multidisk Title Playback in Browser

1 participant