@@ -254,8 +254,7 @@ Pc98DiskReadLogicalSectorsLBA(
254254
255255 /* If we get here then the read failed */
256256 DiskError ("Disk Read Failed in LBA mode" , RegsOut .b .ah );
257- ERR ("Disk Read Failed in LBA mode: %x (%s) "
258- "(DriveNumber: 0x%x SectorNumber: %I64u SectorCount: %u)\n" ,
257+ ERR ("Disk Read Failed in LBA mode: %x (%s) (DriveNumber: 0x%x SectorNumber: %I64u SectorCount: %u)\n" ,
259258 RegsOut .b .ah , DiskGetErrorCodeString (RegsOut .b .ah ),
260259 DiskDrive -> DaUa , SectorNumber , SectorCount );
261260
@@ -333,13 +332,10 @@ Pc98DiskReadLogicalSectorsCHS(
333332 * CF - set on error, clear if successful
334333 * AH - status
335334 */
336- RegsIn .b .al = DiskDrive -> DaUa ;
337335 RegsIn .b .ah = 0x56 ; /* With SEEK, and use double-density format (MFM) */
338336 RegsIn .w .bx = DriveGeometry .BytesPerSector * (UCHAR )NumberOfSectorsToRead ;
339337 RegsIn .b .cl = PhysicalTrack & 0xFFFF ;
340338 RegsIn .b .ch = BytesPerSectorToSectorLengthCode (DriveGeometry .BytesPerSector );
341- RegsIn .b .dl = PhysicalSector ;
342- RegsIn .b .dh = PhysicalHead ;
343339 }
344340 else
345341 {
@@ -358,13 +354,13 @@ Pc98DiskReadLogicalSectorsCHS(
358354 * CF - set on error, clear if successful
359355 * AH - status
360356 */
361- RegsIn .b .al = DiskDrive -> DaUa ;
362357 RegsIn .b .ah = 0x06 ;
363358 RegsIn .w .bx = DriveGeometry .BytesPerSector * (UCHAR )NumberOfSectorsToRead ;
364359 RegsIn .w .cx = PhysicalTrack & 0xFFFF ;
365- RegsIn .b .dl = PhysicalSector ;
366- RegsIn .b .dh = PhysicalHead ;
367360 }
361+ RegsIn .b .al = DiskDrive -> DaUa ;
362+ RegsIn .b .dl = PhysicalSector ;
363+ RegsIn .b .dh = PhysicalHead ;
368364 RegsIn .w .es = (USHORT )(((ULONG_PTR )Buffer ) >> 4 );
369365 RegsIn .w .bp = ((ULONG_PTR )Buffer ) & 0x0F ;
370366
@@ -386,8 +382,7 @@ Pc98DiskReadLogicalSectorsCHS(
386382 if (RetryCount >= 3 )
387383 {
388384 DiskError ("Disk Read Failed in CHS mode, after retrying 3 times" , RegsOut .b .ah );
389- ERR ("Disk Read Failed in CHS mode, after retrying 3 times: %x (%s) "
390- "(DriveNumber: 0x%x SectorNumber: %I64u SectorCount: %u)\n" ,
385+ ERR ("Disk Read Failed in CHS mode, after retrying 3 times: %x (%s) (DriveNumber: 0x%x SectorNumber: %I64u SectorCount: %u)\n" ,
391386 RegsOut .b .ah , DiskGetErrorCodeString (RegsOut .b .ah ),
392387 DiskDrive -> DaUa , SectorNumber , SectorCount );
393388 return FALSE;
@@ -443,9 +438,7 @@ InitScsiDrive(
443438 /* Other devices */
444439 else if (ScsiParameters != 0 )
445440 {
446- UCHAR DeviceType ;
447-
448- DeviceType = ScsiParameters & 0x1F ;
441+ UCHAR DeviceType = ScsiParameters & 0x1F ;
449442 switch (DeviceType )
450443 {
451444 case 0x05 :
@@ -639,9 +632,14 @@ InitIdeDrive(
639632 DiskDrive -> Flags |= DRIVE_FLAGS_LBA ;
640633
641634 if (DeviceUnit -> Flags & ATA_DEVICE_ATAPI )
635+ {
642636 DiskDrive -> Type = DRIVE_TYPE_CDROM ;
637+ DiskDrive -> Flags |= DRIVE_FLAGS_REMOVABLE ;
638+ }
643639 else
640+ {
644641 DiskDrive -> Type = DRIVE_TYPE_HDD ;
642+ }
645643
646644 TRACE ("InitIdeDrive(0x%x) returned:\n"
647645 "Cylinders : 0x%x\n"
@@ -759,8 +757,7 @@ Pc98DiskReadLogicalSectors(
759757{
760758 PPC98_DISK_DRIVE DiskDrive ;
761759
762- TRACE ("Pc98DiskReadLogicalSectors() "
763- "DriveNumber: 0x%x SectorNumber: %I64u SectorCount: %u Buffer: 0x%x\n" ,
760+ TRACE ("Pc98DiskReadLogicalSectors() DriveNumber: 0x%x SectorNumber: %I64u SectorCount: %u Buffer: 0x%x\n" ,
764761 DriveNumber , SectorNumber , SectorCount , Buffer );
765762
766763 /* 16-bit BIOS addressing limitation */
0 commit comments