1.1 --- a/src/gdrom/ide.h Wed Jan 31 10:58:42 2007 +0000
1.2 +++ b/src/gdrom/ide.h Tue Nov 06 08:35:33 2007 +0000
1.5 - * $Id: ide.h,v 1.13 2007-01-31 10:58:42 nkeynes Exp $
1.6 + * $Id: ide.h,v 1.14 2007-11-06 08:35:33 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.14 +#define GDROM_SENSE_LENGTH 10
1.15 +#define GDROM_MODE_LENGTH 32
1.17 struct ide_registers {
1.18 /* IDE interface registers */
1.19 uint8_t status; /* A05F709C + A05F7018 Read-only */
1.21 uint8_t intrq_pending; /* Flag to indicate if the INTRQ line is active */
1.22 gboolean interface_enabled;
1.23 gboolean was_reset; /* Flag indicating that the device has just been reset */
1.26 + uint32_t last_packet_command; /* Identifies the command executing during a r/w cycle */
1.28 /* Sense response for the last executed packet command */
1.29 - unsigned char gdrom_sense[10];
1.31 + unsigned char gdrom_sense[GDROM_SENSE_LENGTH];
1.32 + unsigned char gdrom_mode[GDROM_MODE_LENGTH];
1.34 /* offset in the buffer of the next word to read/write, or -1
1.39 + int32_t data_offset;
1.40 + int32_t data_length;
1.42 /* Status reporting information */
1.43 uint8_t last_read_track;
1.44 - uint32_t read_lba;
1.45 - uint32_t read_mode;
1.46 + uint32_t current_lba;
1.47 + uint32_t current_mode;
1.48 uint32_t sectors_left; /* sectors left after current read */
1.52 uint32_t ide_read_data_dma( uint32_t addr, uint32_t length );
1.53 uint8_t ide_read_status(void);
1.54 uint8_t ide_get_drive_status(void);
1.55 -void ide_write_buffer( unsigned char *data, int length );
1.56 +void ide_write_buffer( unsigned char *data, uint32_t length );
1.58 void ide_write_command( uint8_t command );
1.59 void ide_write_control( uint8_t value );