summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/mb14241.h
blob: 378c3c75b7d5dff5d10d8e4402f3968b0f5a88d0 (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
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli
/*****************************************************************************

    MB14241 shifter IC emulation

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

#ifndef MAME_MACHINE_MB14241_H
#define MAME_MACHINE_MB14241_H

#pragma once

class mb14241_device : public device_t
{
public:
	mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);

	DECLARE_WRITE8_MEMBER( shift_count_w );
	DECLARE_WRITE8_MEMBER( shift_data_w );
	DECLARE_READ8_MEMBER( shift_result_r );

protected:
	// device-level overrides
	virtual void device_start() override;
	virtual void device_reset() override;

private:
	// internal state

	uint16_t m_shift_data;  /* 15 bits only */
	uint8_t m_shift_count;  /* 3 bits */
};

DECLARE_DEVICE_TYPE(MB14241, mb14241_device)

#endif // MAME_MACHINE_MB14241_H