| 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 | #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 { |
| 18 | // char lastRomFile[512]; |
| 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 |
| 22 | // A_SNs_gamma, perfect_vsync, giz_scanlines, giz_dblbuff |
| 23 | // vsync_mode, show_clock, no_frame_limitter |
| 24 | int s_PicoOpt; // for old cfg files only |
| 25 | int s_PsndRate; |
| 26 | int s_PicoRegion; |
| 27 | int s_PicoAutoRgnOrder; |
| 28 | int s_PicoCDBuffers; |
| 29 | int Frameskip; |
| 30 | int CPUclock; |
| 31 | int KeyBinds[PLAT_MAX_KEYS]; |
| 32 | int volume; |
| 33 | int gamma; |
| 34 | #if PLAT_HAVE_JOY |
| 35 | int JoyBinds[4][32]; |
| 36 | #endif |
| 37 | int scaling; // gp2x: 0=center, 1=hscale, 2=hvscale, 3=hsoftscale; psp: bilinear filtering |
| 38 | int rotation; // for UIQ |
| 39 | float scale; // psp: screen scale |
| 40 | float hscale32, hscale40; // psp: horizontal scale |
| 41 | int gamma2; // psp: black level |
| 42 | int turbo_rate; |
| 43 | } currentConfig_t; |
| 44 | |
| 45 | extern currentConfig_t currentConfig, defaultConfig; |
| 46 | extern char *PicoConfigFile; |
| 47 | extern int rom_loaded; |
| 48 | extern char noticeMsg[64]; |
| 49 | extern int state_slot; |
| 50 | extern int config_slot, config_slot_current; |
| 51 | extern unsigned char *movie_data; |
| 52 | extern char loadedRomFName[512]; // last loaded ROM filename |
| 53 | extern int kb_combo_keys, kb_combo_acts; // keys and actions which need button combos |
| 54 | extern int pico_inp_mode; |
| 55 | |
| 56 | |
| 57 | int emu_ReloadRom(char *rom_fname); |
| 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); |
| 65 | int emu_cdCheck(int *pregion, char *fname_in); |
| 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); |
| 69 | char *emu_makeRomId(void); |
| 70 | void emu_getGameName(char *str150); |
| 71 | void emu_findKeyBindCombos(void); |
| 72 | void emu_changeFastForward(int set_on); |
| 73 | void emu_RunEventsPico(unsigned int events); |
| 74 | void emu_DoTurbo(int *pad, int acts); |
| 75 | void emu_packConfig(void); |
| 76 | void emu_unpackConfig(void); |
| 77 | void emu_shutdownMCD(void); |
| 78 | |
| 79 | /* not in common */ |
| 80 | extern const char * const keyNames[]; |
| 81 | void emu_prepareDefaultConfig(void); |
| 82 | void emu_platformDebugCat(char *str); |
| 83 | void emu_forcedFrame(int opts); |
| 84 | void emu_startSound(void); |
| 85 | void emu_endSound(void); |
| 86 | void emu_waitSound(void); |
| 87 | |
| 88 | #ifdef __cplusplus |
| 89 | } // extern "C" |
| 90 | #endif |
| 91 | |