1 // license:BSD-3-Clause 2 // copyright-holders:Ryan Holtz 3 4 #ifndef MAME_INCLUDES_TRANZ330_H 5 #define MAME_INCLUDES_TRANZ330_H 6 7 #pragma once 8 9 #include "cpu/z80/z80.h" 10 #include "machine/z80daisy.h" 11 #include "machine/z80ctc.h" 12 #include "machine/z80pio.h" 13 #include "machine/z80sio.h" 14 #include "machine/msm6242.h" 15 #include "machine/roc10937.h" 16 #include "bus/rs232/rs232.h" 17 #include "sound/spkrdev.h" 18 #include "machine/clock.h" 19 20 #define CPU_TAG "cpu" 21 #define DART_TAG "dart" 22 #define CTC_TAG "ctc" 23 #define PIO_TAG "pio" 24 #define RTC_TAG "rtc" 25 #define VFD_TAG "vfd" 26 #define RS232_TAG "rs232" 27 #define SPEAKER_TAG "speaker" 28 29 class tranz330_state : public driver_device 30 { 31 public: tranz330_state(const machine_config & mconfig,device_type type,const char * tag)32 tranz330_state(const machine_config &mconfig, device_type type, const char *tag) 33 : driver_device(mconfig, type, tag) 34 , m_cpu(*this, CPU_TAG) 35 , m_ctc(*this, CTC_TAG) 36 , m_dart(*this, DART_TAG) 37 , m_pio(*this, PIO_TAG) 38 , m_rtc(*this, RTC_TAG) 39 , m_vfd(*this, VFD_TAG) 40 , m_rs232(*this, RS232_TAG) 41 , m_speaker(*this, SPEAKER_TAG) 42 , m_keypad(*this, "COL.%u", 0) 43 { } 44 45 void tranz330(machine_config &config); 46 47 private: 48 virtual void machine_start() override; 49 virtual void machine_reset() override; 50 51 DECLARE_WRITE_LINE_MEMBER(syncb_w); 52 DECLARE_WRITE_LINE_MEMBER(clock_w); 53 54 DECLARE_WRITE_LINE_MEMBER(sound_w); 55 56 void pio_a_w(uint8_t data); 57 uint8_t pio_b_r(); 58 uint8_t card_r(); 59 60 void tranz330_mem(address_map &map); 61 void tranz330_io(address_map &map); 62 63 required_device<z80_device> m_cpu; 64 required_device<z80ctc_device> m_ctc; 65 required_device<z80dart_device> m_dart; 66 required_device<z80pio_device> m_pio; 67 required_device<msm6242_device> m_rtc; 68 required_device<mic10937_device> m_vfd; 69 required_device<rs232_port_device> m_rs232; 70 required_device<speaker_sound_device> m_speaker; 71 required_ioport_array<4> m_keypad; 72 73 uint8_t m_keypad_col_mask; 74 }; 75 76 #endif // VERIFONE_TRANZ330_H 77