home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / Computer / h / cd < prev    next >
Encoding:
Text File  |  1995-07-19  |  40.9 KB  |  1,227 lines

  1. #ifndef cd_H
  2. #define cd_H
  3.  
  4. /* C header file for CD
  5.  * written by DefMod (Jul  7 1995) on Wed Jul 19 16:41:09 1995
  6.  * Simon Middleton, Uniqueway Ltd; Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef os_H
  14. #include "os.h"
  15. #endif
  16.  
  17. /**********************************
  18.  * SWI names and SWI reason codes *
  19.  **********************************/
  20. #undef  CD_Version
  21. #define CD_Version                              0x41240
  22. #undef  XCD_Version
  23. #define XCD_Version                             0x61240
  24. #undef  CD_ReadData
  25. #define CD_ReadData                             0x41241
  26. #undef  XCD_ReadData
  27. #define XCD_ReadData                            0x61241
  28. #undef  CD_SeekTo
  29. #define CD_SeekTo                               0x41242
  30. #undef  XCD_SeekTo
  31. #define XCD_SeekTo                              0x61242
  32. #undef  CD_DriveStatus
  33. #define CD_DriveStatus                          0x41243
  34. #undef  XCD_DriveStatus
  35. #define XCD_DriveStatus                         0x61243
  36. #undef  CD_DriveReady
  37. #define CD_DriveReady                           0x41244
  38. #undef  XCD_DriveReady
  39. #define XCD_DriveReady                          0x61244
  40. #undef  CD_GetParameters
  41. #define CD_GetParameters                        0x41245
  42. #undef  XCD_GetParameters
  43. #define XCD_GetParameters                       0x61245
  44. #undef  CD_SetParameters
  45. #define CD_SetParameters                        0x41246
  46. #undef  XCD_SetParameters
  47. #define XCD_SetParameters                       0x61246
  48. #undef  CD_OpenDrawer
  49. #define CD_OpenDrawer                           0x41247
  50. #undef  XCD_OpenDrawer
  51. #define XCD_OpenDrawer                          0x61247
  52. #undef  CD_EjectButton
  53. #define CD_EjectButton                          0x41248
  54. #undef  XCD_EjectButton
  55. #define XCD_EjectButton                         0x61248
  56. #undef  CD_EnquireAddress
  57. #define CD_EnquireAddress                       0x41249
  58. #undef  XCD_EnquireAddress
  59. #define XCD_EnquireAddress                      0x61249
  60. #undef  CD_EnquireDataMode
  61. #define CD_EnquireDataMode                      0x4124A
  62. #undef  XCD_EnquireDataMode
  63. #define XCD_EnquireDataMode                     0x6124A
  64. #undef  CD_PlayAudio
  65. #define CD_PlayAudio                            0x4124B
  66. #undef  XCD_PlayAudio
  67. #define XCD_PlayAudio                           0x6124B
  68. #undef  CD_PlayTrack
  69. #define CD_PlayTrack                            0x4124C
  70. #undef  XCD_PlayTrack
  71. #define XCD_PlayTrack                           0x6124C
  72. #undef  CD_AudioPause
  73. #define CD_AudioPause                           0x4124D
  74. #undef  XCD_AudioPause
  75. #define XCD_AudioPause                          0x6124D
  76. #undef  CD_EnquireTrack
  77. #define CD_EnquireTrack                         0x4124E
  78. #undef  XCD_EnquireTrack
  79. #define XCD_EnquireTrack                        0x6124E
  80. #undef  CD_EnquireAllTracks
  81. #define CD_EnquireAllTracks                     0x0
  82. #undef  CD_EnquireOneTrack
  83. #define CD_EnquireOneTrack                      0x4124E
  84. #undef  XCD_EnquireOneTrack
  85. #define XCD_EnquireOneTrack                     0x6124E
  86. #undef  CD_ReadSubChannel
  87. #define CD_ReadSubChannel                       0x4124F
  88. #undef  XCD_ReadSubChannel
  89. #define XCD_ReadSubChannel                      0x6124F
  90. #undef  CD_CheckDrive
  91. #define CD_CheckDrive                           0x41250
  92. #undef  XCD_CheckDrive
  93. #define XCD_CheckDrive                          0x61250
  94. #undef  CD_DiscChanged
  95. #define CD_DiscChanged                          0x41251
  96. #undef  XCD_DiscChanged
  97. #define XCD_DiscChanged                         0x61251
  98. #undef  CD_StopDisc
  99. #define CD_StopDisc                             0x41252
  100. #undef  XCD_StopDisc
  101. #define XCD_StopDisc                            0x61252
  102. #undef  CD_DiscUsed
  103. #define CD_DiscUsed                             0x41253
  104. #undef  XCD_DiscUsed
  105. #define XCD_DiscUsed                            0x61253
  106. #undef  CD_AudioStatus
  107. #define CD_AudioStatus                          0x41254
  108. #undef  XCD_AudioStatus
  109. #define XCD_AudioStatus                         0x61254
  110. #undef  CD_Inquiry
  111. #define CD_Inquiry                              0x41255
  112. #undef  XCD_Inquiry
  113. #define XCD_Inquiry                             0x61255
  114. #undef  CD_DiscHasChanged
  115. #define CD_DiscHasChanged                       0x41256
  116. #undef  XCD_DiscHasChanged
  117. #define XCD_DiscHasChanged                      0x61256
  118. #undef  CD_Control
  119. #define CD_Control                              0x41257
  120. #undef  XCD_Control
  121. #define XCD_Control                             0x61257
  122. #undef  CD_Supported
  123. #define CD_Supported                            0x41258
  124. #undef  XCD_Supported
  125. #define XCD_Supported                           0x61258
  126. #undef  CD_Prefetch
  127. #define CD_Prefetch                             0x41259
  128. #undef  XCD_Prefetch
  129. #define XCD_Prefetch                            0x61259
  130. #undef  CD_Reset
  131. #define CD_Reset                                0x4125A
  132. #undef  XCD_Reset
  133. #define XCD_Reset                               0x6125A
  134. #undef  CD_CloseDrawer
  135. #define CD_CloseDrawer                          0x4125B
  136. #undef  XCD_CloseDrawer
  137. #define XCD_CloseDrawer                         0x6125B
  138. #undef  CD_IsDrawerLocked
  139. #define CD_IsDrawerLocked                       0x4125C
  140. #undef  XCD_IsDrawerLocked
  141. #define XCD_IsDrawerLocked                      0x6125C
  142. #undef  CD_AudioControl
  143. #define CD_AudioControl                         0x4125D
  144. #undef  XCD_AudioControl
  145. #define XCD_AudioControl                        0x6125D
  146. #undef  CD_LastError
  147. #define CD_LastError                            0x4125E
  148. #undef  XCD_LastError
  149. #define XCD_LastError                           0x6125E
  150. #undef  CD_AudioLevel
  151. #define CD_AudioLevel                           0x4125F
  152. #undef  XCD_AudioLevel
  153. #define XCD_AudioLevel                          0x6125F
  154. #undef  CD_Register
  155. #define CD_Register                             0x41260
  156. #undef  XCD_Register
  157. #define XCD_Register                            0x61260
  158. #undef  CD_Unregister
  159. #define CD_Unregister                           0x41261
  160. #undef  XCD_Unregister
  161. #define XCD_Unregister                          0x61261
  162. #undef  CD_ByteCopy
  163. #define CD_ByteCopy                             0x41262
  164. #undef  XCD_ByteCopy
  165. #define XCD_ByteCopy                            0x61262
  166. #undef  CD_Identify
  167. #define CD_Identify                             0x41263
  168. #undef  XCD_Identify
  169. #define XCD_Identify                            0x61263
  170. #undef  CD_ConvertToLBA
  171. #define CD_ConvertToLBA                         0x41264
  172. #undef  XCD_ConvertToLBA
  173. #define XCD_ConvertToLBA                        0x61264
  174. #undef  CD_ConvertToMSF
  175. #define CD_ConvertToMSF                         0x41265
  176. #undef  XCD_ConvertToMSF
  177. #define XCD_ConvertToMSF                        0x61265
  178. #undef  CD_ReadAudio
  179. #define CD_ReadAudio                            0x41266
  180. #undef  XCD_ReadAudio
  181. #define XCD_ReadAudio                           0x61266
  182. #undef  CD_ReadUserData
  183. #define CD_ReadUserData                         0x41267
  184. #undef  XCD_ReadUserData
  185. #define XCD_ReadUserData                        0x61267
  186. #undef  CD_SeekUserData
  187. #define CD_SeekUserData                         0x41268
  188. #undef  XCD_SeekUserData
  189. #define XCD_SeekUserData                        0x61268
  190. #undef  CD_GetAudioParms
  191. #define CD_GetAudioParms                        0x41269
  192. #undef  XCD_GetAudioParms
  193. #define XCD_GetAudioParms                       0x61269
  194. #undef  CDGetAudioParms_VolumeBlock
  195. #define CDGetAudioParms_VolumeBlock             0x41269
  196. #undef  XCDGetAudioParms_VolumeBlock
  197. #define XCDGetAudioParms_VolumeBlock            0x61269
  198. #undef  CD_SetAudioParms
  199. #define CD_SetAudioParms                        0x4126A
  200. #undef  XCD_SetAudioParms
  201. #define XCD_SetAudioParms                       0x6126A
  202.  
  203. /************************************
  204.  * Structure and union declarations *
  205.  ************************************/
  206. typedef struct cd_control_block                 cd_control_block;
  207. typedef struct cd_version_block                 cd_version_block;
  208. typedef struct cd_parameter_block               cd_parameter_block;
  209. typedef struct cd_enquire_all_tracks_block      cd_enquire_all_tracks_block;
  210. typedef struct cd_enquire_one_track_block       cd_enquire_one_track_block;
  211. typedef struct cd_sub_channel_block             cd_sub_channel_block;
  212. typedef struct cd_disc_used_block               cd_disc_used_block;
  213. typedef struct cd_inquiry_block                 cd_inquiry_block;
  214. typedef struct cd_register_block                cd_register_block;
  215. typedef struct cd_volume_block                  cd_volume_block;
  216.  
  217. /********************
  218.  * Type definitions *
  219.  ********************/
  220. typedef bits cd_address;
  221.  
  222. typedef int cd_address_mode;
  223.  
  224. struct cd_control_block
  225.    {  int reserved [5];
  226.    };
  227.  
  228. typedef byte cd_audio_flags;
  229.  
  230. struct cd_version_block
  231.    {  int version_number;
  232.       char version_string [256];
  233.    };
  234.  
  235. typedef int cd_status;
  236.  
  237. typedef int cd_readiness;
  238.  
  239. typedef int cd_multiplier;
  240.  
  241. typedef int cd_data_mode;
  242.  
  243. typedef int cd_speed;
  244.  
  245. struct cd_parameter_block
  246.    {  cd_multiplier inactivity_timer;
  247.       int retry_count;
  248.       cd_data_mode mode;
  249.       cd_speed speed;
  250.    };
  251.  
  252. typedef int cd_play_to_what;
  253.  
  254. struct cd_enquire_all_tracks_block
  255.    {  byte first_track;
  256.       byte last_track;
  257.       byte reserved0;
  258.       byte reserved1;
  259.       byte reserved2;
  260.    };
  261.  
  262. struct cd_enquire_one_track_block
  263.    {  cd_address address;
  264.       cd_audio_flags audio_control;
  265.    };
  266.  
  267. struct cd_sub_channel_block
  268.    {  cd_address relative_lba;
  269.       cd_address absolute_lba;
  270.       cd_audio_flags audio_control;
  271.       byte track_number;
  272.       byte index_number;
  273.    };
  274.  
  275. struct cd_disc_used_block
  276.    {  int block_count;
  277.       int block_size;
  278.    };
  279.  
  280. typedef int cd_audio;
  281.  
  282. struct cd_inquiry_block
  283.    {  byte i [36];
  284.    };
  285.  
  286. typedef int cd_error_response_level;
  287.  
  288. typedef bits cd_flags;
  289.  
  290. typedef bits cd_register_flags;
  291.  
  292. struct cd_register_block
  293.    {  cd_register_flags flags;
  294.       int registration_count;
  295.       int drive_type_count;
  296.    };
  297.  
  298. typedef int cd_drive_type;
  299.  
  300. typedef int cd_audio_completion;
  301.  
  302. struct cd_volume_block
  303.    {  int volume [2];
  304.    };
  305.  
  306. /************************
  307.  * Constant definitions *
  308.  ************************/
  309. #define error_CD_BASE                           0x803400u
  310. #define error_CD_BAD_ALIGNMENT                  0x803401u
  311. #define error_CD_DRIVE_NOT_SUPPORTED            0x803402u
  312. #define error_CD_BAD_MODE                       0x803403u
  313. #define error_CD_INVALID_PARAMETER              0x803404u
  314. #define error_CD_NOT_AUDIO_TRACK                0x803405u
  315. #define error_CD_NO_CADDY                       0x803406u
  316. #define error_CD_NO_DRIVE                       0x803407u
  317. #define error_CD_INVALID_FORMAT                 0x803408u
  318. #define error_CD_BAD_MINUTES                    0x803409u
  319. #define error_CD_BAD_SECONDS                    0x80340Au
  320. #define error_CD_BAD_BLOCKS                     0x80340Bu
  321. #define error_CD_PHYSICAL_BLOCK_BAD             0x80340Cu
  322. #define error_CD_DRAWER_LOCKED                  0x80340Du
  323. #define error_CD_WRONG_DATA_MODE                0x80340Eu
  324. #define error_CD_CHANNEL_NOT_SUPPORTED          0x80340Fu
  325. #define error_CD_BAD_DEVICE_ID                  0x803410u
  326. #define error_CD_BAD_CARD_NUMBER                0x803411u
  327. #define error_CD_BAD_LUN_NUMBER                 0x803412u
  328. #define error_CD_NO_SUCH_TRACK                  0x803413u
  329. #define error_CD_FAULTY_DISC                    0x803414u
  330. #define error_CD_NO_SUCH_BLOCK                  0x803415u
  331. #define error_CD_NOT_SUPPORTED                  0x803416u
  332. #define error_CD_DRIVER_NOT_PRESENT             0x803417u
  333. #define error_CD_SWI_NOT_SUPPORTED              0x803418u
  334. #define error_CD_TOO_MANY_DRIVERS               0x803419u
  335. #define error_CD_NOT_REGISTERED                 0x80341Au
  336. #define cd_LOGICAL_BLOCK_ADDRESSING             ((cd_address_mode) 0x0u)
  337. #define cd_RED_BOOK_ADDRESSING                  ((cd_address_mode) 0x1u)
  338. #define cd_PHYSICAL_BLOCK_ADDRESSING            ((cd_address_mode) 0x2u)
  339. #define cd_AUDIO                                ((cd_audio_flags) 0x0u)
  340. #define cd_DATA                                 ((cd_audio_flags) 0x1u)
  341. #define cd_FOUR_CHANNEL                         ((cd_audio_flags) 0x0u)
  342. #define cd_TWO_CHANNEL                          ((cd_audio_flags) 0x2u)
  343. #define cd_READ_AUDIO_READ                      ((byte) 0)
  344. #define cd_READ_AUDIO_REASON_MASK               0xFFu
  345. #define cd_DRIVE_STATUS_OK                      ((cd_status) 0x1u)
  346. #define cd_DRIVE_STATUS_BUSY                    ((cd_status) 0x2u)
  347. #define cd_DRIVE_STATUS_NOT_READY               ((cd_status) 0x4u)
  348. #define cd_DRIVE_STATUS_UNAVAILABLE             ((cd_status) 0x8u)
  349. #define cd_DRIVE_READY                          ((cd_readiness) 0x0u)
  350. #define cd_DRIVE_NOT_READY                      ((cd_readiness) 0x1u)
  351. #define cd_MULTIPLIER_DEFAULT                   ((cd_multiplier) 0x0u)
  352. #define cd_MULTIPLIER_EIGHTH_SEC                ((cd_multiplier) 0x1u)
  353. #define cd_MULTIPLIER_QUARTER_SEC               ((cd_multiplier) 0x2u)
  354. #define cd_MULTIPLIER_HALF_SEC                  ((cd_multiplier) 0x3u)
  355. #define cd_MULTIPLIER_ONE_SEC                   ((cd_multiplier) 0x4u)
  356. #define cd_MULTIPLIER_TWO_SEC                   ((cd_multiplier) 0x5u)
  357. #define cd_MULTIPLIER_FOUR_SEC                  ((cd_multiplier) 0x6u)
  358. #define cd_MULTIPLIER_EIGHT_SEC                 ((cd_multiplier) 0x7u)
  359. #define cd_MULTIPLIER_SIXTEEN_SEC               ((cd_multiplier) 0x8u)
  360. #define cd_MULTIPLIER_THIRTY_TWO_SEC            ((cd_multiplier) 0x9u)
  361. #define cd_MULTIPLIER_ONE_MIN                   ((cd_multiplier) 0xAu)
  362. #define cd_MULTIPLIER_TWO_MIN                   ((cd_multiplier) 0xBu)
  363. #define cd_MULTIPLIER_FOUR_MIN                  ((cd_multiplier) 0xCu)
  364. #define cd_MULTIPLIER_EIGHT_MIN                 ((cd_multiplier) 0xDu)
  365. #define cd_MULTIPLIER_SIXTEEN_MIN               ((cd_multiplier) 0xEu)
  366. #define cd_MULTIPLIER_THIRTY_TWO_MIN            ((cd_multiplier) 0xFu)
  367. #define cd_MODE_AUDIO                           ((cd_data_mode) 0x0u)
  368. #define cd_MODE1                                ((cd_data_mode) 0x1u)
  369. #define cd_MODE2_FORM2                          ((cd_data_mode) 0x2u)
  370. #define cd_MODE2_FORM1                          ((cd_data_mode) 0x3u)
  371. #define cd_SPEED_UNCHANGED                      0
  372. #define cd_SPEED_STANDARD                       1
  373. #define cd_SPEED_DOUBLE                         2
  374. #define cd_SPEED_MAX                            255
  375. #define cd_PLAY_TO_END_OF_TRACK                 ((cd_play_to_what) 0xFEu)
  376. #define cd_PLAY_TO_END_OF_DISC                  ((cd_play_to_what) 0xFFu)
  377. #define cd_AUDIO_PLAYING                        ((cd_audio) 0x0u)
  378. #define cd_AUDIO_PAUSED                         ((cd_audio) 0x1u)
  379. #define cd_AUDIO_COMPLETED                      ((cd_audio) 0x3u)
  380. #define cd_AUDIO_ERROR                          ((cd_audio) 0x4u)
  381. #define cd_AUDIO_STOPPED                        ((cd_audio) 0x5u)
  382. #define cd_CHECK_ERROR                          ((cd_error_response_level) 0x0u)
  383. #define cd_CHECK_SENSE                          ((cd_error_response_level) 0x1u)
  384. #define cd_CHECK_RETRY                          ((cd_error_response_level) 0x2u)
  385. #define cd_SUPPORTED_AUDIO_CONTROL              ((cd_flags) 0x7u)
  386. #define cd_SUPPORTED_PREFETCH                   ((cd_flags) 0x8u)
  387. #define cd_SUPPORTED_CLOSE_DRAWER               ((cd_flags) 0x10u)
  388. #define cd_SUPPORTED_AUDIO_LEVEL                ((cd_flags) 0x20u)
  389. #define cd_SUPPORTED_SPEED_MULTIPLIER           ((cd_flags) 0x3FC0u)
  390. #define cd_SUPPORTED_READ_AUDIO                 ((cd_flags) 0x4000u)
  391. #define cd_SUPPORTED_AUDIO_PARAMS               ((cd_flags) 0x8000u)
  392. #define cd_USE_OLD_READ                         ((cd_register_flags) 0x40u)
  393. #define cd_USE_OLD_SEEK                         ((cd_register_flags) 0x80u)
  394. #define cd_USE_OLD_INQUIRY                      ((cd_register_flags) 0x100u)
  395. #define cd_USE_OLD_CAPACITY                     ((cd_register_flags) 0x200u)
  396. #define cd_USE_OLD_READY                        ((cd_register_flags) 0x400u)
  397. #define cd_USE_OLD_STOP_OPEN                    ((cd_register_flags) 0x800u)
  398. #define cd_USE_OLD_CHECK                        ((cd_register_flags) 0x1000u)
  399. #define cd_USE_OLD_STATUS                       ((cd_register_flags) 0x2000u)
  400. #define cd_USE_OLD_CONTROL                      ((cd_register_flags) 0x4000u)
  401. #define cd_USE_OLD_PREFETCH                     ((cd_register_flags) 0x8000u)
  402. #define cd_USE_OLD_RESET                        ((cd_register_flags) 0x10000u)
  403. #define cd_USE_READ_DATA_PROPRIETARY            ((cd_register_flags) 0x20000u)
  404. #define cd_USE_READ_DATA_SCATTER                ((cd_register_flags) 0x40000u)
  405. #define cd_USE_SEEK_DATA_PROPRIETARY            ((cd_register_flags) 0x80000u)
  406. #define cd_USE_SEEK_DATA_SCATTER                ((cd_register_flags) 0x100000u)
  407. #define cd_DRIVE_TYPE_UNKNOWN                   ((cd_drive_type) 0xFFFFFFFFu)
  408. #define cd_AUDIO_DONE                           ((cd_audio_completion) 0xFFFFFFFFu)
  409. #define cd_VOLUME_LIMIT                         65535
  410.  
  411. /*************************
  412.  * Function declarations *
  413.  *************************/
  414.  
  415. #ifdef __cplusplus
  416.    extern "C" {
  417. #endif
  418.  
  419. /* ------------------------------------------------------------------------
  420.  * Function:      cd_version()
  421.  *
  422.  * Description:   Reads version string
  423.  *
  424.  * Output:        version - value of R0 on exit (X version only)
  425.  *
  426.  * Returns:       R0 (non-X version only)
  427.  *
  428.  * Other notes:   Calls SWI 0x41240.
  429.  */
  430.  
  431. extern os_error *xcd_version (cd_version_block **version);
  432. __swi (0x41240) cd_version_block *cd_version (void);
  433.  
  434. /* ------------------------------------------------------------------------
  435.  * Function:      cd_read_data()
  436.  *
  437.  * Description:   Reads data from CD-ROM - do not use
  438.  *
  439.  * Input:         address_mode - value of R0 on entry
  440.  *                start_address - value of R1 on entry
  441.  *                block_count - value of R2 on entry
  442.  *                buffer - value of R3 on entry
  443.  *                size - value of R4 on entry
  444.  *                control - value of R7 on entry
  445.  *
  446.  * Other notes:   Calls SWI 0x41241.
  447.  */
  448.  
  449. extern os_error *xcd_read_data (cd_address_mode address_mode,
  450.       cd_address start_address,
  451.       int block_count,
  452.       byte *buffer,
  453.       int size,
  454.       cd_control_block const *control);
  455. extern void cd_read_data (cd_address_mode address_mode,
  456.       cd_address start_address,
  457.       int block_count,
  458.       byte *buffer,
  459.       int size,
  460.       cd_control_block const *control);
  461.  
  462. /* ------------------------------------------------------------------------
  463.  * Function:      cd_seek_to()
  464.  *
  465.  * Description:   Seeks head to given position
  466.  *
  467.  * Input:         address_mode - value of R0 on entry
  468.  *                seek - value of R1 on entry
  469.  *                control - value of R7 on entry
  470.  *
  471.  * Other notes:   Calls SWI 0x41242.
  472.  */
  473.  
  474. extern os_error *xcd_seek_to (cd_address_mode address_mode,
  475.       cd_address seek,
  476.       cd_control_block const *control);
  477. extern void cd_seek_to (cd_address_mode address_mode,
  478.       cd_address seek,
  479.       cd_control_block const *control);
  480.  
  481. /* ------------------------------------------------------------------------
  482.  * Function:      cd_drive_status()
  483.  *
  484.  * Description:   Reads drive status
  485.  *
  486.  * Input:         control - value of R7 on entry
  487.  *
  488.  * Output:        status - value of R0 on exit (X version only)
  489.  *
  490.  * Returns:       R0 (non-X version only)
  491.  *
  492.  * Other notes:   Calls SWI 0x41243.
  493.  */
  494.  
  495. extern os_error *xcd_drive_status (cd_control_block const *control,
  496.       cd_status *status);
  497. extern cd_status cd_drive_status (cd_control_block const *control);
  498.  
  499. /* ------------------------------------------------------------------------
  500.  * Function:      cd_drive_ready()
  501.  *
  502.  * Description:   Checks if drive is ready - prefer CD_DriveStatus
  503.  *
  504.  * Input:         control - value of R7 on entry
  505.  *
  506.  * Output:        ready - value of R0 on exit (X version only)
  507.  *
  508.  * Returns:       R0 (non-X version only)
  509.  *
  510.  * Other notes:   Calls SWI 0x41244.
  511.  */
  512.  
  513. extern os_error *xcd_drive_ready (cd_control_block const *control,
  514.       cd_readiness *ready);
  515. extern cd_readiness cd_drive_ready (cd_control_block const *control);
  516.  
  517. /* ------------------------------------------------------------------------
  518.  * Function:      cd_get_parameters()
  519.  *
  520.  * Description:   Reads drive setup parameters
  521.  *
  522.  * Input:         params - value of R0 on entry
  523.  *                control - value of R7 on entry
  524.  *
  525.  * Other notes:   Calls SWI 0x41245.
  526.  */
  527.  
  528. extern os_error *xcd_get_parameters (cd_parameter_block *params,
  529.       cd_control_block const *control);
  530. extern void cd_get_parameters (cd_parameter_block *params,
  531.       cd_control_block const *control);
  532.  
  533. /* ------------------------------------------------------------------------
  534.  * Function:      cd_set_parameters()
  535.  *
  536.  * Description:   Sets drive setup paramters
  537.  *
  538.  * Input:         params - value of R0 on entry
  539.  *                control - value of R7 on entry
  540.  *
  541.  * Other notes:   Calls SWI 0x41246.
  542.  */
  543.  
  544. extern os_error *xcd_set_parameters (cd_parameter_block const *params,
  545.       cd_control_block const *control);
  546. extern void cd_set_parameters (cd_parameter_block const *params,
  547.       cd_control_block const *control);
  548.  
  549. /* ------------------------------------------------------------------------
  550.  * Function:      cd_open_drawer()
  551.  *
  552.  * Description:   Stops the disc, opens the drawer and ejects the disc
  553.  *
  554.  * Input:         control - value of R7 on entry
  555.  *
  556.  * Other notes:   Calls SWI 0x41247.
  557.  */
  558.  
  559. extern os_error *xcd_open_drawer (cd_control_block const *control);
  560. extern void cd_open_drawer (cd_control_block const *control);
  561.  
  562. /* ------------------------------------------------------------------------
  563.  * Function:      cd_eject_button()
  564.  *
  565.  * Description:   Controls the effect of the eject button and *Eject
  566.  *                command
  567.  *
  568.  * Input:         disable - value of R0 on entry
  569.  *                control - value of R7 on entry
  570.  *
  571.  * Other notes:   Calls SWI 0x41248.
  572.  */
  573.  
  574. extern os_error *xcd_eject_button (bool disable,
  575.       cd_control_block const *control);
  576. extern void cd_eject_button (bool disable,
  577.       cd_control_block const *control);
  578.  
  579. /* ------------------------------------------------------------------------
  580.  * Function:      cd_enquire_address()
  581.  *
  582.  * Description:   Reads current head position
  583.  *
  584.  * Input:         address_mode - value of R0 on entry
  585.  *                control - value of R7 on entry
  586.  *
  587.  * Output:        address - value of R0 on exit (X version only)
  588.  *
  589.  * Returns:       R0 (non-X version only)
  590.  *
  591.  * Other notes:   Calls SWI 0x41249.
  592.  */
  593.  
  594. extern os_error *xcd_enquire_address (cd_address_mode address_mode,
  595.       cd_control_block const *control,
  596.       cd_address *address);
  597. extern cd_address cd_enquire_address (cd_address_mode address_mode,
  598.       cd_control_block const *control);
  599.  
  600. /* ------------------------------------------------------------------------
  601.  * Function:      cd_enquire_data_mode()
  602.  *
  603.  * Description:   Finds data mode at given address
  604.  *
  605.  * Input:         address_mode - value of R0 on entry
  606.  *                address - value of R1 on entry
  607.  *                control - value of R7 on entry
  608.  *
  609.  * Output:        data_mode - value of R0 on exit (X version only)
  610.  *
  611.  * Returns:       R0 (non-X version only)
  612.  *
  613.  * Other notes:   Calls SWI 0x4124A.
  614.  */
  615.  
  616. extern os_error *xcd_enquire_data_mode (cd_address_mode address_mode,
  617.       cd_address address,
  618.       cd_control_block const *control,
  619.       cd_data_mode *data_mode);
  620. extern cd_data_mode cd_enquire_data_mode (cd_address_mode address_mode,
  621.       cd_address address,
  622.       cd_control_block const *control);
  623.  
  624. /* ------------------------------------------------------------------------
  625.  * Function:      cd_play_audio()
  626.  *
  627.  * Description:   Plays selected section of audio
  628.  *
  629.  * Input:         address_mode - value of R0 on entry
  630.  *                start - value of R1 on entry
  631.  *                end - value of R2 on entry
  632.  *                control - value of R7 on entry
  633.  *
  634.  * Other notes:   Calls SWI 0x4124B.
  635.  */
  636.  
  637. extern os_error *xcd_play_audio (cd_address_mode address_mode,
  638.       cd_address start,
  639.       cd_address end,
  640.       cd_control_block const *control);
  641. extern void cd_play_audio (cd_address_mode address_mode,
  642.       cd_address start,
  643.       cd_address end,
  644.       cd_control_block const *control);
  645.  
  646. /* ------------------------------------------------------------------------
  647.  * Function:      cd_play_track()
  648.  *
  649.  * Description:   Plays one or more tracks
  650.  *
  651.  * Input:         track - value of R0 on entry
  652.  *                play_to - value of R1 on entry
  653.  *                control - value of R7 on entry
  654.  *
  655.  * Other notes:   Calls SWI 0x4124C.
  656.  */
  657.  
  658. extern os_error *xcd_play_track (int track,
  659.       cd_play_to_what play_to,
  660.       cd_control_block const *control);
  661. extern void cd_play_track (int track,
  662.       cd_play_to_what play_to,
  663.       cd_control_block const *control);
  664.  
  665. /* ------------------------------------------------------------------------
  666.  * Function:      cd_audio_pause()
  667.  *
  668.  * Description:   Controls pausing of audio playing
  669.  *
  670.  * Input:         pause - value of R0 on entry
  671.  *                control - value of R7 on entry
  672.  *
  673.  * Other notes:   Calls SWI 0x4124D.
  674.  */
  675.  
  676. extern os_error *xcd_audio_pause (bool pause,
  677.       cd_control_block const *control);
  678. extern void cd_audio_pause (bool pause,
  679.       cd_control_block const *control);
  680.  
  681. /* ------------------------------------------------------------------------
  682.  * Function:      cd_enquire_all_tracks()
  683.  *
  684.  * Description:   Reads information on all tracks
  685.  *
  686.  * Input:         info - value of R1 on entry
  687.  *                control - value of R7 on entry
  688.  *
  689.  * Other notes:   Calls SWI 0x4124E with R0 = 0x0.
  690.  */
  691.  
  692. extern os_error *xcd_enquire_all_tracks (cd_enquire_all_tracks_block *info,
  693.       cd_control_block const *control);
  694. extern void cd_enquire_all_tracks (cd_enquire_all_tracks_block *info,
  695.       cd_control_block const *control);
  696.  
  697. /* ------------------------------------------------------------------------
  698.  * Function:      cd_enquire_one_track()
  699.  *
  700.  * Description:   Reads information on a given track
  701.  *
  702.  * Input:         track - value of R0 on entry
  703.  *                info - value of R1 on entry
  704.  *                control - value of R7 on entry
  705.  *
  706.  * Other notes:   Calls SWI 0x4124E.
  707.  */
  708.  
  709. extern os_error *xcd_enquire_one_track (int track,
  710.       cd_enquire_one_track_block *info,
  711.       cd_control_block const *control);
  712. extern void cd_enquire_one_track (int track,
  713.       cd_enquire_one_track_block *info,
  714.       cd_control_block const *control);
  715.  
  716. /* ------------------------------------------------------------------------
  717.  * Function:      cd_read_sub_channel()
  718.  *
  719.  * Description:   Calls SWI 0x4124F
  720.  *
  721.  * Input:         block - value of R1 on entry
  722.  *                control - value of R7 on entry
  723.  *
  724.  * Other notes:   Before entry, R0 = 0x40.
  725.  */
  726.  
  727. extern os_error *xcd_read_sub_channel (cd_sub_channel_block *block,
  728.       cd_control_block const *control);
  729. extern void cd_read_sub_channel (cd_sub_channel_block *block,
  730.       cd_control_block const *control);
  731.  
  732. /* ------------------------------------------------------------------------
  733.  * Function:      cd_check_drive()
  734.  *
  735.  * Description:   Returns SCSI diagnostic information - should not nomally
  736.  *                be used
  737.  *
  738.  * Input:         control - value of R7 on entry
  739.  *
  740.  * Output:        status - value of R0 on exit (X version only)
  741.  *
  742.  * Returns:       R0 (non-X version only)
  743.  *
  744.  * Other notes:   Calls SWI 0x41250.
  745.  */
  746.  
  747. extern os_error *xcd_check_drive (cd_control_block const *control,
  748.       bits *status);
  749. extern bits cd_check_drive (cd_control_block const *control);
  750.  
  751. /* ------------------------------------------------------------------------
  752.  * Function:      cd_disc_changed()
  753.  *
  754.  * Description:   Checks whether the disc has changed - do not use
  755.  *
  756.  * Input:         control - value of R7 on entry
  757.  *
  758.  * Output:        changed - value of R0 on exit (X version only)
  759.  *
  760.  * Returns:       R0 (non-X version only)
  761.  *
  762.  * Other notes:   Calls SWI 0x41251.
  763.  */
  764.  
  765. extern os_error *xcd_disc_changed (cd_control_block const *control,
  766.       bool *changed);
  767. extern bool cd_disc_changed (cd_control_block const *control);
  768.  
  769. /* ------------------------------------------------------------------------
  770.  * Function:      cd_stop_disc()
  771.  *
  772.  * Description:   Stops the disc
  773.  *
  774.  * Input:         control - value of R7 on entry
  775.  *
  776.  * Other notes:   Calls SWI 0x41252.
  777.  */
  778.  
  779. extern os_error *xcd_stop_disc (cd_control_block const *control);
  780. extern void cd_stop_disc (cd_control_block const *control);
  781.  
  782. /* ------------------------------------------------------------------------
  783.  * Function:      cd_disc_used()
  784.  *
  785.  * Description:   Calls SWI 0x41253
  786.  *
  787.  * Input:         address_mode - value of R0 on entry
  788.  *                info - value of R1 on entry
  789.  *                control - value of R7 on entry
  790.  */
  791.  
  792. extern os_error *xcd_disc_used (cd_address_mode address_mode,
  793.       cd_disc_used_block *info,
  794.       cd_control_block const *control);
  795. extern void cd_disc_used (cd_address_mode address_mode,
  796.       cd_disc_used_block *info,
  797.       cd_control_block const *control);
  798.  
  799. /* ------------------------------------------------------------------------
  800.  * Function:      cd_audio_status()
  801.  *
  802.  * Description:   Returns the current audio status of the drive
  803.  *
  804.  * Input:         control - value of R7 on entry
  805.  *
  806.  * Output:        status - value of R0 on exit (X version only)
  807.  *
  808.  * Returns:       R0 (non-X version only)
  809.  *
  810.  * Other notes:   Calls SWI 0x41254.
  811.  */
  812.  
  813. extern os_error *xcd_audio_status (cd_control_block const *control,
  814.       cd_audio *status);
  815. extern cd_audio cd_audio_status (cd_control_block const *control);
  816.  
  817. /* ------------------------------------------------------------------------
  818.  * Function:      cd_inquiry()
  819.  *
  820.  * Description:   Reads info on drive - should not normally be used
  821.  *
  822.  * Input:         data - value of R0 on entry
  823.  *                control - value of R7 on entry
  824.  *
  825.  * Other notes:   Calls SWI 0x41255.
  826.  */
  827.  
  828. extern os_error *xcd_inquiry (cd_inquiry_block *data,
  829.       cd_control_block const *control);
  830. extern void cd_inquiry (cd_inquiry_block *data,
  831.       cd_control_block const *control);
  832.  
  833. /* ------------------------------------------------------------------------
  834.  * Function:      cd_disc_has_changed()
  835.  *
  836.  * Description:   Marks disc as having changed - should not normally be
  837.  *                used
  838.  *
  839.  * Input:         control - value of R7 on entry
  840.  *
  841.  * Other notes:   Calls SWI 0x41256.
  842.  */
  843.  
  844. extern os_error *xcd_disc_has_changed (cd_control_block const *control);
  845. extern void cd_disc_has_changed (cd_control_block const *control);
  846.  
  847. /* ------------------------------------------------------------------------
  848.  * Function:      cd_control()
  849.  *
  850.  * Description:   Controls retry on Unit Attention - do not use
  851.  *
  852.  * Input:         level - value of R0 on entry
  853.  *                control - value of R7 on entry
  854.  *
  855.  * Other notes:   Calls SWI 0x41257.
  856.  */
  857.  
  858. extern os_error *xcd_control (cd_error_response_level level,
  859.       cd_control_block const *control);
  860. extern void cd_control (cd_error_response_level level,
  861.       cd_control_block const *control);
  862.  
  863. /* ------------------------------------------------------------------------
  864.  * Function:      cd_supported()
  865.  *
  866.  * Description:   Calls SWI 0x41258
  867.  *
  868.  * Input:         control - value of R7 on entry
  869.  *
  870.  * Output:        flags - value of R0 on exit (X version only)
  871.  *
  872.  * Returns:       R0 (non-X version only)
  873.  */
  874.  
  875. extern os_error *xcd_supported (cd_control_block const *control,
  876.       cd_flags *flags);
  877. extern cd_flags cd_supported (cd_control_block const *control);
  878.  
  879. /* ------------------------------------------------------------------------
  880.  * Function:      cd_prefetch()
  881.  *
  882.  * Description:   Causes cacheing on drives where this is supported
  883.  *
  884.  * Input:         address_mode - value of R0 on entry
  885.  *                address - value of R1 on entry
  886.  *                control - value of R7 on entry
  887.  *
  888.  * Other notes:   Calls SWI 0x41259.
  889.  */
  890.  
  891. extern os_error *xcd_prefetch (cd_address_mode address_mode,
  892.       cd_address address,
  893.       cd_control_block const *control);
  894. extern void cd_prefetch (cd_address_mode address_mode,
  895.       cd_address address,
  896.       cd_control_block const *control);
  897.  
  898. /* ------------------------------------------------------------------------
  899.  * Function:      cd_reset()
  900.  *
  901.  * Description:   Resets the drive
  902.  *
  903.  * Input:         control - value of R7 on entry
  904.  *
  905.  * Other notes:   Calls SWI 0x4125A.
  906.  */
  907.  
  908. extern os_error *xcd_reset (cd_control_block const *control);
  909. extern void cd_reset (cd_control_block const *control);
  910.  
  911. /* ------------------------------------------------------------------------
  912.  * Function:      cd_close_drawer()
  913.  *
  914.  * Description:   Closes the drawer
  915.  *
  916.  * Input:         control - value of R7 on entry
  917.  *
  918.  * Other notes:   Calls SWI 0x4125B.
  919.  */
  920.  
  921. extern os_error *xcd_close_drawer (cd_control_block const *control);
  922. extern void cd_close_drawer (cd_control_block const *control);
  923.  
  924. /* ------------------------------------------------------------------------
  925.  * Function:      cd_is_drawer_locked()
  926.  *
  927.  * Description:   Calls SWI 0x4125C
  928.  *
  929.  * Input:         control - value of R7 on entry
  930.  *
  931.  * Output:        locked - value of R0 on exit (X version only)
  932.  *
  933.  * Returns:       R0 (non-X version only)
  934.  */
  935.  
  936. extern os_error *xcd_is_drawer_locked (cd_control_block const *control,
  937.       bool *locked);
  938. extern bool cd_is_drawer_locked (cd_control_block const *control);
  939.  
  940. /* ------------------------------------------------------------------------
  941.  * Function:      cd_audio_control()
  942.  *
  943.  * Description:   Do not use
  944.  *
  945.  * Input:         control - value of R1 on entry
  946.  *                control - value of R7 on entry
  947.  *
  948.  * Other notes:   Calls SWI 0x4125D with R0 = 0x0.
  949.  */
  950.  
  951. extern os_error *xcd_audio_control (int control,
  952.       cd_control_block const *control);
  953. extern void cd_audio_control (int control,
  954.       cd_control_block const *control);
  955.  
  956. /* ------------------------------------------------------------------------
  957.  * Function:      cd_last_error()
  958.  *
  959.  * Description:   Calls SWI 0x4125E
  960.  *
  961.  * Output:        errnum - value of R0 on exit (X version only)
  962.  *
  963.  * Returns:       R0 (non-X version only)
  964.  */
  965.  
  966. extern os_error *xcd_last_error (int *errnum);
  967. __swi (0x4125E) int cd_last_error (void);
  968.  
  969. /* ------------------------------------------------------------------------
  970.  * Function:      cd_audio_level()
  971.  *
  972.  * Description:   Do not use
  973.  *
  974.  * Input:         control - value of R7 on entry
  975.  *
  976.  * Output:        error - value of R0 on exit
  977.  *
  978.  * Other notes:   Calls SWI 0x4125F.
  979.  */
  980.  
  981. extern os_error *xcd_audio_level (cd_control_block const *control,
  982.       os_error **error);
  983. extern void cd_audio_level (cd_control_block const *control,
  984.       os_error **error);
  985.  
  986. /* ------------------------------------------------------------------------
  987.  * Function:      cd_register()
  988.  *
  989.  * Description:   version 2.20+
  990.  *
  991.  * Input:         info - value of R0 on entry
  992.  *                driver_code - value of R1 on entry
  993.  *                driver_workspace - value of R2 on entry
  994.  *
  995.  * Other notes:   Calls SWI 0x41260.
  996.  */
  997.  
  998. extern os_error *xcd_register (cd_register_block const *info,
  999.       void const *driver_code,
  1000.       void *driver_workspace);
  1001. __swi (0x41260) void cd_register (cd_register_block const *info,
  1002.       void const *driver_code,
  1003.       void *driver_workspace);
  1004.  
  1005. /* ------------------------------------------------------------------------
  1006.  * Function:      cd_unregister()
  1007.  *
  1008.  * Description:   version 2.20+
  1009.  *
  1010.  * Input:         info - value of R0 on entry
  1011.  *                driver_code - value of R1 on entry
  1012.  *
  1013.  * Other notes:   Calls SWI 0x41261.
  1014.  */
  1015.  
  1016. extern os_error *xcd_unregister (cd_register_block const *info,
  1017.       void const *driver_code);
  1018. __swi (0x41261) void cd_unregister (cd_register_block const *info,
  1019.       void const *driver_code);
  1020.  
  1021. /* ------------------------------------------------------------------------
  1022.  * Function:      cd_byte_copy()
  1023.  *
  1024.  * Description:   A fast memory copy routine - version 2.20+
  1025.  *
  1026.  * Input:         source - value of R1 on entry
  1027.  *                destination - value of R2 on entry
  1028.  *                size - value of R3 on entry
  1029.  *
  1030.  * Other notes:   Calls SWI 0x41262.
  1031.  */
  1032.  
  1033. extern os_error *xcd_byte_copy (byte const *source,
  1034.       byte *destination,
  1035.       int size);
  1036. extern void cd_byte_copy (byte const *source,
  1037.       byte *destination,
  1038.       int size);
  1039.  
  1040. /* ------------------------------------------------------------------------
  1041.  * Function:      cd_identify()
  1042.  *
  1043.  * Description:   version 2.20+
  1044.  *
  1045.  * Input:         control - value of R7 on entry
  1046.  *
  1047.  * Output:        drive_type - value of R2 on exit (X version only)
  1048.  *
  1049.  * Returns:       R2 (non-X version only)
  1050.  *
  1051.  * Other notes:   Calls SWI 0x41263.
  1052.  */
  1053.  
  1054. extern os_error *xcd_identify (cd_control_block const *control,
  1055.       cd_drive_type *drive_type);
  1056. extern cd_drive_type cd_identify (cd_control_block const *control);
  1057.  
  1058. /* ------------------------------------------------------------------------
  1059.  * Function:      cd_convert_to_lba()
  1060.  *
  1061.  * Description:   Converts an audio CD disc address to a logical block
  1062.  *                address - version 2.20+
  1063.  *
  1064.  * Input:         address_mode - value of R0 on entry
  1065.  *                address - value of R1 on entry
  1066.  *
  1067.  * Output:        new_address - value of R1 on exit (X version only)
  1068.  *
  1069.  * Returns:       R1 (non-X version only)
  1070.  *
  1071.  * Other notes:   Calls SWI 0x41264.
  1072.  */
  1073.  
  1074. extern os_error *xcd_convert_to_lba (cd_address_mode address_mode,
  1075.       cd_address address,
  1076.       cd_address *new_address);
  1077. extern cd_address cd_convert_to_lba (cd_address_mode address_mode,
  1078.       cd_address address);
  1079.  
  1080. /* ------------------------------------------------------------------------
  1081.  * Function:      cd_convert_to_msf()
  1082.  *
  1083.  * Description:   Converts an audio CD disc address to a red book format
  1084.  *                address - version 2.20+
  1085.  *
  1086.  * Input:         address_mode - value of R0 on entry
  1087.  *                address - value of R1 on entry
  1088.  *
  1089.  * Output:        new_address - value of R1 on exit (X version only)
  1090.  *
  1091.  * Returns:       R1 (non-X version only)
  1092.  *
  1093.  * Other notes:   Calls SWI 0x41265.
  1094.  */
  1095.  
  1096. extern os_error *xcd_convert_to_msf (cd_address_mode address_mode,
  1097.       cd_address address,
  1098.       cd_address *new_address);
  1099. extern cd_address cd_convert_to_msf (cd_address_mode address_mode,
  1100.       cd_address address);
  1101.  
  1102. /* ------------------------------------------------------------------------
  1103.  * Function:      cd_read_audio()
  1104.  *
  1105.  * Description:   Reads data from digitial audio tracks - version 2.22+
  1106.  *
  1107.  * Input:         address_mode - value of R0 on entry
  1108.  *                address - value of R1 on entry
  1109.  *                block_count - value of R2 on entry
  1110.  *                buffer - value of R3 on entry
  1111.  *                flags - value of R4 on entry
  1112.  *                control - value of R7 on entry
  1113.  *
  1114.  * Output:        drive_type - value of R2 on exit (X version only)
  1115.  *
  1116.  * Returns:       R2 (non-X version only)
  1117.  *
  1118.  * Other notes:   Calls SWI 0x41266.
  1119.  */
  1120.  
  1121. extern os_error *xcd_read_audio (cd_address_mode address_mode,
  1122.       cd_address address,
  1123.       int block_count,
  1124.       byte *buffer,
  1125.       bits flags,
  1126.       cd_control_block const *control,
  1127.       cd_drive_type *drive_type);
  1128. extern cd_drive_type cd_read_audio (cd_address_mode address_mode,
  1129.       cd_address address,
  1130.       int block_count,
  1131.       byte *buffer,
  1132.       bits flags,
  1133.       cd_control_block const *control);
  1134.  
  1135. /* ------------------------------------------------------------------------
  1136.  * Function:      cd_read_user_data()
  1137.  *
  1138.  * Description:   Do not use - version 2.22+
  1139.  *
  1140.  * Input:         address_mode - value of R0 on entry
  1141.  *                address - value of R1 on entry
  1142.  *                size - value of R2 on entry
  1143.  *                buffer - value of R3 on entry
  1144.  *                offset - value of R4 on entry
  1145.  *                control - value of R7 on entry
  1146.  *
  1147.  * Output:        last - value of R1 on exit (X version only)
  1148.  *                next_offset - value of R4 on exit
  1149.  *
  1150.  * Returns:       R1 (non-X version only)
  1151.  *
  1152.  * Other notes:   Calls SWI 0x41267.
  1153.  */
  1154.  
  1155. extern os_error *xcd_read_user_data (cd_address_mode address_mode,
  1156.       cd_address address,
  1157.       int size,
  1158.       byte *buffer,
  1159.       int offset,
  1160.       cd_control_block const *control,
  1161.       cd_address *last,
  1162.       int *next_offset);
  1163. extern cd_address cd_read_user_data (cd_address_mode address_mode,
  1164.       cd_address address,
  1165.       int size,
  1166.       byte *buffer,
  1167.       int offset,
  1168.       cd_control_block const *control,
  1169.       int *next_offset);
  1170.  
  1171. /* ------------------------------------------------------------------------
  1172.  * Function:      cd_seek_user_data()
  1173.  *
  1174.  * Description:   version 2.22+
  1175.  *
  1176.  * Input:         address_mode - value of R0 on entry
  1177.  *                address - value of R1 on entry
  1178.  *                offset - value of R2 on entry
  1179.  *                control - value of R7 on entry
  1180.  *
  1181.  * Output:        found - value of R1 on exit (X version only)
  1182.  *                offset - value of R4 on exit
  1183.  *
  1184.  * Returns:       R1 (non-X version only)
  1185.  *
  1186.  * Other notes:   Calls SWI 0x41268.
  1187.  */
  1188.  
  1189. extern os_error *xcd_seek_user_data (cd_address_mode address_mode,
  1190.       cd_address address,
  1191.       int offset,
  1192.       cd_control_block const *control,
  1193.       cd_address *found,
  1194.       int *offset);
  1195. extern cd_address cd_seek_user_data (cd_address_mode address_mode,
  1196.       cd_address address,
  1197.       int offset,
  1198.       cd_control_block const *control,
  1199.       int *offset);
  1200.  
  1201. /* ------------------------------------------------------------------------
  1202.  * Function:      cdgetaudioparms_volume_block()
  1203.  *
  1204.  * Description:   version 2.22+
  1205.  *
  1206.  * Input:         block - value of R1 on entry
  1207.  *                control - value of R7 on entry
  1208.  *
  1209.  * Output:        cmp - value of R0 on exit (X version only)
  1210.  *
  1211.  * Returns:       R0 (non-X version only)
  1212.  *
  1213.  * Other notes:   Calls SWI 0x41269 with R0 = 0x0.
  1214.  */
  1215.  
  1216. extern os_error *xcdgetaudioparms_volume_block (cd_volume_block *block,
  1217.       cd_control_block const *control,
  1218.       cd_audio_completion *cmp);
  1219. extern cd_audio_completion cdgetaudioparms_volume_block (cd_volume_block *block,
  1220.       cd_control_block const *control);
  1221.  
  1222. #ifdef __cplusplus
  1223.    }
  1224. #endif
  1225.  
  1226. #endif
  1227.