1/*****************************************************************************\
2 Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
3 This file is licensed under the Snes9x License.
4 For further information, consult the LICENSE file in the root directory.
5\*****************************************************************************/
6
7#ifndef _SNAPSHOT_H_
8#define _SNAPSHOT_H_
9
10#include "snes9x.h"
11
12#define SNAPSHOT_MAGIC "#!s9xsnp"
13#define SNAPSHOT_VERSION_IRQ 7
14#define SNAPSHOT_VERSION_BAPU 8
15#define SNAPSHOT_VERSION_IRQ_2018 11 // irq changes were introduced earlier, since this we store NextIRQTimer directly
16#define SNAPSHOT_VERSION 11
17
18#define SUCCESS 1
19#define WRONG_FORMAT (-1)
20#define WRONG_VERSION (-2)
21#define FILE_NOT_FOUND (-3)
22#define WRONG_MOVIE_SNAPSHOT (-4)
23#define NOT_A_MOVIE_SNAPSHOT (-5)
24#define SNAPSHOT_INCONSISTENT (-6)
25
26void S9xResetSaveTimer (bool8);
27bool8 S9xFreezeGame (const char *);
28uint32 S9xFreezeSize (void);
29bool8 S9xFreezeGameMem (uint8 *,uint32);
30bool8 S9xUnfreezeGame (const char *);
31int S9xUnfreezeGameMem (const uint8 *,uint32);
32void S9xFreezeToStream (STREAM);
33int S9xUnfreezeFromStream (STREAM);
34
35#endif
36