summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/abcbus/lux10828.cpp
blob: 034dcb988988c5777570196690917771200ca913 (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
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************

    Luxor 55-10828 "slow" floppy disk controller emulation

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

/*

Luxor Conkort

PCB Layout
----------

55 10900-01

|-----------------------------------|
|   LD1 SW1 LS132       CON2        |
|                               S   |
|   4MHz        S240    N8T97N      |
|   S                               |
|   7404            MC1458  4024    |
|       S                           |
|   74276   S                       |
|           S   S                   |
|   LS32    S   C140E       LS273   |
|                                   |
|                                   |
|       MB8876          ROM         |
|                                   |
|                                   |
|   S   LS32    LS156       TC5514  |
|                                   |
|                           TC5514  |
|       Z80                         |
|                           LS273   |
|                                   |
|                           LS373   |
|       Z80PIO                      |
|                           LS245   |
|   S1                              |
|   LS125   LS124     S20   DM8131  |
|                                   |
|--|-----------------------------|--|
   |------------CON1-------------|

Notes:
    All IC's shown.

    ROM     - Hitachi HN462716 2Kx8 EPROM "MPI02"
    Z80     - Sharp LH0080A Z80A CPU
    Z80PIO  - SGS Z8420AB1 Z80A PIO
    MB8876  - Mitsubishi MB8876 Floppy Disc Controller (FD1791 compatible)
    TC5514  - Toshiba TC5514AP-2 1Kx4 bit Static RAM
    DM8131  - National Semiconductor DM8131N 6-Bit Unified Bus Comparator
    C140E   - Ferranti ULA 2C140E floppy disk data separator and mystery device
    N8T97N  - SA N8T97N ?
    CON1    - ABC bus connector
    CON2    - 25-pin D sub floppy connector (AMP4284)
    SW1     - Disk drive type (SS/DS, SD/DD)
    S1      - ABC bus card address bit 0
    S2      -
    S3      -
    S4      -
    S5      -
    S6      -
    S7      -
    S8      -
    S9      -
    LD1     - LED

*/

/*

    TODO:

    - needs mid-instruction wait state support from Z80 core
    - inverted A4/5/6/7 chip select
    - copy protection device (sends sector header bytes to CPU? DDEN is serial clock? code checks for either $b6 or $f7)

        06F8: ld   a,$2F                    ; SEEK
        06FA: out  ($BC),a
        06FC: push af
        06FD: push bc
        06FE: ld   bc,$0724
        0701: push bc
        0702: ld   b,$07
        0704: rr   a
        0706: call $073F
        073F: DB 7E         in   a,($7E)    ; PIO PORT B
        0741: EE 08         xor  $08        ; DDEN
        0743: D3 7E         out  ($7E),a
        0745: EE 08         xor  $08
        0747: D3 7E         out  ($7E),a
        0749: DB 7E         in   a,($7E)
        074B: 1F            rra
        074C: 1F            rra
        074D: 1F            rra
        074E: CB 11         rl   c
        0750: 79            ld   a,c
        0751: C9            ret
        0709: djnz $0703            <-- jumps to middle of instruction!
        0703: rlca
        0704: rr   a
        0706: call $073F

*/

#include "emu.h"
#include "lux10828.h"



//**************************************************************************
//  MACROS / CONSTANTS
//**************************************************************************

#define Z80_TAG     "5a"
#define Z80PIO_TAG  "3a"
#define MB8876_TAG  "7a"



//**************************************************************************
//  DEVICE DEFINITIONS
//**************************************************************************

DEFINE_DEVICE_TYPE(LUXOR_55_10828, luxor_55_10828_device, "lux10828", "Luxor 55 10828")


//-------------------------------------------------
//  ROM( luxor_55_10828 )
//-------------------------------------------------

ROM_START( luxor_55_10828 )
	ROM_REGION( 0x800, Z80_TAG, 0 )
	ROM_DEFAULT_BIOS("basf6106")
	// ABC 830
	ROM_SYSTEM_BIOS( 0, "basf6106", "BASF 6106/08" )
	ROMX_LOAD( "basf .02.7c", 0x000, 0x800, CRC(5daba200) SHA1(7881933760bed3b94f27585c0a6fc43e5d5153f5), ROM_BIOS(0) )
	ROM_SYSTEM_BIOS( 1, "mpi02", "MPI 51" )
	ROMX_LOAD( "mpi .02.7c",  0x000, 0x800, CRC(2aac9296) SHA1(c01a62e7933186bdf7068d2e9a5bc36590544349), ROM_BIOS(1) )
	ROM_SYSTEM_BIOS( 2, "mpi02n", "MPI 51 (newer)" )
	ROMX_LOAD( "new mpi .02.7c", 0x000, 0x800, CRC(ab788171) SHA1(c8e29965c04c85f2f2648496ea10c9c7ff95392f), ROM_BIOS(2) )
	// ABC 832
	ROM_SYSTEM_BIOS( 3, "micr1015", "Micropolis 1015 (v1.4)" )
	ROMX_LOAD( "micr 1.4.7c", 0x000, 0x800, CRC(a7bc05fa) SHA1(6ac3e202b7ce802c70d89728695f1cb52ac80307), ROM_BIOS(3) )
	ROM_SYSTEM_BIOS( 4, "micr1115", "Micropolis 1115 (v2.3)" )
	ROMX_LOAD( "micr 2.3.7c", 0x000, 0x800, CRC(f2fc5ccc) SHA1(86d6baadf6bf1d07d0577dc1e092850b5ff6dd1b), ROM_BIOS(4) )
	ROM_SYSTEM_BIOS( 5, "basf6118", "BASF 6118 (v1.2)" )
	ROMX_LOAD( "basf 1.2.7c", 0x000, 0x800, CRC(9ca1a1eb) SHA1(04973ad69de8da403739caaebe0b0f6757e4a6b1), ROM_BIOS(5) )
	// ABC 838
	ROM_SYSTEM_BIOS( 6, "basf6104", "BASF 6104, BASF 6115 (v1.0)" )
	ROMX_LOAD( "basf 8 1.0.7c", 0x000, 0x800, NO_DUMP, ROM_BIOS(6) )
ROM_END


//-------------------------------------------------
//  rom_region - device-specific ROM region
//-------------------------------------------------

const tiny_rom_entry *luxor_55_10828_device::device_rom_region() const
{
	return ROM_NAME( luxor_55_10828 );
}


//-------------------------------------------------
//  ADDRESS_MAP( luxor_55_10828_mem )
//-------------------------------------------------

void luxor_55_10828_device::luxor_55_10828_mem(address_map &map)
{
	map.global_mask(0x1fff);
	map(0x0000, 0x07ff).mirror(0x0800).rom().region(Z80_TAG, 0);
	map(0x1000, 0x13ff).mirror(0x0c00).ram();
}


//-------------------------------------------------
//  ADDRESS_MAP( luxor_55_10828_io )
//-------------------------------------------------

void luxor_55_10828_device::luxor_55_10828_io(address_map &map)
{
	map.global_mask(0xff);
	map(0x70, 0x73).mirror(0x0c).rw(Z80PIO_TAG, FUNC(z80pio_device::read_alt), FUNC(z80pio_device::write_alt));
	map(0xb0, 0xb3).mirror(0x0c).rw(FUNC(luxor_55_10828_device::fdc_r), FUNC(luxor_55_10828_device::fdc_w));
	map(0xd0, 0xd0).mirror(0x0f).w(FUNC(luxor_55_10828_device::status_w));
	map(0xe0, 0xe0).mirror(0x0f).w(FUNC(luxor_55_10828_device::ctrl_w));
}


//-------------------------------------------------
//  Z80PIO
//-------------------------------------------------

READ8_MEMBER( luxor_55_10828_device::pio_pa_r )
{
	return m_data;
}

WRITE8_MEMBER( luxor_55_10828_device::pio_pa_w )
{
	m_data = data;
}

READ8_MEMBER( luxor_55_10828_device::pio_pb_r )
{
	/*

	    bit     description

	    0       !(_DS0 & _DS1)  single/double sided (0=SS, 1=DS)
	    1       !(_DD0 & _DD1)  single/double density (0=SD, 1=DD)
	    2       8B pin 10
	    3
	    4       R/_BS           radial/binary drive select
	    5
	    6       FDC _HDLD       head loaded
	    7       FDC IRQ         interrupt request

	*/

	uint8_t data = 0;

	// single/double sided drive
	uint8_t sw1 = m_sw1->read() & 0x0f;
	bool ds0 = m_sel0 ? BIT(sw1, 0) : 1;
	bool ds1 = m_sel1 ? BIT(sw1, 1) : 1;
	data |= !(ds0 && ds1);

	// single/double density drive
	bool dd0 = m_sel0 ? BIT(sw1, 2) : 1;
	bool dd1 = m_sel1 ? BIT(sw1, 3) : 1;
	data |= !(dd0 && dd1) << 1;

	// TODO ULA output
	data |= 0x4;

	// radial/binary drive select
	data |= 0x10;

	// head load
	data |= !m_fdc->hld_r() << 6;

	// FDC interrupt request
	data |= m_fdc_irq << 7;

	return data;
}

WRITE8_MEMBER( luxor_55_10828_device::pio_pb_w )
{
	/*

	    bit     signal          description

	    0
	    1
	    2
	    3       FDC _DDEN       double density enable
	    4
	    5       FDC HLT         head load timing
	    6
	    7

	*/

	// double density enable
	m_fdc->dden_w(BIT(data, 3));

	// head load timing
	m_fdc->hlt_w(BIT(data, 5));
}


//-------------------------------------------------
//  z80_daisy_config daisy_chain
//-------------------------------------------------

static const z80_daisy_config daisy_chain[] =
{
	{ Z80PIO_TAG },
	{ nullptr }
};

static void abc_floppies(device_slot_interface &device)
{
	device.option_add("525sssd", FLOPPY_525_SSSD);
	device.option_add("525sd", FLOPPY_525_SD);
	device.option_add("525ssdd", FLOPPY_525_SSDD);
	device.option_add("525dd", FLOPPY_525_DD);
	device.option_add("8dsdd", FLOPPY_8_DSDD);
}

FLOPPY_FORMATS_MEMBER( luxor_55_10828_device::floppy_formats )
	FLOPPY_ABC800_FORMAT
FLOPPY_FORMATS_END

WRITE_LINE_MEMBER( luxor_55_10828_device::fdc_intrq_w )
{
	m_fdc_irq = state;
	m_pio->port_b_write(state << 7);

	//if (state) m_maincpu->wait_w(CLEAR_LINE);
}

WRITE_LINE_MEMBER( luxor_55_10828_device::fdc_drq_w )
{
	m_fdc_drq = state;

	//if (state) m_maincpu->wait_w(CLEAR_LINE);
}


//-------------------------------------------------
//  device_add_mconfig - add device configuration
//-------------------------------------------------

MACHINE_CONFIG_START(luxor_55_10828_device::device_add_mconfig)
	MCFG_DEVICE_ADD(Z80_TAG, Z80, 4_MHz_XTAL / 2)
	MCFG_DEVICE_PROGRAM_MAP(luxor_55_10828_mem)
	MCFG_DEVICE_IO_MAP(luxor_55_10828_io)
	MCFG_Z80_DAISY_CHAIN(daisy_chain)

	MCFG_DEVICE_ADD(Z80PIO_TAG, Z80PIO, 4_MHz_XTAL / 2)
	MCFG_Z80PIO_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
	MCFG_Z80PIO_IN_PA_CB(READ8(*this, luxor_55_10828_device, pio_pa_r))
	MCFG_Z80PIO_OUT_PA_CB(WRITE8(*this, luxor_55_10828_device, pio_pa_w))
	MCFG_Z80PIO_IN_PB_CB(READ8(*this, luxor_55_10828_device, pio_pb_r))
	MCFG_Z80PIO_OUT_PB_CB(WRITE8(*this, luxor_55_10828_device, pio_pb_w))

	MCFG_DEVICE_ADD(MB8876_TAG, MB8876, 4_MHz_XTAL / 4)
	MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, luxor_55_10828_device, fdc_intrq_w))
	MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, luxor_55_10828_device, fdc_drq_w))

	MCFG_FLOPPY_DRIVE_ADD(MB8876_TAG":0", abc_floppies, "525ssdd", luxor_55_10828_device::floppy_formats)
	MCFG_FLOPPY_DRIVE_ADD(MB8876_TAG":1", abc_floppies, "525ssdd", luxor_55_10828_device::floppy_formats)
MACHINE_CONFIG_END


//-------------------------------------------------
//  INPUT_PORTS( luxor_55_10828 )
//-------------------------------------------------

INPUT_PORTS_START( luxor_55_10828 )
	PORT_START("SW1")
	PORT_DIPNAME( 0x01, 0x01, "Drive 0 Sided" ) PORT_DIPLOCATION("SW1:1")
	PORT_DIPSETTING(    0x01, DEF_STR( Single ) )
	PORT_DIPSETTING(    0x00, "Double" )
	PORT_DIPNAME( 0x02, 0x02, "Drive 1 Sided" ) PORT_DIPLOCATION("SW1:2")
	PORT_DIPSETTING(    0x02, DEF_STR( Single ) )
	PORT_DIPSETTING(    0x00, "Double" )
	PORT_DIPNAME( 0x04, 0x00, "Drive 0 Density" ) PORT_DIPLOCATION("SW1:3")
	PORT_DIPSETTING(    0x04, DEF_STR( Single ) )
	PORT_DIPSETTING(    0x00, "Double" )
	PORT_DIPNAME( 0x08, 0x00, "Drive 1 Density" ) PORT_DIPLOCATION("SW1:4")
	PORT_DIPSETTING(    0x08, DEF_STR( Single ) )
	PORT_DIPSETTING(    0x00, "Double" )

	PORT_START("S1")
	PORT_DIPNAME( 0x01, 0x01, "Card Address" )
	PORT_DIPSETTING(    0x00, "44 (ABC 832/834/850)" )
	PORT_DIPSETTING(    0x01, "45 (ABC 830)" )

	PORT_START("S2,S3")
	PORT_DIPNAME( 0x01, 0x01, "Shift Clock" )
	PORT_DIPSETTING(    0x00, "2 MHz" )
	PORT_DIPSETTING(    0x01, "4 MHz" )

	PORT_START("S4,S5")
	PORT_DIPNAME( 0x01, 0x01, "Write Precompensation" )
	PORT_DIPSETTING(    0x00, "Always On" )
	PORT_DIPSETTING(    0x01, "Programmable" )
INPUT_PORTS_END


//-------------------------------------------------
//  input_ports - device-specific input ports
//-------------------------------------------------

ioport_constructor luxor_55_10828_device::device_input_ports() const
{
	return INPUT_PORTS_NAME( luxor_55_10828 );
}



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

//-------------------------------------------------
//  luxor_55_10828_device - constructor
//-------------------------------------------------

luxor_55_10828_device::luxor_55_10828_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
	device_t(mconfig, LUXOR_55_10828, tag, owner, clock),
	device_abcbus_card_interface(mconfig, *this),
	m_maincpu(*this, Z80_TAG),
	m_pio(*this, Z80PIO_TAG),
	m_fdc(*this, MB8876_TAG),
	m_floppy0(*this, MB8876_TAG":0"),
	m_floppy1(*this, MB8876_TAG":1"),
	m_sw1(*this, "SW1"),
	m_s1(*this, "S1"),
	m_cs(false),
	m_status(0),
	m_data(0),
	m_fdc_irq(0),
	m_fdc_drq(0),
	m_wait_enable(0),
	m_sel0(0),
	m_sel1(0)
{
}


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

void luxor_55_10828_device::device_start()
{
	// state saving
	save_item(NAME(m_cs));
	save_item(NAME(m_status));
	save_item(NAME(m_data));
	save_item(NAME(m_fdc_irq));
	save_item(NAME(m_fdc_drq));
	save_item(NAME(m_wait_enable));
	save_item(NAME(m_sel0));
	save_item(NAME(m_sel1));

	// patch out protection checks (bioses basf6106/mpi02)
	uint8_t *rom = memregion(Z80_TAG)->base();
	rom[0x00fa] = 0xff;
	rom[0x0336] = 0xff;
	rom[0x0718] = 0xff;
	rom[0x072c] = 0xff;
	rom[0x0771] = 0xff;
	rom[0x0788] = 0xff;
}


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

void luxor_55_10828_device::device_reset()
{
	m_cs = false;

	address_space &space = m_maincpu->space(AS_PROGRAM);
	ctrl_w(space, 0, 0);

	m_data = 0;
}



//**************************************************************************
//  ABC BUS INTERFACE
//**************************************************************************

//-------------------------------------------------
//  abcbus_cs -
//-------------------------------------------------

void luxor_55_10828_device::abcbus_cs(uint8_t data)
{
	uint8_t address = 0x2c | BIT(m_s1->read(), 0);

	m_cs = (data == address);
}


//-------------------------------------------------
//  abcbus_stat -
//-------------------------------------------------

uint8_t luxor_55_10828_device::abcbus_stat()
{
	uint8_t data = 0xff;

	if (m_cs)
	{
		data = (m_status & 0xfe) | m_pio->rdy_a();
	}

	return data;
}


//-------------------------------------------------
//  abcbus_inp -
//-------------------------------------------------

uint8_t luxor_55_10828_device::abcbus_inp()
{
	uint8_t data = 0xff;

	if (m_cs)
	{
		m_pio->strobe_a(0);
		m_pio->strobe_a(1);

		if (!BIT(m_status, 6))
		{
			data = m_data;
		}
	}

	return data;
}


//-------------------------------------------------
//  abcbus_out -
//-------------------------------------------------

void luxor_55_10828_device::abcbus_out(uint8_t data)
{
	if (m_cs)
	{
		if (BIT(m_status, 6))
		{
			m_data = data;
		}

		m_pio->strobe_a(0);
		m_pio->strobe_a(1);
	}
}


//-------------------------------------------------
//  abcbus_c1 -
//-------------------------------------------------

void luxor_55_10828_device::abcbus_c1(uint8_t data)
{
	if (m_cs)
	{
		m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
		m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
	}
}


//-------------------------------------------------
//  abcbus_c3 -
//-------------------------------------------------

void luxor_55_10828_device::abcbus_c3(uint8_t data)
{
	if (m_cs)
	{
		m_maincpu->reset();
	}
}



//**************************************************************************
//  IMPLEMENTATION
//**************************************************************************

//-------------------------------------------------
//  ctrl_w -
//-------------------------------------------------

WRITE8_MEMBER( luxor_55_10828_device::ctrl_w )
{
	/*

	    bit     signal          description

	    0       SEL 0
	    1       SEL 1
	    2       SEL 2
	    3       _MOT ON
	    4       SIDE
	    5       _PRECOMP ON
	    6       _WAIT ENABLE
	    7       FDC _MR

	*/

	if (machine().side_effects_disabled())
		return;

	// drive selection
	m_sel0 = BIT(data, 0);
	m_sel1 = BIT(data, 1);

	floppy_image_device *floppy = nullptr;

	if (m_sel0) floppy = m_floppy0->get_device();
	if (m_sel1) floppy = m_floppy1->get_device();

	m_fdc->set_floppy(floppy);

	if (floppy)
	{
		// motor enable
		floppy->mon_w(BIT(data, 3));

		// side select
		floppy->ss_w(!BIT(data, 4));
	}

	// wait enable
	m_wait_enable = BIT(data, 6);

	// FDC master reset
	if (!BIT(data, 7)) m_fdc->soft_reset();
}


//-------------------------------------------------
//  status_w -
//-------------------------------------------------

WRITE8_MEMBER( luxor_55_10828_device::status_w )
{
	/*

	    bit     description

	    0       _INT to main Z80
	    1
	    2
	    3
	    4
	    5
	    6       LS245 DIR
	    7

	*/

	if (machine().side_effects_disabled())
		return;

	m_status = data & 0xfe;

	// interrupt
	m_slot->irq_w(BIT(data, 0) ? ASSERT_LINE : CLEAR_LINE);
}


//-------------------------------------------------
//  fdc_r -
//-------------------------------------------------

READ8_MEMBER( luxor_55_10828_device::fdc_r )
{
	if (machine().side_effects_disabled())
		return 0xff;

	uint8_t data = 0xff;

	if (m_wait_enable)
	{
		data = m_fdc->gen_r(offset);
	}
	else if (!m_fdc_irq && !m_fdc_drq)
	{
		//m_maincpu->wait_w(ASSERT_LINE);
	}
	else
	{
		data = m_fdc->gen_r(offset);
	}

	return data;
}


//-------------------------------------------------
//  fdc_w -
//-------------------------------------------------

WRITE8_MEMBER( luxor_55_10828_device::fdc_w )
{
	if (machine().side_effects_disabled())
		return;

	m_fdc->gen_w(offset, data);

	if (!m_wait_enable && !m_fdc_irq && !m_fdc_drq)
	{
		//m_maincpu->wait_w(ASSERT_LINE);
	}
}