diff --git a/src/emu/machine/cr589.c b/src/emu/machine/cr589.c index ed75d674aeb..687d4c95db8 100644 --- a/src/emu/machine/cr589.c +++ b/src/emu/machine/cr589.c @@ -31,10 +31,6 @@ void cr589_device::device_start() void cr589_device::ExecCommand( int *transferLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch( command[ 0 ] ) { case 0x3b: // WRITE BUFFER @@ -61,10 +57,6 @@ void cr589_device::ExecCommand( int *transferLength ) void cr589_device::ReadData( UINT8 *data, int dataLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch( command[ 0 ] ) { case 0x12: // INQUIRY @@ -93,10 +85,6 @@ void cr589_device::ReadData( UINT8 *data, int dataLength ) void cr589_device::WriteData( UINT8 *data, int dataLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch( command[ 0 ] ) { case 0x3b: // WRITE BUFFER diff --git a/src/emu/machine/scsicd.c b/src/emu/machine/scsicd.c index 292957b86c8..2ca9caa4b38 100644 --- a/src/emu/machine/scsicd.c +++ b/src/emu/machine/scsicd.c @@ -104,13 +104,9 @@ machine_config_constructor scsicd_device::device_mconfig_additions() const void scsicd_device::ExecCommand( int *transferLength ) { - UINT8 *command; - int commandLength; device_t *cdda; int trk; - GetCommand( &command, &commandLength ); - switch ( command[0] ) { case 0x03: // REQUEST SENSE @@ -387,17 +383,12 @@ void scsicd_device::ExecCommand( int *transferLength ) void scsicd_device::ReadData( UINT8 *data, int dataLength ) { - UINT8 *command; - int commandLength; - int i; UINT32 last_phys_frame; UINT32 temp; UINT8 tmp_buffer[2048]; device_t *cdda; - GetCommand( &command, &commandLength ); - switch ( command[0] ) { case 0x03: // REQUEST SENSE @@ -724,10 +715,6 @@ void scsicd_device::ReadData( UINT8 *data, int dataLength ) void scsicd_device::WriteData( UINT8 *data, int dataLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch (command[ 0 ]) { case 0x15: // MODE SELECT(6) diff --git a/src/emu/machine/scsihd.c b/src/emu/machine/scsihd.c index 4f2f274f4b1..44a908090bd 100644 --- a/src/emu/machine/scsihd.c +++ b/src/emu/machine/scsihd.c @@ -87,10 +87,6 @@ machine_config_constructor scsihd_device::device_mconfig_additions() const // scsihd_exec_command void scsihd_device::ExecCommand( int *transferLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch ( command[0] ) { case 0x03: // REQUEST SENSE @@ -184,9 +180,6 @@ void scsihd_device::ExecCommand( int *transferLength ) void scsihd_device::ReadData( UINT8 *data, int dataLength ) { int i; - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); // if we're a drive without a disk, return all zeroes if (!disk) @@ -281,10 +274,6 @@ void scsihd_device::ReadData( UINT8 *data, int dataLength ) void scsihd_device::WriteData( UINT8 *data, int dataLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - if (!disk) { return; diff --git a/src/emu/machine/scsihle.c b/src/emu/machine/scsihle.c index 839a8a49b0f..ee289685a8a 100644 --- a/src/emu/machine/scsihle.c +++ b/src/emu/machine/scsihle.c @@ -33,10 +33,6 @@ void scsihle_device::device_start() void scsihle_device::ExecCommand( int *transferLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch( command[ 0 ] ) { case SCSI_CMD_TEST_UNIT_READY: @@ -68,10 +64,6 @@ void scsihle_device::ExecCommand( int *transferLength ) void scsihle_device::ReadData( UINT8 *data, int dataLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch( command[ 0 ] ) { case SCSI_CMD_REQUEST_SENSE: @@ -88,10 +80,6 @@ void scsihle_device::ReadData( UINT8 *data, int dataLength ) void scsihle_device::WriteData( UINT8 *data, int dataLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch( command[ 0 ] ) { case SCSI_CMD_SEND_DIAGNOSTIC: @@ -127,12 +115,6 @@ void scsihle_device::SetCommand( UINT8 *_command, int _commandLength ) SetPhase( SCSI_PHASE_COMMAND ); } -void scsihle_device::GetCommand( UINT8 **_command, int *_commandLength ) -{ - *_command = command; - *_commandLength = commandLength; -} - int scsihle_device::GetDeviceID() { return scsiID; diff --git a/src/emu/machine/scsihle.h b/src/emu/machine/scsihle.h index 10e1ce5139d..4ef20e1a91e 100644 --- a/src/emu/machine/scsihle.h +++ b/src/emu/machine/scsihle.h @@ -21,7 +21,6 @@ public: virtual void SetDevice( void *device ) = 0; virtual void GetDevice( void **device ) = 0; virtual void SetCommand( UINT8 *command, int commandLength ); - virtual void GetCommand( UINT8 **command, int *commandLength ); virtual void ExecCommand( int *transferLength ); virtual void WriteData( UINT8 *data, int dataLength ); virtual void ReadData( UINT8 *data, int dataLength ); @@ -40,6 +39,9 @@ protected: virtual void device_start(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + UINT8 command[ 32 ]; + int commandLength; + private: void scsi_out_req_delay(UINT8 state); void scsi_change_phase(UINT8 newphase); @@ -57,7 +59,6 @@ private: emu_timer *sel_timer; emu_timer *dataout_timer; - UINT8 command[ 32 ]; UINT8 cmd_idx; UINT8 is_linked; @@ -67,7 +68,6 @@ private: int data_last; int sectorbytes; - int commandLength; int phase; int scsiID; }; diff --git a/src/mame/machine/gdrom.c b/src/mame/machine/gdrom.c index 7e48ac65b0f..91d7be89ed2 100644 --- a/src/mame/machine/gdrom.c +++ b/src/mame/machine/gdrom.c @@ -103,14 +103,9 @@ machine_config_constructor gdrom_device::device_mconfig_additions() const void gdrom_device::ExecCommand( int *transferLength ) { - UINT8 *command; - int commandLength; - device_t *cdda; int trk; - GetCommand( &command, &commandLength ); - switch ( command[0] ) { case 0x03: // REQUEST SENSE @@ -445,17 +440,12 @@ void gdrom_device::ExecCommand( int *transferLength ) void gdrom_device::ReadData( UINT8 *data, int dataLength ) { - UINT8 *command; - int commandLength; - int i; UINT32 last_phys_frame; UINT32 temp; UINT8 tmp_buffer[2048]; device_t *cdda; - GetCommand( &command, &commandLength ); - switch ( command[0] ) { case 0x03: // REQUEST SENSE @@ -797,10 +787,6 @@ void gdrom_device::ReadData( UINT8 *data, int dataLength ) void gdrom_device::WriteData( UINT8 *data, int dataLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch (command[ 0 ]) { case 0x15: // MODE SELECT(6) diff --git a/src/mess/machine/acb4070.c b/src/mess/machine/acb4070.c index 69b3cb4ef01..e7b65f847d3 100644 --- a/src/mess/machine/acb4070.c +++ b/src/mess/machine/acb4070.c @@ -21,10 +21,6 @@ acb4070_device::acb4070_device(const machine_config &mconfig, const char *tag, d void acb4070_device::ExecCommand( int *transferLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch( command[ 0 ] ) { case ACB4070_CMD_WRITE_DATA_BUFFER: diff --git a/src/mess/machine/d9060hd.c b/src/mess/machine/d9060hd.c index 6f0fad9d554..37abe8731bb 100644 --- a/src/mess/machine/d9060hd.c +++ b/src/mess/machine/d9060hd.c @@ -19,10 +19,6 @@ d9060hd_device::d9060hd_device(const machine_config &mconfig, const char *tag, d void d9060hd_device::ExecCommand( int *transferLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch( command[ 0 ] ) { case D9060HD_CMD_PHYSICAL_DEVICE_ID: diff --git a/src/mess/machine/s1410.c b/src/mess/machine/s1410.c index 8f1ce9d98ed..93e37e52192 100644 --- a/src/mess/machine/s1410.c +++ b/src/mess/machine/s1410.c @@ -224,10 +224,6 @@ s1410_device::s1410_device(const machine_config &mconfig, const char *tag, devic void s1410_device::ExecCommand( int *transferLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch( command[ 0 ] ) { case S1410_CMD_INIT_DRIVE_PARAMS: @@ -266,10 +262,6 @@ void s1410_device::ExecCommand( int *transferLength ) void s1410_device::WriteData( UINT8 *data, int dataLength ) { - UINT8 *command; - int commandLength; - GetCommand( &command, &commandLength ); - switch( command[ 0 ] ) { case S1410_CMD_INIT_DRIVE_PARAMS: