diff options
Diffstat (limited to 'src/devices/bus/nes_ctrl/ctrl.h')
-rw-r--r-- | src/devices/bus/nes_ctrl/ctrl.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/devices/bus/nes_ctrl/ctrl.h b/src/devices/bus/nes_ctrl/ctrl.h index 6e9e05aac17..560f546db89 100644 --- a/src/devices/bus/nes_ctrl/ctrl.h +++ b/src/devices/bus/nes_ctrl/ctrl.h @@ -34,10 +34,11 @@ public: // construction/destruction virtual ~device_nes_control_port_interface(); - virtual uint8_t read_bit0() { return 0; } - virtual uint8_t read_bit34() { return 0; } - virtual uint8_t read_exp(offs_t offset) { return 0; } - virtual void write(uint8_t data) { } + virtual u8 read_bit0() { return 0; } + virtual u8 read_bit2() { return 0; } // intended only for P2 microphone + virtual u8 read_bit34() { return 0; } + virtual u8 read_exp(offs_t offset) { return 0; } + virtual void write(u8 data) { } protected: device_nes_control_port_interface(const machine_config &mconfig, device_t &device); @@ -55,20 +56,21 @@ public: // construction/destruction template <typename T> nes_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : nes_control_port_device(mconfig, tag, owner, (uint32_t)0) + : nes_control_port_device(mconfig, tag, owner, (u32)0) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - nes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual ~nes_control_port_device(); - uint8_t read_bit0(); - uint8_t read_bit34(); - uint8_t read_exp(offs_t offset); - void write(uint8_t data); + u8 read_bit0(); + u8 read_bit2(); + u8 read_bit34(); + u8 read_exp(offs_t offset); + void write(u8 data); template <typename T> void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward<T>(tag)); } // for peripherals that interact with the machine's screen |