summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/taitoio_yoke.h
blob: d531ade856a084f3cb650438d47c6f97e20c720c (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
51
52
53
54
// license:BSD-3-Clause
// copyright-holders:Angelo Salese
/***************************************************************************

    Taito Yoke + Throttle Flight device

***************************************************************************/
#ifndef MAME_MACHINE_TAITO_YOKE_H
#define MAME_MACHINE_TAITO_YOKE_H

#pragma once


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

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

	// I/O operations
	u16 throttle_r();
	u16 stickx_r();
	u16 sticky_r();

	DECLARE_READ_LINE_MEMBER( slot_up_r );
	DECLARE_READ_LINE_MEMBER( slot_down_r );
	DECLARE_READ_LINE_MEMBER( handle_left_r );
	DECLARE_READ_LINE_MEMBER( handle_right_r );
	DECLARE_READ_LINE_MEMBER( handle_up_r );
	DECLARE_READ_LINE_MEMBER( handle_down_r );

protected:
	virtual ioport_constructor device_input_ports() const override;

	// device-level overrides
//  virtual void device_validity_check(validity_checker &valid) const;
	virtual void device_start() override;
	virtual void device_reset() override;

private:
	required_ioport m_stick_x;
	required_ioport m_stick_y;
	required_ioport m_throttle;
};


// device type definition
DECLARE_DEVICE_TYPE(TAITOIO_YOKE, taitoio_yoke_device)

#endif // MAME_MACHINE_TAITO_YOKE_H