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