From 88ca096b635643f4e06b501b61b3599022ede8d7 Mon Sep 17 00:00:00 2001 From: UnBeatWater <120745925+UnBeatWaterGH@users.noreply.github.com> Date: Fri, 26 Apr 2024 17:06:16 +0200 Subject: [PATCH] Add "help" CLI option (#55) --- src/mcu.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/mcu.cpp b/src/mcu.cpp index 352b0543..4a89a762 100644 --- a/src/mcu.cpp +++ b/src/mcu.cpp @@ -1376,6 +1376,27 @@ int main(int argc, char *argv[]) { resetType = ResetType::GM_RESET; } + else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "-help") || !strcmp(argv[i], "--help")) + { + // TODO: Might want to try to find a way to print out the executable's actual name (without any full paths). + printf("Usage: nuked-sc55 [options]\n"); + printf("Options:\n"); + printf(" -h, -help, --help Display this information.\n"); + printf("\n"); + printf(" -p: Set MIDI port.\n"); + printf(" -a: Set Audio Device index.\n"); + printf(" -ab::[page_count] Set Audio Buffer size.\n"); + printf("\n"); + printf(" -mk2 Use SC-55mk2 ROM set.\n"); + printf(" -st Use SC-55st ROM set.\n"); + printf(" -mk1 Use SC-55mk1 ROM set.\n"); + printf(" -cm300 Use CM-300/SCC-1 ROM set.\n"); + printf(" -jv880 Use JV-880 ROM set.\n"); + printf("\n"); + printf(" -gs Reset system in GS mode.\n"); + printf(" -gm Reset system in GM mode.\n"); + return 0; + } } }