File: nstcommon.h

package info (click to toggle)
nestopia 1.52.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 12,140 kB
  • sloc: cpp: 127,444; xml: 27,234; ansic: 3,635; makefile: 949; sh: 19
file content (109 lines) | stat: -rw-r--r-- 2,344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#ifndef _NSTCOMMON_H_
#define _NSTCOMMON_H_

// Nst Core
#include "core/api/NstApiEmulator.hpp"
#include "core/api/NstApiVideo.hpp"
#include "core/api/NstApiSound.hpp"
#include "core/api/NstApiMachine.hpp"
#include "core/api/NstApiCartridge.hpp"
#include "core/api/NstApiFds.hpp"
#include "core/api/NstApiNsf.hpp"
#include "core/api/NstApiUser.hpp"
#include "core/api/NstApiRewinder.hpp"
#include "core/api/NstApiMovie.hpp"

using namespace Nes::Api;

typedef struct {
	char nstdir[256];
	char nstconfdir[256];
	char savedir[256];
	char gamename[256];
	char savename[512];
	char fdssave[512];
	char statepath[512];
	char cheatpath[512];
	char palettepath[512];
	char sampdir[512];
} nstpaths_t;

// Pointers
void* nst_ptr_video();
void* nst_ptr_sound();
void* nst_ptr_input();

// Archives
bool nst_archive_checkext(const char *filename);
bool nst_archive_select_file(const char *filename, char *reqfile, size_t reqsize);
bool nst_archive_open(const char *filename, char **rom, int *romsize, const char *reqfile);

// DIP Switches
void nst_dipswitch();

// Database
void nst_db_load();
void nst_db_unload();

// FDS
void nst_fds_bios_load();
void nst_fds_bios_unload();
void nst_fds_info();
void nst_fds_flip();
void nst_fds_switch();

// Movies
void nst_movie_save(const char *filename);
void nst_movie_load(const char *filename);
void nst_movie_stop();

// NSF
bool nst_nsf();
void nst_nsf_play();
void nst_nsf_stop();
void nst_nsf_prev();
void nst_nsf_next();

// PAL
bool nst_pal();

// Play check
bool nst_playing();

// Palette
void nst_palette_load(const char *filename);
void nst_palette_save();
void nst_palette_unload();

// Patch
bool nst_find_patch(char *patchname, unsigned int patchname_length, const char *filename);

// Setters
void nst_set_callbacks();
void nst_set_dirs();
void nst_set_overclock();
void nst_set_paths(const char *filename);
void nst_set_region();
void nst_set_rewind(int direction);

// States
void nst_state_save(const char *filename);
void nst_state_load(const char *filename);
void nst_state_quicksave(int isvst);
void nst_state_quickload(int isvst);

// Timing
void nst_timing_set_ffspeed();
void nst_timing_set_default();

// Main Emulation
void nst_reset(bool hardreset);
void nst_emuloop();

// Unsorted
int nst_load(const char *filename);
void nst_unload();
void nst_play();
void nst_pause();

#endif