1 #ifndef _NSTCOMMON_H_ 2 #define _NSTCOMMON_H_ 3 4 // Nst Core 5 #include "core/api/NstApiEmulator.hpp" 6 #include "core/api/NstApiVideo.hpp" 7 #include "core/api/NstApiSound.hpp" 8 #include "core/api/NstApiMachine.hpp" 9 #include "core/api/NstApiCartridge.hpp" 10 #include "core/api/NstApiFds.hpp" 11 #include "core/api/NstApiNsf.hpp" 12 #include "core/api/NstApiUser.hpp" 13 #include "core/api/NstApiRewinder.hpp" 14 #include "core/api/NstApiMovie.hpp" 15 16 using namespace Nes::Api; 17 18 typedef struct { 19 char nstdir[256]; 20 char nstconfdir[256]; 21 char savedir[256]; 22 char gamename[256]; 23 char savename[512]; 24 char fdssave[512]; 25 char statepath[512]; 26 char cheatpath[512]; 27 char palettepath[512]; 28 char sampdir[512]; 29 } nstpaths_t; 30 31 // Pointers 32 void* nst_ptr_video(); 33 void* nst_ptr_sound(); 34 void* nst_ptr_input(); 35 36 // Archives 37 bool nst_archive_checkext(const char *filename); 38 bool nst_archive_select_file(const char *filename, char *reqfile, size_t reqsize); 39 bool nst_archive_open(const char *filename, char **rom, int *romsize, const char *reqfile); 40 41 // DIP Switches 42 void nst_dipswitch(); 43 44 // Database 45 void nst_db_load(); 46 void nst_db_unload(); 47 48 // FDS 49 void nst_fds_bios_load(); 50 void nst_fds_bios_unload(); 51 void nst_fds_info(); 52 void nst_fds_flip(); 53 void nst_fds_switch(); 54 55 // Movies 56 void nst_movie_save(const char *filename); 57 void nst_movie_load(const char *filename); 58 void nst_movie_stop(); 59 60 // NSF 61 bool nst_nsf(); 62 void nst_nsf_play(); 63 void nst_nsf_stop(); 64 void nst_nsf_prev(); 65 void nst_nsf_next(); 66 67 // PAL 68 bool nst_pal(); 69 70 // Play check 71 bool nst_playing(); 72 73 // Palette 74 void nst_palette_load(const char *filename); 75 void nst_palette_save(); 76 void nst_palette_unload(); 77 78 // Patch 79 bool nst_find_patch(char *patchname, unsigned int patchname_length, const char *filename); 80 81 // Setters 82 void nst_set_callbacks(); 83 void nst_set_dirs(); 84 void nst_set_overclock(); 85 void nst_set_paths(const char *filename); 86 void nst_set_region(); 87 void nst_set_rewind(int direction); 88 89 // States 90 void nst_state_save(const char *filename); 91 void nst_state_load(const char *filename); 92 void nst_state_quicksave(int isvst); 93 void nst_state_quickload(int isvst); 94 95 // Timing 96 int nst_timing_runframes(); 97 void nst_timing_set_ffspeed(); 98 void nst_timing_set_default(); 99 100 // Main Emulation 101 void nst_reset(bool hardreset); 102 void nst_emuloop(); 103 104 // Unsorted 105 int nst_load(const char *filename); 106 void nst_unload(); 107 void nst_play(); 108 void nst_pause(); 109 110 #endif 111