diff options
Diffstat (limited to 'src/mame/drivers/amstrad.cpp')
-rw-r--r-- | src/mame/drivers/amstrad.cpp | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/src/mame/drivers/amstrad.cpp b/src/mame/drivers/amstrad.cpp index 5d2700c011c..61a305dffb9 100644 --- a/src/mame/drivers/amstrad.cpp +++ b/src/mame/drivers/amstrad.cpp @@ -241,12 +241,12 @@ static INPUT_PORTS_START( amstrad_keyboard ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_START("kbrow.9") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_8WAY - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_8WAY - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_8WAY - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_8WAY - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(1) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("controller_type", 0x01, EQUALS, 0x01) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("controller_type", 0x01, EQUALS, 0x01) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("controller_type", 0x01, EQUALS, 0x01) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("controller_type", 0x01, EQUALS, 0x01) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1) PORT_CONDITION("controller_type", 0x01, EQUALS, 0x01) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(1) PORT_CONDITION("controller_type", 0x01, EQUALS, 0x01) PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) /* The bit for the third button is officially undocumented: Amstrad joysticks actually use only two buttons. The only device that reads this bit is the AMX mouse, which uses @@ -335,28 +335,41 @@ INPUT_PORTS_END static INPUT_PORTS_START( amx_mouse ) PORT_START("mouse_input1") - PORT_BIT(0xff , 0, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) PORT_CONDITION("controller_type", 0x01, EQUALS, 0x01) + PORT_BIT(0xff , 0, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) PORT_CONDITION("controller_type", 0x02, EQUALS, 0x02) PORT_START("mouse_input2") - PORT_BIT(0xff , 0, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) PORT_CONDITION("controller_type", 0x01, EQUALS, 0x01) + PORT_BIT(0xff , 0, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) PORT_CONDITION("controller_type", 0x02, EQUALS, 0x02) PORT_START("mouse_input3") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON4) PORT_NAME("Left mouse button") PORT_CODE(MOUSECODE_BUTTON1) PORT_CONDITION("controller_type", 0x01, EQUALS, 0x01) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON5) PORT_NAME("Right mouse button") PORT_CODE(MOUSECODE_BUTTON2) PORT_CONDITION("controller_type", 0x01, EQUALS, 0x01) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON6) PORT_NAME("Middle mouse button") PORT_CODE(MOUSECODE_BUTTON3) PORT_CONDITION("controller_type", 0x01, EQUALS, 0x01) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON4) PORT_NAME("Left mouse button") PORT_CODE(MOUSECODE_BUTTON1) PORT_CONDITION("controller_type", 0x02, EQUALS, 0x02) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON5) PORT_NAME("Right mouse button") PORT_CODE(MOUSECODE_BUTTON2) PORT_CONDITION("controller_type", 0x02, EQUALS, 0x02) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON6) PORT_NAME("Middle mouse button") PORT_CODE(MOUSECODE_BUTTON3) PORT_CONDITION("controller_type", 0x02, EQUALS, 0x02) PORT_START("controller_type") - PORT_CONFNAME( 0x03, 0x00, "Joystick port device" ) - PORT_CONFSETTING(0x00, "2-button Joystick" ) - PORT_CONFSETTING(0x01, "AMX mouse interface" ) - PORT_CONFSETTING(0x02, "Nothing" ) + PORT_CONFNAME( 0x07, 0x01, "Joystick port device" ) + PORT_CONFSETTING(0x00, "Nothing" ) + PORT_CONFSETTING(0x01, "2-button joystick" ) + PORT_CONFSETTING(0x02, "AMX mouse interface" ) + PORT_CONFSETTING(0x04, "Cheetah 125 Special rotational joystick" ) + +INPUT_PORTS_END +static INPUT_PORTS_START( cheetah_125_special ) + PORT_START("cheetah") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_8WAY PORT_NAME("Cheetah 125 Up") PORT_CONDITION("controller_type", 0x04, EQUALS, 0x04) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_8WAY PORT_NAME("Cheetah 125 Down") PORT_CONDITION("controller_type", 0x04, EQUALS, 0x04) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_8WAY PORT_NAME("Cheetah 125 Left") PORT_CONDITION("controller_type", 0x04, EQUALS, 0x04) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_8WAY PORT_NAME("Cheetah 125 Right") PORT_CONDITION("controller_type", 0x04, EQUALS, 0x04) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1) PORT_NAME("Cheetah 125 Fire") PORT_CONDITION("controller_type", 0x04, EQUALS, 0x04) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(1) PORT_NAME("Cheetah 125 Rotate Left") PORT_CONDITION("controller_type", 0x04, EQUALS, 0x04) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(1) PORT_NAME("Cheetah 125 Rotate Right") PORT_CONDITION("controller_type", 0x04, EQUALS, 0x04) INPUT_PORTS_END static INPUT_PORTS_START( cpc464 ) PORT_INCLUDE(amstrad_keyboard) PORT_INCLUDE(crtc_links) PORT_INCLUDE(amx_mouse) + PORT_INCLUDE(cheetah_125_special) INPUT_PORTS_END @@ -383,6 +396,7 @@ static INPUT_PORTS_START( cpc664 ) PORT_INCLUDE(crtc_links) PORT_INCLUDE(amx_mouse) + PORT_INCLUDE(cheetah_125_special) INPUT_PORTS_END @@ -415,6 +429,7 @@ static INPUT_PORTS_START( cpc6128 ) PORT_INCLUDE(crtc_links) PORT_INCLUDE(amx_mouse) + PORT_INCLUDE(cheetah_125_special) INPUT_PORTS_END @@ -483,6 +498,7 @@ static INPUT_PORTS_START( cpc6128f ) PORT_INCLUDE(crtc_links) PORT_INCLUDE(amx_mouse) + PORT_INCLUDE(cheetah_125_special) INPUT_PORTS_END static INPUT_PORTS_START( cpc6128s ) @@ -554,6 +570,7 @@ static INPUT_PORTS_START( kccomp ) PORT_INCLUDE(crtc_links) PORT_INCLUDE(amx_mouse) + PORT_INCLUDE(cheetah_125_special) INPUT_PORTS_END @@ -743,6 +760,7 @@ static INPUT_PORTS_START( aleste ) PORT_INCLUDE(crtc_links) PORT_INCLUDE(amx_mouse) + PORT_INCLUDE(cheetah_125_special) INPUT_PORTS_END |