Skip to content

Commit d710c67

Browse files
committed
[FREELDR] Test
1 parent a398143 commit d710c67

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

boot/freeldr/freeldr/arch/i386/hwdisk.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
9090
GEOMETRY Geometry;
9191
ULONGLONG SectorOffset;
9292
ULONGLONG SectorCount;
93+
static INT PrintForce = 0;
9394

9495
if (DiskReadBufferSize == 0)
9596
{
@@ -141,6 +142,15 @@ DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
141142
if (!Context)
142143
return ENOMEM;
143144

145+
if (DriveType == CdromController && SectorSize != 2048)
146+
{
147+
if (!PrintForce) {
148+
printf("BIOS reports BytesPerSector = %d for CD-ROM, forcing 2048\n", SectorSize);
149+
StallExecutionProcessor(2e6);
150+
PrintForce = 1;
151+
}
152+
SectorSize = 2048;
153+
}
144154
Context->DriveNumber = DriveNumber;
145155
Context->IsFloppy = (DriveType == FloppyDiskPeripheral);
146156
Context->SectorSize = SectorSize;

0 commit comments

Comments
 (0)