new cfg file system
[picodrive.git] / platform / common / emu.h
1 // (c) Copyright 2006-2007 notaz, All rights reserved.
2 // Free for non-commercial use.
3
4 // For commercial use, separate licencing terms must be obtained.
5
6 typedef struct {
7         char lastRomFile[512];
8         int EmuOpt;             // LSb->MSb: use_sram, show_fps, enable_sound, gzip_saves,
9                                         // squidgehack, no_save_cfg_on_exit, <unused>, 16_bit_mode
10                                         // craigix_ram, confirm_save, show_cd_leds, confirm_load
11                                         // A_SNs_gamma, perfect_vsync, giz_scanlines, giz_dblbuff
12                                         // vsync_mode, show_clock, no_frame_limitter
13         int s_PicoOpt;          // for old cfg files only
14         int s_PsndRate;
15         int s_PicoRegion;
16         int Frameskip;
17         int CPUclock;
18         int KeyBinds[32];
19         int volume;
20         int gamma;
21         int JoyBinds[4][32];
22         int s_PicoAutoRgnOrder;
23         int s_PicoCDBuffers;
24         int scaling; // gp2x: 0=center, 1=hscale, 2=hvscale, 3=hsoftscale; psp: bilinear filtering
25         float scale; // psp: screen scale
26         float hscale32, hscale40; // psp: horizontal scale
27 } currentConfig_t;
28
29 extern currentConfig_t currentConfig, defaultConfig;
30 extern char *PicoConfigFile;
31 extern int rom_loaded;
32 extern char noticeMsg[64];
33 extern int state_slot;
34 extern int config_slot, config_slot_current;
35 extern unsigned char *movie_data;
36
37
38 int   emu_ReloadRom(void);
39 int   emu_SaveLoadGame(int load, int sram);
40 int   emu_ReadConfig(int game, int no_defaults);
41 int   emu_WriteConfig(int game);
42 char *emu_GetSaveFName(int load, int is_sram, int slot);
43 int   emu_checkSaveFile(int slot);
44 void  emu_setSaveStateCbs(int gz);
45 void  emu_updateMovie(void);
46 int   emu_cdCheck(int *pregion);
47 int   emu_findBios(int region, char **bios_file);
48 void  emu_textOut8 (int x, int y, const char *text);
49 void  emu_textOut16(int x, int y, const char *text);
50 char *emu_makeRomId(void);
51
52 void  emu_prepareDefaultConfig(void);