2006-07-29 05:46:15 +00:00
|
|
|
#ifndef _FCEUH
|
|
|
|
#define _FCEUH
|
|
|
|
|
|
|
|
extern int fceuindbg;
|
|
|
|
void ResetGameLoaded(void);
|
|
|
|
|
2008-06-06 03:02:00 +00:00
|
|
|
#define DECLFR(x) uint8 x (uint32 A)
|
|
|
|
#define DECLFW(x) void x (uint32 A, uint8 V)
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
void FCEU_MemoryRand(uint8 *ptr, uint32 size);
|
2008-06-06 03:02:00 +00:00
|
|
|
void SetReadHandler(int32 start, int32 end, readfunc func);
|
|
|
|
void SetWriteHandler(int32 start, int32 end, writefunc func);
|
|
|
|
writefunc GetWriteHandler(int32 a);
|
|
|
|
readfunc GetReadHandler(int32 a);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
int AllocGenieRW(void);
|
|
|
|
void FlushGenieRW(void);
|
|
|
|
|
|
|
|
void FCEU_ResetVidSys(void);
|
|
|
|
|
|
|
|
void ResetMapping(void);
|
|
|
|
void ResetNES(void);
|
|
|
|
void PowerNES(void);
|
|
|
|
|
|
|
|
void SetAutoFireOffset(int offset);
|
|
|
|
void SetAutoFirePattern(int onframes, int offframes);
|
|
|
|
void AutoFire(void);
|
2008-06-25 00:43:02 +00:00
|
|
|
void FCEUI_Autosave(void);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
//mbg 7/23/06
|
|
|
|
char *FCEUI_GetAboutString();
|
|
|
|
|
|
|
|
extern uint64 timestampbase;
|
|
|
|
extern uint32 MMC5HackVROMMask;
|
|
|
|
extern uint8 *MMC5HackExNTARAMPtr;
|
|
|
|
extern int MMC5Hack;
|
|
|
|
extern uint8 *MMC5HackVROMPTR;
|
|
|
|
extern uint8 MMC5HackCHRMode;
|
|
|
|
extern uint8 MMC5HackSPMode;
|
|
|
|
extern uint8 MMC5HackSPScroll;
|
|
|
|
extern uint8 MMC5HackSPPage;
|
|
|
|
|
|
|
|
extern uint8 *RAM; //shared memory modifications
|
|
|
|
extern uint8 *GameMemBlock; //shared memory modifications
|
2008-08-07 03:59:19 +00:00
|
|
|
extern int EmulationPaused;
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
extern readfunc ARead[0x10000];
|
|
|
|
extern writefunc BWrite[0x10000];
|
|
|
|
|
2008-08-12 06:52:48 +00:00
|
|
|
|
|
|
|
enum GI {
|
|
|
|
GI_RESETM2 =1,
|
|
|
|
GI_POWER =2,
|
|
|
|
GI_CLOSE =3,
|
|
|
|
GI_RESETSAVE = 4
|
|
|
|
};
|
|
|
|
|
|
|
|
extern void (*GameInterface)(GI h);
|
2006-07-29 05:46:15 +00:00
|
|
|
extern void (*GameStateRestore)(int version);
|
|
|
|
|
|
|
|
|
|
|
|
#include "git.h"
|
2006-08-20 19:40:15 +00:00
|
|
|
extern FCEUGI *GameInfo;
|
2006-07-29 05:46:15 +00:00
|
|
|
extern int GameAttributes;
|
|
|
|
|
|
|
|
extern uint8 PAL;
|
|
|
|
|
2008-06-17 06:55:07 +00:00
|
|
|
//#include "driver.h"
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2008-05-26 00:03:20 +00:00
|
|
|
int PAL;
|
|
|
|
int NetworkPlay;
|
|
|
|
int SoundVolume;
|
2008-06-08 10:22:33 +00:00
|
|
|
bool GameGenie;
|
2008-05-26 00:03:20 +00:00
|
|
|
|
2008-05-27 00:51:31 +00:00
|
|
|
//the currently selected first and last rendered scanlines.
|
2008-05-26 00:03:20 +00:00
|
|
|
int FirstSLine;
|
|
|
|
int LastSLine;
|
2008-05-27 00:51:31 +00:00
|
|
|
|
|
|
|
//the number of scanlines in the currently selected configuration
|
|
|
|
int TotalScanlines() { return LastSLine - FirstSLine + 1; }
|
|
|
|
|
|
|
|
//Driver-supplied user-selected first and last rendered scanlines.
|
2008-05-26 00:03:20 +00:00
|
|
|
//Usr*SLine[0] is for NTSC, Usr*SLine[1] is for PAL.
|
|
|
|
int UsrFirstSLine[2];
|
|
|
|
int UsrLastSLine[2];
|
2008-08-10 13:38:39 +00:00
|
|
|
|
|
|
|
bool SnapName;
|
2008-05-26 00:03:20 +00:00
|
|
|
uint32 SndRate;
|
|
|
|
int soundq;
|
|
|
|
int lowpass;
|
2006-07-29 05:46:15 +00:00
|
|
|
} FCEUS;
|
|
|
|
|
2008-05-26 01:55:45 +00:00
|
|
|
int FCEU_TextScanlineOffset(int y);
|
|
|
|
int FCEU_TextScanlineOffsetFromBottom(int y);
|
|
|
|
|
2006-07-29 05:46:15 +00:00
|
|
|
extern FCEUS FSettings;
|
|
|
|
|
|
|
|
void FCEU_PrintError(char *format, ...);
|
|
|
|
void FCEU_printf(char *format, ...);
|
|
|
|
void FCEU_DispMessage(char *format, ...);
|
2008-05-27 04:40:03 +00:00
|
|
|
void FCEU_DispMessageOnMovie(char *format, ...);
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
void SetNESDeemph(uint8 d, int force);
|
|
|
|
void DrawTextTrans(uint8 *dest, uint32 width, uint8 *textmsg, uint8 fgcolor);
|
|
|
|
void FCEU_PutImage(void);
|
|
|
|
#ifdef FRAMESKIP
|
|
|
|
void FCEU_PutImageDummy(void);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern uint8 Exit;
|
|
|
|
extern uint8 pale;
|
|
|
|
extern uint8 vsdip;
|
|
|
|
|
|
|
|
//#define FCEUDEF_DEBUGGER //mbg merge 7/17/06 - cleaning out conditional compiles
|
|
|
|
|
|
|
|
#define JOY_A 1
|
|
|
|
#define JOY_B 2
|
|
|
|
#define JOY_SELECT 4
|
|
|
|
#define JOY_START 8
|
|
|
|
#define JOY_UP 0x10
|
|
|
|
#define JOY_DOWN 0x20
|
|
|
|
#define JOY_LEFT 0x40
|
|
|
|
#define JOY_RIGHT 0x80
|
|
|
|
#endif
|
2008-05-12 23:16:41 +00:00
|
|
|
|
2008-05-26 00:03:20 +00:00
|
|
|
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
|
|
|
|
|