/***************************************************************************
 *                                                                         *
 *  NOTICE  :   Canadian Prototype Replicas © 1989-1991                    *
 *                                                                         *
 *              All Rights Reserved                                        *
 *                                                                         *
 ***************************************************************************
 *                                                                         *
 *  PROJECT :   CDROM-FS                                                   *
 *                                                                         *
 *                                                                         *
 *  DATE    :   December 1,1989                                            *
 *                                                                         *
 *                                                                         *
 *  VERSION :   0.0                                                        *
 *                                                                         *
 ***************************************************************************
 *                                                                         *
 *  FILENAME:   CDExtens.h                                                 *
 *                                                                         *
 *                                                                         *
 *  SYNOPSIS:   Common include file for dealing with extensions to the     *
 *                                                                         *
 *              DOS environment, specific to CD-Rom.                       *
 *                                                                         *
 *                                                                         *
 *  AUTHOR  :   Allan M. Purtle                                            *
 *                                                                         *
 *                                                                         *
 *  SEE ALSO:                                                              *
 *                                                                         *
 ***************************************************************************
 *                                                                         *
 *  REVISION:                                                              *
 *                                                                         *
 *  Date        Author          Description                                *
 *  --------    --------------  -----------------------------------------  *
 *  12-01-89    A.M.Purtle      New Code                                   *
 *                                                                         *
 *                                                                         *
 ***************************************************************************/

#ifndef CDROM_CDEXTENS_H
#define CDROM_CDEXTENS_H
#endif !CDROM_CDEXTENS_H

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif !EXEC_TYPES_H

#ifndef DOS_DOSEXTENS_H
#include <DOS/DosExtens.h>
#endif !DOS_DOSEXTENS_H


#define CDROMNAME   "cdrom.library"

#define CDBLOCKSIZE 2048L

/***********************************
 *                                 *
 * Disk States                     *
 *                                 *
 ***********************************/

#define ISO     (('I'<<24) | ('S'<<16) | ('O'<<8) | ('\0'))
#define HSG     (('H'<<24) | ('S'<<16) | ('G'<<8) | ('\0'))
#define CDDA    (('C'<<24) | ('D'<<16) | ('D'<<8) | ('A'))

/***********************************
 *                                 *
 *  Compact Disc Specific Packet   *
 *                                 *
 *  Types.                         *
 *                                 *
 ***********************************/

#define ACTION_CD_EXAMINE           2550
#define ACTION_CD_EXNEXT            2551

#define ACTION_GET_VD               2552
#define ACTION_GET_EAR              2553


/***********************************
 *                                 *
 * Type Defines for GetVD()        *
 *                                 *
 ***********************************/

#define BOOT            0L
#define PRIMARY         1L
#define SUPPLEMENTARY   2L
#define PARTITION       3L
#define TERMINATING     255L
#define UNISYS_PRIMARY  240L

/***********************************
 *                                 *
 * This is the extended structure  *
 *                                 *
 * for CD_EXAMINE and CD_EXNEXT.   *
 *                                 *
 ***********************************/

struct CDFileInfoBlock
    {
    struct FileInfoBlock    FIB;

    UBYTE   Length;
    UBYTE   EARLen;
    UWORD   Version;

    ULONG   LBSize;
    ULONG   DataLen;

    UBYTE   FileDate[7];
    UBYTE   Flags;

    UBYTE   Size;
    UBYTE   Skip;
    UWORD   VSN;

    UBYTE   LenSU;
    UBYTE   DataSU[220];
    };
