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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
/**********************************************************************
Scandia Metric FD2 floppy controller emulation
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.
*********************************************************************/
/*
PCB Layout
----------
|-------------------------------------------|
|-| |
|-| ROM0 4MHz |
|-| |
|-| Z80PIO |
|-| CN1|
|-| FD1771 2114 |
|-| 2114 |
|-| Z80 ROM1 |
|-| |
|-------------------------------------------|
Notes:
Relevant IC's shown.
ROM0 - AMI 8005SAJ 1Kx8 EPROM
ROM1 - Motorola MCM2708C 1Kx8 EPROM
Z80 - Zilog Z-80 CPU
Z80PIO - Zilog Z-80A PIO
FD1771 - FD1771-B01
2114 - National Semiconductor MM2114N 1Kx4 Static RAM
CN1 - 2x17 pin PCB header
*/
#include "abc_fd2.h"
//**************************************************************************
// MACROS / CONSTANTS
//**************************************************************************
#define Z80_TAG "2e"
#define Z80PIO_TAG "2c"
#define FD1771_TAG "2d"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type ABC_FD2 = &device_creator<abc_fd2_device>;
//-------------------------------------------------
// ROM( abc_fd2 )
//-------------------------------------------------
ROM_START( abc_fd2 )
ROM_REGION( 0x400, Z80_TAG, 0 )
ROM_LOAD( "1.02.3f", 0x000, 0x400, NO_DUMP )
ROM_REGION( 0x400, "abc80", 0 )
ROM_LOAD( "ami 8005saj.1a", 0x000, 0x400, NO_DUMP )
ROM_END
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
const rom_entry *abc_fd2_device::device_rom_region() const
{
return ROM_NAME( abc_fd2 );
}
//-------------------------------------------------
// ADDRESS_MAP( abc_fd2_mem )
//-------------------------------------------------
static ADDRESS_MAP_START( abc_fd2_mem, AS_PROGRAM, 8, abc_fd2_device )
AM_RANGE(0x0000, 0x03ff) AM_ROM AM_REGION(Z80_TAG, 0)
ADDRESS_MAP_END
//-------------------------------------------------
// ADDRESS_MAP( abc_fd2_io )
//-------------------------------------------------
static ADDRESS_MAP_START( abc_fd2_io, AS_IO, 8, abc_fd2_device )
ADDRESS_MAP_END
//-------------------------------------------------
// Z80PIO_INTERFACE( pio_intf )
//-------------------------------------------------
static Z80PIO_INTERFACE( pio_intf )
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL
};
//-------------------------------------------------
// z80_daisy_config daisy_chain
//-------------------------------------------------
static const z80_daisy_config daisy_chain[] =
{
{ Z80PIO_TAG },
{ NULL }
};
//-------------------------------------------------
// SLOT_INTERFACE( abc_fd2_floppies )
//-------------------------------------------------
static SLOT_INTERFACE_START( abc_fd2_floppies )
SLOT_INTERFACE( "525sssd", FLOPPY_525_SSSD )
SLOT_INTERFACE_END
//-------------------------------------------------
// MACHINE_DRIVER( abc_fd2 )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( abc_fd2 )
MCFG_CPU_ADD(Z80_TAG, Z80, XTAL_4MHz/2) // ?
MCFG_CPU_PROGRAM_MAP(abc_fd2_mem)
MCFG_CPU_IO_MAP(abc_fd2_io)
MCFG_CPU_CONFIG(daisy_chain)
MCFG_Z80PIO_ADD(Z80PIO_TAG, XTAL_4MHz/2, pio_intf) // ?
MCFG_FD1771x_ADD(FD1771_TAG, XTAL_4MHz/2 *8) // ?
MCFG_FLOPPY_DRIVE_ADD(FD1771_TAG":0", abc_fd2_floppies, "525sssd", NULL, floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(FD1771_TAG":1", abc_fd2_floppies, "525sssd", NULL, floppy_image_device::default_floppy_formats)
MACHINE_CONFIG_END
//-------------------------------------------------
// machine_config_additions - device-specific
// machine configurations
//-------------------------------------------------
machine_config_constructor abc_fd2_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( abc_fd2 );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// abc_fd2_device - constructor
//-------------------------------------------------
abc_fd2_device::abc_fd2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ABC_FD2, "ABC FD2", tag, owner, clock),
device_abcbus_card_interface(mconfig, *this),
m_maincpu(*this, Z80_TAG),
m_pio(*this, Z80PIO_TAG),
m_fdc(*this, FD1771_TAG),
m_floppy0(*this, FD1771_TAG":0"),
m_floppy1(*this, FD1771_TAG":1")
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void abc_fd2_device::device_start()
{
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void abc_fd2_device::device_reset()
{
}
//**************************************************************************
// ABC BUS INTERFACE
//**************************************************************************
//-------------------------------------------------
// abcbus_cs -
//-------------------------------------------------
void abc_fd2_device::abcbus_cs(UINT8 data)
{
}
//-------------------------------------------------
// abcbus_xmemfl -
//-------------------------------------------------
UINT8 abc_fd2_device::abcbus_xmemfl(offs_t offset)
{
UINT8 data = 0xff;
if (offset >= 0x6000 && offset < 0x6400) // TODO is this mirrored?
{
data = memregion("abc80")->base()[offset & 0x3ff];
}
return data;
}
|