CHECKED_WRITE(chwc->chunk, chwc->size, chwc->ptr);\r
}\r
\r
+ CHECKED_WRITE(0, 0, NULL);\r
retval = 0;\r
\r
out:\r
break;\r
#endif\r
default:\r
+ if (len|chunk == 0)\r
+ goto readend;\r
if (carthw_chunks != NULL)\r
{\r
carthw_state_chunk *chwc;\r
size_t retro_serialize_size(void)
{
struct savestate_state state = { 0, };
+ unsigned AHW = PicoIn.AHW;
int ret;
+ /* we need the max possible size here, so include 32X for MD and MCD */
+ if (!(AHW & (PAHW_SMS|PAHW_PICO|PAHW_SVP)))
+ PicoIn.AHW |= PAHW_32X;
ret = PicoStateFP(&state, 1, NULL, state_skip, NULL, state_fseek);
+ PicoIn.AHW = AHW;
if (ret != 0)
return 0;