Skip to content

Commit a3a1573

Browse files
committed
victor9k: Floppy disk fixes to address very slow performance
- Polarity of the reset signal was incorrect - Hold the 8048 in reset as long as the reset signal is asserted, instead of doing a one-shot reset and letting it run. - Due to all the mirroring in the IO register map, register writes while probing for the hard disk controller were hitting the registers of the VIA chips in the FDC controller, resulting in SCP resets and whatnot. - The RDY0/RDY1 and Motor Speed signals can be either inputs or outputs. During initialization, these signals are used for things like loading speed tables into the SCP. Look at the direction of the signals from the VIA's point of view to determine who should be driving the lines. - Generate the tach signals going to the SCP correctly. - After all of the above fixes, we can now use the Ready signals from the SCP, and no longer need to bypass it.
1 parent cf70f82 commit a3a1573

File tree

3 files changed

+88
-92
lines changed

3 files changed

+88
-92
lines changed

src/mame/act/victor9k.cpp

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
- Winchester DMA card (Xebec S1410 + Tandon TM502/TM603SE)
1919
- RAM cards
2020
- clock cards
21-
- floppy 8048
2221
2322
*/
2423

@@ -226,18 +225,18 @@ void victor9k_state::victor9k_mem(address_map &map)
226225
{
227226
map(0x00000, 0x1ffff).ram();
228227
map(0x20000, 0xdffff).noprw();
229-
map(0xe0000, 0xe0001).mirror(0x7f00).rw(m_pic, FUNC(pic8259_device::read), FUNC(pic8259_device::write));
230-
map(0xe0020, 0xe0023).mirror(0x7f00).rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write));
231-
map(0xe0040, 0xe0043).mirror(0x7f00).rw(m_upd7201, FUNC(upd7201_device::cd_ba_r), FUNC(upd7201_device::cd_ba_w));
232-
map(0xe8000, 0xe8000).mirror(0x7f00).rw(m_crtc, FUNC(mc6845_device::status_r), FUNC(mc6845_device::address_w));
233-
map(0xe8001, 0xe8001).mirror(0x7f00).rw(m_crtc, FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w));
234-
map(0xe8020, 0xe802f).mirror(0x7f00).m(m_via1, FUNC(via6522_device::map));
235-
map(0xe8040, 0xe804f).mirror(0x7f00).m(m_via2, FUNC(via6522_device::map));
236-
map(0xe8060, 0xe8061).mirror(0x7f00).rw(m_ssda, FUNC(mc6852_device::read), FUNC(mc6852_device::write));
237-
map(0xe8080, 0xe808f).mirror(0x7f00).m(m_via3, FUNC(via6522_device::map));
238-
map(0xe80a0, 0xe80af).mirror(0x7f00).rw(m_fdc, FUNC(victor_9000_fdc_device::cs5_r), FUNC(victor_9000_fdc_device::cs5_w));
239-
map(0xe80c0, 0xe80cf).mirror(0x7f00).rw(m_fdc, FUNC(victor_9000_fdc_device::cs6_r), FUNC(victor_9000_fdc_device::cs6_w));
240-
map(0xe80e0, 0xe80ef).mirror(0x7f00).rw(m_fdc, FUNC(victor_9000_fdc_device::cs7_r), FUNC(victor_9000_fdc_device::cs7_w));
228+
map(0xe0000, 0xe0001).rw(m_pic, FUNC(pic8259_device::read), FUNC(pic8259_device::write));
229+
map(0xe0020, 0xe0023).rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write));
230+
map(0xe0040, 0xe0043).rw(m_upd7201, FUNC(upd7201_device::cd_ba_r), FUNC(upd7201_device::cd_ba_w));
231+
map(0xe8000, 0xe8000).rw(m_crtc, FUNC(mc6845_device::status_r), FUNC(mc6845_device::address_w));
232+
map(0xe8001, 0xe8001).rw(m_crtc, FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w));
233+
map(0xe8020, 0xe802f).m(m_via1, FUNC(via6522_device::map));
234+
map(0xe8040, 0xe804f).m(m_via2, FUNC(via6522_device::map));
235+
map(0xe8060, 0xe8061).rw(m_ssda, FUNC(mc6852_device::read), FUNC(mc6852_device::write));
236+
map(0xe8080, 0xe808f).m(m_via3, FUNC(via6522_device::map));
237+
map(0xe80a0, 0xe80af).rw(m_fdc, FUNC(victor_9000_fdc_device::cs5_r), FUNC(victor_9000_fdc_device::cs5_w));
238+
map(0xe80c0, 0xe80cf).rw(m_fdc, FUNC(victor_9000_fdc_device::cs6_r), FUNC(victor_9000_fdc_device::cs6_w));
239+
map(0xe80e0, 0xe80ef).rw(m_fdc, FUNC(victor_9000_fdc_device::cs7_r), FUNC(victor_9000_fdc_device::cs7_w));
241240
map(0xf0000, 0xf0fff).mirror(0x1000).ram().share("video_ram");
242241
map(0xf8000, 0xf9fff).mirror(0x6000).rom().region(I8088_TAG, 0);
243242
}

src/mame/act/victor9k_fdc.cpp

Lines changed: 73 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,12 @@
2626
*/
2727

2828
/*
29-
30-
TODO:
31-
32-
- write protect
33-
- separate read/write methods
34-
- communication error with SCP after loading boot sector
35-
- bp ff1a8
36-
- patch ff1ab=c3
37-
- 8048 spindle speed control
38-
29+
TODO: write protect
3930
*/
4031

4132
#include "emu.h"
4233
#include "victor9k_fdc.h"
4334

44-
4535
//**************************************************************************
4636
// LOGGING
4737
//**************************************************************************
@@ -82,13 +72,9 @@
8272
// Tandon TM-100 spindle @ 300RPM, measured TACH 12VAC 256Hz
8373
// TACH = RPM / 60 * SPINDLE RATIO * MOTOR POLES
8474
// 256 = 300 / 60 * 6.4 * 8
85-
#define SPINDLE_RATIO 6.4
75+
#define SPINDLE_RATIO 6.4 // Motor RPM divided by Disk RPM
8676
#define MOTOR_POLES 8.0
8777

88-
// TODO wrong values here! motor speed is controlled by an LM2917, with help from the spindle TACH and a DAC0808 whose value is set by the SCP 8048
89-
const int victor_9000_fdc_device::rpm[] = { 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 254, 255, 257, 259, 260, 262, 264, 266, 267, 269, 271, 273, 275, 276, 278, 280, 282, 284, 286, 288, 290, 291, 293, 295, 297, 299, 301, 303, 305, 307, 309, 311, 313, 315, 318, 320, 322, 324, 326, 328, 330, 333, 335, 337, 339, 342, 344, 346, 348, 351, 353, 355, 358, 360, 362, 365, 367, 370, 372, 375, 377, 380, 382, 385, 387, 390, 392, 395, 398, 400, 403, 406, 408, 411, 414, 416, 419, 422, 425, 428, 430, 433, 436, 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, 475, 478, 482, 485, 488, 491, 494, 498, 501, 504, 508, 511, 514, 518, 521, 525, 528, 532, 535, 539, 542, 546, 550, 553, 557, 561, 564, 568, 572, 576, 579, 583, 587, 591, 595, 599, 603, 607, 611, 615, 619, 623, 627, 631, 636, 640, 644, 648, 653, 657, 661, 666, 670, 674, 679, 683, 688, 693, 697, 702, 706, 711, 716, 721, 725, 730, 735, 740, 745, 750, 755, 760, 765, 770, 775, 780, 785, 790, 796, 801, 806, 812, 817, 822, 828, 833, 839, 844, 850, 856, 861, 867, 873, 878, 884 };
90-
91-
9278

9379
//**************************************************************************
9480
// DEVICE DEFINITIONS
@@ -193,6 +179,7 @@ void victor_9000_fdc_device::device_add_mconfig(machine_config &config)
193179
connector->option_add("525qd", FLOPPY_525_QD); // Tandon TM100-4 with custom electronics
194180
connector->set_default_option("525qd");
195181
connector->set_formats(floppy_formats);
182+
connector->enable_sound(true);
196183
}
197184
}
198185

@@ -217,13 +204,12 @@ victor_9000_fdc_device::victor_9000_fdc_device(const machine_config &mconfig, co
217204
m_floppy(*this, I8048_TAG":%u", 0U),
218205
m_gcr_rom(*this, "gcr"),
219206
m_leds(*this, "led%u", 0U),
220-
m_data(0),
221207
m_da{0, 0},
222208
m_start{1, 1},
223209
m_stop{1, 1},
224210
m_sel{0, 0},
225211
m_tach{0, 0},
226-
m_rdy{0, 0},
212+
m_tach_hz{0, 0},
227213
m_scp_rdy0(0),
228214
m_scp_rdy1(0),
229215
m_via_rdy0(1),
@@ -261,13 +247,12 @@ void victor_9000_fdc_device::device_start()
261247
t_tach[1] = timer_alloc(FUNC(victor_9000_fdc_device::tach1_tick), this);
262248

263249
// state saving
264-
save_item(NAME(m_data));
265250
save_item(NAME(m_da));
266251
save_item(NAME(m_start));
267252
save_item(NAME(m_stop));
268253
save_item(NAME(m_sel));
269254
save_item(NAME(m_tach));
270-
save_item(NAME(m_rdy));
255+
save_item(NAME(m_tach_hz));
271256
save_item(NAME(m_scp_rdy0));
272257
save_item(NAME(m_scp_rdy1));
273258
save_item(NAME(m_via_rdy0));
@@ -294,6 +279,8 @@ void victor_9000_fdc_device::device_start()
294279

295280
void victor_9000_fdc_device::device_reset()
296281
{
282+
m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
283+
297284
live_abort();
298285

299286
// reset devices
@@ -330,12 +317,16 @@ TIMER_CALLBACK_MEMBER(victor_9000_fdc_device::tach0_tick)
330317
{
331318
m_tach[0] = !m_tach[0];
332319
LOGSCP("%s TACH0 %u\n", machine().time().as_string(), m_tach[0]);
320+
321+
t_tach[0]->adjust(attotime::from_hz(m_tach_hz[0]*2));
333322
}
334323

335324
TIMER_CALLBACK_MEMBER(victor_9000_fdc_device::tach1_tick)
336325
{
337326
m_tach[1] = !m_tach[1];
338327
LOGSCP("%s TACH1 %u\n", machine().time().as_string(), m_tach[1]);
328+
329+
t_tach[1]->adjust(attotime::from_hz(m_tach_hz[1]*2));
339330
}
340331

341332

@@ -467,7 +458,7 @@ void victor_9000_fdc_device::floppy_p2_w(uint8_t data)
467458
m_scp_rdy1 = BIT(data, 7);
468459
update_rdy();
469460

470-
LOGSCP("%s %s START0/STOP0/SEL0/RDY0 %u/%u/%u/%u START1/STOP1/SEL1/RDY1 %u/%u/%u/%u\n", machine().time().as_string(), machine().describe_context(), start0, stop0, sel0, m_rdy[0], start1, stop1, sel1, m_rdy[1]);
461+
LOGSCP("%s %s START0/STOP0/SEL0/RDY0 %u/%u/%u/%u START1/STOP1/SEL1/RDY1 %u/%u/%u/%u\n", machine().time().as_string(), machine().describe_context(), start0, stop0, sel0, m_scp_rdy0, start1, stop1, sel1, m_scp_rdy1);
471462

472463
if (sync)
473464
{
@@ -476,14 +467,14 @@ void victor_9000_fdc_device::floppy_p2_w(uint8_t data)
476467
m_start[0] = start0;
477468
m_stop[0] = stop0;
478469
m_sel[0] = sel0;
479-
update_spindle_motor(m_floppy[0]->get_device(), t_tach[0], m_start[0], m_stop[0], m_sel[0], m_da[0]);
480-
update_rpm(m_floppy[0]->get_device(), t_tach[0], m_sel[0], m_da[0]);
470+
update_rpm(m_floppy[0]->get_device(), t_tach[0], m_sel[0], m_da[0], m_tach_hz[0]);
471+
update_spindle_motor(m_floppy[0]->get_device(), t_tach[0], m_start[0], m_stop[0], m_sel[0], m_tach_hz[0]);
481472

482473
m_start[1] = start1;
483474
m_stop[1] = stop1;
484475
m_sel[1] = sel1;
485-
update_spindle_motor(m_floppy[1]->get_device(), t_tach[1], m_start[1], m_stop[1], m_sel[1], m_da[1]);
486-
update_rpm(m_floppy[1]->get_device(), t_tach[1], m_sel[1], m_da[1]);
476+
update_rpm(m_floppy[1]->get_device(), t_tach[1], m_sel[1], m_da[1], m_tach_hz[1]);
477+
update_spindle_motor(m_floppy[1]->get_device(), t_tach[1], m_start[1], m_stop[1], m_sel[1], m_tach_hz[1]);
487478

488479
checkpoint();
489480

@@ -556,13 +547,13 @@ void victor_9000_fdc_device::update_stepper_motor(floppy_image_device *floppy, i
556547
floppy->set_rpm(victor9k_format::get_rpm(m_side, floppy->get_cyl()));
557548
}
558549

559-
void victor_9000_fdc_device::update_spindle_motor(floppy_image_device *floppy, emu_timer *t_tach, bool start, bool stop, bool sel, uint8_t &da)
550+
void victor_9000_fdc_device::update_spindle_motor(floppy_image_device *floppy, emu_timer *t_tach, bool start, bool stop, bool sel, float tach_hz)
560551
{
561-
#ifdef USE_SCP
562552
if (start && !stop && floppy->mon_r())
563553
{
564554
LOGSCP("%s: motor start\n", floppy->tag());
565555
floppy->mon_w(0);
556+
t_tach->adjust(attotime::from_hz(tach_hz));
566557
t_tach->enable(true);
567558
}
568559
else if (stop && !floppy->mon_r())
@@ -571,33 +562,34 @@ void victor_9000_fdc_device::update_spindle_motor(floppy_image_device *floppy, e
571562
floppy->mon_w(1);
572563
t_tach->enable(false);
573564
}
574-
#endif
575565
}
576566

577-
void victor_9000_fdc_device::update_rpm(floppy_image_device *floppy, emu_timer *t_tach, bool sel, uint8_t &da)
567+
void victor_9000_fdc_device::update_rpm(floppy_image_device *floppy, emu_timer *t_tach, bool sel, uint8_t dacval, float &tach_hz)
578568
{
579-
#ifdef USE_SCP
580569
if (sel)
581570
{
582-
da = m_data;
583-
584-
float tach = rpm[da] / 60.0 * SPINDLE_RATIO * MOTOR_POLES;
571+
// Map DAC value to RPM, using the range of RPMs for zones 0 to 8,
572+
// and adding some margin. The SCP will adjust the DAC value
573+
// until it measures the desired frequency at the tach inputs.
574+
const float rpm_min = 240, rpm_max = 430;
575+
float rpm = rpm_min + ((255-dacval)/255.0f) * (rpm_max-rpm_min);
585576

586-
LOGSCP("%s: motor speed %u rpm / tach %0.1f hz %0.9f s (DA %02x)\n", floppy->tag(), rpm[da], (double) tach, 1.0/(double)tach, da);
577+
tach_hz = rpm / 60.0 * SPINDLE_RATIO * MOTOR_POLES;
587578

588-
floppy->set_rpm(rpm[da]);
579+
LOGSCP("%s: motor speed %u rpm / tach %0.1f hz %0.9f s (DAC %02x)\n", floppy->tag(), rpm, (double)tach_hz, 1.0/(double)tach_hz, dacval);
589580

590-
bool enabled = t_tach->enabled();
591-
t_tach->adjust(attotime::from_hz(tach*2), 0, attotime::from_hz(tach*2));
592-
t_tach->enable(enabled);
581+
floppy->set_rpm(rpm);
593582
}
594-
#endif
595583
}
596584

597585
void victor_9000_fdc_device::update_rdy()
598586
{
599-
m_via5->write_ca2((m_via_rdy0 && m_via_rdy1) ? m_rdy[0] : m_scp_rdy0);
600-
m_via5->write_cb2((m_via_rdy0 && m_via_rdy1) ? m_rdy[1] : m_scp_rdy1);
587+
uint8_t output_mask = m_via6->read(via6522_device::VIA_DDRB);
588+
589+
// The SCP and VIA chips can both output the RDY0/RDY1 (and L0MS/L1MS)
590+
// signals. When the VIA chip is configured to output the signal, it wins.
591+
m_via5->write_ca2((output_mask & 1) ? m_via_rdy0 : m_scp_rdy0);
592+
m_via5->write_cb2((output_mask & 2) ? m_via_rdy1 : m_scp_rdy1);
601593
}
602594

603595

@@ -610,9 +602,16 @@ void victor_9000_fdc_device::da_w(uint8_t data)
610602
LOGSCP("%s %s DA %02x SEL0 %u SEL1 %u\n", machine().time().as_string(), machine().describe_context(), data, m_sel[0], m_sel[1]);
611603

612604
live_sync();
613-
m_data = data;
614-
if (m_floppy[0]->get_device()) update_rpm(m_floppy[0]->get_device(), t_tach[0], m_sel[0], m_da[0]);
615-
if (m_floppy[1]->get_device()) update_rpm(m_floppy[1]->get_device(), t_tach[1], m_sel[1], m_da[1]);
605+
if (m_sel[0])
606+
{
607+
m_da[0] = data;
608+
}
609+
if (m_sel[1])
610+
{
611+
m_da[1] = data;
612+
}
613+
if (m_floppy[0]->get_device()) update_rpm(m_floppy[0]->get_device(), t_tach[0], m_sel[0], m_da[0], m_tach_hz[0]);
614+
if (m_floppy[1]->get_device()) update_rpm(m_floppy[1]->get_device(), t_tach[1], m_sel[1], m_da[1], m_tach_hz[1]);
616615
checkpoint();
617616
live_run();
618617
}
@@ -634,7 +633,9 @@ uint8_t victor_9000_fdc_device::via4_pa_r()
634633
635634
*/
636635

637-
return m_scp_l0ms;
636+
uint8_t output_mask = m_via4->read(via6522_device::VIA_DDRA);
637+
638+
return (m_via_l0ms & output_mask) | (m_scp_l0ms & ~output_mask);
638639
}
639640

640641
void victor_9000_fdc_device::via4_pa_w(uint8_t data)
@@ -656,17 +657,6 @@ void victor_9000_fdc_device::via4_pa_w(uint8_t data)
656657

657658
m_via_l0ms = data & 0x0f;
658659

659-
#ifndef USE_SCP
660-
// HACK to bypass SCP
661-
if (m_floppy[0]->get_device())
662-
{
663-
m_floppy[0]->get_device()->mon_w((m_via_l0ms == 0xf) ? 1 : 0);
664-
m_floppy[0]->get_device()->set_rpm(victor9k_format::get_rpm(m_side, m_floppy[0]->get_device()->get_cyl()));
665-
}
666-
m_rdy[0] = (m_via_l0ms == 0xf) ? 0 : 1;
667-
update_rdy();
668-
#endif
669-
670660
uint8_t st0 = data >> 4;
671661

672662
LOGVIA("%s %s L0MS %01x ST0 %01x\n", machine().time().as_string(), machine().describe_context(), m_via_l0ms, st0);
@@ -698,7 +688,9 @@ uint8_t victor_9000_fdc_device::via4_pb_r()
698688
699689
*/
700690

701-
return m_scp_l1ms;
691+
uint8_t output_mask = m_via4->read(via6522_device::VIA_DDRB);
692+
693+
return (m_via_l1ms & output_mask) | (m_scp_l1ms & ~output_mask);
702694
}
703695

704696
void victor_9000_fdc_device::via4_pb_w(uint8_t data)
@@ -720,17 +712,6 @@ void victor_9000_fdc_device::via4_pb_w(uint8_t data)
720712

721713
m_via_l1ms = data & 0x0f;
722714

723-
#ifndef USE_SCP
724-
// HACK to bypass SCP
725-
if (m_floppy[1]->get_device())
726-
{
727-
m_floppy[1]->get_device()->mon_w((m_via_l1ms == 0xf) ? 1 : 0);
728-
m_floppy[1]->get_device()->set_rpm(victor9k_format::get_rpm(m_side, m_floppy[1]->get_device()->get_cyl()));
729-
}
730-
m_rdy[1] = (m_via_l1ms == 0xf) ? 0 : 1;
731-
update_rdy();
732-
#endif
733-
734715
uint8_t st1 = data >> 4;
735716

736717
LOGVIA("%s %s L1MS %01x ST1 %01x\n", machine().time().as_string(), machine().describe_context(), m_via_l1ms, st1);
@@ -934,11 +915,13 @@ uint8_t victor_9000_fdc_device::via6_pb_r()
934915

935916
uint8_t data = 0;
936917

918+
uint8_t output_mask = m_via6->read(via6522_device::VIA_DDRB);
919+
937920
// motor speed status, drive A
938-
data |= (m_via_rdy0 && m_via_rdy1) ? m_rdy[0] : m_scp_rdy0;
921+
data |= (output_mask & 1) ? m_via_rdy0 : m_scp_rdy0;
939922

940923
// motor speed status, drive B
941-
data |= ((m_via_rdy0 && m_via_rdy1) ? m_rdy[1] : m_scp_rdy1) << 1;
924+
data |= ((output_mask & 2) ? m_via_rdy1 : m_scp_rdy1) << 1;
942925

943926
// door B sense
944927
data |= ((m_floppy[1]->get_device() && m_floppy[1]->get_device()->exists()) ? 0 : 1) << 3;
@@ -958,8 +941,11 @@ void victor_9000_fdc_device::via6_pb_w(uint8_t data)
958941
959942
bit description
960943
961-
PB0 RDY0 to SCP Motor speed status, drive A
962-
PB1 RDY1 to SCP Motor speed status, drive B
944+
PB0 Data Ready Handshake signal during speed table download
945+
PB1 Data Ack Handshake signal during speed table download
946+
947+
PB0 RDY0 from SCP In Normal Operation: drive A speed converged
948+
PB1 RDY1 from SCP In Normal Operation: drive B speed converged
963949
PB2 _SCRESET Motor speed controller (8048) reset, output
964950
PB3 DS1 Door B sense, input ->order is correct, leads with B
965951
PB4 DSO Door A sense, input
@@ -969,13 +955,25 @@ void victor_9000_fdc_device::via6_pb_w(uint8_t data)
969955
970956
*/
971957

958+
uint8_t output_mask = m_via6->read(via6522_device::VIA_DDRB);
959+
972960
m_via_rdy0 = BIT(data, 0);
973961
m_via_rdy1 = BIT(data, 1);
974962
update_rdy();
975963

976-
// motor speed controller reset
977-
if (!BIT(data, 2))
978-
m_maincpu->reset();
964+
// _SCRESET in the schematic is misnamed. There's an inverter between this
965+
// signal and the _RESET pin of the 8048, so the reset signal is actually
966+
// active high.
967+
//
968+
// Hold the 8048 in reset, unless the reset signal is actively driven low.
969+
if (BIT(output_mask, 2) && !BIT(data, 2))
970+
{
971+
m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
972+
}
973+
else
974+
{
975+
m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
976+
}
979977

980978
bool sync = false;
981979

src/mame/act/victor9k_fdc.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ class victor_9000_fdc_device : public device_t
115115
output_finder<2> m_leds;
116116

117117
void update_stepper_motor(floppy_image_device *floppy, int stp, int old_st, int st);
118-
void update_spindle_motor(floppy_image_device *floppy, emu_timer *t_tach, bool start, bool stop, bool sel, uint8_t &da);
119-
void update_rpm(floppy_image_device *floppy, emu_timer *t_tach, bool sel, uint8_t &da);
118+
void update_spindle_motor(floppy_image_device *floppy, emu_timer *t_tach, bool start, bool stop, bool sel, float tach_hz);
119+
void update_rpm(floppy_image_device *floppy, emu_timer *t_tach, bool sel, uint8_t dacval, float &tach_hz);
120120
void update_rdy();
121121

122122
void load0_cb(floppy_image_device *device);
@@ -128,13 +128,12 @@ class victor_9000_fdc_device : public device_t
128128
uint8_t m_p2;
129129

130130
/* floppy state */
131-
uint8_t m_data;
132131
uint8_t m_da[2];
133132
int m_start[2];
134133
int m_stop[2];
135134
int m_sel[2];
136135
int m_tach[2];
137-
int m_rdy[2];
136+
float m_tach_hz[2];
138137
int m_scp_rdy0;
139138
int m_scp_rdy1;
140139
int m_via_rdy0;

0 commit comments

Comments
 (0)