From 603ebf6ac79ba9c4f63a908aaf663195c13391fc Mon Sep 17 00:00:00 2001 From: Ryan Holtz Date: Mon, 23 Nov 2009 23:29:56 +0000 Subject: [PATCH] (from MESS) Added support for SCSI command 0x2a (Write w/ 32-bit LBA), upped input buffer size in WD33C93 controller [Harmony] --- src/emu/machine/scsihd.c | 1 + src/emu/machine/wd33c93.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/emu/machine/scsihd.c b/src/emu/machine/scsihd.c index fc6f38638e9..dc69147bc4e 100644 --- a/src/emu/machine/scsihd.c +++ b/src/emu/machine/scsihd.c @@ -222,6 +222,7 @@ static void scsihd_write_data( SCSIInstance *scsiInstance, UINT8 *data, int data switch ( command[0] ) { case 0x0a: // WRITE(6) + case 0x2a: // WRITE(10) if ((our_this->disk) && (our_this->blocks)) { while (dataLength > 0) diff --git a/src/emu/machine/wd33c93.c b/src/emu/machine/wd33c93.c index ef570b22ef6..fbf845db0d9 100644 --- a/src/emu/machine/wd33c93.c +++ b/src/emu/machine/wd33c93.c @@ -172,7 +172,7 @@ static const struct WD33C93interface *intf; typedef void (*cmd_handler)(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 /* internal controller data definition */ @@ -815,7 +815,7 @@ void wd33c93_exit( const struct WD33C93interface *interface ) void wd33c93_get_dma_data( int bytes, UINT8 *pData ) { - int len = bytes; + int len = bytes; if ( 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; } + assert(len); + memcpy( pData, &scsi_data.temp_input[scsi_data.temp_input_pos], len ); scsi_data.temp_input_pos += len;