Go straight to READ(12) rather than using READ CD emulation on new ATAPI drives
In the central data transfer step (DriverCode.s around line 450) there are up to 3 goes at doing the transfer, attempting to work around some problems in <unspecified model> Sony drive and Panasonic CD-571B. Others may be affected similarly. However, the very latest combined DVD/CD reader, eg. SATA attached SH-224DB/BEBE, have given up entirely with READ CD. In particular, they do not error it, nor are any bytes transferred to the buffer. This falls foul of CDFSSoftATAPI's 3 step approach, because the absence of an error is taken as success and the (junk RMA) block passed up to CDFS. Unfortunately because the model of Sony reader is not mentioned in the sources nor CVS history we can't do a string match on the model name. Instead, we now look at the reply to IDENTIFY and look for any declaring ATAPI-5 or later. ATAPI-5 was released in 2000, which definitely post dates the workaround by 4 or 5 years. hdr/IDEdefs: declare offset for IDENTIFY to the version fields. Module.s: hook out the version (being careful that pre ATAPI-4 don't have this field). Make a note in the DriveFlag if READ(12) is suspect vintage. Variables.s: reintroduce the DriveFlag in the HAL case DriverCode.s: free up a register to load DriveFlag into, look at the DriveFlag, skip straight to READ(12) on ATAPI-5 or later. Tested on Titanium. Fixes bogus "CDFS does not support that type of disc" with a simple ISO9660 formatted DVD, due to an untouched RMA block being parsed by CDFS. Version 1.43. Tagged as 'ATAPI-1_43'
Showing with 82 additions and 47 deletions