NOLIST ; This file is part of picide, ATA(PI) interface to PIC18 family MCUs. ; Copyright (C) 2004-5 Toby Thain, toby@telegraphics.com.au ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version. ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA LIST #define ATAPI_OPCODE atapipkt+0 #define ATAPI_LBA24 atapipkt+2 #define ATAPI_PAGECTL atapipkt+2 #define ATAPI_LBA16 atapipkt+3 #define ATAPI_LBA8 atapipkt+4 #define ATAPI_LBA0 atapipkt+5 ; the following apply to READ10+READCD commands (not to READ12) #define ATAPI_LEN16 atapipkt+6 #define ATAPI_LEN8 atapipkt+7 #define ATAPI_LEN0 atapipkt+8 #define ATAPI_CMD_INQUIRY 0x12 #define ATAPI_CMD_READ10 0x28 #define ATAPI_CMD_READCAPACITY 0x25 #define ATAPI_CMD_READCD 0xbe #define ATAPI_CMD_REQSENSE 0x03 #define ATAPI_CMD_MODESENSE 0x5a #define ATAPI_STATUS_CHECK b'00000001' #define ATAPI_SENSE_NOTREADY 2 #define ATAPI_SENSE_UNITATTN 6 ; define largest transfer we can handle ; should be at least one sector, and a multiple of sector size ; (which for CD-ROM, is 2048) #define ATAPI_TRANSFER_MAX 2048 #define ATAPI_CDDASECTOR 2352 #define ATAPI_FEATURES_PIO 0 ; no DMA, no overlap