summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/isa/isa.cpp
blob: 324a8b7ca50dc2daf9725b41f15f5b80c9ae30fb (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
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
// license:BSD-3-Clause
// copyright-holders:Miodrag Milanovic
/***************************************************************************

        ISA bus device

***************************************************************************/

#include "emu.h"
#include "isa.h"


//**************************************************************************
//  GLOBAL VARIABLES
//**************************************************************************

DEFINE_DEVICE_TYPE(ISA8_SLOT, isa8_slot_device, "isa8_slot", "8-bit ISA slot")

//**************************************************************************
//  LIVE DEVICE
//**************************************************************************

//-------------------------------------------------
//  isa8_slot_device - constructor
//-------------------------------------------------
isa8_slot_device::isa8_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	isa8_slot_device(mconfig, ISA8_SLOT, tag, owner, clock)
{
}

isa8_slot_device::isa8_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
	device_t(mconfig, type, tag, owner, clock),
	device_slot_interface(mconfig, *this),
	m_isa_bus(*this, finder_base::DUMMY_TAG)
{
}

//-------------------------------------------------
//  device_start - device-specific startup
//-------------------------------------------------

void isa8_slot_device::device_start()
{
	device_isa8_card_interface *const dev = dynamic_cast<device_isa8_card_interface *>(get_card_device());
	const device_isa16_card_interface *intf;
	if (get_card_device() && get_card_device()->interface(intf))
		fatalerror("ISA16 device in ISA8 slot\n");

	if (dev) dev->set_isabus(m_isa_bus);

	// tell isa bus that there is one slot with the specified tag
	downcast<isa8_device &>(*m_isa_bus).add_slot(tag());
}



//**************************************************************************
//  GLOBAL VARIABLES
//**************************************************************************

DEFINE_DEVICE_TYPE(ISA16_SLOT, isa16_slot_device, "isa16_slot", "16-bit ISA slot")

//**************************************************************************
//  LIVE DEVICE
//**************************************************************************

//-------------------------------------------------
//  isa16_slot_device - constructor
//-------------------------------------------------
isa16_slot_device::isa16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	isa8_slot_device(mconfig, ISA16_SLOT, tag, owner, clock)
{
}

//-------------------------------------------------
//  device_start - device-specific startup
//-------------------------------------------------

void isa16_slot_device::device_start()
{
	device_isa8_card_interface *const dev = dynamic_cast<device_isa8_card_interface *>(get_card_device());
	if (dev) dev->set_isabus(m_isa_bus);
	// tell isa bus that there is one slot with the specified tag
	dynamic_cast<isa8_device &>(*m_isa_bus).add_slot(tag());
}


//**************************************************************************
//  GLOBAL VARIABLES
//**************************************************************************

DEFINE_DEVICE_TYPE(ISA8, isa8_device, "isa8", "8-bit ISA bus")

//**************************************************************************
//  LIVE DEVICE
//**************************************************************************

//-------------------------------------------------
//  isa8_device - constructor
//-------------------------------------------------

isa8_device::isa8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	isa8_device(mconfig, ISA8, tag, owner, clock)
{
}

isa8_device::isa8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
	device_t(mconfig, type, tag, owner, clock),
	device_memory_interface(mconfig, *this),
	m_mem_config("ISA 8-bit mem", ENDIANNESS_LITTLE, 8, 24, 0, address_map_constructor()),
	m_io_config("ISA 8-bit I/O", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor()),
	m_mem16_config("ISA 16-bit mem", ENDIANNESS_LITTLE, 16, 24, 0, address_map_constructor()),
	m_io16_config("ISA 16-bit I/O", ENDIANNESS_LITTLE, 16, 16, 0, address_map_constructor()),
	m_maincpu(*this, finder_base::DUMMY_TAG),
	m_iospace(nullptr),
	m_memspace(nullptr),
	m_iowidth(0),
	m_memwidth(0),
	m_allocspaces(false),
	m_out_irq2_cb(*this),
	m_out_irq3_cb(*this),
	m_out_irq4_cb(*this),
	m_out_irq5_cb(*this),
	m_out_irq6_cb(*this),
	m_out_irq7_cb(*this),
	m_out_drq1_cb(*this),
	m_out_drq2_cb(*this),
	m_out_drq3_cb(*this),
	m_nmi_enabled(false),
	m_write_iochck(*this)
{
	std::fill(std::begin(m_dma_device), std::end(m_dma_device), nullptr);
	std::fill(std::begin(m_dma_eop), std::end(m_dma_eop), false);
}

device_memory_interface::space_config_vector isa8_device::memory_space_config() const
{
	return space_config_vector {
		std::make_pair(AS_ISA_MEM,    &m_mem_config),
		std::make_pair(AS_ISA_IO,     &m_io_config),
		std::make_pair(AS_ISA_MEMALT, &m_mem16_config),
		std::make_pair(AS_ISA_IOALT,  &m_io16_config)
	};
}

device_memory_interface::space_config_vector isa16_device::memory_space_config() const
{
	return space_config_vector {
		std::make_pair(AS_ISA_MEM,    &m_mem16_config),
		std::make_pair(AS_ISA_IO,     &m_io16_config),
		std::make_pair(AS_ISA_MEMALT, &m_mem_config),
		std::make_pair(AS_ISA_IOALT,  &m_io_config)
	};
}

READ8_MEMBER(isa8_device::mem_r)
{
	return m_memspace->read_byte(offset);
}

WRITE8_MEMBER(isa8_device::mem_w)
{
	m_memspace->write_byte(offset, data);
}

READ8_MEMBER(isa8_device::io_r)
{
	return m_iospace->read_byte(offset);
}

WRITE8_MEMBER(isa8_device::io_w)
{
	m_iospace->write_byte(offset, data);
}

void isa8_device::set_dma_channel(uint8_t channel, device_isa8_card_interface *dev, bool do_eop)
{
	m_dma_device[channel] = dev;
	m_dma_eop[channel] = do_eop;
}

void isa8_device::add_slot(const char *tag)
{
	device_t *dev = subdevice(tag);
	//printf(tag);
	add_slot(dynamic_cast<device_slot_interface *>(dev));
}

void isa8_device::add_slot(device_slot_interface *slot)
{
	m_slot_list.push_front(slot);
}

void isa8_device::remap(int space_id, offs_t start, offs_t end)
{
	for (device_slot_interface *sl : m_slot_list)
	{
		device_t *dev = sl->get_card_device();
		device_isa8_card_interface *isadev = dynamic_cast<device_isa8_card_interface *>(dev);
		isadev->remap(space_id, start, end);
	}
}

//-------------------------------------------------
//  device_start - device-specific startup
//-------------------------------------------------

void isa8_device::device_start()
{
	// resolve callbacks
	m_write_iochck.resolve_safe();

	m_out_irq2_cb.resolve_safe();
	m_out_irq3_cb.resolve_safe();
	m_out_irq4_cb.resolve_safe();
	m_out_irq5_cb.resolve_safe();
	m_out_irq6_cb.resolve_safe();
	m_out_irq7_cb.resolve_safe();
	m_out_drq1_cb.resolve_safe();
	m_out_drq2_cb.resolve_safe();
	m_out_drq3_cb.resolve_safe();

	if (m_allocspaces)
	{
		m_iospace = &space(AS_ISA_IO);
		m_memspace = &space(AS_ISA_MEM);
		m_iowidth = m_iospace->data_width();
		m_memwidth = m_memspace->data_width();
	}
	else    // use host CPU's program and I/O spaces directly
	{
		m_iospace = &m_maincpu->space(AS_IO);
		m_iowidth = m_maincpu->space_config(AS_IO)->m_data_width;
		m_memspace = &m_maincpu->space(AS_PROGRAM);
		m_memwidth = m_maincpu->space_config(AS_PROGRAM)->m_data_width;
	}
}

//-------------------------------------------------
//  device_reset - device-specific reset
//-------------------------------------------------

void isa8_device::device_reset()
{
}


template<typename R, typename W> void isa8_device::install_space(int spacenum, offs_t start, offs_t end, R rhandler, W whandler)
{
	int buswidth;
	address_space *space;

	if (spacenum == AS_ISA_IO)
	{
		space = m_iospace;
		buswidth = m_iowidth;
	}
	else if (spacenum == AS_ISA_MEM)
	{
		space = m_memspace;
		buswidth = m_memwidth;
	}
	else
	{
		fatalerror("Unknown space passed to isa8_device::install_space!\n");
	}

	switch(buswidth)
	{
		case 8:
			space->install_readwrite_handler(start, end, rhandler, whandler, 0);
			break;
		case 16:
			space->install_readwrite_handler(start, end, rhandler, whandler, 0xffff);
			break;
		case 32:
			if ((start % 4) == 0) {
				if ((end-start)==1) {
					space->install_readwrite_handler(start, end+2, rhandler, whandler, 0x0000ffff);
				} else {
					space->install_readwrite_handler(start, end,   rhandler, whandler, 0xffffffff);
				}
			} else {
				// we handle just misaligned by 2
				space->install_readwrite_handler(start-2, end, rhandler, whandler, 0xffff0000);
			}
			break;
		default:
			fatalerror("ISA8: Bus width %d not supported\n", buswidth);
	}
}

template<typename R, typename W> void isa8_device::install_memory(offs_t start, offs_t end, R rhandler, W whandler)
{
	install_space(AS_ISA_MEM, start, end, rhandler, whandler);
}

template<typename R, typename W> void isa8_device::install_device(offs_t start, offs_t end, R rhandler, W whandler)
{
	install_space(AS_ISA_IO, start, end, rhandler, whandler);
}

template void isa8_device::install_space<read8_delegate,    write8_delegate   >(int spacenum, offs_t start, offs_t end, read8_delegate rhandler,    write8_delegate whandler);
template void isa8_device::install_space<read8m_delegate,   write8m_delegate  >(int spacenum, offs_t start, offs_t end, read8m_delegate rhandler,   write8m_delegate whandler);
template void isa8_device::install_space<read8s_delegate,   write8s_delegate  >(int spacenum, offs_t start, offs_t end, read8s_delegate rhandler,   write8s_delegate whandler);
template void isa8_device::install_space<read8sm_delegate,  write8sm_delegate >(int spacenum, offs_t start, offs_t end, read8sm_delegate rhandler,  write8sm_delegate whandler);
template void isa8_device::install_space<read8mo_delegate,  write8mo_delegate >(int spacenum, offs_t start, offs_t end, read8mo_delegate rhandler,  write8mo_delegate whandler);
template void isa8_device::install_space<read8smo_delegate, write8smo_delegate>(int spacenum, offs_t start, offs_t end, read8smo_delegate rhandler, write8smo_delegate whandler);

template void isa8_device::install_memory<read8_delegate,    write8_delegate   >(offs_t start, offs_t end, read8_delegate rhandler,    write8_delegate whandler);
template void isa8_device::install_memory<read8m_delegate,   write8m_delegate  >(offs_t start, offs_t end, read8m_delegate rhandler,   write8m_delegate whandler);
template void isa8_device::install_memory<read8s_delegate,   write8s_delegate  >(offs_t start, offs_t end, read8s_delegate rhandler,   write8s_delegate whandler);
template void isa8_device::install_memory<read8sm_delegate,  write8sm_delegate >(offs_t start, offs_t end, read8sm_delegate rhandler,  write8sm_delegate whandler);
template void isa8_device::install_memory<read8mo_delegate,  write8mo_delegate >(offs_t start, offs_t end, read8mo_delegate rhandler,  write8mo_delegate whandler);
template void isa8_device::install_memory<read8smo_delegate, write8smo_delegate>(offs_t start, offs_t end, read8smo_delegate rhandler, write8smo_delegate whandler);

template void isa8_device::install_device<read8_delegate,    write8_delegate   >(offs_t start, offs_t end, read8_delegate rhandler,    write8_delegate whandler);
template void isa8_device::install_device<read8m_delegate,   write8m_delegate  >(offs_t start, offs_t end, read8m_delegate rhandler,   write8m_delegate whandler);
template void isa8_device::install_device<read8s_delegate,   write8s_delegate  >(offs_t start, offs_t end, read8s_delegate rhandler,   write8s_delegate whandler);
template void isa8_device::install_device<read8sm_delegate,  write8sm_delegate >(offs_t start, offs_t end, read8sm_delegate rhandler,  write8sm_delegate whandler);
template void isa8_device::install_device<read8mo_delegate,  write8mo_delegate >(offs_t start, offs_t end, read8mo_delegate rhandler,  write8mo_delegate whandler);
template void isa8_device::install_device<read8smo_delegate, write8smo_delegate>(offs_t start, offs_t end, read8smo_delegate rhandler, write8smo_delegate whandler);


void isa8_device::install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data)
{
	m_memspace->install_readwrite_bank(start, end, 0, tag );
	machine().root_device().membank(m_memspace->device().siblingtag(tag).c_str())->set_base(data);
}

void isa8_device::unmap_bank(offs_t start, offs_t end)
{
	m_memspace->unmap_readwrite(start, end);
}

void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, const char *tag, const char *region)
{
	if (machine().root_device().memregion("isa")) {
		uint8_t *src = dev->memregion(region)->base();
		uint8_t *dest = machine().root_device().memregion("isa")->base() + start - 0xc0000;
		memcpy(dest,src, end - start + 1);
	} else {
		m_memspace->install_read_bank(start, end, 0, tag);
		m_memspace->unmap_write(start, end);
		machine().root_device().membank(m_memspace->device().siblingtag(tag).c_str())->set_base(machine().root_device().memregion(dev->subtag(region).c_str())->base());
	}
}

void isa8_device::unmap_rom(offs_t start, offs_t end)
{
	m_memspace->unmap_read(start, end);
}

bool isa8_device::is_option_rom_space_available(offs_t start, int size)
{
	for(int i = 0; i < size; i += 4096) // 4KB granularity should be enough
		if(m_memspace->get_read_ptr(start + i)) return false;
	return true;
}

// interrupt request from isa card
WRITE_LINE_MEMBER( isa8_device::irq2_w ) { m_out_irq2_cb(state); }
WRITE_LINE_MEMBER( isa8_device::irq3_w ) { m_out_irq3_cb(state); }
WRITE_LINE_MEMBER( isa8_device::irq4_w ) { m_out_irq4_cb(state); }
WRITE_LINE_MEMBER( isa8_device::irq5_w ) { m_out_irq5_cb(state); }
WRITE_LINE_MEMBER( isa8_device::irq6_w ) { m_out_irq6_cb(state); }
WRITE_LINE_MEMBER( isa8_device::irq7_w ) { m_out_irq7_cb(state); }

// dma request from isa card
WRITE_LINE_MEMBER( isa8_device::drq1_w ) { m_out_drq1_cb(state); }
WRITE_LINE_MEMBER( isa8_device::drq2_w ) { m_out_drq2_cb(state); }
WRITE_LINE_MEMBER( isa8_device::drq3_w ) { m_out_drq3_cb(state); }

uint8_t isa8_device::dack_r(int line)
{
	if (m_dma_device[line])
		return m_dma_device[line]->dack_r(line);
	return 0xff;
}

void isa8_device::dack_w(int line,uint8_t data)
{
	if (m_dma_device[line])
		return m_dma_device[line]->dack_w(line,data);
}

void isa8_device::eop_w(int channel, int state)
{
	if (m_dma_eop[channel] && m_dma_device[channel])
		m_dma_device[channel]->eop_w(state);
}

void isa8_device::nmi()
{
	if (m_write_iochck.isnull())
	{
		if (m_nmi_enabled)
		{
			m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
		}
	}
	else
	{
		m_write_iochck(0);
		m_write_iochck(1);
	}
}

//**************************************************************************
//  DEVICE CONFIG ISA8 CARD INTERFACE
//**************************************************************************


//**************************************************************************
//  DEVICE ISA8 CARD INTERFACE
//**************************************************************************

//-------------------------------------------------
//  device_isa8_card_interface - constructor
//-------------------------------------------------

device_isa8_card_interface::device_isa8_card_interface(const machine_config &mconfig, device_t &device)
	: device_slot_card_interface(mconfig, device),
		m_isa(nullptr), m_isa_dev(nullptr), m_next(nullptr)
{
}


//-------------------------------------------------
//  ~device_isa8_card_interface - destructor
//-------------------------------------------------

device_isa8_card_interface::~device_isa8_card_interface()
{
}

uint8_t device_isa8_card_interface::dack_r(int line)
{
	return 0;
}
void device_isa8_card_interface::dack_w(int line,uint8_t data)
{
}
void device_isa8_card_interface::eop_w(int state)
{
}

void device_isa8_card_interface::set_isa_device()
{
	m_isa = dynamic_cast<isa8_device *>(m_isa_dev);
}


DEFINE_DEVICE_TYPE(ISA16, isa16_device, "isa16", "16-bit ISA bus")

//-------------------------------------------------
//  isa16_device - constructor
//-------------------------------------------------

isa16_device::isa16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	isa8_device(mconfig, ISA16, tag, owner, clock),
	m_out_irq10_cb(*this),
	m_out_irq11_cb(*this),
	m_out_irq12_cb(*this),
	m_out_irq14_cb(*this),
	m_out_irq15_cb(*this),
	m_out_drq0_cb(*this),
	m_out_drq5_cb(*this),
	m_out_drq6_cb(*this),
	m_out_drq7_cb(*this)
{
}

//-------------------------------------------------
//  device_start - device-specific startup
//-------------------------------------------------

void isa16_device::device_start()
{
	isa8_device::device_start();

	// resolve callbacks
	m_out_irq10_cb.resolve_safe();
	m_out_irq11_cb.resolve_safe();
	m_out_irq12_cb.resolve_safe();
	m_out_irq14_cb.resolve_safe();
	m_out_irq15_cb.resolve_safe();

	m_out_drq0_cb.resolve_safe();
	m_out_drq5_cb.resolve_safe();
	m_out_drq6_cb.resolve_safe();
	m_out_drq7_cb.resolve_safe();
}

void isa16_device::install16_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler)
{
	int buswidth = m_iowidth;
	switch(buswidth)
	{
		case 16:
			m_iospace->install_readwrite_handler(start, end, rhandler, whandler, 0);
			break;
		case 32:
			m_iospace->install_readwrite_handler(start, end, rhandler, whandler, 0xffffffff);
			if ((start % 4) == 0) {
				if ((end-start)==1) {
					m_iospace->install_readwrite_handler(start, end+2, rhandler, whandler, 0x0000ffff);
				} else {
					m_iospace->install_readwrite_handler(start, end,   rhandler, whandler, 0xffffffff);
				}
			} else {
				// we handle just misalligned by 2
				m_iospace->install_readwrite_handler(start-2, end, rhandler, whandler, 0xffff0000);
			}

			break;
		default:
			fatalerror("ISA16: Bus width %d not supported\n", buswidth);
	}
}

READ16_MEMBER(isa16_device::mem16_r)
{
	return m_memspace->read_word(offset<<1, mem_mask);
}

WRITE16_MEMBER(isa16_device::mem16_w)
{
	m_memspace->write_word(offset<<1, data, mem_mask);
}

READ16_MEMBER(isa16_device::io16_r)
{
	return m_iospace->read_word(offset<<1, mem_mask);
}

WRITE16_MEMBER(isa16_device::io16_w)
{
	m_iospace->write_word(offset<<1, data, mem_mask);
}

READ16_MEMBER(isa16_device::mem16_swap_r)
{
	uint16_t rv;
	mem_mask = (mem_mask<<8) | (mem_mask>>8);

	rv = m_memspace->read_word(offset<<1, mem_mask);

	return (rv<<8) | (rv>>8);
}

WRITE16_MEMBER(isa16_device::mem16_swap_w)
{
	mem_mask = (mem_mask<<8) | (mem_mask>>8);
	data = (data<<8) | (data>>8);
	m_memspace->write_word(offset<<1, data, mem_mask);
}

READ16_MEMBER(isa16_device::io16_swap_r)
{
	uint16_t rv;
	mem_mask = (mem_mask<<8) | (mem_mask>>8);

	rv = m_iospace->read_word(offset<<1, mem_mask);

	return (rv<<8) | (rv>>8);
}

WRITE16_MEMBER(isa16_device::io16_swap_w)
{
	mem_mask = (mem_mask<<8) | (mem_mask>>8);
	data = (data<<8) | (data>>8);
	m_iospace->write_word(offset<<1, data, mem_mask);
}

// interrupt request from isa card
WRITE_LINE_MEMBER( isa16_device::irq10_w ) { m_out_irq10_cb(state); }
WRITE_LINE_MEMBER( isa16_device::irq11_w ) { m_out_irq11_cb(state); }
WRITE_LINE_MEMBER( isa16_device::irq12_w ) { m_out_irq12_cb(state); }
WRITE_LINE_MEMBER( isa16_device::irq14_w ) { m_out_irq14_cb(state); }
WRITE_LINE_MEMBER( isa16_device::irq15_w ) { m_out_irq15_cb(state); }

// dma request from isa card
WRITE_LINE_MEMBER( isa16_device::drq0_w ) { m_out_drq0_cb(state); }
WRITE_LINE_MEMBER( isa16_device::drq5_w ) { m_out_drq5_cb(state); }
WRITE_LINE_MEMBER( isa16_device::drq6_w ) { m_out_drq6_cb(state); }
WRITE_LINE_MEMBER( isa16_device::drq7_w ) { m_out_drq7_cb(state); }

uint16_t isa16_device::dack16_r(int line)
{
	if (m_dma_device[line])
		return dynamic_cast<device_isa16_card_interface *>(m_dma_device[line])->dack16_r(line);
	return 0xffff;
}

void isa16_device::dack16_w(int line,uint16_t data)
{
	if (m_dma_device[line])
		return dynamic_cast<device_isa16_card_interface *>(m_dma_device[line])->dack16_w(line,data);
}

void isa16_device::remap(int space_id, offs_t start, offs_t end)
{
	for (device_slot_interface *sl : m_slot_list)
	{
		device_t *dev = sl->get_card_device();

		if (dev)
		{
			device_isa8_card_interface *isadev8 = dynamic_cast<device_isa8_card_interface *>(dev);
			device_isa16_card_interface *isadev16 = dynamic_cast<device_isa16_card_interface *>(dev);

			if (isadev16)
				isadev16->remap(space_id, start, end);
			else
				if (isadev8)
					isadev8->remap(space_id, start, end);
		}
	}
}

//-------------------------------------------------
//  device_isa16_card_interface - constructor
//-------------------------------------------------

device_isa16_card_interface::device_isa16_card_interface(const machine_config &mconfig, device_t &device)
	: device_isa8_card_interface(mconfig,device), m_isa(nullptr)
{
}


//-------------------------------------------------
//  ~device_isa16_card_interface - destructor
//-------------------------------------------------

device_isa16_card_interface::~device_isa16_card_interface()
{
}

void device_isa16_card_interface::set_isa_device()
{
	m_isa = dynamic_cast<isa16_device *>(m_isa_dev);
}

uint16_t device_isa16_card_interface::dack16_r(int line)
{
	return 0;
}

void device_isa16_card_interface::dack16_w(int line,uint16_t data)
{
}