mirror of
https://github.com/holub/mame
synced 2025-05-28 16:43:04 +03:00
- Moved IPT_KEYBOARD -> IPT_KEYPAD for MAME systems not using full keyboard_interrupt (no whatsnew)
- Removed not needed ifdefs from pckeybrd.c and inptport.c
This commit is contained in:
parent
449e97acbc
commit
612dc0bf59
@ -4706,7 +4706,6 @@ static void record_port(const input_port_config *port)
|
||||
int input_machine_has_keyboard(running_machine *machine)
|
||||
{
|
||||
int have_keyboard = FALSE;
|
||||
#ifdef MESS
|
||||
const input_field_config *field;
|
||||
const input_port_config *port;
|
||||
for (port = machine->m_portlist.first(); port != NULL; port = port->next())
|
||||
@ -4720,8 +4719,6 @@ int input_machine_has_keyboard(running_machine *machine)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return have_keyboard;
|
||||
}
|
||||
|
||||
|
@ -47,31 +47,31 @@ static INPUT_PORTS_START(bartop52)
|
||||
PORT_BIT(0x80, 0x80, IPT_UNUSED)
|
||||
|
||||
PORT_START("keypad_0")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(Break)") PORT_CODE(KEYCODE_PAUSE) // is this correct?
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Wind-Up") PORT_CODE(KEYCODE_ENTER_PAD)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("[0]") PORT_CODE(KEYCODE_0_PAD)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("No Wind-Up") PORT_CODE(KEYCODE_PLUS_PAD)
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("(Break)") PORT_CODE(KEYCODE_PAUSE) // is this correct?
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Wind-Up") PORT_CODE(KEYCODE_ENTER_PAD)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("[0]") PORT_CODE(KEYCODE_0_PAD)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("No Wind-Up") PORT_CODE(KEYCODE_PLUS_PAD)
|
||||
PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
|
||||
PORT_START("keypad_1")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_F3)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Fast Ball Low") PORT_CODE(KEYCODE_9_PAD)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Change-Up Low") PORT_CODE(KEYCODE_8_PAD)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Curve Low") PORT_CODE(KEYCODE_7_PAD)
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Reset") PORT_CODE(KEYCODE_F3)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Fast Ball Low") PORT_CODE(KEYCODE_9_PAD)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Change-Up Low") PORT_CODE(KEYCODE_8_PAD)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Curve Low") PORT_CODE(KEYCODE_7_PAD)
|
||||
PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
|
||||
PORT_START("keypad_2")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(DEF_STR(Pause)) PORT_CODE(KEYCODE_F2)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Fast Ball Med.") PORT_CODE(KEYCODE_6_PAD)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Change-Up Med.") PORT_CODE(KEYCODE_5_PAD)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Curve Med") PORT_CODE(KEYCODE_4_PAD)
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(DEF_STR(Pause)) PORT_CODE(KEYCODE_F2)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Fast Ball Med.") PORT_CODE(KEYCODE_6_PAD)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Change-Up Med.") PORT_CODE(KEYCODE_5_PAD)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Curve Med") PORT_CODE(KEYCODE_4_PAD)
|
||||
PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
|
||||
PORT_START("keypad_3")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_START) PORT_NAME("Start")
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Fast Ball High") PORT_CODE(KEYCODE_3_PAD)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Change-Up High") PORT_CODE(KEYCODE_2_PAD)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Curve High") PORT_CODE(KEYCODE_1_PAD)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Fast Ball High") PORT_CODE(KEYCODE_3_PAD)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Change-Up High") PORT_CODE(KEYCODE_2_PAD)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Curve High") PORT_CODE(KEYCODE_1_PAD)
|
||||
PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
|
||||
PORT_START("analog_0")
|
||||
|
@ -512,7 +512,7 @@ static GFXDECODE_START( CGA )
|
||||
GFXDECODE_END
|
||||
|
||||
#define AT_KEYB_HELPER(bit, text, key1) \
|
||||
PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(text) PORT_CODE(key1)
|
||||
PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1)
|
||||
|
||||
static INPUT_PORTS_START( calchase )
|
||||
PORT_START("pc_keyboard_0")
|
||||
|
@ -548,7 +548,7 @@ static GFXDECODE_START( CGA )
|
||||
GFXDECODE_END
|
||||
|
||||
#define AT_KEYB_HELPER(bit, text, key1) \
|
||||
PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(text) PORT_CODE(key1)
|
||||
PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1)
|
||||
|
||||
static INPUT_PORTS_START(gamecstl)
|
||||
PORT_START("pc_keyboard_0")
|
||||
|
@ -266,8 +266,8 @@ ADDRESS_MAP_END
|
||||
static INPUT_PORTS_START( a600xl )
|
||||
|
||||
PORT_START("console") /* IN0 console keys & switch settings */
|
||||
PORT_BIT(0x04, 0x04, IPT_KEYBOARD) PORT_NAME("Option") PORT_CODE(KEYCODE_F2)
|
||||
PORT_BIT(0x02, 0x02, IPT_KEYBOARD) PORT_NAME("Select") PORT_CODE(KEYCODE_F1)
|
||||
PORT_BIT(0x04, 0x04, IPT_KEYPAD) PORT_NAME("Option") PORT_CODE(KEYCODE_F2)
|
||||
PORT_BIT(0x02, 0x02, IPT_KEYPAD) PORT_NAME("Select") PORT_CODE(KEYCODE_F1)
|
||||
PORT_BIT(0x01, 0x01, IPT_START1 )
|
||||
|
||||
PORT_START("djoy_0_1") /* IN1 digital joystick #1 + #2 (PIA port A) */
|
||||
|
@ -393,7 +393,7 @@ static ADDRESS_MAP_START( pcat_io, ADDRESS_SPACE_IO, 32 )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
#define AT_KEYB_HELPER(bit, text, key1) \
|
||||
PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(text) PORT_CODE(key1)
|
||||
PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1)
|
||||
|
||||
static INPUT_PORTS_START( pcat_dyn )
|
||||
PORT_START("pc_keyboard_0")
|
||||
|
@ -377,7 +377,7 @@ static ADDRESS_MAP_START( photoply_io, ADDRESS_SPACE_IO, 32 )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
#define AT_KEYB_HELPER(bit, text, key1) \
|
||||
PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(text) PORT_CODE(key1)
|
||||
PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1)
|
||||
|
||||
static INPUT_PORTS_START( photoply )
|
||||
PORT_START("pc_keyboard_0")
|
||||
|
@ -489,7 +489,7 @@ static GFXDECODE_START( CGA )
|
||||
GFXDECODE_END
|
||||
|
||||
#define AT_KEYB_HELPER(bit, text, key1) \
|
||||
PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(text) PORT_CODE(key1)
|
||||
PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1)
|
||||
|
||||
static INPUT_PORTS_START(taitowlf)
|
||||
PORT_START("pc_keyboard_0")
|
||||
|
@ -304,12 +304,10 @@ static const extended_keyboard_code at_keyboard_extended_codes_set_2_3[]=
|
||||
|
||||
static void at_keyboard_queue_insert(UINT8 data);
|
||||
|
||||
#ifdef MESS
|
||||
static int at_keyboard_queue_size(void);
|
||||
static int at_keyboard_queue_chars(const unicode_char *text, size_t text_len);
|
||||
static int at_keyboard_accept_char(unicode_char ch);
|
||||
static int at_keyboard_charqueue_empty(void);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@ -341,11 +339,9 @@ void at_keyboard_init(running_machine *machine, AT_KEYBOARD_TYPE type)
|
||||
keyboard.ports[i] = machine->port(buf);
|
||||
}
|
||||
|
||||
#ifdef MESS
|
||||
inputx_setup_natural_keyboard(at_keyboard_queue_chars,
|
||||
at_keyboard_accept_char,
|
||||
at_keyboard_charqueue_empty);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -384,7 +380,6 @@ static void at_keyboard_queue_insert(UINT8 data)
|
||||
}
|
||||
|
||||
|
||||
#ifdef MESS
|
||||
static int at_keyboard_queue_size(void)
|
||||
{
|
||||
int queue_size;
|
||||
@ -393,7 +388,6 @@ static int at_keyboard_queue_size(void)
|
||||
queue_size += sizeof(keyboard.queue) / sizeof(keyboard.queue[0]);
|
||||
return queue_size;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* add a list of codes to the keyboard buffer */
|
||||
@ -828,7 +822,6 @@ void at_keyboard_write(running_machine *machine, UINT8 data)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MESS
|
||||
/***************************************************************************
|
||||
unicode_char_to_at_keycode
|
||||
***************************************************************************/
|
||||
@ -1254,7 +1247,6 @@ static int at_keyboard_charqueue_empty(void)
|
||||
{
|
||||
return at_keyboard_queue_size() == 0;
|
||||
}
|
||||
#endif /* MESS */
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user