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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
#pragma once
#ifndef VERIFONE_TRANZ330_H
#define VERIFONE_TRANZ330_H
// single-driver build must have emu.h here
#include "cpu/z80/z80.h"
#include "cpu/z80/z80daisy.h"
#include "machine/z80ctc.h"
#include "machine/z80dart.h"
#include "machine/z80pio.h"
#include "machine/msm6242.h"
#include "machine/roc10937.h"
#include "bus/rs232/rs232.h"
#include "sound/speaker.h"
#include "machine/clock.h"
#define CPU_TAG "cpu"
#define DART_TAG "dart"
#define CTC_TAG "ctc"
#define PIO_TAG "pio"
#define RTC_TAG "rtc"
#define VFD_TAG "vfd"
#define RS232_TAG "rs232"
#define SPEAKER_TAG "speaker"
class tranz330_state : public driver_device
{
public:
tranz330_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_cpu(*this, CPU_TAG)
, m_ctc(*this, CTC_TAG)
, m_dart(*this, DART_TAG)
, m_pio(*this, PIO_TAG)
, m_rtc(*this, RTC_TAG)
, m_vfd(*this, VFD_TAG)
, m_rs232(*this, RS232_TAG)
, m_speaker(*this, SPEAKER_TAG)
, m_keypad(*this, "COL.%u", 0)
{ }
virtual void machine_start() override;
virtual void machine_reset() override;
DECLARE_WRITE_LINE_MEMBER( syncb_w );
DECLARE_WRITE_LINE_MEMBER(clock_w);
DECLARE_WRITE_LINE_MEMBER( sound_w );
DECLARE_WRITE8_MEMBER( pio_a_w );
DECLARE_READ8_MEMBER( pio_b_r );
DECLARE_READ8_MEMBER( card_r );
private:
required_device<cpu_device> m_cpu;
required_device<z80ctc_device> m_ctc;
required_device<z80dart_device> m_dart;
required_device<z80pio_device> m_pio;
required_device<msm6242_device> m_rtc;
required_device<mic10937_t> m_vfd;
required_device<rs232_port_device> m_rs232;
required_device<speaker_sound_device> m_speaker;
required_ioport_array<4> m_keypad;
uint8_t m_keypad_col_mask;
};
#endif // VERIFONE_TRANZ330_H
|