blob: 5eb21e9d2c03423d0ad3170162e5d78a70797799 (
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
|
/*************************************************************************
Memotech MTX 500, MTX 512 and RS 128
*************************************************************************/
#ifndef __MTX__
#define __MTX__
#include "imagedev/snapquik.h"
#include "imagedev/cassette.h"
#include "machine/ctronics.h"
#include "machine/z80ctc.h"
#include "sound/sn76496.h"
#define Z80_TAG "z80"
#define Z80CTC_TAG "z80ctc"
#define Z80DART_TAG "z80dart"
#define FD1793_TAG "fd1793" // SDX
#define FD1791_TAG "fd1791" // FDX
#define SN76489A_TAG "sn76489a"
#define MC6845_TAG "mc6845"
#define SCREEN_TAG "screen"
#define CENTRONICS_TAG "centronics"
class mtx_state : public driver_device
{
public:
mtx_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_sn(*this, SN76489A_TAG)
{ }
required_device<sn76489a_device> m_sn;
/* keyboard state */
UINT8 m_key_sense;
/* video state */
UINT8 *m_video_ram;
UINT8 *m_attr_ram;
/* sound state */
UINT8 m_sound_latch;
/* devices */
z80ctc_device *m_z80ctc;
device_t *m_z80dart;
cassette_image_device *m_cassette;
centronics_device *m_centronics;
/* timers */
device_t *m_cassette_timer;
DECLARE_WRITE8_MEMBER(mtx_bankswitch_w);
DECLARE_WRITE8_MEMBER(mtx_sound_latch_w);
DECLARE_WRITE8_MEMBER(mtx_sense_w);
DECLARE_READ8_MEMBER(mtx_key_lo_r);
DECLARE_READ8_MEMBER(mtx_key_hi_r);
DECLARE_WRITE8_MEMBER(hrx_address_w);
DECLARE_READ8_MEMBER(hrx_data_r);
DECLARE_WRITE8_MEMBER(hrx_data_w);
DECLARE_READ8_MEMBER(hrx_attr_r);
DECLARE_WRITE8_MEMBER(hrx_attr_w);
DECLARE_MACHINE_START(mtx512);
DECLARE_MACHINE_RESET(mtx512);
TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick);
TIMER_DEVICE_CALLBACK_MEMBER(cassette_tick);
DECLARE_WRITE_LINE_MEMBER(ctc_trg1_w);
DECLARE_WRITE_LINE_MEMBER(ctc_trg2_w);
DECLARE_WRITE_LINE_MEMBER(mtx_tms9929a_interrupt);
DECLARE_READ8_MEMBER(mtx_strobe_r);
DECLARE_READ8_MEMBER(mtx_sound_strobe_r);
DECLARE_WRITE8_MEMBER(mtx_cst_w);
DECLARE_READ8_MEMBER(mtx_prt_r);
};
/*----------- defined in machine/mtx.c -----------*/
SNAPSHOT_LOAD( mtx );
#endif /* __MTX_H__ */
|