UIQ3 update, some makefile unification, rm old configs, stuff
[picodrive.git] / platform / common / emu.h
... / ...
CommitLineData
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
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 {
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
45extern currentConfig_t currentConfig, defaultConfig;
46extern char *PicoConfigFile;
47extern int rom_loaded;
48extern char noticeMsg[64];
49extern int state_slot;
50extern int config_slot, config_slot_current;
51extern unsigned char *movie_data;
52extern char loadedRomFName[512]; // last loaded ROM filename
53extern int kb_combo_keys, kb_combo_acts; // keys and actions which need button combos
54extern int pico_inp_mode;
55
56
57int emu_ReloadRom(char *rom_fname);
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);
65int emu_cdCheck(int *pregion, char *fname_in);
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);
69char *emu_makeRomId(void);
70void emu_getGameName(char *str150);
71void emu_findKeyBindCombos(void);
72void emu_forcedFrame(int opts);
73void emu_changeFastForward(int set_on);
74void emu_RunEventsPico(unsigned int events);
75void emu_DoTurbo(int *pad, int acts);
76void emu_packConfig(void);
77void emu_unpackConfig(void);
78void emu_shutdownMCD(void);
79
80extern const char * const keyNames[];
81void emu_prepareDefaultConfig(void);
82void emu_platformDebugCat(char *str);
83
84#ifdef __cplusplus
85} // extern "C"
86#endif
87