2015-06-06 23:38:27 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <ppltasks.h>
|
|
|
|
|
#include "Emulator.h"
|
|
|
|
|
#include "CheatData.h"
|
|
|
|
|
|
|
|
|
|
using namespace concurrency;
|
|
|
|
|
using namespace Windows::Storage;
|
|
|
|
|
|
|
|
|
|
#define MAX_SAVESTATE_SLOTS 10
|
|
|
|
|
#define AUTOSAVESTATE_SLOT 9
|
|
|
|
|
|
|
|
|
|
namespace VBA10
|
|
|
|
|
{
|
|
|
|
|
extern bool ROMLoaded;
|
|
|
|
|
extern StorageFile ^ROMFile;
|
|
|
|
|
extern StorageFolder ^ROMFolder;
|
|
|
|
|
extern int SavestateSlot;
|
2015-07-06 17:29:40 +00:00
|
|
|
extern Windows::Foundation::Collections::IVector<CheatData ^> ^ROMCheats;
|
2015-07-08 02:36:35 +00:00
|
|
|
extern bool ShouldApplyNewCheats;
|
2015-08-20 14:22:02 +00:00
|
|
|
extern Platform::Collections::Map<Platform::String^, HIDControllerInput^>^ hidConfigs;
|
2015-06-06 23:38:27 +00:00
|
|
|
|
2015-06-22 17:27:18 +00:00
|
|
|
Platform::Array<unsigned char> ^GetSnapshotBuffer(unsigned char *backbuffer, size_t pitch, int imageWidth, int imageHeight);
|
|
|
|
|
|
2015-08-20 14:22:02 +00:00
|
|
|
|
2015-06-06 23:38:27 +00:00
|
|
|
task<void> ParseVBAIniAsync();
|
|
|
|
|
bool IsROMLoaded(void);
|
2015-07-06 17:02:58 +00:00
|
|
|
bool IsGBAROMLoaded(void);
|
2015-06-06 23:38:27 +00:00
|
|
|
task<void> SaveStateAsync(void);
|
|
|
|
|
task<void> SaveGBAStateAsync(void);
|
|
|
|
|
task<void> SaveGBStateAsync(void);
|
2015-06-24 16:45:34 +00:00
|
|
|
task<void> LoadStateAsync(int slot);
|
|
|
|
|
task<void> LoadGBAStateAsync(int slot);
|
|
|
|
|
task<void> LoadGBStateAsync(int slot);
|
2015-06-06 23:38:27 +00:00
|
|
|
task<void> LoadGBROMAsync(StorageFile ^file, StorageFolder ^folder);
|
|
|
|
|
task<void> LoadGBAROMAsync(StorageFile ^file, StorageFolder ^folder);
|
|
|
|
|
task<void> LoadROMAsync(StorageFile ^file, StorageFolder ^folder);
|
2015-06-13 22:33:35 +00:00
|
|
|
void ResetSync();
|
|
|
|
|
//task<void> ResetAsync(void);
|
2015-06-06 23:38:27 +00:00
|
|
|
task<ROMData> GetROMBytesFromFileAsync(StorageFile ^file);
|
|
|
|
|
task<void> SaveSRAMAsync(void);
|
|
|
|
|
task<void> SaveGBSRAMAsync(void);
|
|
|
|
|
task<void> SaveGBASRAMAsync(void);
|
|
|
|
|
task<void> SaveSRAMCopyAsync(void);
|
|
|
|
|
task<void> SaveGBASRAMCopyAsync(void);
|
|
|
|
|
task<void> SaveGBSRAMCopyAsync(void);
|
|
|
|
|
task<void> LoadSRAMAsync(void);
|
|
|
|
|
task<void> LoadGBASRAMAsync(void);
|
|
|
|
|
task<void> LoadGBSRAMAsync(void);
|
|
|
|
|
task<void> RestoreFromApplicationDataAsync(void);
|
|
|
|
|
task<void> SuspendAsync(void);
|
|
|
|
|
|
|
|
|
|
task<Windows::Foundation::Collections::IVector<CheatData ^> ^> LoadCheats(void);
|
2015-07-06 17:29:40 +00:00
|
|
|
task<bool> SaveCheats();
|
2015-06-06 23:38:27 +00:00
|
|
|
|
2015-07-06 17:02:58 +00:00
|
|
|
void ApplyCheats(Windows::Foundation::Collections::IVector<CheatData ^> ^cheats);
|
|
|
|
|
void ApplyCheatsGB(Windows::Foundation::Collections::IVector<CheatData ^> ^cheats);
|
|
|
|
|
void ApplyCheatsGBA(Windows::Foundation::Collections::IVector<CheatData ^> ^cheats);
|
2015-06-06 23:38:27 +00:00
|
|
|
|
|
|
|
|
task<void> SaveBytesToFileAsync(StorageFile ^file, unsigned char *bytes, size_t length);
|
|
|
|
|
task<ROMData> GetBytesFromFileAsync(StorageFile ^file);
|
|
|
|
|
|
|
|
|
|
void SelectSavestateSlot(int slot);
|
|
|
|
|
int GetSavestateSlot(void);
|
2015-06-23 13:41:49 +00:00
|
|
|
|
2015-08-20 14:22:02 +00:00
|
|
|
task<void> SaveHidConfig();
|
2015-08-21 03:11:53 +00:00
|
|
|
task<void> LoadHidConfig();
|
2015-08-20 14:22:02 +00:00
|
|
|
|
2015-06-06 23:38:27 +00:00
|
|
|
}
|