Search
lxdream.org :: lxdream/src/gdrom/packet.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdrom/packet.h
changeset 493:c8183f888b14
prev342:850502f0e8de
next561:533f6b478071
author nkeynes
date Tue Nov 06 08:35:33 2007 +0000 (12 years ago)
permissions -rw-r--r--
last change Implement mode select command
view annotate diff log raw
     1 /**
     2  * $Id: packet.h,v 1.8 2007-11-06 08:35:33 nkeynes Exp $
     3  *
     4  * This file defines the command codes and any other flags used by the 
     5  * GD-Rom ATAPI packet commands.
     6  *
     7  * Copyright (c) 2005 Nathan Keynes.
     8  *
     9  * This program is free software; you can redistribute it and/or modify
    10  * it under the terms of the GNU General Public License as published by
    11  * the Free Software Foundation; either version 2 of the License, or
    12  * (at your option) any later version.
    13  *
    14  * This program is distributed in the hope that it will be useful,
    15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    17  * GNU General Public License for more details.
    18  */
    20 /**
    21  * Valid command codes (hex):
    22  * 00  Test 
    23  * 10
    24  * 11  Inquiry
    25  * 12
    26  * 13  Request Sense
    27  * 14  Read TOC
    28  * 15  Read session info
    29  * 16
    30  * 20
    31  * 21
    32  * 22
    33  * 30  Read CD
    34  * 31
    35  * 40  Read Status ?
    36  * 50
    37  * 51
    38  * 52
    39  * 53
    40  * 54
    41  * 55
    42  * 70  
    43  * 71
    44  * 72
    45  * 73
    46  * FE
    47  */
    49 #define PKT_CMD_TEST_READY 0x00
    50 #define PKT_CMD_MODE_SENSE 0x11
    51 #define PKT_CMD_MODE_SELECT 0x12
    52 #define PKT_CMD_SENSE    0x13
    53 #define PKT_CMD_READ_TOC 0x14
    54 #define PKT_CMD_SESSION_INFO 0x15
    55 #define PKT_CMD_READ_SECTOR 0x30
    56 #define PKT_CMD_PLAY_AUDIO  0x20 /* ? */
    57 #define PKT_CMD_STATUS  0x40
    58 #define PKT_CMD_SPIN_UP 0x70 /* ??? */
    59 #define PKT_CMD_71      0x71 /* ??? seems to return garbage */
    61 #define PKT_ERR_OK        0x0000
    62 #define PKT_ERR_NODISC    0x3A02
    63 #define PKT_ERR_BADCMD    0x2005
    64 #define PKT_ERR_BADFIELD  0x2405
    65 #define PKT_ERR_BADREAD   0x3002
    66 #define PKT_ERR_BADREADMODE 0x6405  /* Illegal mode for this track */
    67 #define PKT_ERR_RESET     0x2906
    69 #define IDE_READ_MODE1 0x20
    70 #define IDE_READ_RAW   0x30
.