mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
(MESS) correct capacity is logged when drive parameters are set (nw)
This commit is contained in:
parent
2e5175a35e
commit
34835ae4a5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user