mirror of
https://github.com/holub/mame
synced 2025-07-06 10:29:38 +03:00
ksys573.cpp: Guitar Freaks knob and wail input fixes. (#9111)
* machine/k573mcr.cpp: Don't write data from controllers if a controller isn't connected to the port. * ksys573.cpp: Remapped guitar knobs for Guitar Freaks.
This commit is contained in:
parent
d103c67aba
commit
aeb7f95099
@ -3160,16 +3160,14 @@ static INPUT_PORTS_START( gtrfrks )
|
||||
PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_UNUSED ) /* SERVICE1 */
|
||||
|
||||
PORT_MODIFY( "IN2" )
|
||||
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER( 1 ) PORT_NAME( "P1 Effect 1" )
|
||||
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER( 1 ) PORT_NAME( "P1 Effect 2" )
|
||||
PORT_BIT( 0x00000300, 0x0000, IPT_DIAL ) PORT_PLAYER( 1 ) PORT_NAME( "P1 Effect Knob" ) PORT_MINMAX( 0x0000, 0x0300 ) PORT_SENSITIVITY( 1 ) PORT_KEYDELTA( 8 ) PORT_REVERSE
|
||||
PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER( 1 ) PORT_NAME( "P1 Pick" )
|
||||
PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER( 1 ) PORT_NAME( "P1 Wailing" )
|
||||
PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER( 1 ) PORT_NAME( "P1 Button R" )
|
||||
PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER( 1 ) PORT_NAME( "P1 Button G" )
|
||||
PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER( 1 ) PORT_NAME( "P1 Button B" )
|
||||
PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER( 2 ) PORT_NAME( "P2 Effect 1" )
|
||||
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER( 2 ) PORT_NAME( "P2 Effect 2" )
|
||||
PORT_BIT( 0x00000003, 0x0000, IPT_DIAL ) PORT_PLAYER( 2 ) PORT_NAME( "P2 Effect Knob" ) PORT_MINMAX( 0x00, 0x03 ) PORT_SENSITIVITY( 1 ) PORT_KEYDELTA( 8 ) PORT_REVERSE
|
||||
PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER( 2 ) PORT_NAME( "P2 Pick" )
|
||||
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER( 2 ) PORT_NAME( "P2 Wailing" )
|
||||
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER( 2 ) PORT_NAME( "P2 Button R" )
|
||||
|
@ -150,10 +150,17 @@ bool k573mcr_device::pad_read(uint32_t port_no, uint8_t *output)
|
||||
controller_port_send_byte(0x01);
|
||||
uint8_t a = controller_port_send_byte('B');
|
||||
uint8_t b = controller_port_send_byte(0);
|
||||
*output++ = controller_port_send_byte(0);
|
||||
*output++ = controller_port_send_byte(0);
|
||||
auto connected = a == 0x41 && b == 0x5a;
|
||||
if (connected) {
|
||||
*output++ = controller_port_send_byte(0);
|
||||
*output++ = controller_port_send_byte(0);
|
||||
}
|
||||
else {
|
||||
*output++ = 0;
|
||||
*output++ = 0;
|
||||
}
|
||||
|
||||
return a == 0x41 && b == 0x5a;
|
||||
return connected;
|
||||
}
|
||||
|
||||
bool k573mcr_device::memcard_read(uint32_t port_no, uint16_t block_addr, uint8_t *output)
|
||||
|
Loading…
Reference in New Issue
Block a user