Source
...
Target
Commits (1)
  • Jeffrey Lee's avatar
    Disable DAP in CD_ReadAudio. Fix CD_PlayTrack. · ded9a9d5
    Jeffrey Lee authored
    Detail:
      c/driver - Disabled DAP in driver_ReadAudio() to avoid issues caused by drives which complain about it. Fixed driver_PlayTrack() to work properly when playing to the end of the track.
    Admin:
      Softload tested on Iyonix
      TS-H552 still a bit dodgy, but seems to mostly be due to bugs elsewhere
    
    
    Version 0.03. Tagged as 'SCSI-0_03'
    ded9a9d5
/* (0.02) /* (0.03)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 0.02 #define Module_MajorVersion_CMHG 0.03
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 26 Nov 2011 #define Module_Date_CMHG 10 Dec 2011
#define Module_MajorVersion "0.02" #define Module_MajorVersion "0.03"
#define Module_Version 2 #define Module_Version 3
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "26 Nov 2011" #define Module_Date "10 Dec 2011"
#define Module_ApplicationDate "26-Nov-11" #define Module_ApplicationDate "10-Dec-11"
#define Module_ComponentName "SCSI" #define Module_ComponentName "SCSI"
#define Module_ComponentPath "bsd/RiscOS/Sources/HWSupport/CD/SCSI" #define Module_ComponentPath "bsd/RiscOS/Sources/HWSupport/CD/SCSI"
#define Module_FullVersion "0.02" #define Module_FullVersion "0.03"
#define Module_HelpVersion "0.02 (26 Nov 2011)" #define Module_HelpVersion "0.03 (10 Dec 2011)"
#define Module_LibraryVersionInfo "0:2" #define Module_LibraryVersionInfo "0:3"
...@@ -777,12 +777,12 @@ static _kernel_oserror *driver_PlayTrack(uint32_t start,uint32_t end,const cdfs_ ...@@ -777,12 +777,12 @@ static _kernel_oserror *driver_PlayTrack(uint32_t start,uint32_t end,const cdfs_
/* Read the info of the last track */ /* Read the info of the last track */
if(end == PLAY_TO_END_OF_CD) if(end == PLAY_TO_END_OF_CD)
end = 0xaa; end = 0xaa;
else if(end > READTOCRESPONSE_LastTrack_Read(SCSIOp_MiscBuffer)) else if(start > READTOCRESPONSE_LastTrack_Read(SCSIOp_MiscBuffer))
return ERROR(NoSuchTrack); return ERROR(NoSuchTrack);
else if(end == READTOCRESPONSE_LastTrack_Read(SCSIOp_MiscBuffer)) else if(start == READTOCRESPONSE_LastTrack_Read(SCSIOp_MiscBuffer))
end = 0xaa; end = 0xaa;
else else
end++; end = start+1;
cdfs_trackinfo_t last; cdfs_trackinfo_t last;
e = driver_EnquireTrackInfo(end,&last,blk,retries); e = driver_EnquireTrackInfo(end,&last,blk,retries);
if(e) if(e)
...@@ -923,7 +923,12 @@ static _kernel_oserror *driver_ReadAudio(AddrMode mode,uint32_t start,uint32_t l ...@@ -923,7 +923,12 @@ static _kernel_oserror *driver_ReadAudio(AddrMode mode,uint32_t start,uint32_t l
if(bytelength >= 0x100000000) /* Too big to fit in RAM! */ if(bytelength >= 0x100000000) /* Too big to fit in RAM! */
return ERROR(BadArgs); return ERROR(BadArgs);
SCSI_CREATEBLOCK(SCB,READCD,12); SCSI_CREATEBLOCK(SCB,READCD,12);
#if 0
/* Leave DAP disabled for now - some drives complain about it, and
simply retrying the op with DAP disabled can cause problems too
(although that might be a SCSISoftUSB bug?) */
READCD12_DAP_Write(SCB,1); /* Enable DAP */ READCD12_DAP_Write(SCB,1); /* Enable DAP */
#endif
READCD12_ExpSectorType_Write(SCB,1); /* CD-DA */ READCD12_ExpSectorType_Write(SCB,1); /* CD-DA */
READCD12_StartLBA_Write(SCB,start); READCD12_StartLBA_Write(SCB,start);
READCD12_Length_Write(SCB,length); READCD12_Length_Write(SCB,length);
......