removed GetCommand() and made command and commandLength protected (nw)
This commit is contained in:
parent
76b18952fa
commit
8705d76c40
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user