1. 10 Feb, 2018 1 commit
    • Jeffrey Lee's avatar
      Fix drive lock status reporting for empty drives · efd12171
      Jeffrey Lee authored
      Detail:
        s/DriverCode - Change IsDrawerLocked handler to read the lock status from the drive via mode page &2A, rather than doing a completely unrelated TEST UNIT READY command. On the offchance that &2A isn't implemented, just fall back on our softcopy of the lock state, which is effectively what TEST UNIT READY was doing in the first place.
      Admin:
        Tested on Iyonix
        CD_IsDrawerLocked now returns a sensible value for empty drives, instead of a drive empty error
        Fixes issue reported on forums where CDFS iconbar menu doesn't allow empty drives to be ejected (for ATAPI, at least):
        https://www.riscosopen.org/forum/forums/4/topics/3652
      
      
      Version 1.44. Tagged as 'ATAPI-1_44'
      efd12171
  2. 22 Apr, 2017 2 commits
    • Robert Sprowson's avatar
      Go straight to READ(12) rather than using READ CD emulation on new ATAPI drives · c5fb0382
      Robert Sprowson authored
      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'
      c5fb0382
    • Robert Sprowson's avatar
      Clear out a few unused defines · 0ca30d30
      Robert Sprowson authored
      Not tagged.
      0ca30d30
  3. 22 May, 2016 1 commit
  4. 08 May, 2016 1 commit
  5. 23 Feb, 2016 1 commit
  6. 31 Jan, 2016 1 commit
    • Robert Sprowson's avatar
      Try a 3rd time to ReadData from a drive · eeb4bcb0
      Robert Sprowson authored
      The ReadData function already has 2 workarounds for some quirks with Sony and Panasonic drives, using READ_CD to emulate the behaviour of READ_DATA because the latter didn't work on the particular models Acorn shipped. However, with DVD drives some firmware vendors have been a bit literal about what READ_CD does, so you end up in a situation of being able to read a CD but not a DVD in an otherwise identical setup.
      Change the retry loop from 2 goes to 3. On the 3rd attempt just try using READ_DATA(12) like the standard intended, so we retain the former workarounds and only use that command last. Note that READ_DATA(2) only has a 2 byte block count which would be a truncation from READ_CD's 3, so using READ_DATA(12) with a 4 byte block count keeps the command block shuffling simpler.
      Tested on a HP branded TS-H653 and Pioneer DVR-TD11RS with an ISO9660 DVD-R.
      
      Version 1.39. Tagged as 'ATAPI-1_39'
      eeb4bcb0
  7. 23 Jan, 2016 2 commits
    • Robert Sprowson's avatar
      Fix for spurious error message mounting DVDs · dd1ae3ad
      Robert Sprowson authored
      When CDFS wants to change the drive's data mode to mount a DVD it does so via CD_SetParameters. As a side effect of that call, the read retry count is written too.
      Some drives return illegal request errors when trying to set the read retry count (even though they're marked as changeable), so just swallow the error like CDFSSoftSCSI does (driver.c revision 1.4 line 566).
      Fixes "Compact disc is faulty" error with Samsung SH-S223B drive - the error message was spurious as it's just the default the error handler assumes when it can't look up error 0x50.
      
      Version 1.38. Tagged as 'ATAPI-1_38'
      dd1ae3ad
    • Robert Sprowson's avatar
      Tidy up some comments/constants · 7e900d54
      Robert Sprowson authored
      Use Hdr:SWIs to get our SWI base, not the two local defines, similarly error base.
      Correct a handful of misleading comments.
      Same binary, not tagged.
      7e900d54
  8. 17 Jan, 2016 1 commit
  9. 19 Nov, 2015 1 commit
    • Ben Avison's avatar
      Support newer ARMs better · 29b63845
      Ben Avison authored
      Detail:
        A couple of the routines relied on pre-ARMv6 style LDM functionality, and
        would abort on ARMv7+ (or ARMv6 in ARMv7 mode, if we ever get an ARMv6
        platform with ATAPI). Also took the opportunity to replace a lot of byte
        swizzling code fragments with REV instructions if only targeting ARMv6 or
        later. Bit of a shame they weren't macroised considering how many times
        they were used...
      Admin:
        Untested
      
      Version 1.36. Tagged as 'ATAPI-1_36'
      29b63845
  10. 09 Nov, 2015 1 commit
    • Robert Sprowson's avatar
      Switch round header order · 4ccd7489
      Robert Sprowson authored
      Hdr:ATA needs an error base from Hdr:NewErrors. Also, be explicit about the no data transfer ATAPI case (even though the define is 0).
      Retagged as ATAPI-1_35.
      4ccd7489
  11. 08 Nov, 2015 1 commit
    • Ben Avison's avatar
      Update for compatibility with ADFS 4 · 7f342dba
      Ben Avison authored
      Detail:
        The physical ID by which ATA and ATAPI drives are address has been expanded
        in ADFS 4 from 2 bits to 12. For now, CDFSSoftATAPI is still limited to 4
        drives, and scans the first 4 physical IDs returned by SWI ATA_Enumerate
        (falling back to the 4 legacy physical IDs if the SWI isn't found). This
        will fail on boards with more than 4 physical SATA ports, but caters for
        all current hardware. Also sneaked in the use of LDRH in the SWI dispatcher.
      Admin:
        Tested on a Titanium board.
      
      Version 1.35. Tagged as 'ATAPI-1_35'
      7f342dba
  12. 17 Jul, 2015 1 commit
    • Robert Sprowson's avatar
      Fix for NULL pointer dereference · 7bf27176
      Robert Sprowson authored
      When no drives are detected (but some are configured) CDFSSoftATAPI goes dormant by setting its private word to 0. However, when the module finalises (eg. an RMReinit) that NULL value is then used to call CD_Unregister, and attempting to free the same NULL value with OS_Module.
      Also replaced magic numbers from Hdr:ModHand and Hdr:OsBytes.
      
      Version 1.34. Tagged as 'ATAPI-1_34'
      7bf27176
  13. 24 May, 2012 1 commit
    • Robert Sprowson's avatar
      STASH/GRAB -> Push/Pull. · b2893e51
      Robert Sprowson authored
      Disassembly unchanged apart from the single register STM's which now use STR ith writeback.
      
      Version 1.33. Tagged as 'ATAPI-1_33'
      b2893e51
  14. 22 Apr, 2005 1 commit
  15. 17 Dec, 2002 1 commit
    • Ben Avison's avatar
      Now responds to "Driver in use" errors returned from ADFS_ATAPIOp by retrying... · 8aaccfbf
      Ben Avison authored
      Now responds to "Driver in use" errors returned from ADFS_ATAPIOp by retrying up to the specified timeout (or 10 seconds for internally generated
      
      SCSI_Ops). If the timeout is reached, the CD_SCSIUserOp entry point will
      return a SCSI-compatible "ATAPI driver reservation error" error pointer;
      other entry points pass "Driver in use" through unchanged.
      Also added GPA generation capability, for what it's worth.
      
      Version 1.32. Tagged as 'ATAPI-1_32'
      8aaccfbf
  16. 26 Nov, 2002 1 commit
  17. 22 Nov, 2002 2 commits
    • Ben Avison's avatar
      Various fixes to bugs both new and old. · 7bcccf3d
      Ben Avison authored
      Detail:
        * Byte sex swap fix applied to the code to set the drive speed
        * SCSI-3 spec says that ATAPI packets have to be padded with 0 bytes;
          routines changed accordingly (though this does mean we now have to do
          a tedious copy onto the stack for every operation)
        * All disc errors returned from ADFS_ATAPIOp were accidentally ignored!
        * Internal disc number wasn't being shifted left by 15 bits before being
          used to do a REQUEST SENSE command packet, resulting in it doing a
          reset of any slave devices instead of sending a PACKET command
        * TARGETERROR error numbers weren't being correctly constructed in
          ATAPI_Op (it was using the error pointer instead of the sense key)
        * Worked round another assumption of flag preservation in CD_ SWIs
        * Fixed pathname of messages file to include $
      Admin:
        Tested on Tungsten.
      
      Version 1.30. Tagged as 'ATAPI-1_30'
      7bcccf3d
    • Ben Avison's avatar
      Shiny new version for Tungsten. · 13dfbf90
      Ben Avison authored
      Detail:
        * Removed IOMD dependency - reimplemented to use ADFS_ATAPIOp and
          ADFS_IDEDeviceInfo
        * Supports 4 drives (previously 2)
        * Support for SCSIUserOp entry included
      Admin:
        Requires ADFS 3.34 (or intermediate version after 3.33).
      
      Version 1.29. Tagged as 'ATAPI-1_29'
      13dfbf90
  18. 07 Nov, 2002 1 commit
    • Ben Avison's avatar
      First stage of changes for RISC OS 5. · f33177d5
      Ben Avison authored
      Detail:
        * Moved resources here from CDFSResources - allows tokenisation
        * Uses objasm, shared makefiles and global headers
        * 32-bit compatible
      Admin:
        Not tested. Still IOC/IOMD-centric.
      
      Version 1.28. Tagged as 'ATAPI-1_28'
      f33177d5
  19. 06 Dec, 2000 1 commit
    • John Beranek's avatar
      Changed some odd version tracking code · 08ae23d0
      John Beranek authored
      Detail:
        This module had sets of defines for what options to have in what
         version of the module, instead of just using different versions out
         of a source control system...very odd.  Changed code to say
         "if version is over 1.24, use these standard flags".  Also removed
         check for a "too high" version number.
      Admin:
        Built.
      
      
      Version 1.27. Tagged as 'ATAPI-1_27'
      08ae23d0
  20. 30 Nov, 2000 1 commit
    • John Beranek's avatar
      Merged Ursula branch, moved to srccommit. · 1143f776
      John Beranek authored
      Detail:
        Merged Ursula branch, only change was removal of dynamic dependencies
         from Makefile.
      
        Moved to srccommit usage, changed some occurences of "Version" to
         "ModuleVersion", as defined in VersionASM. Removed obsolete "Version"
         file.
      Admin:
        Added stripdepend call to clean rule
        Additionally added a "GET Hdr:Machine.<Machine>" into s.Main to
         make it assemble correctly.
      
      
      Version 1.26. Tagged as 'ATAPI-1_26'
      1143f776
  21. 24 Nov, 2000 1 commit
  22. 21 Jan, 1997 1 commit
  23. 16 Dec, 1996 1 commit
  24. 21 Nov, 1996 1 commit
  25. 06 Nov, 1996 2 commits
  26. 05 Nov, 1996 2 commits