summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/snes_ctrl/sscope.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/snes_ctrl/sscope.cpp')
-rw-r--r--src/devices/bus/snes_ctrl/sscope.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/devices/bus/snes_ctrl/sscope.cpp b/src/devices/bus/snes_ctrl/sscope.cpp
index 9b7ee0c053f..71a049adb82 100644
--- a/src/devices/bus/snes_ctrl/sscope.cpp
+++ b/src/devices/bus/snes_ctrl/sscope.cpp
@@ -15,7 +15,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type SNES_SUPERSCOPE = device_creator<snes_sscope_device>;
+DEFINE_DEVICE_TYPE(SNES_SUPERSCOPE, snes_sscope_device, "snes_sscope", "Nintendo SNES / SFC SuperScope")
static INPUT_PORTS_START( snes_sscope )
@@ -55,11 +55,12 @@ ioport_constructor snes_sscope_device::device_input_ports() const
//-------------------------------------------------
snes_sscope_device::snes_sscope_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, SNES_SUPERSCOPE, "Nintendo SNES / SFC SuperScope", tag, owner, clock, "snes_sscope", __FILE__),
- device_snes_control_port_interface(mconfig, *this),
- m_buttons(*this, "BUTTONS"),
- m_xaxis(*this, "SSX"),
- m_yaxis(*this, "SSY"), m_strobe(0), m_idx(0), m_latch(0), m_x(0), m_y(0), m_turbo_lock(0), m_pause_lock(0), m_fire_lock(0)
+ device_t(mconfig, SNES_SUPERSCOPE, tag, owner, clock),
+ device_snes_control_port_interface(mconfig, *this),
+ m_buttons(*this, "BUTTONS"),
+ m_xaxis(*this, "SSX"),
+ m_yaxis(*this, "SSY"),
+ m_strobe(0), m_idx(0), m_latch(0), m_x(0), m_y(0), m_turbo_lock(0), m_pause_lock(0), m_fire_lock(0)
{
}
@@ -114,8 +115,7 @@ void snes_sscope_device::port_poll()
m_latch &= 0x04;
// 2. set onscreen/offscreen
- if (!m_port->m_onscreen_cb.isnull())
- m_latch |= (m_port->m_onscreen_cb(m_x, m_y) ? 0x00 : 0x40);
+ m_latch |= m_port->onscreen_cb(m_x, m_y) ? 0x00 : 0x40;
// 3. pause is a button that is always edge sensitive
if (BIT(input, 3) && !m_pause_lock)
@@ -152,8 +152,8 @@ void snes_sscope_device::port_poll()
// Notice that this only works in Port2 because its IOBit pin is connected to bit7 of the IO Port, while Port1
// has IOBit pin connected to bit6 of the IO Port, and the latter is not detected by the H/V Counters. In other
// words, you can connect SuperScope to Port1, but there is no way SNES could detect its on-screen position
- if ((m_latch & 0x03) && !(m_latch & 0x40) && !m_port->m_gunlatch_cb.isnull())
- m_port->m_gunlatch_cb(m_x, m_y);
+ if ((m_latch & 0x03) && !(m_latch & 0x40))
+ m_port->gunlatch_cb(m_x, m_y);
}
//-------------------------------------------------