summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2021-01-11 23:32:54 +0100
committer Olivier Galibert <galibert@pobox.com>2021-01-11 23:33:03 +0100
commitc5fe64666af97d5029af5e1707257b9258218faf (patch)
tree084bf4483aa98abd5544105fe7968e3437368ff5 /src/devices/machine
parent6611ce99a027e37ecc0cb01e9efebc44d898c07c (diff)
mac/swim2: Add apple drivers and associated communications
Diffstat (limited to 'src/devices/machine')
-rwxr-xr-xsrc/devices/machine/applefdintf.cpp3
-rwxr-xr-xsrc/devices/machine/applefdintf.h2
-rw-r--r--src/devices/machine/swim2.cpp21
3 files changed, 14 insertions, 12 deletions
diff --git a/src/devices/machine/applefdintf.cpp b/src/devices/machine/applefdintf.cpp
index 3b1590720c1..8d859601c6b 100755
--- a/src/devices/machine/applefdintf.cpp
+++ b/src/devices/machine/applefdintf.cpp
@@ -31,7 +31,8 @@ void applefdintf_device::floppies_525(device_slot_interface &device)
void applefdintf_device::floppies_35(device_slot_interface &device)
{
- device.option_add("35", FLOPPY_35_HD);
+ device.option_add("35dd", MFD51W);
+ device.option_add("35hd", MFD75W);
}
applefdintf_device::applefdintf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
diff --git a/src/devices/machine/applefdintf.h b/src/devices/machine/applefdintf.h
index 19095e875cc..ad8883765eb 100755
--- a/src/devices/machine/applefdintf.h
+++ b/src/devices/machine/applefdintf.h
@@ -76,7 +76,7 @@ public:
// 3.5
static void floppies_35(device_slot_interface &device);
template<typename T> static void add_35(machine_config &config, T &floppy) {
- FLOPPY_CONNECTOR(config, floppy, floppies_35, "35", formats_35);
+ FLOPPY_CONNECTOR(config, floppy, floppies_35, "35dd", formats_35);
}
template<typename T> static void add_35_nc(machine_config &config, T &floppy) {
FLOPPY_CONNECTOR(config, floppy, floppies_35, "", formats_35);
diff --git a/src/devices/machine/swim2.cpp b/src/devices/machine/swim2.cpp
index 992702bf782..9b9ff9fac60 100644
--- a/src/devices/machine/swim2.cpp
+++ b/src/devices/machine/swim2.cpp
@@ -68,12 +68,9 @@ void swim2_device::set_floppy(floppy_image_device *floppy)
if(m_floppy == floppy)
return;
- if(m_floppy)
- m_floppy->mon_w(true);
m_floppy = floppy;
- if(m_mode & 0x80)
- m_floppy->mon_w(false);
update_phases();
+ m_hdsel_cb((m_mode >> 5) & 1);
}
floppy_image_device *swim2_device::get_floppy() const
@@ -107,14 +104,13 @@ void swim2_device::flush_write(u64 when)
void swim2_device::show_mode() const
{
- logerror("mode%s %s hdsel=%c %c%s %c%c%s\n",
+ logerror("mode%s hdsel=%c %c%s %c%c%s\n",
m_mode & 0x80 ? " motoron" : "",
- m_mode & 0x40 ? "ism" : "iwm",
m_mode & 0x20 ? '1' : '0',
m_mode & 0x10 ? 'w' : 'r',
m_mode & 0x08 ? " action" : "",
- m_mode & 0x04 ? 'a' : '-',
- m_mode & 0x02 ? 'b' : '-',
+ m_mode & 0x04 ? 'b' : '-',
+ m_mode & 0x02 ? 'a' : '-',
m_mode & 0x01 ? " clear" : "");
}
@@ -246,7 +242,7 @@ void swim2_device::write(offs_t offset, u8 data)
case 5: // setup
m_setup = data;
- m_sel35_cb(m_setup & 0x02);
+ m_sel35_cb((m_setup >> 1) & 1);
logerror("setup write=%s %s test=%s %s %s 3.5=%s %s\n",
m_setup & 0x40 ? "gcr" : "mfm",
m_setup & 0x20 ? "ibm" : "apple",
@@ -277,6 +273,11 @@ void swim2_device::write(offs_t offset, u8 data)
if(m_mode & 0x01)
fifo_clear();
+ if((m_mode ^ prev_mode) & 0x06)
+ m_devsel_cb(m_mode & 0x80 ? (m_mode >> 1) & 3 : 0);
+ if((m_mode ^ prev_mode) & 0x20)
+ m_hdsel_cb((m_mode >> 5) & 1);
+
if((m_mode & 0x18) == 0x18 && ((prev_mode & 0x18) != 0x18)) {
// Entering write mode
m_current_bit = 0;
@@ -353,7 +354,7 @@ void swim2_device::sync()
// We count in half-cycles but only toggle write on full cycles
u32 cycles = (next_sync - m_last_sync) << 1;
- // logerror("ACTIVE %s %d-%d (%d)\n", m_mode & 0x10 ? "write" : "read", m_last_sync, next_sync, cycles);
+ logerror("ACTIVE %s %d-%d (%d)\n", m_mode & 0x10 ? "write" : "read", m_last_sync, next_sync, cycles);
while(cycles) {
// logerror("half cycles avail %d needed %d\n", cycles, m_half_cycles_before_change);