File: emumain.h

package info (click to toggle)
genesisplusgx 1.7.4%2Bgit20160410-1
  • links: PTS
  • area: non-free
  • in suites: buster, stretch
  • size: 8,460 kB
  • ctags: 8,372
  • sloc: ansic: 95,843; makefile: 348; sh: 3
file content (77 lines) | stat: -rw-r--r-- 1,620 bytes parent folder | download | duplicates (3)
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
#ifndef _EMUMAIN_H
#define _EMUMAIN_H


#define int32 int32_t
#define int16 int16_t
#define u32 uint32_t
#define u64 uint64_t
#define ScePspDateTime SceDateTime

#define SOUND_FREQUENCY 48000
#define SOUND_SAMPLES 832

void InitEmulator();
void RunEmulator();
void TrashEmulator();

#define DISPLAY_MODE_UNSCALED    0
#define DISPLAY_MODE_FIT_HEIGHT  1
#define DISPLAY_MODE_FILL_SCREEN 2
#define DISPLAY_MODE_2X 3
#define DISPLAY_MODE_3X 4

#define JOY 0x10000
#define SYS 0x20000
#define SPC 0x40000
#define AFI 0x80000

#define CODE_MASK(x) (x & 0xffff)

#define SPC_MENU               1
#define SPC_REWIND             2

#define MAP_BUTTONS            18

#define MAP_ANALOG_UP          0
#define MAP_ANALOG_DOWN        1
#define MAP_ANALOG_LEFT        2
#define MAP_ANALOG_RIGHT       3
#define MAP_BUTTON_UP          4
#define MAP_BUTTON_DOWN        5
#define MAP_BUTTON_LEFT        6
#define MAP_BUTTON_RIGHT       7
#define MAP_BUTTON_SQUARE      8
#define MAP_BUTTON_CROSS       9
#define MAP_BUTTON_CIRCLE      10
#define MAP_BUTTON_TRIANGLE    11
#define MAP_BUTTON_LTRIGGER    12
#define MAP_BUTTON_RTRIGGER    13
#define MAP_BUTTON_SELECT      14
#define MAP_BUTTON_START       15
#define MAP_BUTTON_LRTRIGGERS  16
#define MAP_BUTTON_STARTSELECT 17

typedef struct
{
  int ShowFps;
  int ControlMode;
  int ClockFreq;
  int DisplayMode;
  int VSync;
  int UpdateFreq;
  int Frameskip;
  int VertStrip;
  int SoundEngine;
  int SoundBoost;
  int AutoFire;
  int RewindSaveRate;
  int RewindReplayDelay;
} EmulatorOptions;

struct ButtonConfig
{
  unsigned int ButtonMap[MAP_BUTTONS];
};

#endif // _EMUMAIN_H