Merge branch 'master' of github.com:86Box/86Box into tc1995
This commit is contained in:
@@ -737,8 +737,8 @@ cdrom_read_disc_info_toc(cdrom_t *dev, unsigned char *b, unsigned char track, in
|
||||
static int
|
||||
track_type_is_valid(uint8_t id, int type, int flags, int audio, int mode2)
|
||||
{
|
||||
if (!(flags & 0x70)) { /* 0x00/0x08/0x80/0x88 are illegal modes */
|
||||
cdrom_log("CD-ROM %i: [Any Mode] 0x00/0x08/0x80/0x88 are illegal modes\n", id);
|
||||
if (!(flags & 0x70) && (flags & 0xf8)) { /* 0x08/0x80/0x88 are illegal modes */
|
||||
cdrom_log("CD-ROM %i: [Any Mode] 0x08/0x80/0x88 are illegal modes\n", id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -1629,12 +1629,16 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb)
|
||||
if ((cdb[9] & 0xf8) == 0x08) {
|
||||
/* 0x08 is an illegal mode */
|
||||
scsi_cdrom_invalid_field(dev);
|
||||
break;
|
||||
return;
|
||||
}
|
||||
|
||||
/* If all the flag bits are cleared, then treat it as a non-data command. */
|
||||
if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) == 0x00))
|
||||
dev->sector_len = 0;
|
||||
else if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) != 0x00)) {
|
||||
scsi_cdrom_invalid_field(dev);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GPCMD_READ_CD_OLD:
|
||||
case GPCMD_READ_CD:
|
||||
@@ -1647,12 +1651,16 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb)
|
||||
if ((cdb[9] & 0xf8) == 0x08) {
|
||||
/* 0x08 is an illegal mode */
|
||||
scsi_cdrom_invalid_field(dev);
|
||||
break;
|
||||
return;
|
||||
}
|
||||
|
||||
/* If all the flag bits are cleared, then treat it as a non-data command. */
|
||||
if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) == 0x00))
|
||||
dev->sector_len = 0;
|
||||
else if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) != 0x00)) {
|
||||
scsi_cdrom_invalid_field(dev);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user