Skip to content

VMManager/QT/FSUI: Basic .m3u playlist support#14271

Open
nfriedly wants to merge 4 commits intoPCSX2:masterfrom
nfriedly:m3u
Open

VMManager/QT/FSUI: Basic .m3u playlist support#14271
nfriedly wants to merge 4 commits intoPCSX2:masterfrom
nfriedly:m3u

Conversation

@nfriedly
Copy link
Copy Markdown

@nfriedly nfriedly commented Apr 7, 2026

Description of Changes

This gives PCSX2 the ability to parse .m3u files for multidisc games when opening via the System -> Start File menu. It automatically loads the first disc, and lists all discs in the System -> Change Disc menu as well as in a new FullscreenUI submenu that Change Disc opens when the current disc was launched from an .m3u file. (When not launched from a .m3u file, the FSUI Change Disc option opens the file browser as before.)

Screenshot (14) Metal Gear Solid 3 - Subsistence  Disc 1 of 3  4_14_2026 10_14_07 PM

Rationale behind Changes

I want this for Batocera, where .m3u files are the correct way to group multidisc games.

Fixes #6696

Suggested Testing Steps

I tested a Windows build, both via the System -> Start File menu in PCSX2, and by right-clicking a .m3u file in explorer and choosing Open with, then finding the executable for my modified pcsx2 build.

I tested the second commit by switching discs a few times.

I have not yet tested it in Batocera, but I think it will work.

I have also not yet tested how it handles save states where your on a subsequent disc. I'm moderately concerned that the "just load the first disk" behavior I chose could cause trouble there. (I don't have any save files beyond the first disk of any multidisc games.)

Did you use AI to help find, test, or implement this issue or feature?

Yes, I had copilot plan this out, then I tweaked the plan a bit, then had it implement it. I reviewed the code and made a few changes.

Future work

I think these ideas would make sense, but I'm not not planning on adding them in this PR:

  • Remember which file of the playlist was last loaded, at least when automatically loading savestates
  • Maybe make a hotkey to switch to the next disk(?)
  • Maybe add .m3u support to the main "all games" list(?)

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Thank you for submitting a contribution to PCSX2

As this is your first pull request, please be aware of the contributing guidelines.

Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. You can find more information about this change here.

Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!

When loading a .m3u playlist, parse the list and load the first file instead.
@Deozaan
Copy link
Copy Markdown

Deozaan commented Apr 9, 2026

I have also not yet tested how it handles save states where your on a subsequent disc. I'm moderately concerned that the "just load the first disk" behavior I chose could cause trouble there. (I don't have any save files beyond the first disk of any multidisc games.)

I did a search for online saves and found some that might work, such as this one for Xenosaga 3: https://hippyj3.blogspot.com/2019/09/pcsx2-full-save-collection-xenosaga.html

I'm sure other files are available on that site or other sites for disc-2 saves for various games that could be used for testing.

(I am not affiliated with that site. I have never heard of it until today. It was among the top search results when I searched for save files for PS2 games that had multiple discs.)

@nfriedly nfriedly changed the title Basic .m3u playlist support VMManager: Basic .m3u playlist support Apr 11, 2026
If a .m3u file was opened, Change Disc now opens a sub menu with the entries from the playlist and an option to open the file browser.
If there wasn't a .m3u playlist, it just opens the file browser directly as before.
@nfriedly nfriedly changed the title VMManager: Basic .m3u playlist support VMManager/QT/FSUI: Basic .m3u playlist support Apr 13, 2026
@Deozaan
Copy link
Copy Markdown

Deozaan commented Apr 14, 2026

I tried to test this but I couldn't get the game list to show the game in my .m3u file. Maybe I didn't format the contents of the .m3u file correctly? I'm not sure what I'm doing wrong.

Is there some setting I have to enable? Could you perhaps provide an example .m3u file or instructions on how to get a playlist to show up in the game list?

I downloaded the latest Windows build from here: https://github.com/nfriedly/pcsx2/actions

There seem to be 6 different versions to download there, and I'm not sure what the difference between them all is. Maybe I downloaded the wrong one?

@nfriedly
Copy link
Copy Markdown
Author

nfriedly commented Apr 14, 2026

I tried to test this but I couldn't get the game list to show the game in my .m3u file. Maybe I didn't format the contents of the .m3u file correctly? I'm not sure what I'm doing wrong.

Do you mean the main window that shows up when you open PCSX2? I haven't added support for that. Instead, go to System -> Start File, then select your .m3u file in the file browser and it should launch the first disc.

(It should also work if you right-click a .m3u file and choose Open with, and then find the build of PCSX2.)

Is there some setting I have to enable? Could you perhaps provide an example .m3u file or instructions on how to get a playlist to show up in the game list?

If your files are Xenosaga Episode III - Also Sprach Zarathustra (Disc 1).chd and Xenosaga Episode III - Also Sprach Zarathustra (Disc 2).chd, then a basic .m3u would just be a text file like so:

Xenosaga Episode III - Also Sprach Zarathustra (Disc 1).chd
Xenosaga Episode III - Also Sprach Zarathustra (Disc 2).chd

Then save it as "Xenosaga Episode III - Also Sprach Zarathustra.m3u" or similar in the same folder as the game roms. (Note that for windows notepad, you have to put quotes around the filename when saving, or else it "helpfully" appens a .txt to the end.)

I downloaded the latest Windows build from here: https://github.com/nfriedly/pcsx2/actions

There seem to be 6 different versions to download there, and I'm not sure what the difference between them all is. Maybe I downloaded the wrong one?

TBH, I'm not sure why there are so many different versions. Maybe for compatibility with older computers? I've just been using the top one.

@Deozaan
Copy link
Copy Markdown

Deozaan commented Apr 14, 2026

Do you mean the main window that shows up when you open PCSX2? I haven't added support for that. Instead, go to System -> Start File, then select your .m3u file in the file browser and it should launch the first disc.

I see. Thank you. In that case I did have my .m3u file formatted correctly. I'm looking forward to when the game will show up in the game list (the main window that shows up when you launch PCSX2).

My use case for PCSX2 is primarily a desktop PC, or a Steam Deck. For the desktop PC I prefer to launch using the game list. For the Steam Deck I prefer to use command line arguments to launch PCSX2 straight into the game, so I can have launchers for each game. In both cases, multi-disc games make it annoying because then you have 2-4 listings for a single game, so being able to have only a single "game" show up in the game list or Steam Deck library would be nice.

Anyway, as for testing, I was able to use System -> Start File and select my .m3u file and it loaded the first disc as expected.

I switched to disc 2 and loaded a save. Then I stopped the emulation, creating a resume state in the process. Then I launched from the .m3u file again. It just booted up the first disc. It didn't even prompt to load the state. And when I used the menu item to load a state, it said I didn't have any. It seems that each disc in multi-disc games have separate IDs, so their savestates are stored separately from disc to disc. 😕

I think in order to handle this, PCSX2 would need to check each disc ID from the .m3u file for resume states (.resume.p2s), then display the usual prompt about whether to load the state or boot fresh, etc., and if the user chooses to load the state, make sure to load the appropriate disc instead of the first disc.

The question then becomes: What if there are resume states for multiple discs? It would make sense that a player progressing through the game would have resume states for the earlier disc(s) even after they reached the later disc(s). It might be helpful default behavior if PCSX2 scanned for resume states in reverse order (or in other words, highest disc ID first) and presented the user with an offer to load the first one it encountered. This way, as a player progressed from and had resume states for disc 1 to disc 2 to disc 3, etc., they would be prompted to load the resume state that represents the furthest progress.

TBH, I'm not sure why there are so many different versions. Maybe for compatibility with older computers?

Yes, probably. I see the top one has "avx2" in the name. My CPU is relatively ancient and doesn't support avx2, so I picked one of the others (sse4) that didn't have avx2 in the name. But I'm not sure what the practical difference is between the msvc and clang versions. 🤷‍♂️

…oid unnecesarily truncating file names

Also center change disc menu to avoid writing on top of the text at the bottom right
@nfriedly
Copy link
Copy Markdown
Author

I had a thought, instead of always opening the first disc, maybe it should just bring up the overlay menu that asks which disc to use. I think that would sidestep issues with save states, and probably be a better experience overall.

I might play around with the code when I get a chance and see if I can make that work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Playlists/m3u files

2 participants