Search
lxdream.org :: lxdream :: r250:84e056e12a19
lxdream 0.9.1
released Jun 29
Download Now
changeset250:84e056e12a19
parent249:1708bec547df
child251:3c5953d944e0
authornkeynes
dateTue Dec 19 11:58:12 2006 +0000 (13 years ago)
Add stub for packet 0x40,0x00 (status of some kind)
src/gdrom/ide.c
1.1 --- a/src/gdrom/ide.c Tue Dec 19 11:54:47 2006 +0000
1.2 +++ b/src/gdrom/ide.c Tue Dec 19 11:58:12 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: ide.c,v 1.18 2006-12-19 09:52:56 nkeynes Exp $
1.6 + * $Id: ide.c,v 1.19 2006-12-19 11:58:12 nkeynes Exp $
1.7 *
1.8 * IDE interface implementation
1.9 *
1.10 @@ -110,6 +110,22 @@
1.11 0x15, 0xF1, 0x39, 0xF3, 0x40, 0xDC, 0xDC, 0x25, 0x24, 0x56, 0x6E, 0xA9, 0x2F, 0xF0, 0x00, 0x00 };
1.12
1.13
1.14 +char gdrom_status[] = {
1.15 + 0x00, 0x15, 0x00, 0x64, 0x00, 0x40, 0x00, 0x00,
1.16 + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
1.17 + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
1.18 + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
1.19 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1.20 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
1.21 + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1.22 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1.23 + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x40,
1.24 + 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
1.25 + 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x40, 0x40,
1.26 + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,
1.27 + 0x00, 0x40, 0x00, 0x00 };
1.28 +
1.29 +
1.30 static void ide_init( void )
1.31 {
1.32 ide_reset();
1.33 @@ -453,6 +469,11 @@
1.34 ide_start_packet_read( length, blocksize );
1.35 }
1.36 break;
1.37 + case PKT_CMD_PLAY_CD:
1.38 + ide_set_packet_result( 0 );
1.39 + ide_raise_interrupt();
1.40 + idereg.status = 0x50;
1.41 + break;
1.42 case PKT_CMD_READ_SECTOR:
1.43 lba = cmd[2] << 16 | cmd[3] << 8 | cmd[4];
1.44 length = cmd[8] << 16 | cmd[9] << 8 | cmd[10]; /* blocks */
1.45 @@ -500,6 +521,11 @@
1.46 } else {
1.47 switch( cmd[1] ) {
1.48 case 0:
1.49 + if( length > sizeof(gdrom_status) ) {
1.50 + length = sizeof(gdrom_status);
1.51 + }
1.52 + memcpy( data_buffer, gdrom_status, length );
1.53 + ide_start_packet_read( length, blocksize );
1.54 break;
1.55 case 1:
1.56 if( length > 16 ) {
.