summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/vcs_paddles.h
diff options
context:
space:
mode:
author Curt Coder <curtcoder@mail.com>2012-09-06 15:16:03 +0000
committer Curt Coder <curtcoder@mail.com>2012-09-06 15:16:03 +0000
commit3722e8ff143bdb1125e3186b0a2eac4f63f34a1f (patch)
tree38d3ed35c38b1ae22b6078c419ee54b6459f99b7 /src/mess/machine/vcs_paddles.h
parenta5f74861d4d36d77353c949239903887a914e167 (diff)
(MESS) vic20: Refactored VIC to a modern device. (nw)
(MESS) c64: Fixed IDE64 cartridge video corruption. (nw) (MESS) Added paddles and light pen VCS control devices. [Curt Coder]
Diffstat (limited to 'src/mess/machine/vcs_paddles.h')
-rw-r--r--src/mess/machine/vcs_paddles.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/mess/machine/vcs_paddles.h b/src/mess/machine/vcs_paddles.h
new file mode 100644
index 00000000000..c2056dc7884
--- /dev/null
+++ b/src/mess/machine/vcs_paddles.h
@@ -0,0 +1,53 @@
+/**********************************************************************
+
+ Atari Video Computer System analog paddles emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef __VCS_PADDLES__
+#define __VCS_PADDLES__
+
+
+#include "emu.h"
+#include "machine/vcsctrl.h"
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> vcs_paddles_device
+
+class vcs_paddles_device : public device_t,
+ public device_vcs_control_port_interface
+{
+public:
+ // construction/destruction
+ vcs_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // optional information overrides
+ virtual ioport_constructor device_input_ports() const;
+
+protected:
+ // device-level overrides
+ virtual void device_config_complete() { m_shortname = "vcs_paddles"; }
+ virtual void device_start();
+
+ // device_vcs_control_port_interface overrides
+ virtual UINT8 vcs_joy_r();
+ virtual UINT8 vcs_pot_x_r();
+ virtual UINT8 vcs_pot_y_r();
+};
+
+
+// device type definition
+extern const device_type VCS_PADDLES;
+
+
+#endif