emu.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // (c) Copyright 2006-2007 notaz, All rights reserved.
  2. // Free for non-commercial use.
  3. // For commercial use, separate licencing terms must be obtained.
  4. #include "port_config.h"
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #define EOPT_USE_SRAM (1<<0)
  9. #define EOPT_SHOW_FPS (1<<1)
  10. #define EOPT_EN_SOUND (1<<2)
  11. #define EOPT_GZIP_SAVES (1<<3)
  12. typedef struct _currentConfig_t {
  13. // char lastRomFile[512];
  14. int EmuOpt; // LSb->MSb: use_sram, show_fps, enable_sound, gzip_saves,
  15. // squidgehack, no_save_cfg_on_exit, <unused>, 16_bit_mode
  16. // craigix_ram, confirm_save, show_cd_leds, confirm_load
  17. // A_SNs_gamma, perfect_vsync, giz_scanlines, giz_dblbuff
  18. // vsync_mode, show_clock, no_frame_limitter
  19. int s_PicoOpt; // for old cfg files only
  20. int s_PsndRate;
  21. int s_PicoRegion;
  22. int s_PicoAutoRgnOrder;
  23. int s_PicoCDBuffers;
  24. int Frameskip;
  25. int CPUclock;
  26. int KeyBinds[PLAT_MAX_KEYS];
  27. int volume;
  28. int gamma;
  29. #if PLAT_HAVE_JOY
  30. int JoyBinds[4][32];
  31. #endif
  32. int scaling; // gp2x: 0=center, 1=hscale, 2=hvscale, 3=hsoftscale; psp: bilinear filtering
  33. int rotation; // for UIQ
  34. float scale; // psp: screen scale
  35. float hscale32, hscale40; // psp: horizontal scale
  36. int gamma2; // psp: black level
  37. int turbo_rate;
  38. } currentConfig_t;
  39. extern currentConfig_t currentConfig, defaultConfig;
  40. extern char *PicoConfigFile;
  41. extern int rom_loaded;
  42. extern char noticeMsg[64];
  43. extern int state_slot;
  44. extern int config_slot, config_slot_current;
  45. extern unsigned char *movie_data;
  46. extern char loadedRomFName[512]; // last loaded ROM filename
  47. extern int kb_combo_keys, kb_combo_acts; // keys and actions which need button combos
  48. extern int pico_inp_mode;
  49. int emu_ReloadRom(char *rom_fname);
  50. int emu_SaveLoadGame(int load, int sram);
  51. int emu_ReadConfig(int game, int no_defaults);
  52. int emu_WriteConfig(int game);
  53. char *emu_GetSaveFName(int load, int is_sram, int slot);
  54. int emu_checkSaveFile(int slot);
  55. void emu_setSaveStateCbs(int gz);
  56. void emu_updateMovie(void);
  57. int emu_cdCheck(int *pregion, char *fname_in);
  58. int emu_findBios(int region, char **bios_file);
  59. void emu_textOut8 (int x, int y, const char *text);
  60. void emu_textOut16(int x, int y, const char *text);
  61. char *emu_makeRomId(void);
  62. void emu_getGameName(char *str150);
  63. void emu_findKeyBindCombos(void);
  64. void emu_forcedFrame(int opts);
  65. void emu_changeFastForward(int set_on);
  66. void emu_RunEventsPico(unsigned int events);
  67. void emu_DoTurbo(int *pad, int acts);
  68. void emu_packConfig(void);
  69. void emu_unpackConfig(void);
  70. void emu_shutdownMCD(void);
  71. extern const char * const keyNames[];
  72. void emu_prepareDefaultConfig(void);
  73. void emu_platformDebugCat(char *str);
  74. #ifdef __cplusplus
  75. } // extern "C"
  76. #endif