/*DDK*************************************************************************/
/*                                                                           */
/* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
/*                                                                           */
/*    The following IBM OS/2 WARP source code is provided to you solely for  */
/*    the purpose of assisting you in your development of OS/2 WARP device   */
/*    drivers. You may use this code in accordance with the IBM License      */
/*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
/*    Copyright statement may not be removed.                                */
/*                                                                           */
/*****************************************************************************/

// these are in CDinit.c

void   _far CDStrat1(void);
void   DriveInit(struct  _RPINIT _far *pRPH);
void   _far _loadds IORBEntry(PIORB pIORB);
void   QIORB(PIORB pIORB);
PIORB  DeQIORB(void);
void   ProcessReq(PIORB pIORB);
void   IORB_CmdErr(USHORT  ErrCode,PIORB pIORB,USHORT  Sense_key,USHORT  AdditionalSense);
void   Build_Device_Table(struct  _IORB_CONFIGURATION _far *pIORB);
USHORT GetGeometry(USHORT  SubCmd,struct  _IORB_GEOMETRY _far *pIORB);

// These are in Proccdb.c

void   ProcessCDB(PIORB PIORB);
void   ProcessTOC(PIORB PIORB,PCDCDB pCDB);
void   ProcessMediaCatalogNumber(PIORB PIORB,PCDCDB pCDB);
void   ProcessInquiry(PIORB PIORB,PCDCDB pCDB);
void   ProcessCurrentPosition(PIORB PIORB,PCDCDB pCDB);
void   ProcessAudioPageControl(PIORB PIORB,struct  ModeSelectParmList _far *pDescriptor);
void   ProcessRead(PIORB PIORB,PCDCDB pCDB);
void   ProcessSeek(PIORB PIORB,PCDCDB pCDB);
void   ProcessModeSelectSense(PIORB PIORB,PCDCDB pCDB);
void   ProcessPauseResume(PIORB PIORB,PCDCDB pCDB);
void   ProcessPlay(PIORB PIORB,PCDCDB pCDB);
void   ProcessDiskInfo(PIORB PIORB,PCDCDB pCDB);
void   ProcessStartStop(PIORB PIORB,PCDCDB pCDB);
void   ProcessLock(PIORB PIORB,PCDCDB pCDB);
void   ProcessSubChan(PIORB PIORB,PCDCDB pCDB);
void   ProcessCapacity(PIORB PIORB,PCDCDB pCDB);
void   ProcessHeader(PIORB PIORB,PCDCDB pCDB);
USHORT ValidMSF(ULONG  pos);

// these are in CDReady.c

USHORT GetTocInfo(void);
USHORT CacheTOC(PCDROMSTAT Data,UCHAR  checksum);
USHORT ReadyHardware(PIORB pIORB,USHORT  OpCode);
void   SpecialRead(void);

// these are in DRVCMD.c

void  _far _saveregs TimerTick(void);
void  _far _saveregs IrqHandler(void);
ULONG  GetClock(void);
void   ScaleClock(UCHAR  CpuType);
USHORT ChkBaseAddx(void);
USHORT ChkDrive(void);
BOOL   TryIrq(BOOL Testing);
void   ResetDrive(void);
ULONG  MayYield(ULONG  LastTime);
UCHAR  WriteData(UCHAR  Offset,UCHAR  Data);
void   WriteCmd(PUCHAR CmdPtr,USHORT  Len);
UCHAR  ReadData(void);
USHORT ReadStatus(void);
USHORT ReadStatusBytes(PUCHAR CmdPtr,UCHAR  Len,ULONG  tries);
USHORT ReadDataBytes(PUCHAR CmdPtr,USHORT  Len,PULONG  Count,ULONG  tries,USHORT  PostStatus);
USHORT DriveStatus(ULONG  tries);
USHORT GetStatus(ULONG  tries);
USHORT DriveCommand(UCHAR  OpCode,ULONG  Addr1,ULONG  Addr2,PCDROMSTAT Buffer,USHORT  BufferLen);
void   SetDataMode(UCHAR  data);
void   SetIrqMode(UCHAR  mode);
ULONG  AdrHsg2Red(ULONG  ulHsg);
ULONG  AdrRed2Hsg(ULONG  ulRedBook);
UCHAR  Bin2BCD(UCHAR  bBin);
UCHAR  BCD2Bin(UCHAR  bBin);

