Search
lxdream.org :: lxdream :: r47:da09bcb7ce69
lxdream 0.9.1
released Jun 29
Download Now
changeset47:da09bcb7ce69
parent46:30d123047e16
child48:de09cb63b4d0
authornkeynes
dateTue Dec 27 12:41:33 2005 +0000 (14 years ago)
Log transfer mode set
src/gdrom/ide.c
src/gdrom/ide.h
1.1 --- a/src/gdrom/ide.c Tue Dec 27 08:42:57 2005 +0000
1.2 +++ b/src/gdrom/ide.c Tue Dec 27 12:41:33 2005 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: ide.c,v 1.6 2005-12-26 10:47:34 nkeynes Exp $
1.6 + * $Id: ide.c,v 1.7 2005-12-27 12:41:33 nkeynes Exp $
1.7 *
1.8 * IDE interface implementation
1.9 *
1.10 @@ -126,6 +126,25 @@
1.11 break;
1.12 case IDE_CMD_SET_FEATURE:
1.13 switch( idereg.feature ) {
1.14 + case IDE_FEAT_SET_TRANSFER_MODE:
1.15 + switch( idereg.count & 0xF8 ) {
1.16 + case IDE_XFER_PIO:
1.17 + INFO( "Set PIO default mode: %d", idereg.count&0x07 );
1.18 + break;
1.19 + case IDE_XFER_PIO_FLOW:
1.20 + INFO( "Set PIO Flow-control mode: %d", idereg.count&0x07 );
1.21 + break;
1.22 + case IDE_XFER_MULTI_DMA:
1.23 + INFO( "Set Multiword DMA mode: %d", idereg.count&0x07 );
1.24 + break;
1.25 + case IDE_XFER_ULTRA_DMA:
1.26 + INFO( "Set Ultra DMA mode: %d", idereg.count&0x07 );
1.27 + break;
1.28 + default:
1.29 + INFO( "Setting unknown transfer mode: %02X", idereg.count );
1.30 + break;
1.31 + }
1.32 + break;
1.33 default:
1.34 WARN( "IDE: unimplemented feature: %02X", idereg.feature );
1.35 }
2.1 --- a/src/gdrom/ide.h Tue Dec 27 08:42:57 2005 +0000
2.2 +++ b/src/gdrom/ide.h Tue Dec 27 12:41:33 2005 +0000
2.3 @@ -1,5 +1,5 @@
2.4 /**
2.5 - * $Id: ide.h,v 1.2 2005-12-25 08:24:11 nkeynes Exp $
2.6 + * $Id: ide.h,v 1.3 2005-12-27 12:41:33 nkeynes Exp $
2.7 *
2.8 * This file defines the interface and structures of the dreamcast's IDE
2.9 * port. Note that the register definitions are in asic.h, as the registers
2.10 @@ -63,6 +63,13 @@
2.11 #define IDE_CMD_SERVICE 0xA2
2.12 #define IDE_CMD_SET_FEATURE 0xEF
2.13
2.14 +#define IDE_FEAT_SET_TRANSFER_MODE 0x03
2.15 +
2.16 +#define IDE_XFER_PIO 0x00
2.17 +#define IDE_XFER_PIO_FLOW 0x08
2.18 +#define IDE_XFER_MULTI_DMA 0x20
2.19 +#define IDE_XFER_ULTRA_DMA 0x40
2.20 +
2.21 /* The disc register indicates the current contents of the drive. When open
2.22 * contains 0x06.
2.23 */
.