From 4f4a9b1a33ea5e3ace654abbf3532247fdac796a Mon Sep 17 00:00:00 2001 From: David Kuder Date: Sat, 11 Jun 2022 11:09:01 -0400 Subject: [PATCH] Flexible Disk support --- src/general.ino | 13 +++++++++++++ src/scsi_defs.h | 1 + 2 files changed, 14 insertions(+) diff --git a/src/general.ino b/src/general.ino index a8796d5..fec471d 100755 --- a/src/general.ino +++ b/src/general.ino @@ -409,6 +409,19 @@ void ModeSenseCommandHandler() m_responsebuffer[len + 3] = bc >> 8; m_responsebuffer[len + 4] = bc; m_responsebuffer[len + 5] = 1; //Number of heads + } + len += 24; + break; + case MODEPAGE_FLEXIBLE_GEOMETRY: + { + m_responsebuffer[len + 0] = MODEPAGE_FLEXIBLE_GEOMETRY; //Page code + m_responsebuffer[len + 1] = 0x1E; // Page length + m_responsebuffer[len + 2] = 0x03; // Transfer rate 1mbit/s (MSB) + m_responsebuffer[len + 3] = 0xE8; // Transfer rate 1mbit/s (LSB) + m_responsebuffer[len + 4] = 16; // Number of heads + m_responsebuffer[len + 5] = 18; // Sectors per track + m_responsebuffer[len + 6] = 0x20; // Data bytes per sector (MSB) + m_responsebuffer[len + 6] = 0x00; // Data bytes per sector (LSB) len += 24; } break; diff --git a/src/scsi_defs.h b/src/scsi_defs.h index 2a5962b..948e0da 100755 --- a/src/scsi_defs.h +++ b/src/scsi_defs.h @@ -7,6 +7,7 @@ #define MODEPAGE_DCRC_PARAMETERS 0x02 #define MODEPAGE_FORMAT_PARAMETERS 0x03 #define MODEPAGE_RIGID_GEOMETRY 0x04 +#define MODEPAGE_FLEXIBLE_GEOMETRY 0x05 #define MODEPAGE_APPLE 0x30 #define MODEPAGE_ALL_PAGES 0x3F