IDE DMA: Properly handle partial transfers, fixes ATAPI DMA in Windows 98 SE.

This commit is contained in:
OBattler
2025-03-17 20:58:15 +01:00
parent 8fd299f2d7
commit 556c74c159
6 changed files with 30 additions and 19 deletions

View File

@@ -1096,6 +1096,8 @@ scsi_cdrom_read_blocks(scsi_cdrom_t *dev)
int msf = 0;
int type = dev->sector_type;
int flags = dev->sector_flags;
int num = (dev->drv->bus_type == CDROM_BUS_SCSI) ?
dev->requested_blocks : 1;
switch (dev->current_cdb[0]) {
case GPCMD_READ_CD_MSF_OLD:
@@ -1128,7 +1130,7 @@ scsi_cdrom_read_blocks(scsi_cdrom_t *dev)
}
scsi_cdrom_log(dev->log, "Reading %i blocks starting from %i...\n",
dev->requested_blocks, dev->sector_pos);
num, dev->sector_pos);
ret = scsi_cdrom_read_data(dev, msf, type, flags, dev->vendor_type);