2006-07-29 05:46:15 +00:00
|
|
|
#ifndef _INPUT_H_
|
|
|
|
#define _INPUT_H_
|
|
|
|
|
|
|
|
typedef struct {
|
2008-06-06 03:02:00 +00:00
|
|
|
uint8 (*Read)(int w);
|
|
|
|
void (*Write)(uint8 v);
|
|
|
|
void (*Strobe)(int w);
|
|
|
|
void (*Update)(int w, void *data, int arg);
|
|
|
|
void (*SLHook)(int w, uint8 *bg, uint8 *spr, uint32 linets, int final);
|
|
|
|
void (*Draw)(int w, uint8 *buf, int arg);
|
2006-07-29 05:46:15 +00:00
|
|
|
} INPUTC;
|
|
|
|
|
|
|
|
typedef struct {
|
2008-06-06 03:02:00 +00:00
|
|
|
uint8 (*Read)(int w, uint8 ret);
|
|
|
|
void (*Write)(uint8 v);
|
2006-07-29 05:46:15 +00:00
|
|
|
void (*Strobe)(void);
|
2008-06-06 03:02:00 +00:00
|
|
|
void (*Update)(void *data, int arg);
|
|
|
|
void (*SLHook)(uint8 *bg, uint8 *spr, uint32 linets, int final);
|
|
|
|
void (*Draw)(uint8 *buf, int arg);
|
2006-07-29 05:46:15 +00:00
|
|
|
} INPUTCFC;
|
|
|
|
|
|
|
|
void FCEU_DrawInput(uint8 *buf);
|
|
|
|
void FCEU_UpdateInput(void);
|
|
|
|
int FCEU_BotMode(void);
|
|
|
|
void FCEU_SetBotMode(int x);
|
|
|
|
void InitializeInput(void);
|
|
|
|
void FCEU_UpdateBot(void);
|
|
|
|
extern void (*PStrobe[2])(void);
|
|
|
|
extern void (*InputScanlineHook)(uint8 *bg, uint8 *spr, uint32 linets, int final);
|
|
|
|
|
|
|
|
void FCEU_DoSimpleCommand(int cmd);
|
|
|
|
|
|
|
|
enum EMUCMD
|
|
|
|
{
|
|
|
|
EMUCMD_POWER=0,
|
|
|
|
EMUCMD_RESET,
|
|
|
|
EMUCMD_PAUSE,
|
|
|
|
EMUCMD_FRAME_ADVANCE,
|
|
|
|
EMUCMD_SCREENSHOT,
|
|
|
|
EMUCMD_HIDE_MENU_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|
|
|
|
EMUCMD_VSUNI_TOGGLE_DIP_2,
|
|
|
|
EMUCMD_VSUNI_TOGGLE_DIP_3,
|
|
|
|
EMUCMD_VSUNI_TOGGLE_DIP_4,
|
|
|
|
EMUCMD_VSUNI_TOGGLE_DIP_5,
|
|
|
|
EMUCMD_VSUNI_TOGGLE_DIP_6,
|
|
|
|
EMUCMD_VSUNI_TOGGLE_DIP_7,
|
|
|
|
EMUCMD_VSUNI_TOGGLE_DIP_8,
|
|
|
|
EMUCMD_VSUNI_TOGGLE_DIP_9,
|
|
|
|
EMUCMD_MISC_REWIND,
|
|
|
|
EMUCMD_MISC_SHOWSTATES,
|
2008-05-21 15:35:37 +00:00
|
|
|
EMUCMD_MISC_USE_INPUT_PRESET_1,
|
|
|
|
EMUCMD_MISC_USE_INPUT_PRESET_2,
|
|
|
|
EMUCMD_MISC_USE_INPUT_PRESET_3,
|
2006-07-29 05:46:15 +00:00
|
|
|
|
|
|
|
EMUCMD_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
enum EMUCMDTYPE
|
|
|
|
{
|
|
|
|
EMUCMDTYPE_MISC=0,
|
|
|
|
EMUCMDTYPE_SPEED,
|
|
|
|
EMUCMDTYPE_STATE,
|
|
|
|
EMUCMDTYPE_MOVIE,
|
|
|
|
EMUCMDTYPE_SOUND,
|
|
|
|
EMUCMDTYPE_AVI,
|
|
|
|
EMUCMDTYPE_FDS,
|
|
|
|
EMUCMDTYPE_VSUNI,
|
|
|
|
|
|
|
|
EMUCMDTYPE_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
extern const char* FCEUI_CommandTypeNames[];
|
|
|
|
|
|
|
|
typedef void EMUCMDFN(void);
|
|
|
|
|
|
|
|
struct EMUCMDTABLE
|
|
|
|
{
|
|
|
|
int cmd;
|
|
|
|
int type;
|
|
|
|
EMUCMDFN* fn_on;
|
|
|
|
EMUCMDFN* fn_off;
|
|
|
|
int state;
|
|
|
|
char* name;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct EMUCMDTABLE FCEUI_CommandTable[];
|
|
|
|
|
|
|
|
#endif //_INPUT_H_
|
|
|
|
|