libretro / picodrive

Fast MegaDrive/MegaCD/32X emulator
Other
43 stars 64 forks source link

[Feature Request] .m3u support for multi-discs games? #89

Closed bslenul closed 3 years ago

bslenul commented 6 years ago

Hey!

I was just wondering: would it be hard to implement m3u support to the core? I know you can use the Disk Image Append option, it works fine but it has a few downsides/bugs (RA related, not specific to PicoDrive), like it restarts the game if you didnt set a folder in Settings > Directory > File Browser, you cant append a disc if its on another drive letter than the one set for file browser, it creates 1 save file per disc, etc.

This would be of course something of really really really low priority, there are not many multi-discs games, but it would be cool to have that if not to hard and/or time consuming to implement!

I hope this is OK to ask for feature request here, if not I'm sorry (I'll close the "issue")!

Darknior commented 5 years ago

Hi Yes m3u is an important function i think. Now the emulator working really fine it can help for the CD collections.... and make easy to play multi CD games :) Thanks a lot

klepp0906 commented 4 years ago

+1 on the m3u support. needs this and chd support something awful.

lordairivis commented 4 years ago

I would love support for m3u files in lr-picodrive. I can live without chd support for the moment but considering the other emulators for disc-based systems all (or mostly all) seem to support this makes this a must-have feature for me, especially since picodrive is the only libretro emulator for the sega cd that supports disc swapping.

negativeExponent commented 4 years ago

is the disk-swapping working at least? if so, then a copy-paste of .m3u handling from other cores would probably work after adjusting params specific to core.

bslenul commented 4 years ago

Hey! Yup, as I explain in #114 it's a bit weird, but it works :)

bebess commented 3 years ago

+1 any update of the m3u support?

so many games that have 2cd or more (and 32x too)

Sanaki commented 3 years ago

Would be nice. I think it's the only major missing feature now.

negativeExponent commented 3 years ago

https://github.com/libretro/picodrive/pull/154

barely tested, just enough for swapping disks (just 2, diffferent megacd games swapped). Sounds fine at least.

Some feedbacks would be nice.

bslenul commented 3 years ago

Build fails for me on Windows: G:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: platform/libretro/libretro.o:libretro.c:(.text+0x2370): undefined reference to 'strcasestr'

negativeExponent commented 3 years ago

strcasestr

thanks for reporting...

Fixed...

bslenul commented 3 years ago

The switch itself seems to work great, but it seems there's an issue with .ldci support (to remember which disc was inserted last time).

I tried with Night Trap and Sherlock Holmes 2, the .ldci file is properly created on close content:

{
  "version": "1.0",
  "image_index": 1,
  "image_path": "F:\\Roms\\Sega - Mega CD & Sega CD\\Night Trap (USA) (Sega CD 32X)\\Night Trap (USA) (Disc 2) (Sega CD 32X) (RE-1).cue"
}

but when starting the game again it still boots on disc 1 and says "Failed to set last used disc..." and then the .ldci file is empty:

{
  "version": "1.0",
  "image_index": 0,
  "image_path": ""
}

Logs say:

[ERROR] Failed to set initial disk index:
> Expected [2] F:\Roms\Sega - Mega CD & Sega CD\Night Trap (USA) (Sega CD 32X)\Night Trap (USA) (Disc 2) (Sega CD 32X) (RE-1).cue
> Detected [1] F:\Roms\Sega - Mega CD & Sega CD\Night Trap (USA) (Sega CD 32X)\Night Trap ([INFO] [disk index file] Saving disk index file: D:\programmes\RetroArch\saves\Night Trap (USA) (Sega CD 32X).ldci
[INFO] Setting disc in tray: 1/2 - Night Trap (USA) (Disc 1) (Sega CD 32X) (RE-1)

Here if you want to see the full logs (I start on disc 1, switch disc, close content, start again): https://pastebin.com/XarF4yWU

negativeExponent commented 3 years ago

@bslenul thanks for the report...

Fixed....

https://github.com/libretro/picodrive/pull/154

bslenul commented 3 years ago

Works like a charm now! Thank you! ❤️

bebess commented 3 years ago

wow! thank you bot of you

sorry for the newbie question but where to find the new dll core for retroarch ?

negativeExponent commented 3 years ago

Works like a charm now! Thank you!

PR has been merged. any needed changes will have to be on next PR if any

2018 issue, can now finally be closed :D

Sanaki commented 3 years ago

As always, your work is fantastic and greatly appreciated.

bslenul commented 3 years ago

Yeah thank you again, glad this can be finally closed! 👍

@bebess now that it's merged, it should be available from the core downloader probably in a few hours ;)

bebess commented 3 years ago

@bebess now that it's merged, it should be available from the core downloader probably in a few hours ;)

@bslenul , the version in core downloader is still 1.98-3411c29 and dont work with m3u

bslenul commented 3 years ago

Hm, it should 🤔 If you mean you can't select the core after selecting the .m3u, make sure to update the core info files from the content downloader first (then you may have to restart RA)!

bebess commented 3 years ago

@Sanaki bslenul , yes i do all this i have an error in the log "Failed to detect ROM/CD image type"

do you test with the core downloader dll file ?

bslenul commented 3 years ago

Hm yeah weird, still not available in the content downloader for some reason... The core built fine tho, you can grab it here (assuming you're on Windows 64bit?): https://git.libretro.com/libretro/picodrive/-/jobs/354682/artifacts/browse

bebess commented 3 years ago

@bslenu , with you file , it works ! thank u for your time :)l

bslenul commented 3 years ago

Hey @negativeExponent so I've asked on Discord about the core still not being updated on the core downloader, jdgleaver answered with this:

Only artefacts from the last successful pipeline get uploaded. One failed job == pipeline failure == no new artefacts uploaded The emscripten build will have to be fixed before normal service is resumed....

Emscripten is this only one that fails: https://git.libretro.com/libretro/picodrive/-/jobs/359299

wasm-ld: error: duplicate symbol: strcasestr_retro__
>>> defined in obj-emscripten/./libretro-common/compat/compat_strcasestr.o
>>> defined in libretro_emscripten.bc
shared:ERROR: '/opt/emsdk/upstream/bin/wasm-ld @/tmp/emscripten_9X3NRH.rsp' failed (1)
Makefile.emscripten:113: recipe for target 'picodrive_libretro.js' failed
negativeExponent commented 3 years ago

building emscripten target with STATIC_LINKING = 1 should fix the errors, at least on my end (different error, using linux with latest devkitpro, but still). I dont have a way for to test if the core works though so someone has to confirm and the send the PR for it. Other cores builds emscript with STATIC_LINKING = 1, dunno why picodrive does not.