-
Notifications
You must be signed in to change notification settings - Fork 17
/
main.h
89 lines (74 loc) · 1.89 KB
/
main.h
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
#ifndef MAIN_H
#define MAIN_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <ctype.h>
#include <math.h>
#if !defined(__GP32__) && !defined(TARGET_PSP)
#include "GP2X.h"
extern SDL_Surface* screen;
extern SDL_Surface* actualScreen;
#endif
struct SYSTEMINFO {
int hSize;
int vSize;
int Ticks;
int InputKeys[12];
//MachineSound sound[4];
// Dynamic System Info
BOOL Back0;
BOOL Back1;
BOOL Sprites;
};
struct EMUINFO {
/* char ProgramFolder[_MAX_PATH]; // place holders for filenames
char SavePath[_MAX_PATH];
char DebugPath[_MAX_PATH];
char RomPath[_MAX_PATH];
char ScreenPath[_MAX_PATH];
char OpenFileName[_MAX_PATH]; // place holders for filenames
char SaveFileName[_MAX_PATH];*/
char RomFileName[_MAX_PATH];
int machine; // what kind of machine should we emulate
int romSize; // what is the size of the currently loaded file
int sample_rate; // what is the current sample rate
int stereo; // play in stereo?
//unsigned int fps;
int samples;
SYSTEMINFO *drv;
};
#define KEY_UP 0
#define KEY_DOWN 1
#define KEY_LEFT 2
#define KEY_RIGHT 3
#define KEY_START 4
#define KEY_BUTTON_A 5
#define KEY_BUTTON_B 6
#define KEY_SELECT 7
#define KEY_UP_2 8
#define KEY_DOWN_2 9
#define KEY_LEFT_2 10
#define KEY_RIGHT_2 11
// Possible Neogeo Pocket versions
#define NGP 0x00
#define NGPC 0x01
#define NR_OF_SYSTEMS 2
extern BOOL m_bIsActive;
extern EMUINFO m_emuInfo;
extern SYSTEMINFO m_sysInfo[NR_OF_SYSTEMS];
extern int romSize;
int handleInputFile(char *romName);
void mainemuinit();
#ifdef __GP32__
#define HOST_FPS 60 //100 was what it was, originally
#else
#ifdef TARGET_PSP //to call these FPS is a bit of a misnomer
#define HOST_FPS 60 //the number of frames we want to draw to the host's screen every second
#else
#define HOST_FPS 60 //100 was what it was, originally
#endif
#endif
#endif