diff options
author | 2020-06-17 15:45:03 +0100 | |
---|---|---|
committer | 2020-06-17 15:48:26 +0100 | |
commit | 247d71e1cabe101bd29adee2abc57fb86215a911 (patch) | |
tree | 2dc4013ce61418b2042c03de009844ee15e5e039 /src | |
parent | febcfba1cb31b19b08949a171a2a37a55704ce20 (diff) |
bbc_opus3: Added notes on motor control (nw)
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/bus/bbc/1mhzbus/opus3.cpp | 41 | ||||
-rw-r--r-- | src/devices/bus/bbc/1mhzbus/opus3.h | 7 |
2 files changed, 16 insertions, 32 deletions
diff --git a/src/devices/bus/bbc/1mhzbus/opus3.cpp b/src/devices/bus/bbc/1mhzbus/opus3.cpp index 8ce66cd1ff7..ac92662dd80 100644 --- a/src/devices/bus/bbc/1mhzbus/opus3.cpp +++ b/src/devices/bus/bbc/1mhzbus/opus3.cpp @@ -16,14 +16,14 @@ &FCFC 1770 drive control Drive control register - 0 Select side: 0=side 0, 1=side 1 - 1 Select drive 0 - 2 Select drive 1 - 3 ?Unused? - 4 ?Always Set - 5 Density select: 0=double, 1=single - 6 ?Unused? - 7 ?Unused? + 0 SS Select side: 0=side 0, 1=side 1 + 1 DS0 Select drive 0 + 2 DS1 Select drive 1 + 3 DS2 Select drive 2 + 4 MO Motor enable + 5 DDEN Density select: 0=double, 1=single + 6 NC + 7 NC The RAM is accessible through JIM (page &FD). One page is visible in JIM at a time. The selected page is controlled by the two paging registers: @@ -97,14 +97,12 @@ ROM_END void bbc_opus3_device::device_add_mconfig(machine_config &config) { - /* fdc */ WD1770(config, m_fdc, 16_MHz_XTAL / 2); - m_fdc->drq_wr_callback().set(FUNC(bbc_opus3_device::fdc_drq_w)); + m_fdc->drq_wr_callback().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::nmi_w)); - FLOPPY_CONNECTOR(config, m_floppy0, bbc_floppies, "525qd", floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, m_floppy1, bbc_floppies, nullptr, floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[0], bbc_floppies, "525qd", floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[1], bbc_floppies, nullptr, floppy_formats).enable_sound(true); - /* ram disk */ RAM(config, m_ramdisk).set_default_size("512K").set_extra_options("256K").set_default_value(0); } @@ -131,8 +129,7 @@ bbc_opus3_device::bbc_opus3_device(const machine_config &mconfig, device_type ty , device_bbc_1mhzbus_interface(mconfig, *this) , m_ramdisk(*this, "ramdisk") , m_fdc(*this, "wd1770") - , m_floppy0(*this, "wd1770:0") - , m_floppy1(*this, "wd1770:1") + , m_floppy(*this, "wd1770:%u", 0) , m_ramdisk_page(0) { } @@ -193,16 +190,15 @@ void bbc_opus3_device::fred_w(offs_t offset, uint8_t data) break; case 0xfc: // bit 1, 2: drive select - if (BIT(data, 1)) floppy = m_floppy0->get_device(); - if (BIT(data, 2)) floppy = m_floppy1->get_device(); + if (BIT(data, 1)) floppy = m_floppy[0]->get_device(); + if (BIT(data, 2)) floppy = m_floppy[1]->get_device(); m_fdc->set_floppy(floppy); // bit 0: side select if (floppy) floppy->ss_w(BIT(data, 0)); - // bit 4: interrupt enabled - m_fdc_ie = BIT(data, 4); + // bit 4: motor enable (always set) // bit 5: density m_fdc->dden_w(BIT(data, 5)); @@ -216,13 +212,6 @@ void bbc_opus3_device::fred_w(offs_t offset, uint8_t data) } } -WRITE_LINE_MEMBER(bbc_opus3_device::fdc_drq_w) -{ - m_fdc_drq = state; - - m_slot->nmi_w((m_fdc_drq && m_fdc_ie) ? ASSERT_LINE : CLEAR_LINE); -} - uint8_t bbc_opus3_device::jim_r(offs_t offset) { if ((m_ramdisk_page << 8) < m_ramdisk->size()) diff --git a/src/devices/bus/bbc/1mhzbus/opus3.h b/src/devices/bus/bbc/1mhzbus/opus3.h index 7d287f1622c..895307c3bbf 100644 --- a/src/devices/bus/bbc/1mhzbus/opus3.h +++ b/src/devices/bus/bbc/1mhzbus/opus3.h @@ -47,15 +47,10 @@ protected: private: DECLARE_FLOPPY_FORMATS(floppy_formats); - DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); - required_device<ram_device> m_ramdisk; required_device<wd1770_device> m_fdc; - required_device<floppy_connector> m_floppy0; - optional_device<floppy_connector> m_floppy1; + required_device_array<floppy_connector, 2> m_floppy; - int m_fdc_ie; - int m_fdc_drq; uint16_t m_ramdisk_page; }; |