revision 240:9ae4bd697292
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 240:9ae4bd697292 |
parent | 239:e5cd6b2d4586 |
child | 241:776e46e58d6d |
author | nkeynes |
date | Fri Dec 15 10:18:39 2006 +0000 (16 years ago) |
Initial implementation of the NOP (00h) command
![]() | src/asic.c | view | annotate | diff | log | |
![]() | src/gdrom/ide.c | view | annotate | diff | log | |
![]() | src/gdrom/ide.h | view | annotate | diff | log |
1.1 --- a/src/asic.c Fri Dec 15 10:17:30 2006 +00001.2 +++ b/src/asic.c Fri Dec 15 10:18:39 2006 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: asic.c,v 1.19 2006-08-01 21:56:48 nkeynes Exp $1.6 + * $Id: asic.c,v 1.20 2006-12-15 10:18:39 nkeynes Exp $1.7 *1.8 * Support for the miscellaneous ASIC functions (Primarily event multiplexing,1.9 * and DMA).1.10 @@ -311,7 +311,7 @@1.11 idereg.device = (uint8_t)val;1.12 break;1.13 case IDECMD:1.14 - if( ide_can_write_regs() ) {1.15 + if( ide_can_write_regs() || val == IDE_CMD_NOP ) {1.16 ide_write_command( (uint8_t)val );1.17 }1.18 break;
2.1 --- a/src/gdrom/ide.c Fri Dec 15 10:17:30 2006 +00002.2 +++ b/src/gdrom/ide.c Fri Dec 15 10:18:39 2006 +00002.3 @@ -1,5 +1,5 @@2.4 /**2.5 - * $Id: ide.c,v 1.16 2006-06-18 12:01:53 nkeynes Exp $2.6 + * $Id: ide.c,v 1.17 2006-12-15 10:18:39 nkeynes Exp $2.7 *2.8 * IDE interface implementation2.9 *2.10 @@ -337,6 +337,13 @@2.11 ide_clear_interrupt();2.12 idereg.command = val;2.13 switch( val ) {2.14 + case IDE_CMD_NOP: /* Effectively an "abort" */2.15 + idereg.state = IDE_STATE_IDLE;2.16 + idereg.status = 0x51;2.17 + idereg.error = 0x04;2.18 + idereg.data_offset = -1;2.19 + ide_raise_interrupt();2.20 + return;2.21 case IDE_CMD_RESET_DEVICE:2.22 ide_reset();2.23 break;
3.1 --- a/src/gdrom/ide.h Fri Dec 15 10:17:30 2006 +00003.2 +++ b/src/gdrom/ide.h Fri Dec 15 10:18:39 2006 +00003.3 @@ -1,5 +1,5 @@3.4 /**3.5 - * $Id: ide.h,v 1.8 2006-05-23 13:11:45 nkeynes Exp $3.6 + * $Id: ide.h,v 1.9 2006-12-15 10:18:39 nkeynes Exp $3.7 *3.8 * This file defines the interface and structures of the dreamcast's IDE3.9 * port. Note that the register definitions are in asic.h, as the registers3.10 @@ -84,6 +84,7 @@3.11 #define IDE_CTL_RESET 0x043.12 #define IDE_CTL_IRQEN 0x02 /* IRQ enabled when == 0 */3.14 +#define IDE_CMD_NOP 0x003.15 #define IDE_CMD_RESET_DEVICE 0x083.16 #define IDE_CMD_PACKET 0xA03.17 #define IDE_CMD_IDENTIFY_PACKET_DEVICE 0xA1
.