summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/bus/nes_ctrl/zapper.h
diff options
context:
space:
mode:
author etabeta78 <etabeta78@users.noreply.github.com>2015-01-26 22:46:33 +0100
committer etabeta78 <etabeta78@users.noreply.github.com>2015-01-26 22:46:33 +0100
commit65523cb53fba90208cf81992c81e466b6145bcb7 (patch)
treea8cdd8f47cad3755cf2b221fd320204c10baa73e /src/emu/bus/nes_ctrl/zapper.h
parent79732c9bc4a6b3b5eba9b0245c2a4560c53e3c8d (diff)
(MESS) nes: converted input code to use slot devices. this means that now you
change the emulated controllers (Zapper, NES Four Score Adapter, Bandai Power Pad and Family Trainer, Famicom Keyboard Component, Arkanoid Vaus Paddle and Mahjong Controller) via the Slot Device menu of the UI interface and not anymore from the System Configurations menu. Also, changing controller now requires to reset the system, so please take some time *before* starting the game if you want to play a game that uses particular controllers. [Fabio Priuli] (MESS) nes: added emulation of the Konami Hyper Shot controllers, which are necessary to play Hyper Olympics and Hyper Sports for Famicom. [Fabio Priuli] (MESS) nes: added emulation of the Yonezawa Party Tap controllers, which are necessary to play in more than two players some quiz games for Famicom. [Fabio Priuli] (MESS) nes: added emulation of the Pachinko controller used by a few pachinko games for Famicom. [Fabio Priuli] (MESS) nes: added emulation of the Epoch Barcode Battler unit (even if only as Famicom controller, and not as a standalone unit) which is necessary to play Barcode World for Famicom. [Fabio Priuli]
Diffstat (limited to 'src/emu/bus/nes_ctrl/zapper.h')
-rw-r--r--src/emu/bus/nes_ctrl/zapper.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/emu/bus/nes_ctrl/zapper.h b/src/emu/bus/nes_ctrl/zapper.h
new file mode 100644
index 00000000000..ed19fdfc265
--- /dev/null
+++ b/src/emu/bus/nes_ctrl/zapper.h
@@ -0,0 +1,53 @@
+/**********************************************************************
+
+ Nintendo Family Computer & Entertainment System Zapper Lightgun
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef __NES_ZAPPER__
+#define __NES_ZAPPER__
+
+
+#include "emu.h"
+#include "ctrl.h"
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> nes_zapper_device
+
+class nes_zapper_device : public device_t,
+ public device_nes_control_port_interface
+{
+public:
+ // construction/destruction
+ nes_zapper_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ virtual ioport_constructor device_input_ports() const;
+
+protected:
+ // device-level overrides
+ virtual void device_start();
+ virtual void device_reset();
+
+ virtual UINT8 read_bit34();
+ virtual UINT8 read_exp(offs_t offset);
+
+private:
+ required_ioport m_lightx;
+ required_ioport m_lighty;
+ required_ioport m_trigger;
+};
+
+
+// device type definition
+extern const device_type NES_ZAPPER;
+
+
+#endif