ekeeke / Genesis-Plus-GX

An enhanced port of Genesis Plus - accurate & portable Sega 8/16 bit emulator
Other
673 stars 193 forks source link

[Libretro] Add VFS support #494

Closed OmniBlade closed 1 year ago

OmniBlade commented 1 year ago

Apologies if this has been raised before, but the libretro API supports a VFS implementation that allows frontends to abstract file IO. In particular, the Kodi implementation uses this to handle loading files from network share that aren't mounted at the OS level and for loading files from within archive files.

It doesn't appear that Genesis-Plus-GX currently supports file io via the VFS implementation so when used with Kodi games cannot be loaded from anything other than directly from the OS mounted file systems.

ekeeke commented 1 year ago

This is the wrong place for asking about libretro/retroarch features as I don't really maintain this port. You are better to ask for support on this in libretro fork repository: https://github.com/libretro/Genesis-Plus-GX

Also, I might be wrong but I think VFS support is already implemented in (no idea how it works or if there are limitation for this core though). On emulation core side, all real-time file accesses (for CD files mainly)are already done behind macros that can be redefined by frontend to any file I/O implementation (no direct use of fopen/fread/fseek/fclose in core sourcecode), cf. https://github.com/ekeeke/Genesis-Plus-GX/blob/cea418ece8152520faf1a9aea2d17a89906a6dc7/core/macros.h#L56