Commit aa157e53 authored by Cayce's avatar Cayce
Browse files

- fix keyboard map: some keys where registering twice, and shifted keys did not need to be mapped

- map COUNTRY & STOP equal to fMSX
- document RetroArch-to-fmsx control mapping, including MSX2+ Japanese
parent 7b0c70c2
......@@ -45,6 +45,98 @@ Optional; loaded when found:
* GMASTER2.ROM, GMASTER.ROM
## Mapping of controls
User 1:
* "Joystick": map RetroPad to MSX joystick A
|RetroPad|MSX
|---|---
|LEFT | Stick Left
|UP | Stick Up
|DOWN | Stick Down
|RIGHT |Stick Right
|A | Fire A
|B | Fire B
* "Joystick + Emulated Keyboard": map RetroPad to MSX joystick A, plus to a few MSX keyboard keys useful for gaming
|RetroPad|MSX
|---|---
|LEFT | Stick Left
|UP | Stick Up
|DOWN | Stick Down
|RIGHT |Stick Right
|A | Fire A
|B | Fire B
|X | F3
|Y | Space
|START | F1
|SELECT| F2
|L | F4
|R | F5
|L2 | Graph
|R2 | Ctrl
|L3 | Enter
|R3 | Escape
* "Emulated Keyboard": map RetroPad to MSX keyboard cursor, plus to a few _other_ MSX keyboard keys useful for gaming - where * indicates a difference with "Joystick + Emulated Keyboard"
|RetroPad|MSX
|---|---
|LEFT | Arrow Left
|UP | Arrow Up
|DOWN | Arrow Down
|RIGHT |Arrow Right
|A | Space *
|B | Enter *
|X | N *
|Y | M *
|START | F1
|SELECT| F4 *
|L | F2 *
|R | F3 *
|L2 | Graph
|R2 | Ctrl
|L3 | F5 *
|R3 | Escape
* "Keyboard": maps host keyboard to MSX keyboard. Only on (RetroArch) platforms with a real keyboard (Linux, Windows, etc). Don't forget to press Scroll Lock to enter Game Focus Mode!
* MSX1 & 2: US/European keyboard map, cursors, numeric pad, F1-F5
* MSX2+: Japanese keyboard map - see below
* with these special keys for all 3 MSX models:
|Host | MSX
|---|---
|ctrl |CONTROL
|shift |SHIFT
|left alt |GRAPH
|ins |INSERT
|del |DELETE
|home |HOME/CLS
|end |SELECT
|pageup or pause |STOP/BREAK
|pagedown |COUNTRY
User 2:
* "Joystick": map RetroPad to MSX joystick B
### MSX1/2 US/European keyboard map
Enter accented characters (like é) with COUNTRY (page down) and graphical symbols with GRAPH (left alt).
### MSX2+ Japanese keyboard map
This is a typical MSX2+ with Japanese keyboard:
![Japanese keyboard](Japanese-MSX2+-keyboard.jpg)
How to use this:
* normal: bottomleft Roman letter/symbol
* shift: topleft symbol
* alt: topright symbol (without the box)
* KANA LOCK active: bottomright Japanese character
* KANA LOCK active with shift: middleright Japanese character
To (de)activate KANA LOCK, press page down (COUNTRY). It works just like caps lock: press and release to enable.
## Technical details
Video: 16bpp RGB565 (PSP: BGR565, PS2: BGR555) 272x228 (544x228 in 512px MSX2 screen modes). This includes an 8px (16px) border; MSX native screen resolutions are:
......
......@@ -67,7 +67,7 @@ typedef struct
int retro;
int fmsx;
}keymap_t;
keymap_t keymap[] =
keymap_t keymap[] = // only need to map basic keys; not SHIFTed ones
{
{ RETROK_LEFT, KBD_LEFT },
{ RETROK_UP, KBD_UP },
......@@ -80,13 +80,16 @@ keymap_t keymap[] =
{ RETROK_LALT, KBD_GRAPH },
{ RETROK_BACKSPACE, KBD_BS },
{ RETROK_TAB, KBD_TAB },
{ RETROK_ESCAPE, KBD_ESCAPE },
{ RETROK_SPACE, KBD_SPACE },
{ RETROK_CAPSLOCK, KBD_CAPSLOCK },
{ RETROK_END, KBD_SELECT },
{ RETROK_HOME, KBD_HOME },
{ RETROK_RETURN, KBD_ENTER },
{ RETROK_DELETE, KBD_DELETE },
{ RETROK_INSERT, KBD_INSERT },
{ RETROK_PAGEUP, KBD_COUNTRY },
{ RETROK_PAGEDOWN, KBD_COUNTRY },
{ RETROK_PAGEUP, KBD_STOP },
{ RETROK_PAUSE, KBD_STOP },
{ RETROK_F1, KBD_F1 },
{ RETROK_F2, KBD_F2 },
......@@ -97,25 +100,21 @@ keymap_t keymap[] =
{ RETROK_KP1, KBD_NUMPAD1 },
{ RETROK_KP2, KBD_NUMPAD2 },
{ RETROK_KP3, KBD_NUMPAD3 },
{ RETROK_ESCAPE, KBD_ESCAPE },
{ RETROK_KP4, KBD_NUMPAD4 },
{ RETROK_KP5, KBD_NUMPAD5 },
{ RETROK_KP6, KBD_NUMPAD6 },
{ RETROK_KP7, KBD_NUMPAD7 },
{ RETROK_SPACE, KBD_SPACE },
{ RETROK_EXCLAIM, '!' },
{ RETROK_QUOTE, '"' },
{ RETROK_HASH, '#' },
{ RETROK_DOLLAR, '$' },
/* { RETROK_UNKNOWN, '%' }, */
{ RETROK_AMPERSAND, '&' },
{ RETROK_BACKSLASH, '\'' },
{ RETROK_LEFTPAREN, '(' },
{ RETROK_RIGHTPAREN, ')' },
{ RETROK_ASTERISK, '*' },
{ RETROK_PLUS, '+' },
{ RETROK_COMMA, ',' },
{ RETROK_KP8, KBD_NUMPAD8 },
{ RETROK_KP9, KBD_NUMPAD9 },
{ RETROK_BACKQUOTE, '`' },
{ RETROK_MINUS, '-' },
{ RETROK_EQUALS, '=' },
{ RETROK_LEFTBRACKET,'[' },
{ RETROK_RIGHTBRACKET,']' },
{ RETROK_BACKSLASH, '\\' },
{ RETROK_SEMICOLON, ';' },
{ RETROK_QUOTE, '\'' },
{ RETROK_COMMA, ',' },
{ RETROK_PERIOD, '.' },
{ RETROK_SLASH, '/' },
{ RETROK_0, '0' },
......@@ -128,45 +127,6 @@ keymap_t keymap[] =
{ RETROK_7, '7' },
{ RETROK_8, '8' },
{ RETROK_9, '9' },
{ RETROK_COLON, ':' },
{ RETROK_SEMICOLON, ';' },
{ RETROK_LESS, '<' },
{ RETROK_EQUALS, '=' },
{ RETROK_GREATER, '>' },
{ RETROK_QUESTION, '?' },
{ RETROK_AT, '@' },
/* { RETROK_a, 'A' },
{ RETROK_b, 'B' },
{ RETROK_c, 'C' },
{ RETROK_d, 'D' },
{ RETROK_e, 'E' },
{ RETROK_f, 'F' },
{ RETROK_g, 'G' },
{ RETROK_h, 'H' },
{ RETROK_j, 'I' },
{ RETROK_j, 'J' },
{ RETROK_k, 'K' },
{ RETROK_l, 'L' },
{ RETROK_m, 'M' },
{ RETROK_n, 'N' },
{ RETROK_o, 'O' },
{ RETROK_p, 'P' },
{ RETROK_q, 'Q' },
{ RETROK_r, 'R' },
{ RETROK_s, 'S' },
{ RETROK_t, 'T' },
{ RETROK_u, 'U' },
{ RETROK_v, 'V' },
{ RETROK_w, 'W' },
{ RETROK_x, 'X' },
{ RETROK_y, 'Y' },
{ RETROK_z, 'Z' }, */
{ RETROK_LEFTBRACKET,'[' },
{ RETROK_BACKSLASH, '\\' },
{ RETROK_RIGHTBRACKET,']' },
{ RETROK_CARET, '^' },
{ RETROK_UNDERSCORE, '_' },
{ RETROK_QUOTE, '`' },
{ RETROK_a, 'a' },
{ RETROK_b, 'b' },
{ RETROK_c, 'c' },
......@@ -192,14 +152,7 @@ keymap_t keymap[] =
{ RETROK_w, 'w' },
{ RETROK_x, 'x' },
{ RETROK_y, 'y' },
{ RETROK_z, 'z' },
{ RETROK_LEFTBRACE, '{' },
{ RETROK_BAR, '|' },
{ RETROK_RIGHTBRACE, '}' },
{ RETROK_TILDE, '~' },
/* { RETROK_DELETE, 0x7F }, DEL? */
{ RETROK_KP8, KBD_NUMPAD8 },
{ RETROK_KP9, KBD_NUMPAD9 }
{ RETROK_z, 'z' }
};
int joystate;
......@@ -311,7 +264,7 @@ static void set_input_descriptors(void)
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_B, "Fire B" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_A, "Fire A" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_X, "F3" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_Y, "Spacebar" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_Y, "Space" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_SELECT, "F2" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START, "F1" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L, "F4" },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment