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