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