summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nes_ctrl/pachinko.cpp
diff options
context:
space:
mode:
author 0kmg <9137159+0kmg@users.noreply.github.com>2022-02-07 15:12:42 -0900
committer GitHub <noreply@github.com>2022-02-07 19:12:42 -0500
commite450cc79539942693b9fffcc61cdfc7d0e9cff17 (patch)
treede215af879a995cc11a156788ecbcae8ce8b2474 /src/devices/bus/nes_ctrl/pachinko.cpp
parent9da06744f15162239e6b901cb127d2c4aca66baa (diff)
bus/nes_ctrl: Added NES support for Virtual Boy controllers. (#9124)
- Generalized the read/write pattern for joypads a bit more and placed it in the base NES joypad class. - Using that, added Virtual Boy controller and simplified Pachinko controller some more. New working software list additions (nes.xml) ----------------------------------- Candelabra - Estoscerro [SlyDogStudios]
Diffstat (limited to 'src/devices/bus/nes_ctrl/pachinko.cpp')
-rw-r--r--src/devices/bus/nes_ctrl/pachinko.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/devices/bus/nes_ctrl/pachinko.cpp b/src/devices/bus/nes_ctrl/pachinko.cpp
index e7f1cf0ed8c..f9a28ee8f54 100644
--- a/src/devices/bus/nes_ctrl/pachinko.cpp
+++ b/src/devices/bus/nes_ctrl/pachinko.cpp
@@ -41,40 +41,12 @@ ioport_constructor nes_pachinko_device::device_input_ports() const
//-------------------------------------------------
nes_pachinko_device::nes_pachinko_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : nes_fcpadexp_device(mconfig, NES_PACHINKO, tag, owner, clock)
+ : nes_fcpadexp_device(mconfig, NES_PACHINKO, tag, owner, clock, 0)
, m_trigger(*this, "TRIGGER")
{
}
-//-------------------------------------------------
-// read
-//-------------------------------------------------
-
-u8 nes_pachinko_device::read_exp(offs_t offset)
-{
- u8 ret = 0;
- // this controller behaves like a standard P3 joypad, with longer stream of inputs
- if (offset == 0) //$4016
- {
- if (m_strobe)
- set_latch();
- ret = (m_latch & 1) << 1;
- m_latch >>= 1;
- }
- return ret;
-}
-
-//-------------------------------------------------
-// write
-//-------------------------------------------------
-
-void nes_pachinko_device::write(u8 data)
-{
- if (write_strobe(data))
- set_latch();
-}
-
void nes_pachinko_device::set_latch()
{
m_latch = m_joypad->read();