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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************
Commodore 1526/MPS-802/4023 Printer emulation
**********************************************************************/
#include "c1526.h"
//**************************************************************************
// MACROS / CONSTANTS
//**************************************************************************
#define M6504_TAG "u7d"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type C1526 = &device_creator<c1526_t>;
const device_type MPS802 = &device_creator<c1526_t>;
const device_type C4023 = &device_creator<c4023_t>;
//-------------------------------------------------
// ROM( c1526 )
//-------------------------------------------------
ROM_START( c1526 )
ROM_REGION( 0x2000, M6504_TAG, 0 )
ROM_SYSTEM_BIOS( 0, "r05", "Revision 5" )
ROMX_LOAD( "325341-05.u8d", 0x0000, 0x2000, CRC(3ef63c59) SHA1(a71be83a476d2777d33dddb0103c036a047975ba), ROM_BIOS(1) )
ROM_SYSTEM_BIOS( 1, "r07c", "Revision 7c" )
ROMX_LOAD( "325341-08.u8d", 0x0000, 0x2000, CRC(38f85b4a) SHA1(25880091979b21fdaf713b53ef2f1cb8063a3505), ROM_BIOS(2) )
ROM_SYSTEM_BIOS( 2, "r07b", "Revision 7b (Swe/Fin)" )
ROMX_LOAD( "cbm 1526 vers. 1.0 skand.gen.u8d", 0x0000, 0x2000, CRC(21051f69) SHA1(7e622fc39985ebe9333d2b546b3c85fd6ab17a53), ROM_BIOS(3) )
ROM_SYSTEM_BIOS( 3, "grafik", "MPS802 GrafikROM II v60.12" )
ROMX_LOAD( "mps802 grafikrom ii v60.12.u8d", 0x0000, 0x2000, CRC(9f5e6b18) SHA1(8b7f620a8f85e250b142d72b812a67fd0e292d68), ROM_BIOS(4) )
ROM_END
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
const rom_entry *c1526_t::device_rom_region() const
{
return ROM_NAME( c1526 );
}
//-------------------------------------------------
// ROM( c4023 )
//-------------------------------------------------
ROM_START( c4023 )
ROM_REGION( 0x2000, M6504_TAG, 0 )
ROM_LOAD( "325360-03.u8d", 0x0000, 0x2000, CRC(c6bb0977) SHA1(7a8c43d2e205f58d83709c04bc7795602a892ddd) )
ROM_END
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
const rom_entry *c4023_t::device_rom_region() const
{
return ROM_NAME( c4023 );
}
//-------------------------------------------------
// ADDRESS_MAP( c1526_mem )
//-------------------------------------------------
static ADDRESS_MAP_START( c1526_mem, AS_PROGRAM, 8, c1526_base_t )
AM_RANGE(0xe000, 0xffff) AM_ROM AM_REGION(M6504_TAG, 0)
ADDRESS_MAP_END
//-------------------------------------------------
// MACHINE_DRIVER( c1526 )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( c1526 )
MCFG_CPU_ADD(M6504_TAG, M6504, XTAL_4MHz/4)
MCFG_CPU_PROGRAM_MAP(c1526_mem)
MACHINE_CONFIG_END
//-------------------------------------------------
// machine_config_additions - device-specific
// machine configurations
//-------------------------------------------------
machine_config_constructor c1526_t::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( c1526 );
}
//-------------------------------------------------
// MACHINE_DRIVER( c4023 )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( c4023 )
MCFG_CPU_ADD(M6504_TAG, M6504, XTAL_4MHz/4)
MCFG_CPU_PROGRAM_MAP(c1526_mem)
MACHINE_CONFIG_END
//-------------------------------------------------
// machine_config_additions - device-specific
// machine configurations
//-------------------------------------------------
machine_config_constructor c4023_t::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( c4023 );
}
//-------------------------------------------------
// INPUT_PORTS( c1526 )
//-------------------------------------------------
static INPUT_PORTS_START( c1526 )
INPUT_PORTS_END
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor c1526_t::device_input_ports() const
{
return INPUT_PORTS_NAME( c1526 );
}
//-------------------------------------------------
// INPUT_PORTS( c4023 )
//-------------------------------------------------
static INPUT_PORTS_START( c4023 )
INPUT_PORTS_END
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor c4023_t::device_input_ports() const
{
return INPUT_PORTS_NAME( c4023 );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// c1526_base_t - constructor
//-------------------------------------------------
c1526_base_t:: c1526_base_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source)
{
}
//-------------------------------------------------
// c1526_t - constructor
//-------------------------------------------------
c1526_t::c1526_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
c1526_base_t(mconfig, C1526, "1526", tag, owner, clock, "c1526", __FILE__),
device_cbm_iec_interface(mconfig, *this)
{
}
//-------------------------------------------------
// c4023_t - constructor
//-------------------------------------------------
c4023_t::c4023_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
c1526_base_t(mconfig, C4023, "4023", tag, owner, clock, "c4023", __FILE__),
device_ieee488_interface(mconfig, *this)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void c1526_base_t::device_start()
{
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void c1526_base_t::device_reset()
{
}
//-------------------------------------------------
// cbm_iec_atn -
//-------------------------------------------------
void c1526_t::cbm_iec_atn(int state)
{
}
//-------------------------------------------------
// cbm_iec_data -
//-------------------------------------------------
void c1526_t::cbm_iec_data(int state)
{
}
//-------------------------------------------------
// cbm_iec_reset -
//-------------------------------------------------
void c1526_t::cbm_iec_reset(int state)
{
if (!state)
{
device_reset();
}
}
//-------------------------------------------------
// ieee488_atn_w -
//-------------------------------------------------
void c4023_t::ieee488_atn(int state)
{
}
//-------------------------------------------------
// ieee488_ifc_w -
//-------------------------------------------------
void c4023_t::ieee488_ifc(int state)
{
if (!state)
{
device_reset();
}
}
|