blob: 8172cf91b6d1b74b207adcc0349e6e0afe9cf9e9 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
// license:GPL-2.0+
// copyright-holders:Dirk Best
/**********************************************************************
EPSON TF-20
Dual 5.25" floppy drive with HX-20 factory option
**********************************************************************/
#pragma once
#ifndef __TF20_H__
#define __TF20_H__
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/ram.h"
#include "machine/upd765.h"
#include "machine/z80dart.h"
#include "epson_sio.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class epson_tf20_device : public device_t,
public device_epson_sio_interface
{
public:
// construction/destruction
epson_tf20_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual const rom_entry *device_rom_region() const override;
virtual machine_config_constructor device_mconfig_additions() const override;
virtual ioport_constructor device_input_ports() const override;
// not really public
DECLARE_READ8_MEMBER( rom_disable_r );
DECLARE_READ8_MEMBER( upd765_tc_r );
DECLARE_WRITE8_MEMBER( fdc_control_w );
IRQ_CALLBACK_MEMBER( irq_callback );
DECLARE_WRITE_LINE_MEMBER( txda_w );
DECLARE_WRITE_LINE_MEMBER( dtra_w );
// from sio output
DECLARE_WRITE_LINE_MEMBER( rxc_w );
DECLARE_WRITE_LINE_MEMBER( pinc_w );
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_epson_sio_interface overrides
virtual void tx_w(int level) override;
virtual void pout_w(int level) override;
private:
required_device<cpu_device> m_cpu;
required_device<ram_device> m_ram;
required_device<upd765a_device> m_fdc;
required_device<upd7201_device> m_mpsc;
required_device<epson_sio_device> m_sio_output;
floppy_image_device *m_fd0;
floppy_image_device *m_fd1;
emu_timer *m_timer_serial;
emu_timer *m_timer_tc;
int m_rxc;
int m_txda;
int m_dtra;
int m_pinc;
epson_sio_device *m_sio_input;
static const int XTAL_CR1 = XTAL_8MHz;
static const int XTAL_CR2 = XTAL_4_9152MHz;
};
// device type definition
extern const device_type EPSON_TF20;
#endif // __TF20_H__
|