Browse Source

Add some extra key mappings; docs on keys.

master
Ben Kurtovic 8 years ago
parent
commit
6f1b1a461b
2 changed files with 21 additions and 1 deletions
  1. +15
    -1
      README.md
  2. +6
    -0
      src/emulator.c

+ 15
- 1
README.md View File

@@ -48,7 +48,8 @@ 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.
(`-s <n>`) to scale the game screen by an integer factor in windowed mode (this
only sets the starting configuration; the window should be resizeable).

Add `--debug` (`-g`) to show logging information while running. Pass it twice
(`-gg`) to show more detailed logs, including an emulator trace.
@@ -56,6 +57,19 @@ Add `--debug` (`-g`) to show logging information while running. Pass it twice
`./crater -h` gives (fairly basic) command-line usage, and `./crater -v` gives
the current version.

### Key mapping

Custom key mappings are not supported. There are two primary configurations I
like:

- `Return`/`Esc` for `Start`; `WASD` for D-pad; `.` for `1`/left trigger;
`/` for `2`/right trigger

- `Return`/`Esc` for `Start`; arrow keys for D-pad; `Z` for `1`/left trigger;
`X` for `2`/right trigger

You can switch between them freely.

### Assembler/Disassembler

crater has built-in support for converting Z80 assembly into ROM images, as


+ 6
- 0
src/emulator.c View File

@@ -105,10 +105,16 @@ static void handle_keypress(GameGear *gg, SDL_Keycode key, bool state)
case SDLK_d:
button = BUTTON_RIGHT; break;
case SDLK_j:
case SDLK_z:
case SDLK_PERIOD:
button = BUTTON_TRIGGER_1; break;
case SDLK_k:
case SDLK_x:
case SDLK_SLASH:
button = BUTTON_TRIGGER_2; break;
case SDLK_RETURN:
case SDLK_RETURN2:
case SDLK_ESCAPE:
button = BUTTON_START; break;
default:
return;


Loading…
Cancel
Save