Browse Source

CLI: have -s be --save instead of --scale; use -x for --scale.

master
Ben Kurtovic 7 years ago
parent
commit
829680032d
2 changed files with 7 additions and 7 deletions
  1. +3
    -3
      README.md
  2. +4
    -4
      src/config.c

+ 3
- 3
README.md View File

@@ -50,13 +50,13 @@ Add or symlink ROMs to `roms/` at your leisure. Note that they must end in
`.gg` or `.bin` to be auto-detected.

Add `--fullscreen` (`-f`) to enable fullscreen mode, or `--scale <n>`
(`-s <n>`) to scale the game screen by an integer factor in windowed mode (this
(`-x <n>`) to scale the game screen by an integer factor in windowed mode (this
only sets the starting configuration; the window should be resizeable).

By default, crater will save cartridge RAM ("battery saves"; these are distinct
from save states, which are not yet supported) to a file named `<rom>.sav`,
where `<rom>` is the path to the ROM file. You can set a custom save location
with `--save <path>` or disable saving entirely with `--no-save`.
with `--save <path>` (`-s <path>`) or disable saving entirely with `--no-save`.

Add `--debug` (`-g`) to show logging information while running. Pass it twice
(`-gg`) to show more detailed logs, including an emulator trace.
@@ -94,7 +94,7 @@ Status

The emulator is almost fully functional, lacking only audio support, a few
uncommon CPU instructions, and some advanced graphics features. Most games are
playable with only minor bugs. Future goals include save states and a more
playable with only minor bugs. Future goals include full save states and a more
sophisticated debugging mode.

The assembler is complete. Future goals include more documentation, macros, and


+ 4
- 4
src/config.c View File

@@ -37,9 +37,9 @@ static void print_help(const char *arg1)
"advanced options:\n"
" -g, --debug show logging information while running; add twice (-gg)\n"
" to show more detailed logs, including an emulator trace\n"
" -s, --scale <n> scale the game screen by an integer factor\n"
" -x, --scale <n> scale the game screen by an integer factor\n"
" (applies to windowed mode only; defaults to 4)\n"
" -b, --save <path> save cartridge RAM (\"battery save\") to the given file\n"
" -s, --save <path> save cartridge RAM (\"battery save\") to the given file\n"
" (defaults to <rom_path>.sav)\n"
" -n, --no-save disable saving cartridge RAM entirely\n"
" -a, --assemble <in> [<out>]\n"
@@ -230,7 +230,7 @@ static int parse_opt_arg(Config *config, Arguments *args, const char *arg)
else if (arg_check(arg, "f", "fullscreen")) {
config->fullscreen = true;
}
else if (arg_check(arg, "s", "scale")) {
else if (arg_check(arg, "x", "scale")) {
const char *next = consume_next(args);
if (!next) {
ERROR("the scale option requires an argument")
@@ -243,7 +243,7 @@ static int parse_opt_arg(Config *config, Arguments *args, const char *arg)
}
config->scale = scale;
}
else if (arg_check(arg, "b", "save")) {
else if (arg_check(arg, "s", "save")) {
const char *next = consume_next(args);
if (!next) {
ERROR("the save option requires an argument")


Loading…
Cancel
Save