Search
lxdream.org :: lxdream/src/gdrom/ide.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdrom/ide.h
changeset 138:afabd7e6d26d
prev125:49bf45f8210a
next142:2f631c3a3946
author nkeynes
date Sun Apr 30 01:51:08 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change Add Nero file format handler and general gdrom disc hooks
file annotate diff log raw
1.1 --- a/src/gdrom/ide.h Wed Mar 22 14:29:02 2006 +0000
1.2 +++ b/src/gdrom/ide.h Sun Apr 30 01:51:08 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: ide.h,v 1.4 2006-03-22 14:29:02 nkeynes Exp $
1.6 + * $Id: ide.h,v 1.5 2006-04-30 01:51:08 nkeynes Exp $
1.7 *
1.8 * This file defines the interface and structures of the dreamcast's IDE
1.9 * port. Note that the register definitions are in asic.h, as the registers
1.10 @@ -37,7 +37,8 @@
1.11 uint8_t lba2; /* A05F7094 Read/Write 10101 */
1.12 uint8_t device; /* A05F7098 Read/Write 10110 */
1.13 uint8_t command; /* A05F709C Write-only 10111 */
1.14 -
1.15 + uint8_t intrq_pending; /* Flag to indicate if the INTRQ line is active */
1.16 +
1.17 /* We don't keep the data register per se, rather the currently pending
1.18 * data is kept here and read out a byte at a time (in PIO mode) or all at
1.19 * once (in DMA mode). The IDE routines are responsible for managing this
1.20 @@ -48,7 +49,6 @@
1.21 int datalen;
1.22 int blocksize; /* Used to determine the transfer unit size */
1.23 int blockleft; /* Bytes remaining in the current block */
1.24 - uint8_t intrq_pending; /* Flag to indicate if the INTRQ line is active */
1.25 };
1.26
1.27 #define IDE_ST_BUSY 0x80
1.28 @@ -67,21 +67,12 @@
1.29 #define IDE_CMD_SET_FEATURE 0xEF
1.30
1.31 #define IDE_FEAT_SET_TRANSFER_MODE 0x03
1.32 -
1.33 #define IDE_XFER_PIO 0x00
1.34 #define IDE_XFER_PIO_FLOW 0x08
1.35 #define IDE_XFER_MULTI_DMA 0x20
1.36 #define IDE_XFER_ULTRA_DMA 0x40
1.37
1.38 -/* The disc register indicates the current contents of the drive. When open
1.39 - * contains 0x06.
1.40 - */
1.41 -#define IDE_DISC_AUDIO 0x00
1.42 -#define IDE_DISC_NONE 0x06
1.43 -#define IDE_DISC_CDROM 0x20
1.44 -#define IDE_DISC_GDROM 0x80
1.45 -#define IDE_DISC_READY 0x01 /* ored with above */
1.46 -#define IDE_DISC_IDLE 0x02 /* ie spun-down */
1.47 +
1.48
1.49 #define PKT_CMD_RESET 0x00 /* Wild-ass guess */
1.50 #define PKT_CMD_IDENTIFY 0x11
1.51 @@ -97,7 +88,6 @@
1.52 #define ide_can_write_regs() ((idereg.status&0x88)==0)
1.53 #define IS_IDE_IRQ_ENABLED() ((idereg.control&0x02)==0)
1.54
1.55 -void ide_reset(void);
1.56
1.57 uint16_t ide_read_data_pio(void);
1.58 uint8_t ide_read_status(void);
.