diff options
author | 2018-03-30 02:31:23 +1100 | |
---|---|---|
committer | 2018-03-30 02:31:23 +1100 | |
commit | 811b159b83900b693aea764807a48afd396fb185 (patch) | |
tree | 83c6ab77fd7045ebfd0cf77f2d1b8b51c9dd2376 /src/devices/bus/neogeo_ctrl/joystick.cpp | |
parent | 16125666f732199946c9634b399980f7783fc752 (diff) |
neogeo: Further improvements:
* Removed LEDs/lamps from configurations that lack them.
* Hooked up coin lockouts.
* Improved I/O register mapping.
* Added controller detection connections for AES.
* Hooked up SPI-like outputs on SIT board used by irrmaze.
* Added layout for irrmaze showing most lamps.
* Irrmaze still missing card dispenser, air compressor and colour lamps.
Diffstat (limited to 'src/devices/bus/neogeo_ctrl/joystick.cpp')
-rw-r--r-- | src/devices/bus/neogeo_ctrl/joystick.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/devices/bus/neogeo_ctrl/joystick.cpp b/src/devices/bus/neogeo_ctrl/joystick.cpp index e854330a452..83c0513be95 100644 --- a/src/devices/bus/neogeo_ctrl/joystick.cpp +++ b/src/devices/bus/neogeo_ctrl/joystick.cpp @@ -39,6 +39,7 @@ static INPUT_PORTS_START( neogeo_joy ) PORT_START("START_SELECT") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SELECT ) + PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END @@ -64,7 +65,8 @@ neogeo_joystick_device::neogeo_joystick_device(const machine_config &mconfig, co device_t(mconfig, NEOGEO_JOY, tag, owner, clock), device_neogeo_control_port_interface(mconfig, *this), m_joy(*this, "JOY"), - m_ss(*this, "START_SELECT") + m_ss(*this, "START_SELECT"), + m_ctrl_sel(0x00) { } @@ -75,34 +77,35 @@ neogeo_joystick_device::neogeo_joystick_device(const machine_config &mconfig, co void neogeo_joystick_device::device_start() { + save_item(NAME(m_ctrl_sel)); } //------------------------------------------------- -// device_reset - device-specific reset +// read_ctrl //------------------------------------------------- -void neogeo_joystick_device::device_reset() +uint8_t neogeo_joystick_device::read_ctrl() { + return m_joy->read() & (BIT(m_ctrl_sel, 2) ? 0x7f : 0xff); } - //------------------------------------------------- -// read_ctrl +// read_start_sel //------------------------------------------------- -uint8_t neogeo_joystick_device::read_ctrl() +uint8_t neogeo_joystick_device::read_start_sel() { - return m_joy->read(); + return m_ss->read(); } //------------------------------------------------- -// read_start_sel +// write_ctrlsel //------------------------------------------------- -uint8_t neogeo_joystick_device::read_start_sel() +void neogeo_joystick_device::write_ctrlsel(uint8_t data) { - return m_ss->read(); + m_ctrl_sel = data; } |