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.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.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.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.15 + uint8_t intrq_pending; /* Flag to indicate if the INTRQ line is active */
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.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.27 #define IDE_ST_BUSY 0x80
1.29 #define IDE_CMD_SET_FEATURE 0xEF
1.31 #define IDE_FEAT_SET_TRANSFER_MODE 0x03
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.38 -/* The disc register indicates the current contents of the drive. When open
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.49 #define PKT_CMD_RESET 0x00 /* Wild-ass guess */
1.50 #define PKT_CMD_IDENTIFY 0x11
1.52 #define ide_can_write_regs() ((idereg.status&0x88)==0)
1.53 #define IS_IDE_IRQ_ENABLED() ((idereg.control&0x02)==0)
1.55 -void ide_reset(void);
1.57 uint16_t ide_read_data_pio(void);
1.58 uint8_t ide_read_status(void);