Linux build fixes
[clinton/Virtual-Jaguar-Rx.git] / src / settings.h
1 //
2 // settings.h: Header file
3 //
4 // JPM = Jean-Paul Mari <djipi.mari@gmail.com>
5 //
6 // Who When What
7 // --- ---------- ------------------------------------------------------------
8 // JPM 06/19/2016 Soft debugger support
9 // JPM Sept./2018 Added the new Models and BIOS handler, and a screenshot settings
10 // JPM 10/10/2018 Added search paths in settings
11 // JPM 04/06/2019 Added ELF sections check
12 //
13
14 #ifndef __SETTINGS_H__
15 #define __SETTINGS_H__
16
17 // MAX_PATH isn't defined in stdlib.h on *nix, so we do it here...
18 #ifdef __GCCUNIX__
19 #include <limits.h>
20 #define MAX_PATH _POSIX_PATH_MAX
21 #else
22 #include <stdlib.h> // for MAX_PATH on MinGW/Darwin
23 // Kludge for Win64
24 #ifndef MAX_PATH
25 #define MAX_PATH _MAX_PATH // Urgh.
26 #endif
27 #endif
28 #include <stdlib.h>
29 #include <stdint.h>
30
31 #define MaxMemory1BrowserWindow 4
32
33
34 // List the erase settings possibilities
35 enum
36 {
37 SETTINGS_NONE = 0,
38 SETTINGS_ALL,
39 SETTINGS_UI,
40 SETTINGS_ALPINE,
41 SETTINGS_DEBUGGER,
42 SETTINGS_END
43 };
44
45
46 // Key bindings settings structure
47 struct KBSettings
48 {
49 //char KBSettingName[100];
50 char KBSettingValue[100];
51 //char KBSettingDefaultValue[100];
52 };
53
54
55 // functions declarations
56 extern bool EraseSettings(char *Setting);
57
58
59 // Settings struct
60 struct VJSettings
61 {
62 bool useJoystick; // Joystick usage
63 int32_t joyport; // Joystick port
64 bool hardwareTypeNTSC; // Set to false for PAL, otherwise it is NTSC
65 bool useJaguarBIOS; // Use of any Jaguar BIOS
66 bool useRetailBIOS; // Use of Retail BIOS
67 bool useDevBIOS; // Use of Development BIOS
68 bool GPUEnabled; // Use of GPU
69 bool DSPEnabled; // Use of DSP
70 bool usePipelinedDSP;
71 bool fullscreen; // Emulator in full screen mode so video output display only
72 bool useOpenGL; // OpenGL support (always 'true')
73 uint32_t glFilter;
74 bool hardwareTypeAlpine; // Alpine mode
75 bool softTypeDebugger; // Soft type debugger mode
76 bool audioEnabled;
77 uint32_t frameSkip;
78 uint32_t renderType;
79 uint32_t refresh;
80 bool allowWritesToROM; // Allow writing to ROM cartdridge
81 uint32_t biosType; // Bios type used
82 uint32_t jaguarModel; // Jaguar model
83 size_t nbrdisasmlines; // Number of lines to show in the M68K tracing window
84 bool disasmopcodes;
85 bool displayHWlabels;
86 bool useFastBlitter;
87 bool displayFullSourceFilename;
88 bool ELFSectionsCheck;
89 size_t nbrmemory1browserwindow; // Number of memory browser windows
90 size_t DRAM_size; // DRAM size
91
92 // Keybindings in order of U, D, L, R, C, B, A, Op, Pa, 0-9, #, *
93 uint32_t p1KeyBindings[21];
94 uint32_t p2KeyBindings[21];
95
96 // Keybindings
97 KBSettings KBContent[100];
98
99 // Paths
100 char ROMPath[MAX_PATH];
101 //char jagBootPath[MAX_PATH];
102 //char CDBootPath[MAX_PATH];
103 char EEPROMPath[MAX_PATH];
104 char alpineROMPath[MAX_PATH];
105 char debuggerROMPath[MAX_PATH];
106 char absROMPath[MAX_PATH];
107 char screenshotPath[MAX_PATH];
108 char sourcefilesearchPaths[4096];
109 };
110
111 // Render types
112 enum { RT_NORMAL = 0, RT_TV = 1 };
113
114 // Jaguar models
115 enum { JAG_NULL_SERIES, JAG_K_SERIES, JAG_M_SERIES };
116
117 // BIOS types
118 enum { BT_NULL, BT_K_SERIES, BT_M_SERIES, BT_STUBULATOR_1, BT_STUBULATOR_2 };
119
120 // Exported variables
121 extern VJSettings vjs;
122
123 #endif // __SETTINGS_H__