Add better floppy MODE page support

This commit is contained in:
Michael McMaster 2019-03-02 15:37:17 +10:00
parent bc8faaea31
commit 3b4a7605c5
2 changed files with 40 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2019XXXX 4.9.X
- Improve XEBEC controller support
- Add Flexible Disk Drive Geometry SCSI MODE page
20180926 4.8.1
- Fix bug when writing with multiple SCSI devices on the chain

View File

@ -120,6 +120,35 @@ static const uint8 RigidDiskDriveGeometry[] =
0x00, 0x00 // Reserved
};
static const uint8 FlexibleDiskDriveGeometry[] =
{
0x05, // Page code
0x1E, // Page length
0x01, 0xF4, // Transfer Rate (500kbits)
0x01, // heads
18, // sectors per track
0x20,0x00, // bytes per sector
0x00, 80, // Cylinders
0x00, 0x80, // Write-precomp
0x00, 0x80, // reduced current,
0x00, 0x00, // Drive step rate
0x00, // pulse width
0x00, 0x00, // Head settle delay
0x00, // motor on delay
0x00, // motor off delay
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00
};
static const uint8 RigidDiskDriveGeometry_SCSI1[] =
{
0x04, // Page code
@ -439,6 +468,13 @@ static void doModeSense(
}
}
if (pageCode == 0x05 || pageCode == 0x3F)
{
pageFound = 1;
pageIn(pc, idx, FlexibleDiskDriveGeometry, sizeof(FlexibleDiskDriveGeometry));
idx += sizeof(FlexibleDiskDriveGeometry);
}
// DON'T output the following pages for SCSI1 hosts. They get upset when
// we have more data to send than the allocation length provided.
// (ie. Try not to output any more pages below this comment)