Handle number of M68K cycles used when tracing in debugger mode
[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 allowM68KExceptionCatch; // Allow M68K exception catch
83 bool allowWritesToROM; // Allow writing to ROM cartdridge
84 uint32_t biosType; // Bios type used
85 uint32_t jaguarModel; // Jaguar model
86 size_t nbrdisasmlines; // Number of lines to show in the M68K tracing window
87 bool disasmopcodes;
88 bool displayHWlabels;
89 bool useFastBlitter;
90 bool displayFullSourceFilename;
91 bool ELFSectionsCheck;
92 size_t nbrmemory1browserwindow; // Number of memory browser windows
93 size_t DRAM_size; // DRAM size
94
95 // Keybindings in order of U, D, L, R, C, B, A, Op, Pa, 0-9, #, *
96 uint32_t p1KeyBindings[21];
97 uint32_t p2KeyBindings[21];
98
99 // Keybindings
100 KBSettings KBContent[100];
101
102 // Paths
103 char ROMPath[MAX_PATH];
104 //char jagBootPath[MAX_PATH];
105 //char CDBootPath[MAX_PATH];
106 char EEPROMPath[MAX_PATH];
107 char alpineROMPath[MAX_PATH];
108 char debuggerROMPath[MAX_PATH];
109 char absROMPath[MAX_PATH];
110 char screenshotPath[MAX_PATH];
111 char sourcefilesearchPaths[4096];
112 };
113
114 // Render types
115 enum { RT_NORMAL = 0, RT_TV = 1 };
116
117 // Jaguar models
118 enum { JAG_NULL_SERIES, JAG_K_SERIES, JAG_M_SERIES };
119
120 // BIOS types
121 enum { BT_NULL, BT_K_SERIES, BT_M_SERIES, BT_STUBULATOR_1, BT_STUBULATOR_2 };
122
123 // Exported variables
124 extern VJSettings vjs;
125
126 #endif // __SETTINGS_H__