Closed FabLafarge closed 2 years ago
Tested on lastest retroarch/core (standalone 1.10.0/cap32 - 4.5.2 b8f09a0) and working as expected :+1:
Tested again, doesn't work here :
Steps to reproduce :
Reproduced on Windows and PSPVita builds.
Further investigation seems to indicate SNA support may be incomplete
Enabling verbose logging and attempting to load produces the following log :
SNA Error (18): C:\Temp\Fruity Frank.sna (0)=1
(1)=1
which would indicate this error: ERR_SNA_SIZE
This particular snapshot is 47.110 bytes in size, which would indicate some kind of compression. This file is valid with other emulators such as CPCEC.
I imagine SNA loading works fine with snapshots generated by the core itself, but will often fail with third party SNAs fetched off the internet.
Had a dive into the code, and my findings so far are :
cap32.h
, that "+1" violates the SNA fileformat specs (see https://www.cpcwiki.eu/index.php/Format:SNA_snapshot_file_format ) , which means all subsequent data is offset by 1.
Therefore, this core is only compatible with its own SNA and will fail with any SNA created with a third party emulator.typedef struct {
char id[8+1];
char unused1[8];
unsigned char version;
Good news: I made a build changing this
typedef struct {
char id[8+1];
char unused1[8];
unsigned char version;
to this
typedef struct {
char id[8+1];
char unused1[7];
unsigned char version;
and the core now loads successfully thirdparty uncompressed snapshots :)
We may have to make an old SNA converter, but it can be prepared as a contrib with a small python script. I prefer your solution and that the SNA is as the format that was decided as standard. Thank you very much.
Loading a SNA file seems broken at the moment. The CPC just sits at the usual BASIC prompt instead of running the snapshot.