4 /* Prototypes for platform interface functions follow: */
6 void FCEUD_Update(uint8 *buf, int16 *Buffer, int Count);
9 void FCEUD_SetPalette(uint8 index, uint8 r, uint8 g, uint8 b);
10 void FCEUD_GetPalette(uint8 i,uint8 *r, unsigned char *g, unsigned char *b);
13 void FCEUD_WriteSoundData(int32 *Buffer, int Count);
15 /* Displays an error. Can block or not. */
16 void FCEUD_PrintError(char *s);
19 /* Network interface */
21 int FCEUD_NetworkConnect(void);
22 int FCEUD_NetworkRecvData(uint8 *data, uint32 len, int block);
23 int FCEUD_NetworkSendData(uint8 *data, uint32 len);
24 void FCEUD_NetworkClose(void);
30 #define DES_RESET 0x10
31 #define DES_POWER 0x11
33 #define DES_GETNTSCHUE 0x20
34 #define DES_GETNTSCTINT 0x21
35 #define DES_SETNTSCHUE 0x22
36 #define DES_SETNTSCTINT 0x23
38 #define DES_NSFINC 0x50
39 #define DES_NSFDEC 0x51
40 #define DES_NSFRES 0x52
42 #define DES_VSUNIDIPSET 0x70
43 #define DES_VSUNITOGGLEDIPVIEW 0x71
44 #define DES_VSUNICOIN 0x72
45 #define DES_FDSINSERT 0x80
46 #define DES_FDSEJECT 0x81
47 #define DES_FDSSELECT 0x82
49 #define DES_NTSCSELHUE 0x90
50 #define DES_NTSCSELTINT 0x91
51 #define DES_NTSCDEC 0x92
52 #define DES_NTSCINC 0x93
54 void DriverInterface(int w, void *d);
56 void FCEUI_SetInput(int port, int type, void *ptr, int attrib);
57 void FCEUI_SetInputFC(int type, void *ptr, int attrib);
58 void FCEUI_DisableFourScore(int s);
69 #define SIFC_ARKANOID 1
71 #define SIFC_4PLAYER 3
75 /* New interface functions */
77 /* 0 to order screen snapshots numerically(0.png), 1 to order them file base-numerically(smb3-0.png). */
78 void FCEUI_SetSnapName(int a);
80 /* 0 to keep 8-sprites limitation, 1 to remove it */
81 void FCEUI_DisableSpriteLimitation(int a);
83 /* 0 to save extra game data(*.sav) in same dir as game, 1 to save under base dir */
84 void FCEUI_SaveExtraDataUnderBase(int a);
86 /* name=path and file to load. returns 0 on failure, 1 on success */
87 FCEUGI *FCEUI_LoadGame(char *name);
89 /* allocates memory. 0 on failure, 1 on success. */
90 int FCEUI_Initialize(void);
92 /* begins emulation. Returns after FCEUI_CloseGame() is called */
93 void FCEUI_Emulate(void);
95 /* Closes currently loaded game, causes FCEUI_Emulate to return */
96 void FCEUI_CloseGame(void);
98 /* Enable/Disable game genie. a=0 disable, a=1 enable */
99 void FCEUI_SetGameGenie(int a);
101 /* Set video system a=0 NTSC, a=1 PAL */
102 void FCEUI_SetVidSystem(int a);
104 /* Convenience function; returns currently emulated video system(0=NTSC, 1=PAL). */
105 int FCEUI_GetCurrentVidSystem(int *slstart, int *slend);
108 /* Should be called from FCEUD_BlitScreen(). Specifies how many frames
109 to skip until FCEUD_BlitScreen() is called. FCEUD_BlitScreenDummy()
110 will be called instead of FCEUD_BlitScreen() when when a frame is skipped.
112 void FCEUI_FrameSkip(int x);
115 /* First and last scanlines to render, for ntsc and pal emulation. */
116 void FCEUI_SetRenderedLines(int ntscf, int ntscl, int palf, int pall);
118 /* Sets the base directory(save states, snapshots, etc. are saved in directories
119 below this directory. */
120 void FCEUI_SetBaseDirectory(char *dir);
122 /* Tells FCE Ultra to copy the palette data pointed to by pal and use it.
123 Data pointed to by pal needs to be 64*3 bytes in length.
125 void FCEUI_SetPaletteArray(uint8 *pal);
127 /* Sets up sound code to render sound at the specified rate, in samples
128 per second. The sample rate should be as close to 44100 hz as possible.
129 Sample rates from 8192 through 65535 are ok, though if the sample rate
130 is too low, some sound channels(noise) won't sound right.
131 If "Rate" equals 0, sound is disabled.
133 void FCEUI_Sound(int Rate);
134 void FCEUI_SetSoundVolume(uint32 volume);
137 /* Set network play stuff. type=1 for server, type=2 for client.
138 skip is only used for server */
139 void FCEUI_SetNetworkPlay(int type);
142 void FCEUI_SelectState(int w);
143 void FCEUI_SaveState(void);
144 void FCEUI_LoadState(void);
145 int32 FCEUI_GetDesiredFPS(void);
146 void FCEUI_SaveSnapshot(void);
147 void FCEU_DispMessage(char *format, ...);
148 #define FCEUI_DispMessage FCEU_DispMessage
150 int FCEUI_AddCheat(char *name, uint32 addr, uint8 val);
151 int FCEUI_DelCheat(uint32 which);
153 int32 FCEUI_CheatSearchGetCount(void);
154 void FCEUI_CheatSearchGetRange(uint32 first, uint32 last, int (*callb)(uint32 a, uint8 last, uint8 current));
155 void FCEUI_CheatSearchGet(int (*callb)(uint32 a, uint8 last, uint8 current));
156 void FCEUI_CheatSearchBegin(void);
157 void FCEUI_CheatSearchEnd(int type, uint8 v1, uint8 v2);
158 void FCEUI_ListCheats(int (*callb)(char *name, uint32 a, uint8 v, int s));
160 int FCEUI_GetCheat(uint32 which, char **name, uint32 *a, uint8 *v, int *s);
161 int FCEUI_SetCheat(uint32 which, char *name, int32 a, int32 v, int s);
162 void FCEUI_CheatSearchShowExcluded(void);
163 void FCEUI_CheatSearchSetCurrentAsOriginal(void);
165 #define FCEUIOD_STATE 0
166 #define FCEUIOD_SNAPS 1
168 #define FCEUIOD_CHEATS 3
169 #define FCEUIOD_MISC 4
171 #define FCEUIOD__COUNT 5
173 void FCEUI_SetDirOverride(int which, char *n);