summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nes_ctrl/ctrl.cpp
diff options
context:
space:
mode:
author 0kmg <9137159+0kmg@users.noreply.github.com>2021-12-11 12:42:32 -0900
committer GitHub <noreply@github.com>2021-12-11 16:42:32 -0500
commit03ac15805ef89e8ad2163a914985e2312fc7d6da (patch)
tree195330bf192317fbd6548811e31eba09e207880d /src/devices/bus/nes_ctrl/ctrl.cpp
parent3c6f27277d045fc58a38d7a6fadcf92fcb68ec10 (diff)
bus/nes_ctrl: Work on Famicom joypads + more separation of EXP port. (#8956)
* bus/nes_ctrl: Work on Famicom joypads + more separation of EXP port. - Enforced proper strobe behavior on joypads. Added helper function to controller interface for common pattern. - Added proper expansion port version of joypad. - Streamlined pachinko controller by making it an expansion joypad subclass. Moreover, ball launch lever now works correctly! - Added missing battery-backed WRAM to Pachio-kun 5, game runs now. - Simplified arcade stick a bit, now also a subclass of the expansion joypad. - Rewrote Hori Twin and 4 Players adapters. The latter's 4P mode protocol now works. In theory this supports six players simultaneously, though all known games using it have duplicate controls for P1 and P2. machine/nes.cpp: Removed hack that shifted bit 0 reads to support controller port joypads on expansion port. There shouldn't be any expansion port devices left that write to bit 0. * Fix missing battery-backed WRAM for Royal Blood and Vegas Connection, while we're at it.
Diffstat (limited to 'src/devices/bus/nes_ctrl/ctrl.cpp')
-rw-r--r--src/devices/bus/nes_ctrl/ctrl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/devices/bus/nes_ctrl/ctrl.cpp b/src/devices/bus/nes_ctrl/ctrl.cpp
index 33bd74e77cf..8ce51061ce2 100644
--- a/src/devices/bus/nes_ctrl/ctrl.cpp
+++ b/src/devices/bus/nes_ctrl/ctrl.cpp
@@ -78,8 +78,9 @@ DEFINE_DEVICE_TYPE(NES_CONTROL_PORT, nes_control_port_device, "nes_control_port"
// device_nes_control_port_interface - constructor
//-------------------------------------------------
-device_nes_control_port_interface::device_nes_control_port_interface(const machine_config &mconfig, device_t &device) :
- device_interface(device, "nesctrl")
+device_nes_control_port_interface::device_nes_control_port_interface(const machine_config &mconfig, device_t &device)
+ : device_interface(device, "nesctrl")
+ , m_strobe(0)
{
m_port = dynamic_cast<nes_control_port_device *>(device.owner());
}
@@ -207,7 +208,7 @@ void fc_control_port2_devices(device_slot_interface &device)
void fc_expansion_devices(device_slot_interface &device)
{
- device.option_add("joypad", NES_JOYPAD);
+ device.option_add("joypad", NES_FCPAD_EXP);
device.option_add("arcstick", NES_ARCSTICK);
device.option_add("fc_keyboard", NES_FCKEYBOARD);
device.option_add("zapper", NES_ZAPPER);