mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-05-27 08:11:55 +00:00
Merge branch 'master' of github.com:AnonymusRaccoon/ComSquare into Debugger
This commit is contained in:
+7
-3
@@ -16,10 +16,10 @@ void usage(char *bin)
|
||||
std::cout << "ComSquare:" << std::endl
|
||||
<< "\tUsage: " << bin << " rom_path [options]" << std::endl
|
||||
<< "Options:" << std::endl
|
||||
<< "\t-c, --cpu: \tEnable the debugger of the CPU." << std::endl
|
||||
<< "\t-c, --cpu: \tEnable the debugger of the CPU." << std::endl
|
||||
<< "\t-m, --memory: \tEnable the memory viewer panel." << std::endl
|
||||
<< "\t-h, --header: \tShow the header of the cartridge." << std::endl
|
||||
<< "\t-b, --bus: \tShow the memory bus's log." << std::endl;
|
||||
<< "\t-b, --bus: \tShow the memory bus's log." << std::endl;
|
||||
}
|
||||
|
||||
void parseArguments(int argc, char **argv, SNES &snes)
|
||||
@@ -28,13 +28,14 @@ void parseArguments(int argc, char **argv, SNES &snes)
|
||||
int option_index = 0;
|
||||
static struct option long_options[] = {
|
||||
{"cpu", no_argument, 0, 'c'},
|
||||
{"apu", no_argument, 0, 'a'},
|
||||
{"memory", no_argument, 0, 'm'},
|
||||
{"header", no_argument, 0, 'h'},
|
||||
{"bus", no_argument, 0, 'b'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
int c = getopt_long(argc, argv, "cmh", long_options, &option_index);
|
||||
int c = getopt_long(argc, argv, "camhb", long_options, &option_index);
|
||||
if (c == -1)
|
||||
break;
|
||||
switch (c) {
|
||||
@@ -44,6 +45,9 @@ void parseArguments(int argc, char **argv, SNES &snes)
|
||||
case 'c':
|
||||
snes.enableCPUDebugging();
|
||||
break;
|
||||
case 'a':
|
||||
snes.enableAPUDebugging();
|
||||
break;
|
||||
case 'm':
|
||||
snes.enableRamViewer();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user