libretro / FBNeo

FBNeo - We are Team FBNeo.
https://neo-source.com
Other
228 stars 136 forks source link

RETRO_SERIALIZATION_QUIRK_ENDIAN_DEPENDENT flag #1004

Closed ghost closed 2 years ago

ghost commented 2 years ago

Could we've this flag implemented? Example on how to implement: https://github.com/ekeeke/Genesis-Plus-GX/blob/master/libretro/libretro.c#L3379

Main use would be RetroArch gracefully erroring out during a netplay connection (I believe FBNeo's byte ordering is always native, which means we cannot use its savestates across different endianness): https://github.com/libretro/RetroArch/blob/master/network/netplay/netplay_frontend.c#L1042-L1054

barbudreadmon commented 2 years ago

The compatibility is probably game-dependent, but let's do this anyway : https://github.com/libretro/FBNeo/commit/2edfcdc8f9ca6cb256664e59cdf5ff007926fccb

ghost commented 2 years ago

@barbudreadmon I've checked the commit, but you're implementing the wrong flag; It must be RETRO_SERIALIZATION_QUIRK_ENDIAN_DEPENDENT, not RETRO_SERIALIZATION_QUIRK_PLATFORM_DEPENDENT, otherwise, as an example, we won't be able to netplay between Windows x64 and Linux x64 (they've different sizeof long).

I've used GPGX as an example because I don't know of another core using that callback.

ghost commented 2 years ago

As expected: dino-220811-114156

Windows x64 (client) and Linux ARM (host).

barbudreadmon commented 2 years ago

fixed