summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/bus/scsi
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-09-13 08:41:44 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-09-13 08:41:44 +0200
commitf88cefad27a1737c76e09d99c9fb43e173506081 (patch)
tree2d8167d03579c46e226471747eb4407bd00ed6fa /src/emu/bus/scsi
parente92ac9e0fa8e99869894bea00589bbb526be30aa (diff)
Move all devices into separate part of src tree (nw)
Diffstat (limited to 'src/emu/bus/scsi')
-rw-r--r--src/emu/bus/scsi/acb4070.c63
-rw-r--r--src/emu/bus/scsi/acb4070.h47
-rw-r--r--src/emu/bus/scsi/cdu76s.c47
-rw-r--r--src/emu/bus/scsi/cdu76s.h31
-rw-r--r--src/emu/bus/scsi/d9060hd.c36
-rw-r--r--src/emu/bus/scsi/d9060hd.h22
-rw-r--r--src/emu/bus/scsi/omti5100.c94
-rw-r--r--src/emu/bus/scsi/omti5100.h30
-rw-r--r--src/emu/bus/scsi/pc9801_sasi.c28
-rw-r--r--src/emu/bus/scsi/pc9801_sasi.h20
-rw-r--r--src/emu/bus/scsi/s1410.c365
-rw-r--r--src/emu/bus/scsi/s1410.h35
-rw-r--r--src/emu/bus/scsi/sa1403d.c148
-rw-r--r--src/emu/bus/scsi/sa1403d.h36
-rw-r--r--src/emu/bus/scsi/scsi.c709
-rw-r--r--src/emu/bus/scsi/scsi.h313
-rw-r--r--src/emu/bus/scsi/scsicd.c41
-rw-r--r--src/emu/bus/scsi/scsicd.h31
-rw-r--r--src/emu/bus/scsi/scsihd.c39
-rw-r--r--src/emu/bus/scsi/scsihd.h31
-rw-r--r--src/emu/bus/scsi/scsihle.c591
-rw-r--r--src/emu/bus/scsi/scsihle.h92
22 files changed, 0 insertions, 2849 deletions
diff --git a/src/emu/bus/scsi/acb4070.c b/src/emu/bus/scsi/acb4070.c
deleted file mode 100644
index 1503272b55c..00000000000
--- a/src/emu/bus/scsi/acb4070.c
+++ /dev/null
@@ -1,63 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-/*
- * ACB4070 + RLL drive
- *
- */
-
-#include "acb4070.h"
-
-// device type definition
-const device_type ACB4070 = &device_creator<acb4070_device>;
-
-acb4070_device::acb4070_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : scsihd_device(mconfig, ACB4070, "ACB4070", tag, owner, clock, "acb4070", __FILE__)
-{
-}
-
-#define ACB4070_CMD_WRITE_DATA_BUFFER ( 0x13 )
-#define ACB4070_CMD_READ_DATA_BUFFER ( 0x14 )
-
-#define TRANSFERLENGTH_DATA_BUFFER 0x0400
-
-void acb4070_device::ExecCommand()
-{
- switch( command[ 0 ] )
- {
- case ACB4070_CMD_WRITE_DATA_BUFFER:
- m_phase = SCSI_PHASE_DATAOUT;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = TRANSFERLENGTH_DATA_BUFFER;
- break;
-
- case ACB4070_CMD_READ_DATA_BUFFER:
- m_phase = SCSI_PHASE_DATAIN;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = TRANSFERLENGTH_DATA_BUFFER;
- break;
-
- case T10SPC_CMD_MODE_SELECT_6:
- m_phase = SCSI_PHASE_DATAOUT;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = SCSILengthFromUINT8( &command[ 4 ] );
- break;
-
- default:
- scsihd_device::ExecCommand();
- break;
- }
-}
-
-void acb4070_device::WriteData( UINT8 *data, int dataLength )
-{
- switch( command[ 0 ] )
- {
- case T10SPC_CMD_MODE_SELECT_6:
- adaptec_sense_t *sense=(adaptec_sense_t *) data;
- int tracks=(sense->cylinder_count[0]<<8)+sense->cylinder_count[1];
- int capacity=(tracks * sense->head_count * 17);
- logerror("Tracks=%d, Heads=%d sec/track=%d\n",tracks,sense->head_count,sense->sectors_per_track);
- logerror("Setting disk capacity to %d blocks\n",capacity);
- break;
- }
-}
diff --git a/src/emu/bus/scsi/acb4070.h b/src/emu/bus/scsi/acb4070.h
deleted file mode 100644
index e396c6eb58f..00000000000
--- a/src/emu/bus/scsi/acb4070.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-#pragma once
-
-#ifndef __ACB4070__
-#define __ACB4070__
-
-#include "scsihd.h"
-
-class acb4070_device : public scsihd_device
-{
-public:
- // construction/destruction
- acb4070_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual void ExecCommand();
- virtual void WriteData( UINT8 *data, int dataLength );
-
-private:
- struct adaptec_sense_t
- {
- // parameter list
- UINT8 reserved1[3];
- UINT8 length;
-
- // descriptor list
- UINT8 density;
- UINT8 reserved2[4];
- UINT8 block_size[3];
-
- // drive parameter list
- UINT8 format_code;
- UINT8 cylinder_count[2];
- UINT8 head_count;
- UINT8 reduced_write[2];
- UINT8 write_precomp[2];
- UINT8 landing_zone;
- UINT8 step_pulse_code;
- UINT8 bit_flags;
- UINT8 sectors_per_track;
- };
-};
-
-// device type definition
-extern const device_type ACB4070;
-
-#endif
diff --git a/src/emu/bus/scsi/cdu76s.c b/src/emu/bus/scsi/cdu76s.c
deleted file mode 100644
index bb6a70390ed..00000000000
--- a/src/emu/bus/scsi/cdu76s.c
+++ /dev/null
@@ -1,47 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-#include "cdu76s.h"
-
-void sony_cdu76s_device::ExecCommand()
-{
- switch ( command[0] )
- {
- case 0x12: // INQUIRY
- logerror("CDU76S: INQUIRY\n");
- m_phase = SCSI_PHASE_DATAIN;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = SCSILengthFromUINT8( &command[ 4 ] );
- break;
- }
-}
-
-void sony_cdu76s_device::ReadData( UINT8 *data, int dataLength )
-{
- switch ( command[0] )
- {
- case 0x12: // INQUIRY
- memset( data, 0, dataLength );
- data[0] = 0x05; // device is present, device is CD/DVD (MMC-3)
- data[1] = 0x80; // media is removable
- data[2] = 0x05; // device complies with SPC-3 standard
- data[3] = 0x02; // response data format = SPC-3 standard
- // some Konami games freak out if this isn't "Sony", so we'll lie
- // this is the actual drive on my Nagano '98 board
- strcpy((char *)&data[8], "Sony");
- strcpy((char *)&data[16], "CDU-76S");
- strcpy((char *)&data[32], "1.0");
- break;
-
- default:
- scsicd_device::ReadData( data, dataLength );
- break;
- }
-}
-
-// device type definition
-const device_type CDU76S = &device_creator<sony_cdu76s_device>;
-
-sony_cdu76s_device::sony_cdu76s_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- scsicd_device(mconfig, CDU76S, "Sony CDU-76S", tag, owner, clock, "cdu76s", __FILE__)
-{
-}
diff --git a/src/emu/bus/scsi/cdu76s.h b/src/emu/bus/scsi/cdu76s.h
deleted file mode 100644
index a0997ea6c05..00000000000
--- a/src/emu/bus/scsi/cdu76s.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-/***************************************************************************
-
- cdu76s.h
-
- Sony CDU-76S
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __CDU76S_H__
-#define __CDU76S_H__
-
-#include "scsicd.h"
-#include "machine/t10mmc.h"
-
-class sony_cdu76s_device : public scsicd_device
-{
-public:
- sony_cdu76s_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual void ExecCommand();
- virtual void ReadData( UINT8 *data, int dataLength );
-};
-
-// device type definition
-extern const device_type CDU76S;
-
-#endif
diff --git a/src/emu/bus/scsi/d9060hd.c b/src/emu/bus/scsi/d9060hd.c
deleted file mode 100644
index 3d212582a39..00000000000
--- a/src/emu/bus/scsi/d9060hd.c
+++ /dev/null
@@ -1,36 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-/*
- * D9060 - SASI + TANDON TM602S
- *
- */
-
-#include "d9060hd.h"
-
-// device type definition
-const device_type D9060HD = &device_creator<d9060hd_device>;
-
-d9060hd_device::d9060hd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : scsihd_device(mconfig, D9060HD, "D9060HD", tag, owner, clock, "d9060hd", __FILE__)
-{
-}
-
-#define D9060HD_CMD_PHYSICAL_DEVICE_ID ( 0xc0 )
-#define D9060HD_CMD_DRIVE_DIAGS ( 0xe3 )
-
-void d9060hd_device::ExecCommand()
-{
- switch( command[ 0 ] )
- {
- case D9060HD_CMD_PHYSICAL_DEVICE_ID:
- case D9060HD_CMD_DRIVE_DIAGS:
- m_phase = SCSI_PHASE_STATUS;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = 0;
- break;
-
- default:
- scsihd_device::ExecCommand();
- break;
- }
-}
diff --git a/src/emu/bus/scsi/d9060hd.h b/src/emu/bus/scsi/d9060hd.h
deleted file mode 100644
index f3fa504cf81..00000000000
--- a/src/emu/bus/scsi/d9060hd.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-#pragma once
-
-#ifndef __D9060HD__
-#define __D9060HD__
-
-#include "scsihd.h"
-
-class d9060hd_device : public scsihd_device
-{
-public:
- // construction/destruction
- d9060hd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual void ExecCommand();
-};
-
-// device type definition
-extern const device_type D9060HD;
-
-#endif
diff --git a/src/emu/bus/scsi/omti5100.c b/src/emu/bus/scsi/omti5100.c
deleted file mode 100644
index 9e10538102d..00000000000
--- a/src/emu/bus/scsi/omti5100.c
+++ /dev/null
@@ -1,94 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-#include "omti5100.h"
-
-#define OMTI_STATUS_NOT_READY 0x04
-#define OMTI_READ_DATA_BUFFER 0xec
-#define OMTI_ASSIGN_DISK_PARAM 0xc2
-
-const device_type OMTI5100 = &device_creator<omti5100_device>;
-
-#if 0
-ROM_START( omti5100 )
- ROM_REGION(0x1000, "mcu", 0) // Hitachi Z8
- ROM_LOAD("100240-N.7a", 0x0000, 0x1000, CRC(d227d6cb) SHA1(3d6140764d3d043428c941826370ebf1597c63bd))
-ROM_END
-
-const rom_entry *omti5100_device::device_rom_region() const
-{
- return ROM_NAME( omti5100 );
-}
-#endif
-
-omti5100_device::omti5100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : scsihd_device(mconfig, OMTI5100, "OMTI 5100", tag, owner, clock, "omti5100", __FILE__),
- m_image0(*this, "image0"),
- m_image1(*this, "image1")
-{
-}
-
-void omti5100_device::device_start()
-{
- m_image = m_image0;
- scsihle_device::device_start();
-}
-
-void omti5100_device::ExecCommand()
-{
- harddisk_image_device *image = ((command[1] >> 5) & 1) ? m_image1 : m_image0;
- switch(command[0])
- {
- case OMTI_READ_DATA_BUFFER:
- m_phase = SCSI_PHASE_DATAIN;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = 512;
- break;
- case OMTI_ASSIGN_DISK_PARAM:
- m_phase = SCSI_PHASE_DATAOUT;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = 10;
- break;
- default:
- if(!image)
- {
- m_phase = SCSI_PHASE_STATUS;
- m_status_code = SCSI_STATUS_CODE_CHECK_CONDITION;
- m_sense_asc = OMTI_STATUS_NOT_READY;
- m_transfer_length = 0;
- }
- else
- {
- SetDevice(image);
- scsihd_device::ExecCommand();
- }
- break;
- }
-}
-
-void omti5100_device::ReadData( UINT8 *data, int dataLength )
-{
- switch( command[ 0 ] )
- {
- case OMTI_READ_DATA_BUFFER:
- data[0] = '5';
- data[1] = '1';
- data[2] = '0';
- data[3] = '0';
- break;
-
- default:
- scsihd_device::ReadData( data, dataLength );
- break;
- }
-}
-
-static MACHINE_CONFIG_FRAGMENT( omti5100 )
- MCFG_HARDDISK_ADD("image0")
- MCFG_HARDDISK_ADD("image1")
-MACHINE_CONFIG_END
-
-
-machine_config_constructor omti5100_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( omti5100 );
-}
diff --git a/src/emu/bus/scsi/omti5100.h b/src/emu/bus/scsi/omti5100.h
deleted file mode 100644
index 9c9e1e5444c..00000000000
--- a/src/emu/bus/scsi/omti5100.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-#ifndef OMTI5100_H_
-#define OMTI5100_H_
-
-#include "emu.h"
-#include "scsi.h"
-#include "scsihd.h"
-#include "imagedev/harddriv.h"
-
-class omti5100_device : public scsihd_device
-{
-public:
- omti5100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual machine_config_constructor device_mconfig_additions() const;
- //virtual const rom_entry *device_rom_region() const;
-
- virtual void ExecCommand();
- virtual void ReadData( UINT8 *data, int dataLength );
- void device_start();
-
-private:
- required_device<harddisk_image_device> m_image0;
- required_device<harddisk_image_device> m_image1;
-};
-
-extern const device_type OMTI5100;
-
-#endif /* OMTI5100_H_ */
diff --git a/src/emu/bus/scsi/pc9801_sasi.c b/src/emu/bus/scsi/pc9801_sasi.c
deleted file mode 100644
index 619f9f074da..00000000000
--- a/src/emu/bus/scsi/pc9801_sasi.c
+++ /dev/null
@@ -1,28 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-#include "pc9801_sasi.h"
-
-#define SASI_CMD_SPECIFY 0xc2 // according to x68k_hdc.c
-
-const device_type PC9801_SASI = &device_creator<pc9801_sasi_device>;
-
-pc9801_sasi_device::pc9801_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : scsihd_device(mconfig, PC9801_SASI, "PC-9801 SASI Controller", tag, owner, clock, "pc9801_sasi", __FILE__)
-{
-}
-
-void pc9801_sasi_device::ExecCommand()
-{
- switch(command[0])
- {
- case SASI_CMD_SPECIFY:
- m_phase = SCSI_PHASE_DATAOUT;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = 10;
- break;
-
- default:
- scsihd_device::ExecCommand();
- break;
- }
-}
diff --git a/src/emu/bus/scsi/pc9801_sasi.h b/src/emu/bus/scsi/pc9801_sasi.h
deleted file mode 100644
index 44ef5f5e0cc..00000000000
--- a/src/emu/bus/scsi/pc9801_sasi.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-#ifndef PC9801_SASI_H_
-#define PC9801_SASI_H_
-
-#include "scsihd.h"
-
-class pc9801_sasi_device : public scsihd_device
-{
-public:
- // construction/destruction
- pc9801_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- virtual void ExecCommand();
-};
-
-// device type definition
-extern const device_type PC9801_SASI;
-
-#endif /* PC9801_SASI_H_ */
diff --git a/src/emu/bus/scsi/s1410.c b/src/emu/bus/scsi/s1410.c
deleted file mode 100644
index 59b964ce4f2..00000000000
--- a/src/emu/bus/scsi/s1410.c
+++ /dev/null
@@ -1,365 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Curt Coder
-/**********************************************************************
-
- Xebec S1410 5.25" Winchester Disk Controller emulation
-
-**********************************************************************/
-
-/*
-
-Xebec S1410
-
-PCB Layout
-----------
-
-ASSY 104527 REV E04 SN 127623
-
-|-------------------------------------------|
-| |
-|CN1 |
-| |
-| |
-|CN2 |
-| XEBEC2 CN5|
-| PROM 2114 |
-|CN3 XEBEC1 2114 |
-| |
-|CN4 Z80 ROM |
-| 20MHz 16MHz |
-|-------------------------------------------|
-
-Notes:
- Relevant IC's shown.
-
- Z80 - Zilog Z8400APS Z80A CPU
- ROM - 2732 pinout ROM "XEBEC 104521G 2155008 M460949"
- PROM - National Semiconductor DM74S288N "103911" 32x8 TTL PROM
- 2114 - National Semiconductor NMC2148HN-3 1Kx4 RAM
- XEBEC1 - Xebec 3198-0009
- XEBEC2 - Xebec 3198-0045 "T20"
- CN1 - 4-pin Molex, drive power
- CN2 - 34-pin PCB edge, ST-506 drive 0/1 control
- CN3 - 2x10 PCB header, ST-506 drive 0 data
- CN4 - 2x10 PCB header, ST-506 drive 1 data
- CN5 - 2x25 PCB header, SASI host interface
-
-
-ASSY 104766 REV C02 SN 231985P
-
-|-------------------------------------------|
-| |
-| CN1 SY2158 |
-| CN7 CN6 |
-| ROM |
-| CN2 |
-| XEBEC1 Z80 |
-| CN5 |
-| CN3 XEBEC2 20MHz XEBEC3 |
-| |
-| CN4 XEBEC4 XEBEC5 |
-| |
-|-------------------------------------------|
-
-Notes:
- Relevant IC's shown.
-
- Z80 - Zilog Z8400APS Z80A CPU
- ROM - 2732 pinout ROM "104788D"
- SY2158 - Synertek SY2158A-3 1Kx8 RAM
- XEBEC1 - Xebec 3198-0046N8445
- XEBEC2 - Xebec 3198-0009
- XEBEC3 - Xebec 3198-0057
- XEBEC4 - Xebec 3198-0058
- XEBEC5 - Xebec 3198-0056
- CN1 - 4-pin Molex, drive power
- CN2 - 34-pin PCB edge, ST-506 drive 0/1 control
- CN3 - 2x10 PCB header, ST-506 drive 0 data
- CN4 - 2x10 PCB header, ST-506 drive 1 data
- CN5 - 2x25 PCB header, SASI host interface
- CN6 - 2x8 PCB header
- CN7 - 2x10 PCB header (test only)
-
-*/
-
-
-#include "s1410.h"
-#include "cpu/z80/z80.h"
-#include "imagedev/harddriv.h"
-
-
-
-//**************************************************************************
-// MACROS / CONSTANTS
-//**************************************************************************
-
-#define Z8400A_TAG "z80"
-
-
-
-//**************************************************************************
-// DEVICE DEFINITIONS
-//**************************************************************************
-
-const device_type S1410 = &device_creator<s1410_device>;
-
-//-------------------------------------------------
-// ROM( s1410 )
-//-------------------------------------------------
-
-ROM_START( s1410 )
- ROM_REGION( 0x1000, Z8400A_TAG, 0 )
- ROM_LOAD( "104521f", 0x0000, 0x1000, CRC(305b8e76) SHA1(9efaa53ae86bc111bd263ad433e083f78a000cab) )
- ROM_LOAD( "104521g", 0x0000, 0x1000, CRC(24385115) SHA1(c389f6108cd5ed798a090acacce940ee43d77042) )
- ROM_LOAD( "104788d", 0x0000, 0x1000, CRC(2e385e2d) SHA1(7e2c349b2b6e95f2134f82cffc38d86b8a68390d) )
-
- ROM_REGION( 0x20, "103911", 0 )
- ROM_LOAD( "103911", 0x00, 0x20, NO_DUMP ) // DM74S288N
-ROM_END
-
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *s1410_device::device_rom_region() const
-{
- return ROM_NAME( s1410 );
-}
-
-
-//-------------------------------------------------
-// ADDRESS_MAP( s1410_mem )
-//-------------------------------------------------
-
-static ADDRESS_MAP_START( s1410_mem, AS_PROGRAM, 8, s1410_device )
- AM_RANGE(0x0000, 0x0fff) AM_ROM AM_REGION(Z8400A_TAG, 0)
- AM_RANGE(0x1000, 0x13ff) AM_RAM
-ADDRESS_MAP_END
-
-
-//-------------------------------------------------
-// ADDRESS_MAP( s1410_io )
-//-------------------------------------------------
-
-static ADDRESS_MAP_START( s1410_io, AS_IO, 8, s1410_device )
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x66, 0x66) AM_WRITENOP
- AM_RANGE(0x67, 0x67) AM_WRITENOP
- AM_RANGE(0x68, 0x68) AM_READNOP
- AM_RANGE(0x69, 0x69) AM_WRITENOP
- AM_RANGE(0x6a, 0x6a) AM_WRITENOP
- AM_RANGE(0x6b, 0x6b) AM_WRITENOP
- AM_RANGE(0x6c, 0x6c) AM_WRITENOP
- AM_RANGE(0xa0, 0xa0) AM_NOP
- AM_RANGE(0xc1, 0xc1) AM_WRITENOP
- AM_RANGE(0xc2, 0xc2) AM_WRITENOP
- AM_RANGE(0xc3, 0xc3) AM_WRITENOP
-ADDRESS_MAP_END
-
-
-//-------------------------------------------------
-// MACHINE_DRIVER( s1410 )
-//-------------------------------------------------
-
-static MACHINE_CONFIG_FRAGMENT( s1410 )
- MCFG_CPU_ADD(Z8400A_TAG, Z80, XTAL_16MHz/4)
- MCFG_CPU_PROGRAM_MAP(s1410_mem)
- MCFG_CPU_IO_MAP(s1410_io)
- MCFG_DEVICE_DISABLE()
-
- MCFG_HARDDISK_ADD("image")
-MACHINE_CONFIG_END
-
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor s1410_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( s1410 );
-}
-
-
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-//-------------------------------------------------
-// s1410_device - constructor
-//-------------------------------------------------
-
-s1410_device::s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : scsihd_device(mconfig, S1410, "Xebec S1410", tag, owner, clock, "s1410", __FILE__)
-{
-}
-
-#define S1410_CMD_CHECK_TRACK_FORMAT ( 0x05 )
-#define S1410_CMD_FORMAT_TRACK ( 0x06 )
-#define S1410_CMD_INIT_DRIVE_PARAMS ( 0x0c )
-#define S1410_CMD_FORMAT_ALT_TRACK ( 0x0E )
-#define S1410_CMD_WRITE_SEC_BUFFER ( 0x0F )
-#define S1410_CMD_READ_SEC_BUFFER ( 0x10 )
-#define S1410_CMD_RAM_DIAGS ( 0xe0 )
-#define S1410_CMD_DRIVE_DIAGS ( 0xe3 )
-#define S1410_CMD_CONTROLER_DIAGS ( 0xe4 )
-
-#define S1410_STATUS_NOT_READY ( 0x04 )
-
-#define TRANSFERLENGTH_INIT_DRIVE_PARAMS ( 0x08 )
-#define TRANSFERLENGTH_FORMAT_ALT_TRACK ( 0x03 )
-#define TRANSFERLENGTH_SECTOR_BUFFER ( 0x0200 )
-
-void s1410_device::ExecCommand()
-{
- switch( command[ 0 ] )
- {
- case T10SPC_CMD_RECALIBRATE:
- if (command[1] >> 5)
- {
- m_phase = SCSI_PHASE_STATUS;
- m_status_code = SCSI_STATUS_CODE_CHECK_CONDITION;
- m_sense_asc = S1410_STATUS_NOT_READY;
- m_transfer_length = 0;
- }
- else
- {
- scsihd_device::ExecCommand();
- }
- break;
-
- case T10SPC_CMD_REQUEST_SENSE:
- m_phase = SCSI_PHASE_DATAIN;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = 4;
- break;
-
- case S1410_CMD_FORMAT_TRACK:
- {
- m_lba = (command[1]&0x1f)<<16 | command[2]<<8 | command[3];
-
- switch( m_sector_bytes )
- {
- case 256:
- m_blocks = 32;
- break;
-
- case 512:
- m_blocks = 17;
- break;
- }
-
- logerror("S1410: FORMAT TRACK at LBA %x for %x blocks\n", m_lba, m_blocks);
-
- if ((m_disk) && (m_blocks))
- {
- dynamic_buffer data(m_sector_bytes);
- memset(&data[0], 0xc6, m_sector_bytes);
-
- while (m_blocks > 0)
- {
- if (!hard_disk_write(m_disk, m_lba, &data[0]))
- {
- logerror("S1410: HD write error!\n");
- }
- m_lba++;
- m_blocks--;
- }
- }
-
- m_phase = SCSI_PHASE_STATUS;
- m_transfer_length = 0;
- }
- break;
-
- case S1410_CMD_INIT_DRIVE_PARAMS:
- m_phase = SCSI_PHASE_DATAOUT;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = TRANSFERLENGTH_INIT_DRIVE_PARAMS;
- break;
-
- case S1410_CMD_FORMAT_ALT_TRACK:
- m_phase = SCSI_PHASE_DATAOUT;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = TRANSFERLENGTH_FORMAT_ALT_TRACK;
- break;
-
- case S1410_CMD_WRITE_SEC_BUFFER:
- m_phase = SCSI_PHASE_DATAOUT;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = TRANSFERLENGTH_SECTOR_BUFFER;
- break;
-
- case S1410_CMD_READ_SEC_BUFFER:
- m_phase = SCSI_PHASE_DATAIN;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = TRANSFERLENGTH_SECTOR_BUFFER;
- break;
-
- case S1410_CMD_CHECK_TRACK_FORMAT:
- case S1410_CMD_RAM_DIAGS:
- case S1410_CMD_DRIVE_DIAGS:
- case S1410_CMD_CONTROLER_DIAGS:
- m_phase = SCSI_PHASE_STATUS;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- m_transfer_length = 0;
- break;
-
- default:
- scsihd_device::ExecCommand();
- break;
- }
-}
-
-void s1410_device::WriteData( UINT8 *data, int dataLength )
-{
- switch( command[ 0 ] )
- {
- case S1410_CMD_INIT_DRIVE_PARAMS:
- {
- int sectorsPerTrack = 0;
-
- switch( m_sector_bytes )
- {
- case 256:
- sectorsPerTrack = 32;
- break;
-
- case 512:
- sectorsPerTrack = 17;
- break;
- }
-
- UINT16 tracks = ((data[0]<<8)+data[1]);
- UINT8 heads = data[2];
- UINT32 capacity = tracks * heads * sectorsPerTrack * m_sector_bytes;
-
- logerror("S1410_CMD_INIT_DRIVE_PARAMS Tracks=%d, Heads=%d, Capacity=%d\n",tracks,heads,capacity);
- }
- break;
-
- default:
- scsihd_device::WriteData( data, dataLength );
- break;
- }
-}
-
-void s1410_device::ReadData( UINT8 *data, int dataLength )
-{
- switch( command[ 0 ] )
- {
- case T10SPC_CMD_REQUEST_SENSE:
- data[0] = m_sense_asc & 0x7f;
- data[1] = (m_sense_information >> 16) & 0x1f;
- data[2] = (m_sense_information >> 8) & 0xff;
- data[3] = (m_sense_information >> 0) & 0xff;
- break;
-
- default:
- scsihd_device::ReadData( data, dataLength );
- break;
- }
-}
diff --git a/src/emu/bus/scsi/s1410.h b/src/emu/bus/scsi/s1410.h
deleted file mode 100644
index b7834f56c88..00000000000
--- a/src/emu/bus/scsi/s1410.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Curt Coder
-/**********************************************************************
-
- Xebec S1410 5.25" Winchester Disk Controller emulation
-
-**********************************************************************/
-
-#pragma once
-
-#ifndef __S1410__
-#define __S1410__
-
-#include "scsihd.h"
-
-class s1410_device : public scsihd_device
-{
-public:
- // construction/destruction
- s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual const rom_entry *device_rom_region() const;
- virtual machine_config_constructor device_mconfig_additions() const;
-
- virtual void ExecCommand();
- virtual void WriteData( UINT8 *data, int dataLength );
- virtual void ReadData( UINT8 *data, int dataLength );
-};
-
-
-// device type definition
-extern const device_type S1410;
-
-#endif
diff --git a/src/emu/bus/scsi/sa1403d.c b/src/emu/bus/scsi/sa1403d.c
deleted file mode 100644
index 1abe47e0805..00000000000
--- a/src/emu/bus/scsi/sa1403d.c
+++ /dev/null
@@ -1,148 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Curt Coder
-/**********************************************************************
-
- Shugart SA1403D Winchester Disk Controller emulation
-
-**********************************************************************/
-
-#include "sa1403d.h"
-
-
-
-//**************************************************************************
-// DEVICE DEFINITIONS
-//**************************************************************************
-
-const device_type SA1403D = &device_creator<sa1403d_device>;
-
-
-//-------------------------------------------------
-// ROM( sa1403d )
-//-------------------------------------------------
-
-ROM_START( sa1403d )
- ROM_REGION( 0x4000, "sa1403d", 0 )
- ROM_DEFAULT_BIOS( "as31" )
- ROM_SYSTEM_BIOS( 0, "as30", "AS30" )
- ROMX_LOAD( "i", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(1) )
- ROMX_LOAD( "ii", 0x1000, 0x1000, NO_DUMP, ROM_BIOS(1) )
- ROMX_LOAD( "iii", 0x2000, 0x1000, NO_DUMP, ROM_BIOS(1) )
- ROMX_LOAD( "iv", 0x3000, 0x1000, NO_DUMP, ROM_BIOS(1) )
- ROM_SYSTEM_BIOS( 1, "as31", "AS31" )
- ROMX_LOAD( "i", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(2) )
- ROMX_LOAD( "ii", 0x1000, 0x1000, NO_DUMP, ROM_BIOS(2) )
- ROMX_LOAD( "iii", 0x2000, 0x1000, NO_DUMP, ROM_BIOS(2) )
- ROMX_LOAD( "iv", 0x3000, 0x1000, NO_DUMP, ROM_BIOS(2) )
- ROM_SYSTEM_BIOS( 2, "u50", "Diagnostic PROM set 12668" )
- ROMX_LOAD( "i", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(3) )
- ROMX_LOAD( "ii", 0x1000, 0x1000, NO_DUMP, ROM_BIOS(3) )
- ROMX_LOAD( "iii", 0x2000, 0x1000, NO_DUMP, ROM_BIOS(3) )
- ROMX_LOAD( "iv", 0x3000, 0x1000, NO_DUMP, ROM_BIOS(3) )
-ROM_END
-
-
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const rom_entry *sa1403d_device::device_rom_region() const
-{
- return ROM_NAME( sa1403d );
-}
-
-
-//-------------------------------------------------
-// MACHINE_DRIVER( sa1403d )
-//-------------------------------------------------
-
-static MACHINE_CONFIG_FRAGMENT( sa1403d )
- MCFG_HARDDISK_ADD("image")
-MACHINE_CONFIG_END
-
-
-//-------------------------------------------------
-// machine_config_additions - device-specific
-// machine configurations
-//-------------------------------------------------
-
-machine_config_constructor sa1403d_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( sa1403d );
-}
-
-
-//-------------------------------------------------
-// INPUT_PORTS( sa1403d )
-//-------------------------------------------------
-
-INPUT_PORTS_START( sa1403d )
- PORT_INCLUDE(scsihle)
-
- PORT_START("2H")
- PORT_DIPNAME( 0xc0, 0x40, "LUN 0 Drive Type" ) PORT_DIPLOCATION("2H:7,8")
- PORT_DIPSETTING( 0x00, "SA1002" ) // 2 heads, 256 cylinders
- PORT_DIPSETTING( 0x40, "SA1004" ) // 4 heads, 256 cylinders
- PORT_DIPSETTING( 0x80, "SA800" ) // 1 head, 77 cylinders
- PORT_DIPSETTING( 0xc0, "SA850" ) // 2 heads, 77 cylinders
- PORT_DIPNAME( 0x30, 0x30, "LUN 1 Drive Type" ) PORT_DIPLOCATION("2H:5,6")
- PORT_DIPSETTING( 0x00, "SA1002" )
- PORT_DIPSETTING( 0x10, "SA1004" )
- PORT_DIPSETTING( 0x20, "SA800" )
- PORT_DIPSETTING( 0x30, "SA850" )
- PORT_DIPNAME( 0x0c, 0x0c, "LUN 2 Drive Type" ) PORT_DIPLOCATION("2H:3,4")
- PORT_DIPSETTING( 0x00, "SA1002" )
- PORT_DIPSETTING( 0x04, "SA1004" )
- PORT_DIPSETTING( 0x08, "SA800" )
- PORT_DIPSETTING( 0x0c, "SA850" )
- PORT_DIPNAME( 0x03, 0x03, "LUN 3 Drive Type" ) PORT_DIPLOCATION("2H:1,2")
- PORT_DIPSETTING( 0x00, "SA1002" )
- PORT_DIPSETTING( 0x01, "SA1004" )
- PORT_DIPSETTING( 0x02, "SA800" )
- PORT_DIPSETTING( 0x03, "SA850" )
-INPUT_PORTS_END
-
-
-//-------------------------------------------------
-// input_ports - device-specific input ports
-//-------------------------------------------------
-
-ioport_constructor sa1403d_device::device_input_ports() const
-{
- return INPUT_PORTS_NAME( sa1403d );
-}
-
-
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-//-------------------------------------------------
-// sa1403d_device - constructor
-//-------------------------------------------------
-
-sa1403d_device::sa1403d_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : scsihd_device(mconfig, SA1403D, "Shugart SA1403D", tag, owner, clock, "sa1403d", __FILE__)
-{
-}
-
-void sa1403d_device::ExecCommand()
-{
- switch( command[ 0 ] )
- {
- default:
- scsihd_device::ExecCommand();
- break;
- }
-}
-
-void sa1403d_device::WriteData( UINT8 *data, int dataLength )
-{
- switch( command[ 0 ] )
- {
- default:
- scsihd_device::WriteData( data, dataLength );
- break;
- }
-}
diff --git a/src/emu/bus/scsi/sa1403d.h b/src/emu/bus/scsi/sa1403d.h
deleted file mode 100644
index 5f92ff11240..00000000000
--- a/src/emu/bus/scsi/sa1403d.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Curt Coder
-/**********************************************************************
-
- Shugart SA1403D Winchester Disk Controller emulation
-
-**********************************************************************/
-
-#pragma once
-
-#ifndef __SA1403D__
-#define __SA1403D__
-
-#include "scsihd.h"
-#include "imagedev/harddriv.h"
-
-class sa1403d_device : public scsihd_device
-{
-public:
- // construction/destruction
- sa1403d_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // optional information overrides
- virtual const rom_entry *device_rom_region() const;
- virtual machine_config_constructor device_mconfig_additions() const;
- virtual ioport_constructor device_input_ports() const;
-
- virtual void ExecCommand();
- virtual void WriteData( UINT8 *data, int dataLength );
-};
-
-
-// device type definition
-extern const device_type SA1403D;
-
-#endif
diff --git a/src/emu/bus/scsi/scsi.c b/src/emu/bus/scsi/scsi.c
deleted file mode 100644
index 7eac8fc7631..00000000000
--- a/src/emu/bus/scsi/scsi.c
+++ /dev/null
@@ -1,709 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-
-#include "scsi.h"
-
-SCSI_PORT_DEVICE::SCSI_PORT_DEVICE(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, SCSI_PORT, "SCSI Port", tag, owner, clock, "scsi", __FILE__),
- m_bsy_handler(*this),
- m_sel_handler(*this),
- m_cd_handler(*this),
- m_io_handler(*this),
- m_msg_handler(*this),
- m_req_handler(*this),
- m_ack_handler(*this),
- m_atn_handler(*this),
- m_rst_handler(*this),
- m_data0_handler(*this),
- m_data1_handler(*this),
- m_data2_handler(*this),
- m_data3_handler(*this),
- m_data4_handler(*this),
- m_data5_handler(*this),
- m_data6_handler(*this),
- m_data7_handler(*this),
- m_bsy_in(0),
- m_sel_in(0),
- m_cd_in(0),
- m_io_in(0),
- m_msg_in(0),
- m_req_in(0),
- m_ack_in(0),
- m_rst_in(0),
- m_data0_in(0),
- m_data1_in(0),
- m_data2_in(0),
- m_data3_in(0),
- m_data4_in(0),
- m_data5_in(0),
- m_data6_in(0),
- m_data7_in(0),
- m_bsy_out(0),
- m_sel_out(0),
- m_cd_out(0),
- m_io_out(0),
- m_msg_out(0),
- m_req_out(0),
- m_ack_out(0),
- m_rst_out(0),
- m_data0_out(0),
- m_data1_out(0),
- m_data2_out(0),
- m_data3_out(0),
- m_data4_out(0),
- m_data5_out(0),
- m_data6_out(0),
- m_data7_out(0)
-{
-}
-
-static MACHINE_CONFIG_FRAGMENT( scsi_port )
- MCFG_DEVICE_ADD( SCSI_PORT_DEVICE1, SCSI_PORT_SLOT, 0 )
- MCFG_DEVICE_ADD( SCSI_PORT_DEVICE2, SCSI_PORT_SLOT, 0 )
- MCFG_DEVICE_ADD( SCSI_PORT_DEVICE3, SCSI_PORT_SLOT, 0 )
- MCFG_DEVICE_ADD( SCSI_PORT_DEVICE4, SCSI_PORT_SLOT, 0 )
- MCFG_DEVICE_ADD( SCSI_PORT_DEVICE5, SCSI_PORT_SLOT, 0 )
- MCFG_DEVICE_ADD( SCSI_PORT_DEVICE6, SCSI_PORT_SLOT, 0 )
- MCFG_DEVICE_ADD( SCSI_PORT_DEVICE7, SCSI_PORT_SLOT, 0 )
-MACHINE_CONFIG_END
-
-machine_config_constructor SCSI_PORT_DEVICE::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME( scsi_port );
-}
-
-void SCSI_PORT_DEVICE::device_start()
-{
- const char *deviceName[] =
- {
- SCSI_PORT_DEVICE1,
- SCSI_PORT_DEVICE2,
- SCSI_PORT_DEVICE3,
- SCSI_PORT_DEVICE4,
- SCSI_PORT_DEVICE5,
- SCSI_PORT_DEVICE6,
- SCSI_PORT_DEVICE7
- };
-
- m_device_count = 0;
-
- for (int i = 0; i < 7; i++)
- {
- SCSI_PORT_SLOT_device *slot = subdevice<SCSI_PORT_SLOT_device>(deviceName[i]);
- m_slot[i] = slot;
-
- if (slot != NULL)
- m_device_count = i + 1;
- }
-
- m_bsy_handler.resolve_safe();
- m_sel_handler.resolve_safe();
- m_cd_handler.resolve_safe();
- m_io_handler.resolve_safe();
- m_msg_handler.resolve_safe();
- m_req_handler.resolve_safe();
- m_ack_handler.resolve_safe();
- m_atn_handler.resolve_safe();
- m_rst_handler.resolve_safe();
- m_data0_handler.resolve_safe();
- m_data1_handler.resolve_safe();
- m_data2_handler.resolve_safe();
- m_data3_handler.resolve_safe();
- m_data4_handler.resolve_safe();
- m_data5_handler.resolve_safe();
- m_data6_handler.resolve_safe();
- m_data7_handler.resolve_safe();
-
- m_data0_handler(0);
- m_data1_handler(0);
- m_data2_handler(0);
- m_data3_handler(0);
- m_data4_handler(0);
- m_data5_handler(0);
- m_data6_handler(0);
- m_data7_handler(0);
-
- m_bsy_handler(0);
- m_sel_handler(0);
- m_cd_handler(0);
- m_io_handler(0);
- m_msg_handler(0);
- m_req_handler(0);
- m_ack_handler(0);
- m_atn_handler(0);
- m_rst_handler(0);
-}
-
-void SCSI_PORT_DEVICE::update_bsy()
-{
- int bsy = m_bsy_in;
- for (int i = 0; i < m_device_count; i++)
- {
- bsy |= m_slot[i]->m_bsy;
- }
-
- if (m_bsy_out != bsy)
- {
- m_bsy_out = bsy;
- m_bsy_handler(bsy);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_bsy(bsy);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_sel()
-{
- int sel = m_sel_in;
- for (int i = 0; i < m_device_count; i++)
- {
- sel |= m_slot[i]->m_sel;
- }
-
- if (m_sel_out != sel)
- {
- m_sel_out = sel;
- m_sel_handler(sel);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_sel(sel);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_cd()
-{
- int cd = m_cd_in;
- for (int i = 0; i < m_device_count; i++)
- {
- cd |= m_slot[i]->m_cd;
- }
-
- if (m_cd_out != cd)
- {
- m_cd_out = cd;
- m_cd_handler(cd);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_cd(cd);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_io()
-{
- int io = m_io_in;
- for (int i = 0; i < m_device_count; i++)
- {
- io |= m_slot[i]->m_io;
- }
-
- if (m_io_out != io)
- {
- m_io_out = io;
- m_io_handler(io);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_io(io);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_msg()
-{
- int msg = m_msg_in;
- for (int i = 0; i < m_device_count; i++)
- {
- msg |= m_slot[i]->m_msg;
- }
-
- if (m_msg_out != msg)
- {
- m_msg_out = msg;
- m_msg_handler(msg);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_msg(msg);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_req()
-{
- int req = m_req_in;
- for (int i = 0; i < m_device_count; i++)
- {
- req |= m_slot[i]->m_req;
- }
-
- if (m_req_out != req)
- {
- m_req_out = req;
- m_req_handler(req);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_req(req);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_ack()
-{
- int ack = m_ack_in;
- for (int i = 0; i < m_device_count; i++)
- {
- ack |= m_slot[i]->m_ack;
- }
-
- if (m_ack_out != ack)
- {
- m_ack_out = ack;
- m_ack_handler(ack);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_ack(ack);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_atn()
-{
- int atn = m_atn_in;
- for (int i = 0; i < m_device_count; i++)
- {
- atn |= m_slot[i]->m_atn;
- }
-
- if (m_atn_out != atn)
- {
- m_atn_out = atn;
- m_atn_handler(atn);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_atn(atn);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_rst()
-{
- int rst = m_rst_in;
- for (int i = 0; i < m_device_count; i++)
- {
- rst |= m_slot[i]->m_rst;
- }
-
- if (m_rst_out != rst)
- {
- m_rst_out = rst;
- m_rst_handler(rst);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_rst(rst);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_data0()
-{
- int data0 = m_data0_in;
- for (int i = 0; i < m_device_count; i++)
- {
- data0 |= m_slot[i]->m_data0;
- }
-
- if (m_data0_out != data0)
- {
- m_data0_out = data0;
- m_data0_handler(data0);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_data0(data0);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_data1()
-{
- int data1 = m_data1_in;
- for (int i = 0; i < m_device_count; i++)
- {
- data1 |= m_slot[i]->m_data1;
- }
-
- if (m_data1_out != data1)
- {
- m_data1_out = data1;
- m_data1_handler(data1);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_data1(data1);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_data2()
-{
- int data2 = m_data2_in;
- for (int i = 0; i < m_device_count; i++)
- {
- data2 |= m_slot[i]->m_data2;
- }
-
- if (m_data2_out != data2)
- {
- m_data2_out = data2;
- m_data2_handler(data2);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_data2(data2);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_data3()
-{
- int data3 = m_data3_in;
- for (int i = 0; i < m_device_count; i++)
- {
- data3 |= m_slot[i]->m_data3;
- }
-
- if (m_data3_out != data3)
- {
- m_data3_out = data3;
- m_data3_handler(data3);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_data3(data3);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_data4()
-{
- int data4 = m_data4_in;
- for (int i = 0; i < m_device_count; i++)
- {
- data4 |= m_slot[i]->m_data4;
- }
-
- if (m_data4_out != data4)
- {
- m_data4_out = data4;
- m_data4_handler(data4);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_data4(data4);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_data5()
-{
- int data5 = m_data5_in;
- for (int i = 0; i < m_device_count; i++)
- {
- data5 |= m_slot[i]->m_data5;
- }
-
- if (m_data5_out != data5)
- {
- m_data5_out = data5;
- m_data5_handler(data5);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_data5(data5);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_data6()
-{
- int data6 = m_data6_in;
- for (int i = 0; i < m_device_count; i++)
- {
- data6 |= m_slot[i]->m_data6;
- }
-
- if (m_data6_out != data6)
- {
- m_data6_out = data6;
- m_data6_handler(data6);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_data6(data6);
- }
- }
-}
-
-void SCSI_PORT_DEVICE::update_data7()
-{
- int data7 = m_data7_in;
- for (int i = 0; i < m_device_count; i++)
- {
- data7 |= m_slot[i]->m_data7;
- }
-
- if (m_data7_out != data7)
- {
- m_data7_out = data7;
- m_data7_handler(data7);
-
- for (int i = 0; i < m_device_count; i++)
- {
- scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
- dev->input_data7(data7);
- }
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_bsy )
-{
- if (m_bsy_in != state)
- {
- m_bsy_in = state;
- update_bsy();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_sel )
-{
- if (m_sel_in != state)
- {
- m_sel_in = state;
- update_sel();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_cd )
-{
- if (m_cd_in != state)
- {
- m_cd_in = state;
- update_cd();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_io )
-{
- if (m_io_in != state)
- {
- m_io_in = state;
- update_io();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_msg )
-{
- if (m_msg_in != state)
- {
- m_msg_in = state;
- update_msg();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_req )
-{
- if (m_req_in != state)
- {
- m_req_in = state;
- update_req();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_ack )
-{
- if (m_ack_in != state)
- {
- m_ack_in = state;
- update_ack();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_atn )
-{
- if (m_atn_in != state)
- {
- m_atn_in = state;
- update_atn();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_rst )
-{
- if (m_rst_in != state)
- {
- m_rst_in = state;
- update_rst();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_data0 )
-{
- if (m_data0_in != state)
- {
- m_data0_in = state;
- update_data0();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_data1 )
-{
- if (m_data1_in != state)
- {
- m_data1_in = state;
- update_data1();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_data2 )
-{
- if (m_data2_in != state)
- {
- m_data2_in = state;
- update_data2();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_data3 )
-{
- if (m_data3_in != state)
- {
- m_data3_in = state;
- update_data3();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_data4 )
-{
- if (m_data4_in != state)
- {
- m_data4_in = state;
- update_data4();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_data5 )
-{
- if (m_data5_in != state)
- {
- m_data5_in = state;
- update_data5();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_data6 )
-{
- if (m_data6_in != state)
- {
- m_data6_in = state;
- update_data6();
- }
-}
-
-WRITE_LINE_MEMBER( SCSI_PORT_DEVICE::write_data7 )
-{
- if (m_data7_in != state)
- {
- m_data7_in = state;
- update_data7();
- }
-}
-
-const device_type SCSI_PORT = &device_creator<SCSI_PORT_DEVICE>;
-
-SCSI_PORT_SLOT_device::SCSI_PORT_SLOT_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, SCSI_PORT_SLOT, "SCSI Connector", tag, owner, clock, "scsi_slot", __FILE__),
- device_slot_interface(mconfig, *this),
- m_dev(NULL),
- m_bsy(0),
- m_sel(0),
- m_cd(0),
- m_io(0),
- m_msg(0),
- m_req(0),
- m_ack(0),
- m_rst(0),
- m_data0(0),
- m_data1(0),
- m_data2(0),
- m_data3(0),
- m_data4(0),
- m_data5(0),
- m_data6(0),
- m_data7(0)
-{
- m_port = dynamic_cast<SCSI_PORT_DEVICE *>(device().owner());
-}
-
-void SCSI_PORT_SLOT_device::device_config_complete()
-{
- m_dev = dynamic_cast<scsi_port_interface *>(get_card_device());
-}
-
-void SCSI_PORT_SLOT_device::device_start()
-{
-}
-
-const device_type SCSI_PORT_SLOT = &device_creator<SCSI_PORT_SLOT_device>;
-
-scsi_port_interface::scsi_port_interface(const machine_config &mconfig, device_t &device)
- : device_slot_card_interface(mconfig, device)
-{
- m_slot = dynamic_cast<SCSI_PORT_SLOT_device *>(device.owner());
-}
-
-scsi_port_interface::~scsi_port_interface()
-{
-}
diff --git a/src/emu/bus/scsi/scsi.h b/src/emu/bus/scsi/scsi.h
deleted file mode 100644
index dd8c88635ed..00000000000
--- a/src/emu/bus/scsi/scsi.h
+++ /dev/null
@@ -1,313 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-
-#pragma once
-
-#ifndef _SCSI_H_
-#define _SCSI_H_
-
-#include "emu.h"
-#include "machine/buffer.h"
-#include "machine/latch.h"
-
-#define SCSI_PORT_DEVICE1 "1"
-#define SCSI_PORT_DEVICE2 "2"
-#define SCSI_PORT_DEVICE3 "3"
-#define SCSI_PORT_DEVICE4 "4"
-#define SCSI_PORT_DEVICE5 "5"
-#define SCSI_PORT_DEVICE6 "6"
-#define SCSI_PORT_DEVICE7 "7"
-
-#define MCFG_SCSI_BSY_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_bsy_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_SEL_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_sel_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_CD_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_cd_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_IO_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_io_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_MSG_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_msg_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_REQ_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_req_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_ACK_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_ack_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_ATN_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_atn_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_RST_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_rst_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA0_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_data0_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA1_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_data1_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA2_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_data2_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA3_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_data3_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA4_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_data4_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA5_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_data5_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA6_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_data6_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA7_HANDLER(_devcb) \
- devcb = &SCSI_PORT_DEVICE::set_data7_handler(*device, DEVCB_##_devcb);
-
-#define MCFG_SCSI_OUTPUT_LATCH_ADD(_tag, scsi_port_tag) \
- MCFG_DEVICE_ADD(_tag, OUTPUT_LATCH, 0) \
- MCFG_OUTPUT_LATCH_BIT0_HANDLER(DEVWRITELINE(scsi_port_tag, SCSI_PORT_DEVICE, write_data0)) \
- MCFG_OUTPUT_LATCH_BIT1_HANDLER(DEVWRITELINE(scsi_port_tag, SCSI_PORT_DEVICE, write_data1)) \
- MCFG_OUTPUT_LATCH_BIT2_HANDLER(DEVWRITELINE(scsi_port_tag, SCSI_PORT_DEVICE, write_data2)) \
- MCFG_OUTPUT_LATCH_BIT3_HANDLER(DEVWRITELINE(scsi_port_tag, SCSI_PORT_DEVICE, write_data3)) \
- MCFG_OUTPUT_LATCH_BIT4_HANDLER(DEVWRITELINE(scsi_port_tag, SCSI_PORT_DEVICE, write_data4)) \
- MCFG_OUTPUT_LATCH_BIT5_HANDLER(DEVWRITELINE(scsi_port_tag, SCSI_PORT_DEVICE, write_data5)) \
- MCFG_OUTPUT_LATCH_BIT6_HANDLER(DEVWRITELINE(scsi_port_tag, SCSI_PORT_DEVICE, write_data6)) \
- MCFG_OUTPUT_LATCH_BIT7_HANDLER(DEVWRITELINE(scsi_port_tag, SCSI_PORT_DEVICE, write_data7))
-
-#define MCFG_SCSI_DATA_INPUT_BUFFER(_tag) \
- MCFG_SCSI_DATA0_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit0)) \
- MCFG_SCSI_DATA1_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit1)) \
- MCFG_SCSI_DATA2_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit2)) \
- MCFG_SCSI_DATA3_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit3)) \
- MCFG_SCSI_DATA4_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit4)) \
- MCFG_SCSI_DATA5_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit5)) \
- MCFG_SCSI_DATA6_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit6)) \
- MCFG_SCSI_DATA7_HANDLER(DEVWRITELINE(_tag, input_buffer_device, write_bit7))
-
-class SCSI_PORT_SLOT_device;
-class scsi_port_interface;
-
-class SCSI_PORT_DEVICE : public device_t
-{
- friend class scsi_port_interface;
-
-public:
- // construction/destruction
- SCSI_PORT_DEVICE(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- template<class _Object> static devcb_base &set_bsy_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_bsy_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_sel_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_sel_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_cd_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_cd_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_io_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_io_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_msg_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_msg_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_req_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_req_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_ack_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_ack_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_atn_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_atn_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_rst_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_rst_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_data0_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_data0_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_data1_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_data1_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_data2_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_data2_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_data3_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_data3_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_data4_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_data4_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_data5_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_data5_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_data6_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_data6_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_data7_handler(device_t &device, _Object object) { return downcast<SCSI_PORT_DEVICE &>(device).m_data7_handler.set_callback(object); }
-
- DECLARE_WRITE_LINE_MEMBER( write_bsy );
- DECLARE_WRITE_LINE_MEMBER( write_sel );
- DECLARE_WRITE_LINE_MEMBER( write_cd );
- DECLARE_WRITE_LINE_MEMBER( write_io );
- DECLARE_WRITE_LINE_MEMBER( write_msg );
- DECLARE_WRITE_LINE_MEMBER( write_req );
- DECLARE_WRITE_LINE_MEMBER( write_ack );
- DECLARE_WRITE_LINE_MEMBER( write_atn );
- DECLARE_WRITE_LINE_MEMBER( write_rst );
- DECLARE_WRITE_LINE_MEMBER( write_data0 );
- DECLARE_WRITE_LINE_MEMBER( write_data1 );
- DECLARE_WRITE_LINE_MEMBER( write_data2 );
- DECLARE_WRITE_LINE_MEMBER( write_data3 );
- DECLARE_WRITE_LINE_MEMBER( write_data4 );
- DECLARE_WRITE_LINE_MEMBER( write_data5 );
- DECLARE_WRITE_LINE_MEMBER( write_data6 );
- DECLARE_WRITE_LINE_MEMBER( write_data7 );
-
-protected:
- // device-level overrides
- virtual void device_start();
- virtual machine_config_constructor device_mconfig_additions() const;
-
- void update_bsy();
- void update_sel();
- void update_cd();
- void update_io();
- void update_msg();
- void update_req();
- void update_ack();
- void update_atn();
- void update_rst();
- void update_data0();
- void update_data1();
- void update_data2();
- void update_data3();
- void update_data4();
- void update_data5();
- void update_data6();
- void update_data7();
-
-private:
- devcb_write_line m_bsy_handler;
- devcb_write_line m_sel_handler;
- devcb_write_line m_cd_handler;
- devcb_write_line m_io_handler;
- devcb_write_line m_msg_handler;
- devcb_write_line m_req_handler;
- devcb_write_line m_ack_handler;
- devcb_write_line m_atn_handler;
- devcb_write_line m_rst_handler;
- devcb_write_line m_data0_handler;
- devcb_write_line m_data1_handler;
- devcb_write_line m_data2_handler;
- devcb_write_line m_data3_handler;
- devcb_write_line m_data4_handler;
- devcb_write_line m_data5_handler;
- devcb_write_line m_data6_handler;
- devcb_write_line m_data7_handler;
-
- SCSI_PORT_SLOT_device *m_slot[7];
- int m_device_count;
-
- int m_bsy_in;
- int m_sel_in;
- int m_cd_in;
- int m_io_in;
- int m_msg_in;
- int m_req_in;
- int m_ack_in;
- int m_atn_in;
- int m_rst_in;
- int m_data0_in;
- int m_data1_in;
- int m_data2_in;
- int m_data3_in;
- int m_data4_in;
- int m_data5_in;
- int m_data6_in;
- int m_data7_in;
- int m_bsy_out;
- int m_sel_out;
- int m_cd_out;
- int m_io_out;
- int m_msg_out;
- int m_req_out;
- int m_ack_out;
- int m_atn_out;
- int m_rst_out;
- int m_data0_out;
- int m_data1_out;
- int m_data2_out;
- int m_data3_out;
- int m_data4_out;
- int m_data5_out;
- int m_data6_out;
- int m_data7_out;
-};
-
-extern const device_type SCSI_PORT;
-
-class scsi_port_interface;
-
-class SCSI_PORT_SLOT_device : public device_t,
- public device_slot_interface
-{
- friend class SCSI_PORT_DEVICE;
- friend class scsi_port_interface;
-
-public:
- SCSI_PORT_SLOT_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- scsi_port_interface *dev() { return m_dev; }
- SCSI_PORT_DEVICE *port() { return m_port; }
-
-protected:
- // device-level overrides
- virtual void device_start();
- virtual void device_config_complete();
-
-protected:
- scsi_port_interface *m_dev;
- SCSI_PORT_DEVICE *m_port;
-
- int m_bsy;
- int m_sel;
- int m_cd;
- int m_io;
- int m_msg;
- int m_req;
- int m_ack;
- int m_atn;
- int m_rst;
- int m_data0;
- int m_data1;
- int m_data2;
- int m_data3;
- int m_data4;
- int m_data5;
- int m_data6;
- int m_data7;
-};
-
-extern const device_type SCSI_PORT_SLOT;
-
-class scsi_port_interface : public device_slot_card_interface
-{
-public:
- scsi_port_interface(const machine_config &mconfig, device_t &device);
- virtual ~scsi_port_interface();
-
- virtual DECLARE_WRITE_LINE_MEMBER( input_bsy ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_sel ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_cd ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_io ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_msg ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_req ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_ack ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_atn ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_rst ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_data0 ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_data1 ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_data2 ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_data3 ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_data4 ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_data5 ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_data6 ) {}
- virtual DECLARE_WRITE_LINE_MEMBER( input_data7 ) {}
-
- DECLARE_WRITE_LINE_MEMBER( output_bsy ) { if (m_slot->m_bsy != state) { m_slot->m_bsy = state; m_slot->port()->update_bsy(); } }
- DECLARE_WRITE_LINE_MEMBER( output_sel ) { if (m_slot->m_sel != state) { m_slot->m_sel = state; m_slot->port()->update_sel(); } }
- DECLARE_WRITE_LINE_MEMBER( output_cd ) { if (m_slot->m_cd != state) { m_slot->m_cd = state; m_slot->port()->update_cd(); } }
- DECLARE_WRITE_LINE_MEMBER( output_io ) { if (m_slot->m_io != state) { m_slot->m_io = state; m_slot->port()->update_io(); } }
- DECLARE_WRITE_LINE_MEMBER( output_msg ) { if (m_slot->m_msg != state) { m_slot->m_msg = state; m_slot->port()->update_msg(); } }
- DECLARE_WRITE_LINE_MEMBER( output_req ) { if (m_slot->m_req != state) { m_slot->m_req = state; m_slot->port()->update_req(); } }
- DECLARE_WRITE_LINE_MEMBER( output_ack ) { if (m_slot->m_ack != state) { m_slot->m_ack = state; m_slot->port()->update_ack(); } }
- DECLARE_WRITE_LINE_MEMBER( output_atn ) { if (m_slot->m_atn != state) { m_slot->m_atn = state; m_slot->port()->update_atn(); } }
- DECLARE_WRITE_LINE_MEMBER( output_rst ) { if (m_slot->m_rst != state) { m_slot->m_rst = state; m_slot->port()->update_rst(); } }
- DECLARE_WRITE_LINE_MEMBER( output_data0 ) { if (m_slot->m_data0 != state) { m_slot->m_data0 = state; m_slot->port()->update_data0(); } }
- DECLARE_WRITE_LINE_MEMBER( output_data1 ) { if (m_slot->m_data1 != state) { m_slot->m_data1 = state; m_slot->port()->update_data1(); } }
- DECLARE_WRITE_LINE_MEMBER( output_data2 ) { if (m_slot->m_data2 != state) { m_slot->m_data2 = state; m_slot->port()->update_data2(); } }
- DECLARE_WRITE_LINE_MEMBER( output_data3 ) { if (m_slot->m_data3 != state) { m_slot->m_data3 = state; m_slot->port()->update_data3(); } }
- DECLARE_WRITE_LINE_MEMBER( output_data4 ) { if (m_slot->m_data4 != state) { m_slot->m_data4 = state; m_slot->port()->update_data4(); } }
- DECLARE_WRITE_LINE_MEMBER( output_data5 ) { if (m_slot->m_data5 != state) { m_slot->m_data5 = state; m_slot->port()->update_data5(); } }
- DECLARE_WRITE_LINE_MEMBER( output_data6 ) { if (m_slot->m_data6 != state) { m_slot->m_data6 = state; m_slot->port()->update_data6(); } }
- DECLARE_WRITE_LINE_MEMBER( output_data7 ) { if (m_slot->m_data7 != state) { m_slot->m_data7 = state; m_slot->port()->update_data7(); } }
-
-private:
- SCSI_PORT_SLOT_device *m_slot;
-};
-
-#endif
diff --git a/src/emu/bus/scsi/scsicd.c b/src/emu/bus/scsi/scsicd.c
deleted file mode 100644
index 9ee7d92668f..00000000000
--- a/src/emu/bus/scsi/scsicd.c
+++ /dev/null
@@ -1,41 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-/***************************************************************************
-
- scsicd.c - Implementation of a SCSI CD-ROM device
-
-***************************************************************************/
-
-#include "scsicd.h"
-
-// device type definition
-const device_type SCSICD = &device_creator<scsicd_device>;
-
-scsicd_device::scsicd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- scsihle_device(mconfig, SCSICD, "SCSI CD", tag, owner, clock, "scsicd", __FILE__)
-{
-}
-
-scsicd_device::scsicd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- scsihle_device(mconfig, type, name, tag, owner, clock, shortname, source)
-{
-}
-
-void scsicd_device::device_start()
-{
- m_image = subdevice<cdrom_image_device>("image");
- m_cdda = subdevice<cdda_device>("cdda");
-
- scsihle_device::device_start();
-}
-
-static MACHINE_CONFIG_FRAGMENT(scsi_cdrom)
- MCFG_CDROM_ADD("image")
- MCFG_CDROM_INTERFACE("cdrom")
- MCFG_SOUND_ADD("cdda", CDDA, 0)
-MACHINE_CONFIG_END
-
-machine_config_constructor scsicd_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(scsi_cdrom);
-}
diff --git a/src/emu/bus/scsi/scsicd.h b/src/emu/bus/scsi/scsicd.h
deleted file mode 100644
index c7667ee3321..00000000000
--- a/src/emu/bus/scsi/scsicd.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-/***************************************************************************
-
- scsicd.h
-
-***************************************************************************/
-
-#ifndef _SCSICD_H_
-#define _SCSICD_H_
-
-#include "scsihle.h"
-#include "machine/t10mmc.h"
-
-class scsicd_device : public scsihle_device,
- public t10mmc
-{
-public:
- // construction/destruction
- scsicd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- scsicd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- virtual machine_config_constructor device_mconfig_additions() const;
-
-protected:
- virtual void device_start();
-};
-
-// device type definition
-extern const device_type SCSICD;
-
-#endif
diff --git a/src/emu/bus/scsi/scsihd.c b/src/emu/bus/scsi/scsihd.c
deleted file mode 100644
index 8774310d0b3..00000000000
--- a/src/emu/bus/scsi/scsihd.c
+++ /dev/null
@@ -1,39 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-/***************************************************************************
-
- scsihd.c - Implementation of a SCSI hard disk drive
-
-***************************************************************************/
-
-#include "scsihd.h"
-
-// device type definition
-const device_type SCSIHD = &device_creator<scsihd_device>;
-
-scsihd_device::scsihd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : scsihle_device(mconfig, SCSIHD, "SCSI HD", tag, owner, clock, "scsihd", __FILE__)
-{
-}
-
-scsihd_device::scsihd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- scsihle_device(mconfig, type, name, tag, owner, clock, shortname, source)
-{
-}
-
-void scsihd_device::device_start()
-{
- m_image = subdevice<harddisk_image_device>("image");
-
- scsihle_device::device_start();
-}
-
-static MACHINE_CONFIG_FRAGMENT(scsi_harddisk)
- MCFG_HARDDISK_ADD("image")
- MCFG_HARDDISK_INTERFACE("scsi_hdd")
-MACHINE_CONFIG_END
-
-machine_config_constructor scsihd_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(scsi_harddisk);
-}
diff --git a/src/emu/bus/scsi/scsihd.h b/src/emu/bus/scsi/scsihd.h
deleted file mode 100644
index db151095847..00000000000
--- a/src/emu/bus/scsi/scsihd.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-/***************************************************************************
-
- scsihd.h
-
-***************************************************************************/
-
-#ifndef _SCSIHD_H_
-#define _SCSIHD_H_
-
-#include "scsihle.h"
-#include "machine/t10sbc.h"
-
-class scsihd_device : public scsihle_device,
- public t10sbc
-{
-public:
- // construction/destruction
- scsihd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- scsihd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- virtual machine_config_constructor device_mconfig_additions() const;
-
-protected:
- virtual void device_start();
-};
-
-// device type definition
-extern const device_type SCSIHD;
-
-#endif
diff --git a/src/emu/bus/scsi/scsihle.c b/src/emu/bus/scsi/scsihle.c
deleted file mode 100644
index 033e1f66bae..00000000000
--- a/src/emu/bus/scsi/scsihle.c
+++ /dev/null
@@ -1,591 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-/*
-
-scsihle.c
-
-Base class for HLE'd SCSI devices.
-
-*/
-
-#include "scsihle.h"
-
-scsihle_device::scsihle_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- scsi_port_interface(mconfig, *this),
- m_scsi_id(*this, "SCSI_ID"),
- m_input_data(0)
-{
-}
-
-INPUT_PORTS_START(scsihle)
- PORT_START("SCSI_ID")
- PORT_CONFNAME(0x07, 0x07, "SCSI ID")
- PORT_CONFSETTING( 0x00, "0")
- PORT_CONFSETTING( 0x01, "1")
- PORT_CONFSETTING( 0x02, "2")
- PORT_CONFSETTING( 0x03, "3")
- PORT_CONFSETTING( 0x04, "4")
- PORT_CONFSETTING( 0x05, "5")
- PORT_CONFSETTING( 0x06, "6")
- PORT_CONFSETTING( 0x07, "7")
-INPUT_PORTS_END
-
-DEVICE_INPUT_DEFAULTS_START( SCSI_ID_0 )
- DEVICE_INPUT_DEFAULTS( "SCSI_ID", 7, 0 )
-DEVICE_INPUT_DEFAULTS_END
-
-DEVICE_INPUT_DEFAULTS_START( SCSI_ID_1 )
- DEVICE_INPUT_DEFAULTS( "SCSI_ID", 7, 1 )
-DEVICE_INPUT_DEFAULTS_END
-
-DEVICE_INPUT_DEFAULTS_START( SCSI_ID_2 )
- DEVICE_INPUT_DEFAULTS( "SCSI_ID", 7, 2 )
-DEVICE_INPUT_DEFAULTS_END
-
-DEVICE_INPUT_DEFAULTS_START( SCSI_ID_3 )
- DEVICE_INPUT_DEFAULTS( "SCSI_ID", 7, 3 )
-DEVICE_INPUT_DEFAULTS_END
-
-DEVICE_INPUT_DEFAULTS_START( SCSI_ID_4 )
- DEVICE_INPUT_DEFAULTS( "SCSI_ID", 7, 4 )
-DEVICE_INPUT_DEFAULTS_END
-
-DEVICE_INPUT_DEFAULTS_START( SCSI_ID_5 )
- DEVICE_INPUT_DEFAULTS( "SCSI_ID", 7, 5 )
-DEVICE_INPUT_DEFAULTS_END
-
-DEVICE_INPUT_DEFAULTS_START( SCSI_ID_6 )
- DEVICE_INPUT_DEFAULTS( "SCSI_ID", 7, 6 )
-DEVICE_INPUT_DEFAULTS_END
-
-DEVICE_INPUT_DEFAULTS_START( SCSI_ID_7 )
- DEVICE_INPUT_DEFAULTS( "SCSI_ID", 7, 7 )
-DEVICE_INPUT_DEFAULTS_END
-
-ioport_constructor scsihle_device::device_input_ports() const
-{
- return INPUT_PORTS_NAME(scsihle);
-}
-
-void scsihle_device::device_start()
-{
- t10_start(*this);
-
- req_timer = timer_alloc(0);
- sel_timer = timer_alloc(1);
- dataout_timer = timer_alloc(2);
-}
-
-void scsihle_device::device_reset()
-{
- scsiID = m_scsi_id->read();
- t10_reset();
-}
-
-int scsihle_device::GetDeviceID()
-{
- return scsiID;
-}
-
-#define BSY_DELAY_NS 50
-#define REQ_DELAY_NS 90
-
-static const char *const phasenames[] =
-{
- "data out", "data in", "command", "status", "none", "none", "message out", "message in", "bus free","select"
-};
-
-// scsihle
-#define SCSI_CMD_BUFFER_WRITE ( 0x3b )
-#define SCSI_CMD_BUFFER_READ ( 0x3c )
-
-// scsihd
-#define SCSI_CMD_FORMAT_UNIT 0x04
-#define SCSI_CMD_SEARCH_DATA_EQUAL 0x31
-#define SCSI_CMD_READ_DEFECT 0x37
-
-
-#define IS_COMMAND(cmd) (command[0]==cmd)
-
-#define FORMAT_UNIT_TIMEOUT 5
-
-/*
- LOGLEVEL
- 0 no logging,
- 1 just commands
- 2 1 + data
- 3 2 + line changes
-*/
-
-#define LOGLEVEL 0
-
-#define LOG(level, ...) if(LOGLEVEL>=level) logerror(__VA_ARGS__)
-
-void scsihle_device::data_out(UINT8 data)
-{
-// printf( "%s data out %02x\n", tag(), data );
- output_data0(BIT(data, 0));
- output_data1(BIT(data, 1));
- output_data2(BIT(data, 2));
- output_data3(BIT(data, 3));
- output_data4(BIT(data, 4));
- output_data5(BIT(data, 5));
- output_data6(BIT(data, 6));
- output_data7(BIT(data, 7));
-}
-
-void scsihle_device::scsi_out_req_delay(UINT8 state)
-{
- req_timer->adjust(attotime::from_nsec(REQ_DELAY_NS),state);
-}
-
-void scsihle_device::dump_bytes(UINT8 *buff, int count)
-{
- int byteno;
-
- for(byteno=0; byteno<count; byteno++)
- {
- logerror("%02X ",buff[byteno]);
- }
-}
-
-void scsihle_device::dump_command_bytes()
-{
- logerror("sending command 0x%02X to ScsiID %d\n",command[0],scsiID);
- dump_bytes(command,cmd_idx);
- logerror("\n\n");
-}
-
-void scsihle_device::dump_data_bytes(int count)
-{
- logerror("Data buffer[0..%d]\n",count);
- dump_bytes(buffer,count);
- logerror("\n\n");
-}
-
-void scsihle_device::scsibus_read_data()
-{
- data_last = (bytes_left >= m_sector_bytes) ? m_sector_bytes : bytes_left;
-
- LOG(2,"SCSIBUS:scsibus_read_data bytes_left=%04X, data_last=%04X\n",bytes_left,data_last);
-
- data_idx=0;
-
- if (data_last > 0)
- {
- ReadData(buffer, data_last);
- bytes_left-=data_last;
-
- data_out(buffer[ data_idx++ ]);
- }
-}
-
-void scsihle_device::scsibus_write_data()
-{
- if (data_last > 0)
- {
- WriteData(buffer, data_last);
- bytes_left -= data_last;
- }
-
- data_idx=0;
-}
-
-void scsihle_device::device_timer(emu_timer &timer, device_timer_id tid, int param, void *ptr)
-{
- switch (tid)
- {
- case 0:
- output_req(param);
- break;
-
- case 1:
- output_bsy(param);
- break;
-
- case 2:
- // Some drives, notably the ST225N and ST125N, accept fromat unit commands
- // with flags set indicating that bad block data should be transfered but
- // don't then implemnt a data in phase, this timeout it to catch these !
- if (IS_COMMAND(SCSI_CMD_FORMAT_UNIT) && (data_idx==0))
- {
- scsi_change_phase(SCSI_PHASE_STATUS);
- }
- break;
- }
-}
-
-void scsihle_device::scsibus_exec_command()
-{
- int command_local = 0;
-
- if (LOGLEVEL)
- dump_command_bytes();
-
- //is_linked=command[cmd_idx-1] & 0x01;
- is_linked=0;
-
- // Check for locally executed commands, and if found execute them
- switch (command[0])
- {
- // Format unit
- case SCSI_CMD_FORMAT_UNIT:
- LOG(1,"SCSIBUS: format unit command[1]=%02X & 0x10\n",(command[1] & 0x10));
- command_local=1;
- if ((command[1] & 0x10)==0x10)
- m_phase = SCSI_PHASE_DATAOUT;
- else
- m_phase = SCSI_PHASE_STATUS;
-
- m_status_code = SCSI_STATUS_CODE_GOOD;
- bytes_left=4;
- dataout_timer->adjust(attotime::from_seconds(FORMAT_UNIT_TIMEOUT));
- break;
-
- case SCSI_CMD_SEARCH_DATA_EQUAL:
- LOG(1,"SCSIBUS: Search_data_equaln");
- command_local=1;
- bytes_left=0;
- m_phase = SCSI_PHASE_STATUS;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- break;
-
- case SCSI_CMD_READ_DEFECT:
- LOG(1,"SCSIBUS: read defect list\n");
- command_local=1;
-
- buffer[0] = 0x00;
- buffer[1] = command[2];
- buffer[3] = 0x00; // defect list len msb
- buffer[4] = 0x00; // defect list len lsb
-
- bytes_left=4;
- m_phase = SCSI_PHASE_DATAIN;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- break;
-
- // write buffer
- case SCSI_CMD_BUFFER_WRITE:
- LOG(1,"SCSIBUS: write_buffer\n");
- command_local=1;
- bytes_left=(command[7]<<8)+command[8];
- m_phase = SCSI_PHASE_DATAOUT;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- break;
-
- // read buffer
- case SCSI_CMD_BUFFER_READ:
- LOG(1,"SCSIBUS: read_buffer\n");
- command_local=1;
- bytes_left = (command[7]<<8) + command[8];
- m_phase = SCSI_PHASE_DATAIN;
- m_status_code = SCSI_STATUS_CODE_GOOD;
- break;
- }
-
-
- // Check for locally executed command, if not then pass it on
- // to the disk driver
- if (!command_local)
- {
- SetCommand(command, cmd_idx);
- ExecCommand();
- GetLength(&bytes_left);
- data_idx=0;
- }
-
- scsi_change_phase(m_phase);
-
- LOG(1,"SCSIBUS:bytes_left=%02X data_idx=%02X\n",bytes_left,data_idx);
-
- // This is correct as we need to read from disk for commands other than just read data
- if ((m_phase == SCSI_PHASE_DATAIN) && (!command_local))
- scsibus_read_data();
-}
-
-UINT8 scsihle_device::scsibus_driveno(UINT8 drivesel)
-{
- switch (drivesel)
- {
- case 0x01: return 0;
- case 0x02: return 1;
- case 0x04: return 2;
- case 0x08: return 3;
- case 0x10: return 4;
- case 0x20: return 5;
- case 0x40: return 6;
- case 0x80: return 7;
- default: return 0;
- }
-}
-
-void scsihle_device::scsi_change_phase(UINT8 newphase)
-{
- LOG(1,"scsi_change_phase() from=%s, to=%s\n",phasenames[m_phase],phasenames[newphase]);
-
- m_phase=newphase;
- cmd_idx=0;
- data_idx=0;
-
- switch(m_phase)
- {
- case SCSI_PHASE_BUS_FREE:
- output_bsy(0);
- // sel
- output_cd(0);
- output_io(0);
- output_msg(0);
- output_req(0);
- // ack
- // atn
- // rst
- data_out(0);
- LOG(1,"SCSIBUS: done\n\n");
- break;
-
- case SCSI_PHASE_COMMAND:
- output_cd(1);
- output_io(0);
- output_msg(0);
- scsi_out_req_delay(1);
- data_out(0);
- LOG(1,"\nSCSIBUS: Command begin\n");
- break;
-
- case SCSI_PHASE_DATAOUT:
- output_cd(0);
- output_io(0);
- output_msg(0);
- scsi_out_req_delay(1);
- data_out(0);
- break;
-
- case SCSI_PHASE_DATAIN:
- output_cd(0);
- output_io(1);
- output_msg(0);
- scsi_out_req_delay(1);
- break;
-
- case SCSI_PHASE_STATUS:
- output_cd(1);
- output_io(1);
- output_msg(0);
- scsi_out_req_delay(1);
- data_out(m_status_code);
- break;
-
- case SCSI_PHASE_MESSAGE_OUT:
- output_cd(1);
- output_io(0);
- output_msg(1);
- scsi_out_req_delay(1);
- data_out(0);
- break;
-
- case SCSI_PHASE_MESSAGE_IN:
- output_cd(1);
- output_io(1);
- output_msg(1);
- scsi_out_req_delay(1);
- data_out(0); // no errors for the time being !
- break;
- }
-}
-
-WRITE_LINE_MEMBER( scsihle_device::input_sel )
-{
-// printf( "sel %d %d %02x\n", state, m_phase, m_input_data );
- switch (m_phase)
- {
- case SCSI_PHASE_BUS_FREE:
- // Note this assumes we only have one initiator and therefore
- // only one line active.
- if (scsibus_driveno(m_input_data) == scsiID)
- {
- void *hdfile = NULL;
- // Check to see if device had image file mounted, if not, do not set busy,
- // and stay busfree.
- GetDevice(&hdfile);
- if (hdfile != NULL)
- {
- if (!state)
- {
- scsi_change_phase(SCSI_PHASE_COMMAND);
- }
- else
- {
- sel_timer->adjust(attotime::from_nsec(BSY_DELAY_NS),1);
- }
- }
- }
- break;
- }
-}
-
-WRITE_LINE_MEMBER( scsihle_device::input_ack )
-{
- switch (m_phase)
- {
- case SCSI_PHASE_COMMAND:
- if (!state)
- {
- command[ cmd_idx++ ] = m_input_data;
-
- // If the command is ready go and execute it
- if (cmd_idx == get_scsi_cmd_len(command[0]))
- {
- scsibus_exec_command();
- }
- else
- {
- scsi_out_req_delay(1);
- }
- }
- else
- {
- scsi_out_req_delay(0);
- }
- break;
-
- case SCSI_PHASE_DATAIN:
- if (!state)
- {
- // check to see if we have reached the end of the block buffer
- // and that there is more data to read from the scsi disk
- if (data_idx == m_sector_bytes && bytes_left > 0)
- {
- scsibus_read_data();
- scsi_out_req_delay(1);
- }
- else if (data_idx == data_last && bytes_left == 0)
- {
- scsi_change_phase(SCSI_PHASE_STATUS);
- }
- else
- {
- data_out(buffer[data_idx++]);
- scsi_out_req_delay(1);
- }
- }
- else
- {
- scsi_out_req_delay(0);
- }
- break;
-
- case SCSI_PHASE_DATAOUT:
- if (!state)
- {
- //LOG(1,"SCSIBUS:bytes_left=%02X data_idx=%02X\n",bytes_left,data_idx);
- buffer[data_idx++] = m_input_data;
-
- if (IS_COMMAND(SCSI_CMD_FORMAT_UNIT))
- {
- // If we have the first byte, then cancel the dataout timout
- if (data_idx == 1)
- dataout_timer->adjust(attotime::never);
-
- // When we have the first 3 bytes, calculate how many more are in the
- // bad block list.
- if (data_idx == 3)
- {
- bytes_left += ((buffer[2]<<8) + buffer[3]);
- LOG(1, "format_unit reading an extra %d bytes\n", bytes_left - 4);
- dump_data_bytes(4);
- }
- }
-
- // If the data buffer is full flush it to the SCSI disk
-
- data_last = (bytes_left >= m_sector_bytes) ? m_sector_bytes : bytes_left;
-
- if (data_idx == data_last)
- scsibus_write_data();
-
- if (data_idx == 0 && bytes_left == 0)
- {
- scsi_change_phase(SCSI_PHASE_STATUS);
- }
- else
- {
- scsi_out_req_delay(1);
- }
- }
- else
- {
- scsi_out_req_delay(0);
- }
- break;
-
- case SCSI_PHASE_STATUS:
- if (!state)
- {
- if (cmd_idx > 0)
- {
- scsi_change_phase(SCSI_PHASE_MESSAGE_IN);
- }
- else
- {
- scsi_out_req_delay(1);
- }
- }
- else
- {
- cmd_idx++;
- scsi_out_req_delay(0);
- }
- break;
-
- case SCSI_PHASE_MESSAGE_IN:
- if (!state)
- {
- if (cmd_idx > 0)
- {
- if (is_linked)
- scsi_change_phase(SCSI_PHASE_COMMAND);
- else
- scsi_change_phase(SCSI_PHASE_BUS_FREE);
- }
- else
- {
- scsi_out_req_delay(1);
- }
- }
- else
- {
- cmd_idx++;
- scsi_out_req_delay(0);
- }
- break;
- }
-}
-
-WRITE_LINE_MEMBER( scsihle_device::input_rst )
-{
- if (state)
- {
- scsi_change_phase(SCSI_PHASE_BUS_FREE);
- cmd_idx = 0;
- data_idx = 0;
- is_linked = 0;
- }
-}
-
-// get the length of a SCSI command based on it's command byte type
-int scsihle_device::get_scsi_cmd_len(int cbyte)
-{
- int group;
-
- group = (cbyte>>5) & 7;
-
- if (group == 0 || group == 3 || group == 6 || group == 7) return 6;
- if (group == 1 || group == 2) return 10;
- if (group == 5) return 12;
-
- fatalerror("scsihle: Unknown SCSI command group %d, command byte=%02X\n", group,cbyte);
-
- // never executed
- //return 6;
-}
diff --git a/src/emu/bus/scsi/scsihle.h b/src/emu/bus/scsi/scsihle.h
deleted file mode 100644
index 5f638149ffd..00000000000
--- a/src/emu/bus/scsi/scsihle.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-/*
-
-scsihle.h
-
-Base class for HLE'd SCSI devices.
-
-*/
-
-#ifndef _SCSIHLE_H_
-#define _SCSIHLE_H_
-
-#include "scsi.h"
-#include "machine/t10spc.h"
-
-INPUT_PORTS_EXTERN( scsihle );
-
-class scsihle_device : public device_t,
- public scsi_port_interface,
- public virtual t10spc
-{
-public:
- // construction/destruction
- scsihle_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
-
- virtual int GetDeviceID(); // hack for legacy_scsi_host_adapter::get_device
-
- virtual DECLARE_WRITE_LINE_MEMBER( input_sel );
- virtual DECLARE_WRITE_LINE_MEMBER( input_ack );
- virtual DECLARE_WRITE_LINE_MEMBER( input_rst );
- virtual DECLARE_WRITE_LINE_MEMBER( input_data0 ) { if (state) m_input_data |= 0x01; else m_input_data &= ~0x01; }
- virtual DECLARE_WRITE_LINE_MEMBER( input_data1 ) { if (state) m_input_data |= 0x02; else m_input_data &= ~0x02; }
- virtual DECLARE_WRITE_LINE_MEMBER( input_data2 ) { if (state) m_input_data |= 0x04; else m_input_data &= ~0x04; }
- virtual DECLARE_WRITE_LINE_MEMBER( input_data3 ) { if (state) m_input_data |= 0x08; else m_input_data &= ~0x08; }
- virtual DECLARE_WRITE_LINE_MEMBER( input_data4 ) { if (state) m_input_data |= 0x10; else m_input_data &= ~0x10; }
- virtual DECLARE_WRITE_LINE_MEMBER( input_data5 ) { if (state) m_input_data |= 0x20; else m_input_data &= ~0x20; }
- virtual DECLARE_WRITE_LINE_MEMBER( input_data6 ) { if (state) m_input_data |= 0x40; else m_input_data &= ~0x40; }
- virtual DECLARE_WRITE_LINE_MEMBER( input_data7 ) { if (state) m_input_data |= 0x80; else m_input_data &= ~0x80; }
-
-protected:
- // device-level overrides
- virtual ioport_constructor device_input_ports() const;
- virtual void device_start();
- virtual void device_reset();
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
-
-private:
- required_ioport m_scsi_id;
- void data_out(UINT8 data);
- void scsi_out_req_delay(UINT8 state);
- void scsi_change_phase(UINT8 newphase);
- int get_scsi_cmd_len(int cbyte);
- UINT8 scsibus_driveno(UINT8 drivesel);
- void scsibus_read_data();
- void scsibus_write_data();
- void scsibus_exec_command();
- void dump_command_bytes();
- void dump_data_bytes(int count);
- void dump_bytes(UINT8 *buff, int count);
-
- emu_timer *req_timer;
- emu_timer *sel_timer;
- emu_timer *dataout_timer;
-
- UINT8 cmd_idx;
- UINT8 is_linked;
-
- UINT8 buffer[ 1024 ];
- UINT16 data_idx;
- int bytes_left;
- int data_last;
-
- int scsiID;
- UINT8 m_input_data;
-};
-
-extern const input_device_default DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_0)[];
-extern const input_device_default DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_1)[];
-extern const input_device_default DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_2)[];
-extern const input_device_default DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_3)[];
-extern const input_device_default DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_4)[];
-extern const input_device_default DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_5)[];
-extern const input_device_default DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_6)[];
-extern const input_device_default DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_7)[];
-
-#define MCFG_SCSIDEV_ADD(_tag, _option, _type, _id) \
- MCFG_DEVICE_MODIFY(_tag ) \
- MCFG_SLOT_OPTION_ADD( _option, _type ) \
- MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS( _option, _id ) \
- MCFG_SLOT_DEFAULT_OPTION( _option )
-#endif