[iyonix-support] Re: CDROM oddities

  • From: cj <chris@xxxxxxxxxxxxxxxxxxxx>
  • To: iyonix-support@xxxxxxxxxxxxx
  • Date: Fri, 11 Apr 2014 12:10:52 +0100

In article <53f696e7bcjcgl@xxxxxxxxxxxxxxx>,
   Jim Lesurf <jcgl@xxxxxxxxxxxxxxx> wrote:
> Is the 'card = 3' value an indicator of such problems? I'm
> wondering how the programmer can tell without simply trying the CD_
> swis and seeing if they fail.

The various parameters returned in the 'device' from the SWI
convert_drive_to_device should be transparent to the programmer. You
fill the 5 integer block using the appropriate rotates and masks, and
pass the address of that block in the call to CD_ReadAudio. I do that
in my ripper and have never had any problems. There are still a few
people out there who use it and it works for them.

I use oslib, but the code should be somewhat similar.

-------------------------------------------------------
void cdread_init ( int cdfs_log_no )

{
  int device ;

  device = cdfs_convert_drive_to_device ( cdfs_log_no ) ;
  gv.cd.cd_cblk.reserved[0] = device & 7 ;
  gv.cd.cd_cblk.reserved[1] = (device>>3) & 3 ;
  gv.cd.cd_cblk.reserved[2] = (device>>5) & 7 ;
  gv.cd.cd_cblk.reserved[3] = (device>>8) & 0xFF ;
  gv.cd.cd_cblk.reserved[4] = (device>>16) & 0xFFFF ;
  return;
}
----------------------------------------------------------

This sets up the block ready for calls to cd_read_audio.

In my code, I see I only read one block at a time.

-- 
        Chris Johnson
---
To alter your preferences or leave the group, 
visit //www.freelists.org/list/iyonix-support
Other info via //www.freelists.org/webpage/iyonix-support
List-related queries to iyonix-support-moderators@xxxxxxxxxxxxx

Other related posts: