(from MESS) Added support for SCSI command 0x2a (Write w/ 32-bit LBA), upped input buffer size in WD33C93 controller [Harmony]

This commit is contained in:
Ryan Holtz 2009-11-23 23:29:56 +00:00
parent 40e2a10729
commit 603ebf6ac7
2 changed files with 5 additions and 2 deletions

View File

@ -222,6 +222,7 @@ static void scsihd_write_data( SCSIInstance *scsiInstance, UINT8 *data, int data
switch ( command[0] ) switch ( command[0] )
{ {
case 0x0a: // WRITE(6) case 0x0a: // WRITE(6)
case 0x2a: // WRITE(10)
if ((our_this->disk) && (our_this->blocks)) if ((our_this->disk) && (our_this->blocks))
{ {
while (dataLength > 0) while (dataLength > 0)

View File

@ -172,7 +172,7 @@ static const struct WD33C93interface *intf;
typedef void (*cmd_handler)(running_machine *machine); typedef void (*cmd_handler)(running_machine *machine);
#define CMD_HANDLER(name) void name(running_machine *machine) #define CMD_HANDLER(name) void name(running_machine *machine)
#define TEMP_INPUT_LEN 65536 #define TEMP_INPUT_LEN 262144
#define FIFO_SIZE 12 #define FIFO_SIZE 12
/* internal controller data definition */ /* internal controller data definition */
@ -815,7 +815,7 @@ void wd33c93_exit( const struct WD33C93interface *interface )
void wd33c93_get_dma_data( int bytes, UINT8 *pData ) void wd33c93_get_dma_data( int bytes, UINT8 *pData )
{ {
int len = bytes; int len = bytes;
if ( len >= wd33c93_get_xfer_count() ) if ( len >= wd33c93_get_xfer_count() )
len = wd33c93_get_xfer_count(); len = wd33c93_get_xfer_count();
@ -829,6 +829,8 @@ void wd33c93_get_dma_data( int bytes, UINT8 *pData )
len = TEMP_INPUT_LEN - len; len = TEMP_INPUT_LEN - len;
} }
assert(len);
memcpy( pData, &scsi_data.temp_input[scsi_data.temp_input_pos], len ); memcpy( pData, &scsi_data.temp_input[scsi_data.temp_input_pos], len );
scsi_data.temp_input_pos += len; scsi_data.temp_input_pos += len;