diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2020-04-02 17:45:33 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2020-04-02 17:45:40 -0400 |
commit | 076f4af7531416a13e028577c66f69dfdc40fd3b (patch) | |
tree | fd165e86b35df21727630e5ed994b7f50f1a4794 /src | |
parent | 72b45cbb01b346e4c935780efb6f74aad8030557 (diff) |
dgnalpha: Fix disk boot by removing old hack to ignore first FDC IRQ
Diffstat (limited to 'src')
-rw-r--r-- | src/mame/includes/dgnalpha.h | 12 | ||||
-rw-r--r-- | src/mame/machine/dgnalpha.cpp | 26 |
2 files changed, 9 insertions, 29 deletions
diff --git a/src/mame/includes/dgnalpha.h b/src/mame/includes/dgnalpha.h index eea5ddf2af0..d5bb5b3078f 100644 --- a/src/mame/includes/dgnalpha.h +++ b/src/mame/includes/dgnalpha.h @@ -44,10 +44,7 @@ public: m_pia_2(*this, PIA2_TAG), m_ay8912(*this, AY8912_TAG), m_fdc(*this, WD2797_TAG), - m_floppy0(*this, WD2797_TAG ":0"), - m_floppy1(*this, WD2797_TAG ":1"), - m_floppy2(*this, WD2797_TAG ":2"), - m_floppy3(*this, WD2797_TAG ":3") + m_floppy(*this, WD2797_TAG ":%u", 0U) { } @@ -84,12 +81,7 @@ private: required_device<pia6821_device> m_pia_2; required_device<ay8912_device> m_ay8912; required_device<wd2797_device> m_fdc; - required_device<floppy_connector> m_floppy0; - required_device<floppy_connector> m_floppy1; - required_device<floppy_connector> m_floppy2; - required_device<floppy_connector> m_floppy3; - - uint8_t m_just_reset; + required_device_array<floppy_connector, 4> m_floppy; /* modem */ uint8_t modem_r(offs_t offset); diff --git a/src/mame/machine/dgnalpha.cpp b/src/mame/machine/dgnalpha.cpp index 5021549f9ba..c13884e227c 100644 --- a/src/mame/machine/dgnalpha.cpp +++ b/src/mame/machine/dgnalpha.cpp @@ -77,7 +77,6 @@ keeping track of it in a variable in the driver. void dragon_alpha_state::device_start(void) { dragon_state::device_start(); - save_item(NAME(m_just_reset)); } @@ -89,7 +88,6 @@ void dragon_alpha_state::device_start(void) void dragon_alpha_state::device_reset(void) { dragon_state::device_reset(); - m_just_reset = 1; } @@ -317,19 +315,16 @@ WRITE8_MEMBER( dragon_alpha_state::psg_porta_write ) floppy_image_device *floppy = nullptr; - if (BIT(data, 0)) floppy = m_floppy0->get_device(); - if (BIT(data, 1)) floppy = m_floppy1->get_device(); - if (BIT(data, 2)) floppy = m_floppy2->get_device(); - if (BIT(data, 3)) floppy = m_floppy3->get_device(); + for (int n = 0; n < 4; n++) + if (BIT(data, n)) + floppy = m_floppy[n]->get_device(); m_fdc->set_floppy(floppy); // todo: turning the motor on with bit 4 isn't giving the drive enough // time to spin up, how does it work in hardware? - if (m_floppy0->get_device()) m_floppy0->get_device()->mon_w(0); - if (m_floppy1->get_device()) m_floppy1->get_device()->mon_w(0); - if (m_floppy2->get_device()) m_floppy2->get_device()->mon_w(0); - if (m_floppy3->get_device()) m_floppy3->get_device()->mon_w(0); + for (auto &f : m_floppy) + if (f->get_device()) f->get_device()->mon_w(0); m_fdc->dden_w(BIT(data, 5)); } @@ -347,15 +342,8 @@ WRITE_LINE_MEMBER( dragon_alpha_state::fdc_intrq_w ) { if (state) { - if (m_just_reset) - { - m_just_reset = 0; - } - else - { - if (m_pia_2->ca2_output_z()) - m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); - } + if (m_pia_2->ca2_output_z()) + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } else { |