summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2021-01-31 12:35:36 +0100
committer Olivier Galibert <galibert@pobox.com>2021-01-31 19:15:16 +0100
commit901fe7d7a29d54bea4e70768a5a04a1083b75832 (patch)
tree1d07bd0dd5db44927a33f36c6c3b82630920088d
parent9bb34aec209c547e56d90bdcfabf2e10c209f7d1 (diff)
iwm: remove disable_mon, move to floppy
-rw-r--r--src/devices/imagedev/floppy.cpp8
-rw-r--r--src/devices/imagedev/floppy.h3
-rw-r--r--src/devices/machine/iwm.cpp20
-rw-r--r--src/devices/machine/iwm.h7
-rw-r--r--src/mame/drivers/apple2gs.cpp2
-rw-r--r--src/mame/drivers/mac.cpp2
-rw-r--r--src/mame/drivers/mac128.cpp2
7 files changed, 22 insertions, 22 deletions
diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp
index e4634147843..65d3691b8fd 100644
--- a/src/devices/imagedev/floppy.cpp
+++ b/src/devices/imagedev/floppy.cpp
@@ -2502,7 +2502,7 @@ void mac_floppy_device::seek_phase_w(int phases)
case 0x2: // Motor on
logerror("cmd motor on\n");
- mon_w(0);
+ floppy_image_device::mon_w(0);
break;
case 0x3: // End eject
@@ -2516,7 +2516,7 @@ void mac_floppy_device::seek_phase_w(int phases)
case 0x6: // Motor off
logerror("cmd motor off\n");
- mon_w(1);
+ floppy_image_device::mon_w(1);
break;
case 0x7: // Start eject
@@ -2567,6 +2567,10 @@ void mac_floppy_device::track_changed()
set_rpm(new_rpm);
}
+void mac_floppy_device::mon_w(int)
+{
+ // Motor control is through commands
+}
oa_d34v_device::oa_d34v_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mac_floppy_device(mconfig, OAD34V, tag, owner, clock)
{
diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h
index ce83d7b4839..d0832d45fd2 100644
--- a/src/devices/imagedev/floppy.h
+++ b/src/devices/imagedev/floppy.h
@@ -98,7 +98,7 @@ public:
std::vector<uint32_t> &get_buffer() { return image->get_buffer(cyl, ss, subcyl); }
int get_cyl() { return cyl; }
- void mon_w(int state);
+ virtual void mon_w(int state);
bool ready_r();
void set_ready(bool state);
double get_pos();
@@ -280,6 +280,7 @@ public:
virtual ~mac_floppy_device() = default;
virtual bool wpt_r() override;
+ virtual void mon_w(int) override;
virtual void seek_phase_w(int phases) override;
virtual const char *image_interface() const noexcept override { return "floppy_3_5"; }
diff --git a/src/devices/machine/iwm.cpp b/src/devices/machine/iwm.cpp
index e4b5388f8c3..121e70645f9 100644
--- a/src/devices/machine/iwm.cpp
+++ b/src/devices/machine/iwm.cpp
@@ -13,11 +13,10 @@
DEFINE_DEVICE_TYPE(IWM, iwm_device, "iwm", "Apple IWM floppy controller")
-iwm_device::iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t q3_clock, bool disable_mon) :
+iwm_device::iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t q3_clock) :
applefdintf_device(mconfig, IWM, tag, owner, clock),
m_floppy(nullptr),
- m_q3_clock(q3_clock),
- m_disable_mon(disable_mon)
+ m_q3_clock(q3_clock)
{
m_q3_fclk_ratio = q3_clock ? double(clock)/double(q3_clock) : 0; // ~0.25
m_fclk_q3_ratio = q3_clock ? double(q3_clock)/double(clock) : 0; // ~4
@@ -86,7 +85,7 @@ void iwm_device::device_timer(emu_timer &, device_timer_id, int, void *)
if(m_active == MODE_DELAY) {
flush_write();
m_active = MODE_IDLE;
- if(m_floppy && !m_disable_mon)
+ if(m_floppy)
m_floppy->mon_w(true);
m_devsel_cb(0);
m_status &= ~0x20;
@@ -101,10 +100,10 @@ void iwm_device::set_floppy(floppy_image_device *floppy)
sync();
- if(m_floppy && (m_control & 0x10) && !m_disable_mon)
+ if(m_floppy && (m_control & 0x10))
m_floppy->mon_w(true);
m_floppy = floppy;
- if(m_floppy && (m_control & 0x10) && !m_disable_mon)
+ if(m_floppy && (m_control & 0x10))
m_floppy->mon_w(false);
update_phases();
}
@@ -167,7 +166,7 @@ u8 iwm_device::control(int offset, u8 data)
if(m_control & 0x10) {
m_active = MODE_ACTIVE;
m_status |= 0x20;
- if(m_floppy && !m_disable_mon)
+ if(m_floppy)
m_floppy->mon_w(false);
} else {
if(m_mode & 0x04) {
@@ -175,7 +174,7 @@ u8 iwm_device::control(int offset, u8 data)
m_active = MODE_IDLE;
m_status &= ~0x20;
m_whd &= ~0x40;
- if(m_floppy && !m_disable_mon)
+ if(m_floppy)
m_floppy->mon_w(true);
} else {
m_devsel_cb(m_control & 0x20 ? 2 : 1);
@@ -215,7 +214,7 @@ u8 iwm_device::control(int offset, u8 data)
m_rw = MODE_IDLE;
}
- if(1) {
+ if(0) {
u8 s = m_control & 0xc0;
const char *slot = "?";
if(s == 0x00 && !m_active)
@@ -384,7 +383,6 @@ void iwm_device::sync()
if(is_sync()) {
if(m_rsh >= 0x80) {
m_data = m_rsh;
- logerror("DATAR %02x\n", m_data);
if(m_data == 0xfc)
machine().debug_break();
m_rsh = 0;
@@ -396,7 +394,6 @@ void iwm_device::sync()
} else if(m_rsh >= 0x80) {
m_data = m_rsh;
- logerror("DATAR %02x\n", m_data);
if(m_data == 0xfc)
machine().debug_break();
m_rsh = 0;
@@ -453,7 +450,6 @@ void iwm_device::sync()
m_rw_state = S_IDLE;
m_last_sync = next_sync;
} else {
- logerror("DATAW %02x\n", m_data);
m_wsh = m_data;
m_rw_state = SW_WINDOW_MIDDLE;
m_whd |= 0x80;
diff --git a/src/devices/machine/iwm.h b/src/devices/machine/iwm.h
index 49b9c432723..d3c2350d446 100644
--- a/src/devices/machine/iwm.h
+++ b/src/devices/machine/iwm.h
@@ -22,9 +22,9 @@ class iwm_device: public applefdintf_device
{
public:
// construction/destruction
- iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t q3_clock = 0, bool disable_mon = false);
- iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, XTAL q3_clock, bool disable_mon = false) :
- iwm_device(mconfig, tag, owner, clock, q3_clock.value(), disable_mon) {}
+ iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t q3_clock = 0);
+ iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, XTAL q3_clock) :
+ iwm_device(mconfig, tag, owner, clock, q3_clock.value()) {}
virtual u8 read(offs_t offset) override;
virtual void write(offs_t offset, u8 data) override;
@@ -67,7 +67,6 @@ private:
int m_active, m_rw, m_rw_state;
u8 m_data, m_whd, m_mode, m_status, m_control, m_rw_bit_count;
u8 m_rsh, m_wsh;
- bool m_disable_mon;
u8 control(int offset, u8 data);
u64 time_to_cycles(const attotime &tm) const;
diff --git a/src/mame/drivers/apple2gs.cpp b/src/mame/drivers/apple2gs.cpp
index a7fc39e2df2..92e5862e960 100644
--- a/src/mame/drivers/apple2gs.cpp
+++ b/src/mame/drivers/apple2gs.cpp
@@ -5055,7 +5055,7 @@ void apple2gs_state::apple2gs(machine_config &config)
A2BUS_SLOT(config, "sl7", m_a2bus, apple2_cards, nullptr);
#if NEW_IWM
- IWM(config, m_iwm, A2GS_7M, 1021800*2, true);
+ IWM(config, m_iwm, A2GS_7M, 1021800*2);
m_iwm->phases_cb().set(FUNC(apple2gs_state::phases_w));
m_iwm->sel35_cb().set(FUNC(apple2gs_state::sel35_w));
m_iwm->devsel_cb().set(FUNC(apple2gs_state::devsel_w));
diff --git a/src/mame/drivers/mac.cpp b/src/mame/drivers/mac.cpp
index 13f7762d491..b096c595d6c 100644
--- a/src/mame/drivers/mac.cpp
+++ b/src/mame/drivers/mac.cpp
@@ -738,7 +738,7 @@ void mac_state::add_base_devices(machine_config &config, bool rtc, int woz_versi
#if NEW_SWIM
switch (woz_version) {
case 0:
- IWM(config, m_fdc, C15M, 0, true);
+ IWM(config, m_fdc, C15M);
break;
case 1:
SWIM1(config, m_fdc, C15M);
diff --git a/src/mame/drivers/mac128.cpp b/src/mame/drivers/mac128.cpp
index 1a6d97b8237..a1e5a25e914 100644
--- a/src/mame/drivers/mac128.cpp
+++ b/src/mame/drivers/mac128.cpp
@@ -1024,7 +1024,7 @@ void mac128_state::mac512ke(machine_config &config)
/* devices */
RTC3430042(config, m_rtc, 32.768_kHz_XTAL);
#if NEW_IWM
- IWM(config, m_iwm, C7M, 0, true);
+ IWM(config, m_iwm, C7M);
m_iwm->phases_cb().set(FUNC(mac128_state::phases_w));
m_iwm->sel35_cb().set(FUNC(mac128_state::sel35_w));
m_iwm->devsel_cb().set(FUNC(mac128_state::devsel_w));