ea8c405f |
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 | |
ca482e5d |
6 | #include "port_config.h" |
7 | |
8 | #ifdef __cplusplus |
9 | extern "C" { |
10 | #endif |
11 | |
12 | #define EOPT_USE_SRAM (1<<0) |
13 | #define EOPT_SHOW_FPS (1<<1) |
14 | #define EOPT_EN_SOUND (1<<2) |
15 | #define EOPT_GZIP_SAVES (1<<3) |
16 | |
17 | typedef struct _currentConfig_t { |
1ca2ea4f |
18 | // char lastRomFile[512]; |
ea8c405f |
19 | int EmuOpt; // LSb->MSb: use_sram, show_fps, enable_sound, gzip_saves, |
20 | // squidgehack, no_save_cfg_on_exit, <unused>, 16_bit_mode |
21 | // craigix_ram, confirm_save, show_cd_leds, confirm_load |
c77ca79e |
22 | // A_SNs_gamma, perfect_vsync, giz_scanlines, giz_dblbuff |
c6196c0f |
23 | // vsync_mode, show_clock, no_frame_limitter |
58c86d00 |
24 | int s_PicoOpt; // for old cfg files only |
25 | int s_PsndRate; |
26 | int s_PicoRegion; |
ca482e5d |
27 | int s_PicoAutoRgnOrder; |
28 | int s_PicoCDBuffers; |
ea8c405f |
29 | int Frameskip; |
30 | int CPUclock; |
ca482e5d |
31 | int KeyBinds[PLAT_MAX_KEYS]; |
ea8c405f |
32 | int volume; |
33 | int gamma; |
ca482e5d |
34 | #if PLAT_HAVE_JOY |
ea8c405f |
35 | int JoyBinds[4][32]; |
ca482e5d |
36 | #endif |
37 | int scaling; // gp2x: 0=center, 1=hscale, 2=hvscale, 3=hsoftscale; psp: bilinear filtering |
38 | int rotation; // for UIQ |
8ab3e3c1 |
39 | float scale; // psp: screen scale |
40 | float hscale32, hscale40; // psp: horizontal scale |
6fc57144 |
41 | int gamma2; // psp: black level |
f0f0d2df |
42 | int turbo_rate; |
ea8c405f |
43 | } currentConfig_t; |
44 | |
58c86d00 |
45 | extern currentConfig_t currentConfig, defaultConfig; |
ea8c405f |
46 | extern char *PicoConfigFile; |
eacee137 |
47 | extern int rom_loaded; |
ea8c405f |
48 | extern char noticeMsg[64]; |
49 | extern int state_slot; |
50 | extern int config_slot, config_slot_current; |
51 | extern unsigned char *movie_data; |
ca482e5d |
52 | extern char loadedRomFName[512]; // last loaded ROM filename |
bdec53c9 |
53 | extern int kb_combo_keys, kb_combo_acts; // keys and actions which need button combos |
c060a9ab |
54 | extern int pico_inp_mode; |
ea8c405f |
55 | |
56 | |
ca482e5d |
57 | int emu_ReloadRom(char *rom_fname); |
ea8c405f |
58 | int emu_SaveLoadGame(int load, int sram); |
59 | int emu_ReadConfig(int game, int no_defaults); |
60 | int emu_WriteConfig(int game); |
61 | char *emu_GetSaveFName(int load, int is_sram, int slot); |
62 | int emu_checkSaveFile(int slot); |
63 | void emu_setSaveStateCbs(int gz); |
64 | void emu_updateMovie(void); |
ca482e5d |
65 | int emu_cdCheck(int *pregion, char *fname_in); |
ea8c405f |
66 | int emu_findBios(int region, char **bios_file); |
67 | void emu_textOut8 (int x, int y, const char *text); |
68 | void emu_textOut16(int x, int y, const char *text); |
58c86d00 |
69 | char *emu_makeRomId(void); |
ca482e5d |
70 | void emu_getGameName(char *str150); |
bdec53c9 |
71 | void emu_findKeyBindCombos(void); |
c060a9ab |
72 | void emu_changeFastForward(int set_on); |
73 | void emu_RunEventsPico(unsigned int events); |
f0f0d2df |
74 | void emu_DoTurbo(int *pad, int acts); |
ca482e5d |
75 | void emu_packConfig(void); |
76 | void emu_unpackConfig(void); |
77 | void emu_shutdownMCD(void); |
ea8c405f |
78 | |
7b3f44c6 |
79 | /* not in common */ |
6fc57144 |
80 | extern const char * const keyNames[]; |
58c86d00 |
81 | void emu_prepareDefaultConfig(void); |
fcf94fcc |
82 | void emu_platformDebugCat(char *str); |
7b3f44c6 |
83 | void emu_forcedFrame(int opts); |
84 | void emu_startSound(void); |
85 | void emu_endSound(void); |
86 | void emu_waitSound(void); |
ca482e5d |
87 | |
88 | #ifdef __cplusplus |
89 | } // extern "C" |
90 | #endif |
91 | |