summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/vtech/ioexp/joystick.h
blob: 30d1fdb423912015e49d2373a7f1870fb1925033 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// license:GPL-2.0+
// copyright-holders:Dirk Best
/***************************************************************************

    VTech Laser Joystick Interface

    VTech Laser JS 20
    Dick Smith Electronics X-7315

***************************************************************************/

#pragma once

#ifndef __VTECH_IOEXP_JOYSTICK_H__
#define __VTECH_IOEXP_JOYSTICK_H__

#include "emu.h"
#include "ioexp.h"


//**************************************************************************
//  TYPE DEFINITIONS
//**************************************************************************

// ======================> joystick_interface_device

class joystick_interface_device : public device_t, public device_ioexp_interface
{
public:
	// construction/destruction
	joystick_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

	DECLARE_READ8_MEMBER( joystick_r );

protected:
	virtual ioport_constructor device_input_ports() const override;
	virtual void device_start() override;
	virtual void device_reset() override;

private:
	required_ioport m_joy0;
	required_ioport m_joy0_arm;
	required_ioport m_joy1;
	required_ioport m_joy1_arm;
};

// device type definition
extern const device_type JOYSTICK_INTERFACE;

#endif // __VTECH_IOEXP_JOYSTICK_H__