diff options
author | 2016-10-23 16:31:33 +1100 | |
---|---|---|
committer | 2016-10-23 16:31:33 +1100 | |
commit | 30e830da6187e429c154e4291f210fdb40f717dd (patch) | |
tree | f412bfce0911e24fc20ffdff416fee718a94276e | |
parent | 22db65ea41b58b7e1e5dae206ffef586bca63a10 (diff) | |
parent | 124f9ae63e250ba52fd0494e6f90a668e0e26279 (diff) |
Merge pull request #1548 from ajrhacker/mz80b_more_keys
Keyboard fixes for MZ-80B/MZ-2000/MZ-2200 (nw)
-rw-r--r-- | src/mame/drivers/mz2000.cpp | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/mame/drivers/mz2000.cpp b/src/mame/drivers/mz2000.cpp index e81558922da..93540e603e0 100644 --- a/src/mame/drivers/mz2000.cpp +++ b/src/mame/drivers/mz2000.cpp @@ -34,7 +34,6 @@ #define MASTER_CLOCK XTAL_17_73447MHz/5 /* TODO: was 4 MHz, but otherwise cassette won't work due of a bug with MZF support ... */ -#define UTF8_PI "\xcf\x80" #define UTF8_POUND "\xc2\xa3" #define UTF8_YEN "\xc2\xa5" #define UTF8_SPADES "\xe2\x99\xa0" @@ -420,10 +419,16 @@ static ADDRESS_MAP_START(mz2000_io, AS_IO, 8, mz2000_state ) ADDRESS_MAP_END -// The \ key is actually directly to the left of the BREAK key; the CLR/HOME and INST/DEL keys sit -// between the BREAK key and the CR key, and the ] key lies directly to the left of CR. The somewhat -// fudged key bindings for this corner of the keyboard approximate those used for other JIS keyboards. -// (The Japanese MZ-80B/MZ-2000 keyboard layout is almost but not quite JIS.) +/* + The \ key is actually directly to the left of the BREAK key; the CLR/HOME and INST/DEL keys sit + between the BREAK key and the CR key, and the ] key lies directly to the left of CR. The somewhat + fudged key bindings for this corner of the keyboard approximate those used for other JIS keyboards. + (The Japanese MZ-80B/MZ-2000 keyboard layout is almost but not quite JIS.) + + For the natural keyboard, GRPH and RVS/KANA are mapped to the left and right ALT keys; this follows + their positions on the MZ-2500 keyboard. The unshifted INST/DEL functions as a backspace key and + has been mapped accordingly. +*/ /* Input ports */ static INPUT_PORTS_START( mz80be ) // European keyboard @@ -465,7 +470,7 @@ static INPUT_PORTS_START( mz80be ) // European keyboard PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BREAK") PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BREAK") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(UCHAR_MAMEKEY(PAUSE)) PORT_START("KEY4") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ \xe2\x86\x90 \xe2\x86\x92") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') @@ -504,7 +509,7 @@ static INPUT_PORTS_START( mz80be ) // European keyboard PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CHAR('~') PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\\') PORT_CHAR('|') PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("? \xe2\x86\x91 \xe2\x86\x93") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR('?') - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". > " UTF8_PI) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". > " UTF8_SMALL_PI) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", < " UTF8_YEN) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') PORT_START("KEY8") @@ -530,18 +535,18 @@ static INPUT_PORTS_START( mz80be ) // European keyboard PORT_START("KEYA") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}') PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLR HOME") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INST DEL") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(DEL)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLR HOME") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_CHAR(UCHAR_MAMEKEY(END)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INST DEL") PORT_CODE(KEYCODE_DEL) PORT_CHAR('\b') PORT_CHAR(UCHAR_MAMEKEY(INSERT)) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("KEYB") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRPH") PORT_CODE(KEYCODE_TAB) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRPH") PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(LALT)) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SFT LOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RVS") PORT_CODE(KEYCODE_TILDE) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RVS") PORT_CODE(KEYCODE_TILDE) PORT_CHAR(UCHAR_MAMEKEY(RALT)) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) @@ -607,7 +612,7 @@ static INPUT_PORTS_START( mz80bj ) // Japanese keyboard (kana, no RVS) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\ | \xe3\x83\xb2") PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('|') // wo PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("? \xe2\x86\x91 \xe3\x83\xad \xe2\x86\x93") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR('?') // ro PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". > \xe3\x83\xab \xe3\x80\x82") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') // ru - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", < \xe3\x83\x8d " UTF8_PI) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') // ne + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", < \xe3\x83\x8d " UTF8_SMALL_PI) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') // ne PORT_MODIFY("KEY8") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 _ \xe3\x83\xaf") PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('_') // wa @@ -632,7 +637,7 @@ static INPUT_PORTS_START( mz80bj ) // Japanese keyboard (kana, no RVS) PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("] } \xe3\x83\xa0 \xe3\x80\x8d") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}') // mu PORT_MODIFY("KEYB") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(UTF8_KANA_KATAKANA) PORT_CODE(KEYCODE_TILDE) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(UTF8_KANA_KATAKANA) PORT_CODE(KEYCODE_TILDE) PORT_CHAR(UCHAR_MAMEKEY(RALT)) INPUT_PORTS_END @@ -985,5 +990,5 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ COMP( 1981, mz80b, 0, 0, mz80b, mz80be, driver_device, 0, "Sharp", "MZ-80B", MACHINE_NOT_WORKING ) -COMP( 1982, mz2000, mz80b, 0, mz2000, mz80bj, driver_device, 0, "Sharp", "MZ-2000", MACHINE_NOT_WORKING ) -COMP( 1982, mz2200, mz80b, 0, mz2000, mz80bj, driver_device, 0, "Sharp", "MZ-2200", MACHINE_NOT_WORKING ) +COMP( 1982, mz2000, 0, 0, mz2000, mz80bj, driver_device, 0, "Sharp", "MZ-2000", MACHINE_NOT_WORKING ) +COMP( 1982, mz2200, mz2000, 0, mz2000, mz80bj, driver_device, 0, "Sharp", "MZ-2200", MACHINE_NOT_WORKING ) |