(MESS) correct capacity is logged when drive parameters are set (nw)

This commit is contained in:
smf- 2012-09-25 05:24:22 +00:00
parent 2e5175a35e
commit 34835ae4a5

View File

@ -274,9 +274,24 @@ void s1410_device::WriteData( UINT8 *data, int dataLength )
{
case S1410_CMD_INIT_DRIVE_PARAMS:
{
UINT16 tracks=((data[0]<<8)+data[1]);
int sectorsPerTrack = 0;
int bytesPerSector = GetSectorBytes();
switch( bytesPerSector )
{
case 256:
sectorsPerTrack = 32;
break;
case 512:
sectorsPerTrack = 17;
break;
}
UINT16 tracks = ((data[0]<<8)+data[1]);
UINT8 heads = data[2];
UINT32 capacity=(tracks * heads) * 17;
UINT32 capacity = tracks * heads * sectorsPerTrack * bytesPerSector;
logerror("S1410_CMD_INIT_DRIVE_PARAMS Tracks=%d, Heads=%d, Capacity=%d\n",tracks,heads,capacity);
}
break;