src/platform/commandline.h (view raw)
1#ifndef COMMAND_LINE_H
2#define COMMAND_LINE_H
3
4#include "common.h"
5
6enum DebuggerType {
7 DEBUGGER_NONE = 0,
8#ifdef USE_CLI_DEBUGGER
9 DEBUGGER_CLI,
10#endif
11#ifdef USE_GDB_STUB
12 DEBUGGER_GDB,
13#endif
14 DEBUGGER_MAX
15};
16
17#define GRAPHICS_OPTIONS "234f"
18#define GRAPHICS_USAGE \
19 "\nGraphics options:\n" \
20 " -2 2x viewport\n" \
21 " -3 3x viewport\n" \
22 " -4 4x viewport\n" \
23 " -f Sart full-screen"
24
25#define PERF_OPTIONS "S:"
26#define PERF_USAGE \
27 "\nBenchmark options:\n" \
28 " -S SEC Run for SEC in-game seconds before exiting"
29
30struct StartupOptions {
31 int fd;
32 const char* fname;
33 int biosFd;
34 int frameskip;
35 int rewindBufferCapacity;
36 int rewindBufferInterval;
37
38 int width;
39 int height;
40 int fullscreen;
41
42 int perfDuration;
43
44 enum DebuggerType debuggerType;
45 int debugAtStart;
46};
47
48int parseCommandArgs(struct StartupOptions* opts, int argc, char* const* argv, const char* extraOptions);
49void usage(const char* arg0, const char* extraOptions);
50
51struct ARMDebugger* createDebugger(struct StartupOptions* opts);
52
53#endif