1 // (c) Copyright 2006-2007 notaz, All rights reserved.
2 // Free for non-commercial use.
4 // For commercial use, separate licencing terms must be obtained.
6 #include "port_config.h"
12 extern void *g_screen_ptr;
15 #define g_screen_width SCREEN_WIDTH
16 #define g_screen_height SCREEN_HEIGHT
18 extern int g_screen_width;
19 extern int g_screen_height;
23 #define EOPT_USE_SRAM (1<<0)
24 #define EOPT_SHOW_FPS (1<<1)
25 #define EOPT_EN_SOUND (1<<2)
26 #define EOPT_GZIP_SAVES (1<<3)
27 #define EOPT_NO_AUTOSVCFG (1<<5)
29 typedef struct _currentConfig_t {
30 // char lastRomFile[512];
31 int EmuOpt; // LSb->MSb: use_sram, show_fps, enable_sound, gzip_saves,
32 // squidgehack, no_save_cfg_on_exit, <unused>, 16_bit_mode
33 // craigix_ram, confirm_save, show_cd_leds, confirm_load
34 // A_SNs_gamma, perfect_vsync, giz_scanlines, giz_dblbuff
35 // vsync_mode, show_clock, no_frame_limitter
36 int s_PicoOpt; // for old cfg files only
39 int s_PicoAutoRgnOrder;
43 int KeyBinds[PLAT_MAX_KEYS];
49 int scaling; // gp2x: 0=center, 1=hscale, 2=hvscale, 3=hsoftscale; psp: bilinear filtering
50 int rotation; // for UIQ
51 float scale; // psp: screen scale
52 float hscale32, hscale40; // psp: horizontal scale
53 int gamma2; // psp: black level
57 extern currentConfig_t currentConfig, defaultConfig;
58 extern char *PicoConfigFile;
59 extern int rom_loaded;
60 extern char noticeMsg[64];
61 extern int state_slot;
62 extern int config_slot, config_slot_current;
63 extern unsigned char *movie_data;
64 extern int kb_combo_keys, kb_combo_acts; // keys and actions which need button combos
65 extern int pico_inp_mode;
67 extern char rom_fname_reload[512]; // ROM to try loading on next PGS_ReloadRom
68 extern char rom_fname_loaded[512]; // currently loaded ROM filename
71 extern int engineState;
80 PGS_Suspending, /* PSP */
81 PGS_SuspendWake, /* PSP */
85 int emu_ReloadRom(char *rom_fname);
86 int emu_SaveLoadGame(int load, int sram);
87 int emu_ReadConfig(int game, int no_defaults);
88 int emu_WriteConfig(int game);
89 void emu_writelrom(void);
90 char *emu_GetSaveFName(int load, int is_sram, int slot);
91 int emu_checkSaveFile(int slot);
92 void emu_setSaveStateCbs(int gz);
93 void emu_updateMovie(void);
94 int emu_cdCheck(int *pregion, char *fname_in);
95 int emu_findBios(int region, char **bios_file);
96 void emu_textOut8 (int x, int y, const char *text);
97 void emu_textOut16(int x, int y, const char *text);
98 char *emu_makeRomId(void);
99 void emu_getGameName(char *str150);
100 void emu_findKeyBindCombos(void);
101 void emu_changeFastForward(int set_on);
102 void emu_RunEventsPico(unsigned int events);
103 void emu_DoTurbo(int *pad, int acts);
104 void emu_packConfig(void);
105 void emu_unpackConfig(void);
106 void emu_shutdownMCD(void);