2006-07-29 05:46:15 +00:00
|
|
|
#ifndef __DRIVER_H_
|
|
|
|
#define __DRIVER_H_
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2008-05-23 09:58:38 +00:00
|
|
|
#include <string>
|
2008-06-17 06:55:07 +00:00
|
|
|
#include <iosfwd>
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
#include "git.h"
|
2008-07-09 05:47:13 +00:00
|
|
|
#include "file.h"
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
FILE *FCEUD_UTF8fopen(const char *fn, const char *mode);
|
2008-06-17 06:55:07 +00:00
|
|
|
inline FILE *FCEUD_UTF8fopen(const std::string &n, const char *mode) { return FCEUD_UTF8fopen(n.c_str(),mode); }
|
2010-05-17 21:02:38 +00:00
|
|
|
EMUFILE_FILE* FCEUD_UTF8_fstream(const char *n, const char *m);
|
|
|
|
inline EMUFILE_FILE* FCEUD_UTF8_fstream(const std::string &n, const char *m) { return FCEUD_UTF8_fstream(n.c_str(),m); }
|
2008-08-13 07:49:48 +00:00
|
|
|
FCEUFILE* FCEUD_OpenArchiveIndex(ArchiveScanRecord& asr, std::string& fname, int innerIndex);
|
|
|
|
FCEUFILE* FCEUD_OpenArchive(ArchiveScanRecord& asr, std::string& fname, std::string* innerFilename);
|
|
|
|
ArchiveScanRecord FCEUD_ScanArchive(std::string fname);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
//mbg 7/23/06
|
2007-02-11 10:10:16 +00:00
|
|
|
const char *FCEUD_GetCompilerString();
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//This makes me feel dirty for some reason.
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEU_printf(char *format, ...);
|
|
|
|
#define FCEUI_printf FCEU_printf
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Video interface
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUD_SetPalette(uint8 index, uint8 r, uint8 g, uint8 b);
|
|
|
|
void FCEUD_GetPalette(uint8 i,uint8 *r, uint8 *g, uint8 *b);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Displays an error. Can block or not.
|
2007-02-11 10:10:16 +00:00
|
|
|
void FCEUD_PrintError(const char *s);
|
2007-02-05 19:37:24 +00:00
|
|
|
void FCEUD_Message(const char *s);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Network interface
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Call only when a game is loaded.
|
2006-07-29 05:46:15 +00:00
|
|
|
int FCEUI_NetplayStart(int nlocal, int divisor);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
// Call when network play needs to stop.
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_NetplayStop(void);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Note: YOU MUST NOT CALL ANY FCEUI_* FUNCTIONS WHILE IN FCEUD_SendData() or FCEUD_RecvData().
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Return 0 on failure, 1 on success.
|
2006-07-29 05:46:15 +00:00
|
|
|
int FCEUD_SendData(void *data, uint32 len);
|
|
|
|
int FCEUD_RecvData(void *data, uint32 len);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Display text received over the network.
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUD_NetplayText(uint8 *text);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Encode and send text over the network.
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_NetplayText(uint8 *text);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Called when a fatal error occurred and network play can't continue. This function
|
|
|
|
//should call FCEUI_NetplayStop() after it has deinitialized the network on the driver
|
|
|
|
//side.
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUD_NetworkClose(void);
|
|
|
|
|
2008-06-01 16:31:27 +00:00
|
|
|
bool FCEUI_BeginWaveRecord(const char *fn);
|
2006-07-29 05:46:15 +00:00
|
|
|
int FCEUI_EndWaveRecord(void);
|
|
|
|
|
|
|
|
void FCEUI_ResetNES(void);
|
|
|
|
void FCEUI_PowerNES(void);
|
|
|
|
|
|
|
|
void FCEUI_NTSCSELHUE(void);
|
|
|
|
void FCEUI_NTSCSELTINT(void);
|
|
|
|
void FCEUI_NTSCDEC(void);
|
|
|
|
void FCEUI_NTSCINC(void);
|
|
|
|
void FCEUI_GetNTSCTH(int *tint, int *hue);
|
|
|
|
void FCEUI_SetNTSCTH(int n, int tint, int hue);
|
|
|
|
|
2008-06-07 08:18:04 +00:00
|
|
|
void FCEUI_SetInput(int port, ESI type, void *ptr, int attrib);
|
|
|
|
void FCEUI_SetInputFC(ESIFC type, void *ptr, int attrib);
|
2008-06-09 08:15:20 +00:00
|
|
|
|
|
|
|
//tells the emulator whether a fourscore is attached
|
|
|
|
void FCEUI_SetInputFourscore(bool attachFourscore);
|
|
|
|
//tells whether a fourscore is attached
|
|
|
|
bool FCEUI_GetInputFourscore();
|
2010-04-28 19:25:52 +00:00
|
|
|
//tells whether the microphone is used
|
|
|
|
bool FCEUI_GetInputMicrophone();
|
2008-06-09 08:15:20 +00:00
|
|
|
|
2008-05-21 15:35:37 +00:00
|
|
|
void FCEUI_UseInputPreset(int preset);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//New interface functions
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//0 to order screen snapshots numerically(0.png), 1 to order them file base-numerically(smb3-0.png).
|
2009-03-22 05:31:17 +00:00
|
|
|
//this variable isn't used at all, snap is always name-based
|
|
|
|
//void FCEUI_SetSnapName(bool a);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//0 to keep 8-sprites limitation, 1 to remove it
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_DisableSpriteLimitation(int a);
|
|
|
|
|
2008-06-22 02:38:00 +00:00
|
|
|
void FCEUI_SetRenderPlanes(bool sprites, bool bg);
|
|
|
|
void FCEUI_GetRenderPlanes(bool& sprites, bool& bg);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-25 06:34:08 +00:00
|
|
|
//name=path and file to load. returns null if it failed
|
2012-12-16 13:07:50 +00:00
|
|
|
FCEUGI *FCEUI_LoadGame(const char *name, int OverwriteVidMode, bool silent = false);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2012-10-21 16:40:04 +00:00
|
|
|
//same as FCEUI_LoadGame, except that it can load from a tempfile.
|
2008-07-09 05:47:13 +00:00
|
|
|
//name is the logical path to open; archiveFilename is the archive which contains name
|
2012-12-16 13:07:50 +00:00
|
|
|
FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode, bool silent = false);
|
2008-06-25 06:34:08 +00:00
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//general purpose emulator initialization. returns true if successful
|
|
|
|
bool FCEUI_Initialize();
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Emulates a frame.
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_Emulate(uint8 **, int32 **, int32 *, int);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Closes currently loaded game
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_CloseGame(void);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Deallocates all allocated memory. Call after FCEUI_Emulate() returns.
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_Kill(void);
|
|
|
|
|
2008-06-10 16:06:14 +00:00
|
|
|
//Enable/Disable game genie. a=true->enabled
|
2008-06-08 10:22:33 +00:00
|
|
|
void FCEUI_SetGameGenie(bool a);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Set video system a=0 NTSC, a=1 PAL
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_SetVidSystem(int a);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Convenience function; returns currently emulated video system(0=NTSC, 1=PAL).
|
2006-07-29 05:46:15 +00:00
|
|
|
int FCEUI_GetCurrentVidSystem(int *slstart, int *slend);
|
|
|
|
|
|
|
|
#ifdef FRAMESKIP
|
|
|
|
/* Should be called from FCEUD_BlitScreen(). Specifies how many frames
|
|
|
|
to skip until FCEUD_BlitScreen() is called. FCEUD_BlitScreenDummy()
|
|
|
|
will be called instead of FCEUD_BlitScreen() when when a frame is skipped.
|
|
|
|
*/
|
|
|
|
void FCEUI_FrameSkip(int x);
|
|
|
|
#endif
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//First and last scanlines to render, for ntsc and pal emulation.
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_SetRenderedLines(int ntscf, int ntscl, int palf, int pall);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Sets the base directory(save states, snapshots, etc. are saved in directories below this directory.
|
2008-06-22 02:38:00 +00:00
|
|
|
void FCEUI_SetBaseDirectory(std::string const & dir);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Tells FCE Ultra to copy the palette data pointed to by pal and use it.
|
|
|
|
//Data pointed to by pal needs to be 64*3 bytes in length.
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_SetPaletteArray(uint8 *pal);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//Sets up sound code to render sound at the specified rate, in samples
|
|
|
|
//per second. Only sample rates of 44100, 48000, and 96000 are currently supported.
|
|
|
|
//If "Rate" equals 0, sound is disabled.
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_Sound(int Rate);
|
|
|
|
void FCEUI_SetSoundVolume(uint32 volume);
|
2009-01-12 18:59:00 +00:00
|
|
|
void FCEUI_SetTriangleVolume(uint32 volume);
|
|
|
|
void FCEUI_SetSquare1Volume(uint32 volume);
|
|
|
|
void FCEUI_SetSquare2Volume(uint32 volume);
|
|
|
|
void FCEUI_SetNoiseVolume(uint32 volume);
|
|
|
|
void FCEUI_SetPCMVolume(uint32 volume);
|
|
|
|
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_SetSoundQuality(int quality);
|
|
|
|
|
|
|
|
void FCEUD_SoundToggle(void);
|
|
|
|
void FCEUD_SoundVolumeAdjust(int);
|
|
|
|
|
|
|
|
int FCEUI_SelectState(int, int);
|
2008-12-26 23:49:45 +00:00
|
|
|
extern void FCEUI_SelectStateNext(int);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
//"fname" overrides the default save state filename code if non-NULL.
|
2008-08-12 03:28:51 +00:00
|
|
|
void FCEUI_SaveState(const char *fname);
|
|
|
|
void FCEUI_LoadState(const char *fname);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
void FCEUD_SaveStateAs(void);
|
|
|
|
void FCEUD_LoadStateFrom(void);
|
|
|
|
|
2008-06-09 08:15:20 +00:00
|
|
|
//at the minimum, you should call FCEUI_SetInput, FCEUI_SetInputFC, and FCEUI_SetInputFourscore
|
|
|
|
//you may also need to maintain your own internal state
|
2010-04-28 19:25:52 +00:00
|
|
|
void FCEUD_SetInput(bool fourscore, bool microphone, ESI port0, ESI port1, ESIFC fcexp);
|
2008-06-09 08:15:20 +00:00
|
|
|
|
2008-05-09 06:43:55 +00:00
|
|
|
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUD_MovieRecordTo(void);
|
|
|
|
void FCEUD_MovieReplayFrom(void);
|
2008-07-23 06:54:14 +00:00
|
|
|
void FCEUD_LuaRunFrom(void);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
int32 FCEUI_GetDesiredFPS(void);
|
|
|
|
void FCEUI_SaveSnapshot(void);
|
2010-06-07 04:26:16 +00:00
|
|
|
void FCEUI_SaveSnapshotAs(void);
|
2010-05-16 04:18:49 +00:00
|
|
|
void FCEU_DispMessage(char *format, int disppos, ...);
|
2006-07-29 05:46:15 +00:00
|
|
|
#define FCEUI_DispMessage FCEU_DispMessage
|
|
|
|
|
2008-06-10 16:06:14 +00:00
|
|
|
int FCEUI_DecodePAR(const char *code, int *a, int *v, int *c, int *type);
|
|
|
|
int FCEUI_DecodeGG(const char *str, int *a, int *v, int *c);
|
2006-07-29 05:46:15 +00:00
|
|
|
int FCEUI_AddCheat(const char *name, uint32 addr, uint8 val, int compare, int type);
|
|
|
|
int FCEUI_DelCheat(uint32 which);
|
|
|
|
int FCEUI_ToggleCheat(uint32 which);
|
|
|
|
|
|
|
|
int32 FCEUI_CheatSearchGetCount(void);
|
|
|
|
void FCEUI_CheatSearchGetRange(uint32 first, uint32 last, int (*callb)(uint32 a, uint8 last, uint8 current));
|
|
|
|
void FCEUI_CheatSearchGet(int (*callb)(uint32 a, uint8 last, uint8 current, void *data), void *data);
|
|
|
|
void FCEUI_CheatSearchBegin(void);
|
|
|
|
void FCEUI_CheatSearchEnd(int type, uint8 v1, uint8 v2);
|
|
|
|
void FCEUI_ListCheats(int (*callb)(char *name, uint32 a, uint8 v, int compare, int s, int type, void *data), void *data);
|
|
|
|
|
|
|
|
int FCEUI_GetCheat(uint32 which, char **name, uint32 *a, uint8 *v, int *compare, int *s, int *type);
|
|
|
|
int FCEUI_SetCheat(uint32 which, const char *name, int32 a, int32 v, int compare,int s, int type);
|
|
|
|
|
|
|
|
void FCEUI_CheatSearchShowExcluded(void);
|
|
|
|
void FCEUI_CheatSearchSetCurrentAsOriginal(void);
|
|
|
|
|
2008-08-01 03:31:06 +00:00
|
|
|
//.rom
|
2008-11-07 14:53:05 +00:00
|
|
|
#define FCEUIOD_ROMS 0 //Roms
|
2012-10-21 16:40:04 +00:00
|
|
|
#define FCEUIOD_NV 1 //NV = nonvolatile. save data.
|
|
|
|
#define FCEUIOD_STATES 2 //savestates
|
2008-11-07 14:53:05 +00:00
|
|
|
#define FCEUIOD_FDSROM 3 //disksys.rom
|
|
|
|
#define FCEUIOD_SNAPS 4 //screenshots
|
|
|
|
#define FCEUIOD_CHEATS 5 //cheats
|
|
|
|
#define FCEUIOD_MOVIES 6 //.fm2 files
|
|
|
|
#define FCEUIOD_MEMW 7 //memory watch fiels
|
|
|
|
#define FCEUIOD_BBOT 8 //basicbot, obsolete
|
2012-01-12 19:56:17 +00:00
|
|
|
#define FCEUIOD_MACRO 9 //macro files - old TASEdit v0.1 paradigm, not implemented, probably obsolete
|
2008-11-07 14:53:05 +00:00
|
|
|
#define FCEUIOD_INPUT 10 //input presets
|
|
|
|
#define FCEUIOD_LUA 11 //lua scripts
|
|
|
|
#define FCEUIOD_AVI 12 //default file for avi output
|
|
|
|
#define FCEUIOD__COUNT 13 //base directory override?
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
void FCEUI_SetDirOverride(int which, char *n);
|
|
|
|
|
|
|
|
void FCEUI_MemDump(uint16 a, int32 len, void (*callb)(uint16 a, uint8 v));
|
|
|
|
uint8 FCEUI_MemSafePeek(uint16 A);
|
|
|
|
void FCEUI_MemPoke(uint16 a, uint8 v, int hl);
|
|
|
|
void FCEUI_NMI(void);
|
|
|
|
void FCEUI_IRQ(void);
|
|
|
|
uint16 FCEUI_Disassemble(void *XA, uint16 a, char *stringo);
|
|
|
|
void FCEUI_GetIVectors(uint16 *reset, uint16 *irq, uint16 *nmi);
|
|
|
|
|
|
|
|
uint32 FCEUI_CRC32(uint32 crc, uint8 *buf, uint32 len);
|
|
|
|
|
|
|
|
void FCEUI_ToggleTileView(void);
|
|
|
|
void FCEUI_SetLowPass(int q);
|
|
|
|
|
|
|
|
void FCEUI_NSFSetVis(int mode);
|
|
|
|
int FCEUI_NSFChange(int amount);
|
|
|
|
int FCEUI_NSFGetInfo(uint8 *name, uint8 *artist, uint8 *copyright, int maxlen);
|
|
|
|
|
|
|
|
void FCEUI_VSUniToggleDIPView(void);
|
|
|
|
void FCEUI_VSUniToggleDIP(int w);
|
|
|
|
uint8 FCEUI_VSUniGetDIPs(void);
|
|
|
|
void FCEUI_VSUniSetDIP(int w, int state);
|
|
|
|
void FCEUI_VSUniCoin(void);
|
|
|
|
|
|
|
|
void FCEUI_FDSInsert(void); //mbg merge 7/17/06 changed to void fn(void) to make it an EMUCMDFN
|
|
|
|
//int FCEUI_FDSEject(void);
|
|
|
|
void FCEUI_FDSSelect(void);
|
|
|
|
|
|
|
|
int FCEUI_DatachSet(const uint8 *rcode);
|
|
|
|
|
2008-05-09 04:00:04 +00:00
|
|
|
///returns a flag indicating whether emulation is paused
|
2008-06-08 10:22:33 +00:00
|
|
|
int FCEUI_EmulationPaused();
|
2008-05-09 04:00:04 +00:00
|
|
|
///returns a flag indicating whether a one frame step has been requested
|
|
|
|
int FCEUI_EmulationFrameStepped();
|
|
|
|
///clears the framestepped flag. use it after youve stepped your one frame
|
|
|
|
void FCEUI_ClearEmulationFrameStepped();
|
2006-08-01 07:40:00 +00:00
|
|
|
///sets the EmulationPaused flags
|
|
|
|
void FCEUI_SetEmulationPaused(int val);
|
|
|
|
///toggles the paused bit (bit0) for EmulationPaused. caused FCEUD_DebugUpdate() to fire if the emulation pauses
|
2008-06-08 10:22:33 +00:00
|
|
|
void FCEUI_ToggleEmulationPause();
|
|
|
|
|
|
|
|
//indicates whether input aids should be drawn (such as crosshairs, etc; usually in fullscreen mode)
|
|
|
|
bool FCEUD_ShouldDrawInputAids();
|
2006-08-01 07:40:00 +00:00
|
|
|
|
2008-05-09 06:43:55 +00:00
|
|
|
///called when the emulator closes a game
|
|
|
|
void FCEUD_OnCloseGame(void);
|
|
|
|
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_FrameAdvance(void);
|
2008-05-09 06:43:55 +00:00
|
|
|
void FCEUI_FrameAdvanceEnd(void);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-05 06:49:11 +00:00
|
|
|
//AVI Output
|
2006-07-29 05:46:15 +00:00
|
|
|
int FCEUI_AviBegin(const char* fname);
|
|
|
|
void FCEUI_AviEnd(void);
|
|
|
|
void FCEUI_AviVideoUpdate(const unsigned char* buffer);
|
|
|
|
void FCEUI_AviSoundUpdate(void* soundData, int soundLen);
|
2008-06-05 06:49:11 +00:00
|
|
|
bool FCEUI_AviIsRecording();
|
2011-09-23 18:09:40 +00:00
|
|
|
bool FCEUI_AviEnableHUDrecording();
|
|
|
|
void FCEUI_SetAviEnableHUDrecording(bool enable);
|
2010-03-02 03:34:15 +00:00
|
|
|
bool FCEUI_AviDisableMovieMessages();
|
|
|
|
void FCEUI_SetAviDisableMovieMessages(bool disable);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
void FCEUD_AviRecordTo(void);
|
|
|
|
void FCEUD_AviStop(void);
|
|
|
|
|
2008-06-10 16:06:14 +00:00
|
|
|
///A callback that the emu core uses to poll the state of a given emulator command key
|
2006-07-29 05:46:15 +00:00
|
|
|
typedef int TestCommandState(int cmd);
|
2006-07-31 07:40:11 +00:00
|
|
|
///Signals the emu core to poll for emulator commands and take actions
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUI_HandleEmuCommands(TestCommandState* testfn);
|
2006-07-31 07:40:11 +00:00
|
|
|
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2008-06-05 06:49:11 +00:00
|
|
|
//Emulation speed
|
2006-07-29 05:46:15 +00:00
|
|
|
enum EMUSPEED_SET
|
|
|
|
{
|
|
|
|
EMUSPEED_SLOWEST=0,
|
|
|
|
EMUSPEED_SLOWER,
|
|
|
|
EMUSPEED_NORMAL,
|
|
|
|
EMUSPEED_FASTER,
|
|
|
|
EMUSPEED_FASTEST
|
|
|
|
};
|
|
|
|
void FCEUD_SetEmulationSpeed(int cmd);
|
|
|
|
void FCEUD_TurboOn(void);
|
|
|
|
void FCEUD_TurboOff(void);
|
2008-06-12 22:26:34 +00:00
|
|
|
void FCEUD_TurboToggle(void);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
int FCEUD_ShowStatusIcon(void);
|
|
|
|
void FCEUD_ToggleStatusIcon(void);
|
|
|
|
void FCEUD_HideMenuToggle(void);
|
|
|
|
|
2006-07-31 07:40:11 +00:00
|
|
|
///signals the driver to perform a file open GUI operation
|
|
|
|
void FCEUD_CmdOpen(void);
|
|
|
|
|
2006-07-29 05:46:15 +00:00
|
|
|
//new merge-era driver routines here:
|
|
|
|
|
2006-08-01 05:50:19 +00:00
|
|
|
///signals that the cpu core hit a breakpoint. this function should not return until the core is ready for the next cycle
|
2012-08-03 19:28:14 +00:00
|
|
|
void FCEUD_DebugBreakpoint(int bp_num);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2006-08-01 05:50:19 +00:00
|
|
|
///the driver should log the current instruction, if it wants (we should move the code in the win driver that does this to the shared area)
|
2012-09-30 16:36:45 +00:00
|
|
|
void FCEUD_TraceInstruction(uint8 *opcode, int size);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2006-08-01 05:50:19 +00:00
|
|
|
///the driver might should update its NTView (only used if debugging support is compiled in)
|
2008-08-08 09:45:34 +00:00
|
|
|
void FCEUD_UpdateNTView(int scanline, bool drawall);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
2006-08-01 05:50:19 +00:00
|
|
|
///the driver might should update its PPUView (only used if debugging support is compiled in)
|
2006-07-29 05:46:15 +00:00
|
|
|
void FCEUD_UpdatePPUView(int scanline, int drawall);
|
|
|
|
|
2008-05-26 21:58:24 +00:00
|
|
|
///I am dissatisfied with this method of getting an option from the driver to the core. but that is what we're using for now
|
|
|
|
bool FCEUD_PauseAfterPlayback();
|
|
|
|
|
2008-08-13 04:06:01 +00:00
|
|
|
///called when fceu changes something in the video system you might be interested in
|
|
|
|
void FCEUD_VideoChanged();
|
|
|
|
|
2008-06-05 06:49:11 +00:00
|
|
|
enum EFCEUI
|
|
|
|
{
|
2008-12-26 23:26:43 +00:00
|
|
|
FCEUI_STOPAVI, FCEUI_QUICKSAVE, FCEUI_QUICKLOAD, FCEUI_SAVESTATE, FCEUI_LOADSTATE,
|
2008-12-27 00:08:29 +00:00
|
|
|
FCEUI_NEXTSAVESTATE,FCEUI_PREVIOUSSAVESTATE,FCEUI_VIEWSLOTS,
|
2008-06-21 07:24:01 +00:00
|
|
|
FCEUI_STOPMOVIE, FCEUI_RECORDMOVIE, FCEUI_PLAYMOVIE,
|
|
|
|
FCEUI_OPENGAME, FCEUI_CLOSEGAME,
|
2012-01-12 19:56:17 +00:00
|
|
|
FCEUI_TASEDITOR,
|
2012-02-06 16:57:46 +00:00
|
|
|
FCEUI_RESET, FCEUI_POWER, FCEUI_PLAYFROMBEGINNING, FCEUI_EJECT_DISK, FCEUI_SWITCH_DISK
|
2008-06-05 06:49:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//checks whether an EFCEUI is valid right now
|
|
|
|
bool FCEU_IsValidUI(EFCEUI ui);
|
|
|
|
|
2006-08-01 05:50:19 +00:00
|
|
|
#ifdef __cplusplus
|
2008-06-10 16:06:14 +00:00
|
|
|
extern "C"
|
|
|
|
#endif
|
2006-08-01 05:50:19 +00:00
|
|
|
FILE *FCEUI_UTF8fopen_C(const char *n, const char *m);
|
|
|
|
|
2008-06-08 10:22:33 +00:00
|
|
|
#endif //__DRIVER_H_
|