blob: dc33c4519f3704d77e3a5d332eed004c10fe297a (
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
|
// license:BSD-3-Clause
// copyright-holders:Juergen Buchmueller
/**********************************************************************
Rockwell 10696 General Purpose Input/Output (I/O)
Juergen Buchmueller <pullmoll@t-online.de>
The device decodes reads/write to a 16 byte I/O range defined
by four wired inputs SC1, SC2, SC3 and SC4.
It provides 12 inputs and 12 outputs in groups of three
time 4 bits each.
**********************************************************************/
#ifndef MAME_MACHINE_R10696_H
#define MAME_MACHINE_R10696_H
#pragma once
class r10696_device : public device_t
{
public:
r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
uint8_t io_r(offs_t offset);
void io_w(offs_t offset, uint8_t data);
/* Set the read and write group (4-bit; nibble) delegates */
auto iord_cb() { return m_iord.bind(); }
auto iowr_cb() { return m_iowr.bind(); }
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
private:
uint8_t m_io_a; //!< input/output flip-flops group A
uint8_t m_io_b; //!< input/output flip-flops group B
uint8_t m_io_c; //!< input/output flip-flops group C
devcb_read8 m_iord; //!< input line (read, offset = group, data = 4 bits)
devcb_write8 m_iowr; //!< output line (write, offset = group, data = 4 bits)
};
DECLARE_DEVICE_TYPE(R10696, r10696_device)
#endif // MAME_MACHINE_R10696_H
|