Add support for emulated Game Genie add-on

This commit is contained in:
jdgleaver
2021-10-21 15:52:40 +01:00
parent 98b2ae09ab
commit 1a961ff6be
12 changed files with 240 additions and 84 deletions

View File

@@ -2,6 +2,7 @@
#define _FCEU_DRIVER_H
#include <stdio.h>
#include <libretro.h>
#ifdef __cplusplus
extern "C" {
@@ -37,7 +38,9 @@ void FCEUD_SetPalette(uint8 index, uint8 r, uint8 g, uint8 b);
/* Displays an error. Can block or not. */
void FCEUD_PrintError(char *s);
void FCEUD_Message(char *s);
void FCEUD_DispMessage(char *m);
void FCEUD_DispMessage(enum retro_log_level level, unsigned duration, char *str);
void FCEU_DispMessage(enum retro_log_level level, unsigned duration, char *format, ...);
int FCEUI_BeginWaveRecord(char *fn);
int FCEUI_EndWaveRecord(void);
@@ -99,7 +102,14 @@ void FCEUI_DisableSpriteLimitation(int a);
/* -1 = no change, 0 = show, 1 = hide, 2 = internal toggle */
void FCEUI_SetRenderDisable(int sprites, int bg);
FCEUGI *FCEUI_LoadGame(const char *name, const uint8_t *buf, size_t bufsize);
/* frontend_post_load_init_cb() is called immediately
* after loading the ROM, allowing any frontend
* initialisation that is dependent on ROM type to
* be performed before the regular internal post-load
* initialisation */
typedef void (*frontend_post_load_init_cb_t)(void);
FCEUGI *FCEUI_LoadGame(const char *name, const uint8_t *databuf, size_t databufsize,
frontend_post_load_init_cb_t frontend_post_load_init_cb);
#ifdef COPYFAMI
/* Fake UNIF board to start new CFHI instance */
@@ -168,8 +178,6 @@ void FCEUI_LoadMovie(char *fname);
int32 FCEUI_GetDesiredFPS(void);
void FCEUI_SaveSnapshot(void);
void FCEU_DispMessage(char *format, ...);
#define FCEUI_DispMessage FCEU_DispMessage
int FCEUI_DecodePAR(const char *code, uint16 *a, uint8 *v, int *c, int *type);
int FCEUI_DecodeGG(const char *str, uint16 *a, uint8 *v, int *c);