summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2021-05-25 18:49:52 +0200
committer Olivier Galibert <galibert@pobox.com>2021-05-25 19:49:25 +0200
commit261a87015c34b5759c33649970d1a7e3dfb6a3e7 (patch)
tree4518f732616a441cb46c4a9662ff186fd020b7c2
parent858402f0a2f683851572477904be0be9d7e49472 (diff)
floppy: Allow the vtech floppy with its 32.2us gaps read back unscathed
-rw-r--r--src/devices/bus/vtech/memexp/floppy.cpp3
-rw-r--r--src/devices/imagedev/floppy.cpp29
-rw-r--r--src/devices/imagedev/floppy.h2
3 files changed, 31 insertions, 3 deletions
diff --git a/src/devices/bus/vtech/memexp/floppy.cpp b/src/devices/bus/vtech/memexp/floppy.cpp
index e1ad9939a42..e18cf7fd186 100644
--- a/src/devices/bus/vtech/memexp/floppy.cpp
+++ b/src/devices/bus/vtech/memexp/floppy.cpp
@@ -47,7 +47,7 @@ const tiny_rom_entry *vtech_floppy_controller_device::device_rom_region() const
static void laser_floppies(device_slot_interface &device)
{
- device.option_add("525", FLOPPY_525_SSSD);
+ device.option_add("525", FLOPPY_525_VTECH);
}
void vtech_floppy_controller_device::device_add_mconfig(machine_config &config)
@@ -152,7 +152,6 @@ void vtech_floppy_controller_device::latch_w(uint8_t data)
m_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb());
}
if(newflop) {
- newflop->set_rpm(85);
newflop->mon_w(0);
newflop->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&vtech_floppy_controller_device::index_callback, this));
m_current_cyl = newflop->get_cyl() << 1;
diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp
index 1a13aa8ec74..09f61ea17c9 100644
--- a/src/devices/imagedev/floppy.cpp
+++ b/src/devices/imagedev/floppy.cpp
@@ -59,6 +59,7 @@ DEFINE_DEVICE_TYPE(FLOPPY_35_ED, floppy_35_ed, "floppy_35_ed", "3.5\" exte
// generic 5.25" drives
DEFINE_DEVICE_TYPE(FLOPPY_525_SSSD_35T, floppy_525_sssd_35t, "floppy_525_sssd_35t", "5.25\" single-sided single density 35-track floppy drive")
DEFINE_DEVICE_TYPE(FLOPPY_525_SD_35T, floppy_525_sd_35t, "floppy_525_sd_35t", "5.25\" double-sided single density 35-track floppy drive")
+DEFINE_DEVICE_TYPE(FLOPPY_525_VTECH, floppy_525_vtech, "floppy_525_vtech", "5.25\" single-sided single density VTECH floppy drive")
DEFINE_DEVICE_TYPE(FLOPPY_525_SSSD, floppy_525_sssd, "floppy_525_sssd", "5.25\" single-sided single density floppy drive")
DEFINE_DEVICE_TYPE(FLOPPY_525_SD, floppy_525_sd, "floppy_525_sd", "5.25\" single density floppy drive")
DEFINE_DEVICE_TYPE(FLOPPY_525_SSDD, floppy_525_ssdd, "floppy_525_ssdd", "5.25\" single-sided double density floppy drive")
@@ -261,6 +262,7 @@ floppy_image_device::floppy_image_device(const machine_config &mconfig, device_t
revolution_count(0),
cyl(0),
subcyl(0),
+ amplifier_freakout_time(attotime::from_usec(16)),
image_dirty(false),
track_dirty(false),
ready_counter(0),
@@ -1280,7 +1282,7 @@ void floppy_image_device::cache_weakness_setup()
return;
}
- cache_weak = cache_end_time.is_never() || (cache_end_time - cache_start_time >= attotime::from_usec(16));
+ cache_weak = cache_end_time.is_never() || (cache_end_time - cache_start_time >= amplifier_freakout_time);
if(!cache_weak) {
cache_weak_start = attotime::never;
return;
@@ -2102,6 +2104,31 @@ void floppy_525_sd_35t::setup_characteristics()
set_rpm(300);
variants.push_back(floppy_image::SSSD);
+ variants.push_back(floppy_image::DSSD);
+}
+
+//-------------------------------------------------
+// 5.25" single-sided single density, VTECH edition
+//-------------------------------------------------
+
+floppy_525_vtech::floppy_525_vtech(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ floppy_image_device(mconfig, FLOPPY_525_VTECH, tag, owner, clock)
+{
+ amplifier_freakout_time = attotime::from_usec(64);
+}
+
+floppy_525_vtech::~floppy_525_vtech()
+{
+}
+
+void floppy_525_vtech::setup_characteristics()
+{
+ form_factor = floppy_image::FF_525;
+ tracks = 40;
+ sides = 1;
+ set_rpm(85);
+
+ variants.push_back(floppy_image::SSSD);
}
//-------------------------------------------------
diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h
index 2be061acc83..f3cb767d6aa 100644
--- a/src/devices/imagedev/floppy.h
+++ b/src/devices/imagedev/floppy.h
@@ -231,6 +231,7 @@ protected:
/* Current floppy zone cache */
attotime cache_start_time, cache_end_time, cache_weak_start;
+ attotime amplifier_freakout_time;
int cache_index;
u32 cache_entry;
bool cache_weak;
@@ -316,6 +317,7 @@ DECLARE_FLOPPY_IMAGE_DEVICE(FLOPPY_35_HD, floppy_35_hd, "floppy_3_
DECLARE_FLOPPY_IMAGE_DEVICE(FLOPPY_35_ED, floppy_35_ed, "floppy_3_5")
DECLARE_FLOPPY_IMAGE_DEVICE(FLOPPY_525_SSSD_35T, floppy_525_sssd_35t, "floppy_5_25")
DECLARE_FLOPPY_IMAGE_DEVICE(FLOPPY_525_SD_35T, floppy_525_sd_35t, "floppy_5_25")
+DECLARE_FLOPPY_IMAGE_DEVICE(FLOPPY_525_VTECH, floppy_525_vtech, "floppy_5_25")
DECLARE_FLOPPY_IMAGE_DEVICE(FLOPPY_525_SSSD, floppy_525_sssd, "floppy_5_25")
DECLARE_FLOPPY_IMAGE_DEVICE(FLOPPY_525_SD, floppy_525_sd, "floppy_5_25")
DECLARE_FLOPPY_IMAGE_DEVICE(FLOPPY_525_SSDD, floppy_525_ssdd, "floppy_5_25")