2018-11-15 23:31:39 +00:00
|
|
|
/*****************************************************************************\
|
|
|
|
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
|
|
|
This file is licensed under the Snes9x License.
|
|
|
|
For further information, consult the LICENSE file in the root directory.
|
|
|
|
\*****************************************************************************/
|
2010-09-25 15:46:12 +00:00
|
|
|
|
|
|
|
#ifndef _SNAPSHOT_H_
|
|
|
|
#define _SNAPSHOT_H_
|
|
|
|
|
2014-01-29 20:53:17 +00:00
|
|
|
#include "snes9x.h"
|
|
|
|
|
2010-09-25 15:46:12 +00:00
|
|
|
#define SNAPSHOT_MAGIC "#!s9xsnp"
|
2018-08-25 17:18:56 +00:00
|
|
|
#define SNAPSHOT_VERSION_IRQ 7
|
|
|
|
#define SNAPSHOT_VERSION_BAPU 8
|
|
|
|
#define SNAPSHOT_VERSION_IRQ_2018 11 // irq changes were introduced earlier, since this we store NextIRQTimer directly
|
2023-03-04 17:31:18 +00:00
|
|
|
#define SNAPSHOT_VERSION 12
|
2010-09-25 15:46:12 +00:00
|
|
|
|
|
|
|
#define SUCCESS 1
|
|
|
|
#define WRONG_FORMAT (-1)
|
|
|
|
#define WRONG_VERSION (-2)
|
|
|
|
#define FILE_NOT_FOUND (-3)
|
|
|
|
#define WRONG_MOVIE_SNAPSHOT (-4)
|
|
|
|
#define NOT_A_MOVIE_SNAPSHOT (-5)
|
|
|
|
#define SNAPSHOT_INCONSISTENT (-6)
|
|
|
|
|
|
|
|
void S9xResetSaveTimer (bool8);
|
|
|
|
bool8 S9xFreezeGame (const char *);
|
2012-01-02 00:48:51 +00:00
|
|
|
uint32 S9xFreezeSize (void);
|
|
|
|
bool8 S9xFreezeGameMem (uint8 *,uint32);
|
2010-09-25 15:46:12 +00:00
|
|
|
bool8 S9xUnfreezeGame (const char *);
|
2012-01-02 00:48:51 +00:00
|
|
|
int S9xUnfreezeGameMem (const uint8 *,uint32);
|
2010-09-25 15:46:12 +00:00
|
|
|
void S9xFreezeToStream (STREAM);
|
|
|
|
int S9xUnfreezeFromStream (STREAM);
|
2019-12-19 17:18:45 +00:00
|
|
|
bool8 S9xUnfreezeScreenshot(const char *filename, uint16 **image_buffer, int &width, int &height);
|
|
|
|
int S9xUnfreezeScreenshotFromStream(STREAM stream, uint16 **image_buffer, int &width, int &height);
|
2010-09-25 15:46:12 +00:00
|
|
|
|
|
|
|
#endif
|