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) |
d7dd4d66 |
16 | #define EOPT_NO_AUTOSVCFG (1<<5) |
ca482e5d |
17 | |
18 | typedef struct _currentConfig_t { |
1ca2ea4f |
19 | // char lastRomFile[512]; |
ea8c405f |
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 |
c77ca79e |
23 | // A_SNs_gamma, perfect_vsync, giz_scanlines, giz_dblbuff |
c6196c0f |
24 | // vsync_mode, show_clock, no_frame_limitter |
58c86d00 |
25 | int s_PicoOpt; // for old cfg files only |
26 | int s_PsndRate; |
27 | int s_PicoRegion; |
ca482e5d |
28 | int s_PicoAutoRgnOrder; |
29 | int s_PicoCDBuffers; |
ea8c405f |
30 | int Frameskip; |
31 | int CPUclock; |
ca482e5d |
32 | int KeyBinds[PLAT_MAX_KEYS]; |
ea8c405f |
33 | int volume; |
34 | int gamma; |
ca482e5d |
35 | #if PLAT_HAVE_JOY |
ea8c405f |
36 | int JoyBinds[4][32]; |
ca482e5d |
37 | #endif |
38 | int scaling; // gp2x: 0=center, 1=hscale, 2=hvscale, 3=hsoftscale; psp: bilinear filtering |
39 | int rotation; // for UIQ |
8ab3e3c1 |
40 | float scale; // psp: screen scale |
41 | float hscale32, hscale40; // psp: horizontal scale |
6fc57144 |
42 | int gamma2; // psp: black level |
f0f0d2df |
43 | int turbo_rate; |
ea8c405f |
44 | } currentConfig_t; |
45 | |
58c86d00 |
46 | extern currentConfig_t currentConfig, defaultConfig; |
ea8c405f |
47 | extern char *PicoConfigFile; |
eacee137 |
48 | extern int rom_loaded; |
ea8c405f |
49 | extern char noticeMsg[64]; |
50 | extern int state_slot; |
51 | extern int config_slot, config_slot_current; |
52 | extern unsigned char *movie_data; |
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 | |
713c9224 |
56 | extern char rom_fname_reload[512]; // ROM to try loading on next PGS_ReloadRom |
57 | extern char rom_fname_loaded[512]; // currently loaded ROM filename |
58 | |
1fb0dd88 |
59 | // engine states |
713c9224 |
60 | extern int engineState; |
1fb0dd88 |
61 | enum TPicoGameState { |
62 | PGS_Paused = 1, |
63 | PGS_Running, |
64 | PGS_Quit, |
65 | PGS_KeyConfig, |
66 | PGS_ReloadRom, |
67 | PGS_Menu, |
68 | PGS_RestartRun, |
69 | PGS_Suspending, /* PSP */ |
70 | PGS_SuspendWake, /* PSP */ |
71 | }; |
72 | |
ea8c405f |
73 | |
ca482e5d |
74 | int emu_ReloadRom(char *rom_fname); |
ea8c405f |
75 | int emu_SaveLoadGame(int load, int sram); |
76 | int emu_ReadConfig(int game, int no_defaults); |
77 | int emu_WriteConfig(int game); |
d7dd4d66 |
78 | void emu_writelrom(void); |
ea8c405f |
79 | char *emu_GetSaveFName(int load, int is_sram, int slot); |
80 | int emu_checkSaveFile(int slot); |
81 | void emu_setSaveStateCbs(int gz); |
82 | void emu_updateMovie(void); |
ca482e5d |
83 | int emu_cdCheck(int *pregion, char *fname_in); |
ea8c405f |
84 | int emu_findBios(int region, char **bios_file); |
85 | void emu_textOut8 (int x, int y, const char *text); |
86 | void emu_textOut16(int x, int y, const char *text); |
58c86d00 |
87 | char *emu_makeRomId(void); |
ca482e5d |
88 | void emu_getGameName(char *str150); |
bdec53c9 |
89 | void emu_findKeyBindCombos(void); |
c060a9ab |
90 | void emu_changeFastForward(int set_on); |
91 | void emu_RunEventsPico(unsigned int events); |
f0f0d2df |
92 | void emu_DoTurbo(int *pad, int acts); |
ca482e5d |
93 | void emu_packConfig(void); |
94 | void emu_unpackConfig(void); |
95 | void emu_shutdownMCD(void); |
ea8c405f |
96 | |
ca482e5d |
97 | #ifdef __cplusplus |
98 | } // extern "C" |
99 | #endif |
100 | |