Search
lxdream.org :: lxdream/src/gdrom/packet.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdrom/packet.h
changeset 143:9446fb6df0c5
prev142:2f631c3a3946
next149:d88dd2e9a190
author nkeynes
date Wed May 03 12:52:38 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change Add (track) mode parameter to read sectors call
Fix missing interrupt on end-of-packet read.
file annotate diff log raw
nkeynes@142
     1
/**
nkeynes@143
     2
 * $Id: packet.h,v 1.2 2006-05-03 12:52:38 nkeynes Exp $
nkeynes@142
     3
 *
nkeynes@142
     4
 * This file defines the command codes and any other flags used by the 
nkeynes@142
     5
 * GD-Rom ATAPI packet commands.
nkeynes@142
     6
 *
nkeynes@142
     7
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@142
     8
 *
nkeynes@142
     9
 * This program is free software; you can redistribute it and/or modify
nkeynes@142
    10
 * it under the terms of the GNU General Public License as published by
nkeynes@142
    11
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@142
    12
 * (at your option) any later version.
nkeynes@142
    13
 *
nkeynes@142
    14
 * This program is distributed in the hope that it will be useful,
nkeynes@142
    15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@142
    16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@142
    17
 * GNU General Public License for more details.
nkeynes@142
    18
 */
nkeynes@142
    19
nkeynes@142
    20
/**
nkeynes@142
    21
 * Valid command codes (hex):
nkeynes@142
    22
 * 00  Test 
nkeynes@142
    23
 * 10
nkeynes@142
    24
 * 11  Inquiry
nkeynes@142
    25
 * 12
nkeynes@142
    26
 * 13  Request Sense
nkeynes@142
    27
 * 14  Read TOC
nkeynes@142
    28
 * 15
nkeynes@142
    29
 * 16
nkeynes@142
    30
 * 20
nkeynes@142
    31
 * 21
nkeynes@142
    32
 * 22
nkeynes@142
    33
 * 30  Read CD
nkeynes@142
    34
 * 31
nkeynes@142
    35
 * 40
nkeynes@142
    36
 * 50
nkeynes@142
    37
 * 51
nkeynes@142
    38
 * 52
nkeynes@142
    39
 * 53
nkeynes@142
    40
 * 54
nkeynes@142
    41
 * 55
nkeynes@142
    42
 * 70
nkeynes@142
    43
 * 71
nkeynes@142
    44
 * 72
nkeynes@142
    45
 * 73
nkeynes@142
    46
 * FE
nkeynes@142
    47
 */
nkeynes@142
    48
nkeynes@142
    49
#define PKT_CMD_TEST_READY 0x00
nkeynes@142
    50
#define PKT_CMD_IDENTIFY 0x11
nkeynes@142
    51
#define PKT_CMD_SENSE    0x13
nkeynes@142
    52
#define PKT_CMD_READ_TOC 0x14
nkeynes@142
    53
#define PKT_CMD_READ_SECTOR 0x30
nkeynes@142
    54
nkeynes@142
    55
#define PKT_ERR_OK        0x0000
nkeynes@142
    56
#define PKT_ERR_NODISC    0x3A02
nkeynes@142
    57
#define PKT_ERR_BADCMD    0x2005
nkeynes@142
    58
#define PKT_ERR_BADFIELD  0x2405
nkeynes@143
    59
#define PKT_ERR_BADREAD   0x0030
nkeynes@143
    60
#define PKT_ERR_BADREADMODE 0x6405  /* Illegal mode for this track */
nkeynes@142
    61
nkeynes@142
    62
#define IDE_READ_MODE1 0x20
nkeynes@142
    63
#define IDE_READ_RAW   0x30
.