diff options
Diffstat (limited to 'src/devices/machine/nscsi_bus.h')
-rw-r--r-- | src/devices/machine/nscsi_bus.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/devices/machine/nscsi_bus.h b/src/devices/machine/nscsi_bus.h index 5e7d7dcecab..244eda94fe8 100644 --- a/src/devices/machine/nscsi_bus.h +++ b/src/devices/machine/nscsi_bus.h @@ -6,19 +6,12 @@ #pragma once -#define MCFG_NSCSI_BUS_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, NSCSI_BUS, 0) - -#define MCFG_NSCSI_ADD(_tag, _slot_intf, _def_slot, _fixed) \ - MCFG_DEVICE_ADD(_tag, NSCSI_CONNECTOR, 0) \ - MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _fixed) - class nscsi_device; class nscsi_bus_device : public device_t { public: - nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); void ctrl_w(int refid, uint32_t lines, uint32_t mask); void data_w(int refid, uint32_t lines); @@ -49,10 +42,19 @@ private: }; class nscsi_connector: public device_t, - public device_slot_interface + public device_slot_interface { public: - nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + template <typename T> + nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, bool fixed = false) + : nscsi_connector(mconfig, tag, owner, 0) + { + option_reset(); + opts(*this); + set_default_option(dflt); + set_fixed(fixed); + } + nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); virtual ~nscsi_connector(); nscsi_device *get_device(); @@ -167,7 +169,9 @@ protected: // SCSI addtional sense code qualifiers enum { - SK_ASC_MEDIUM_NOT_PRESENT = 0x3a + SK_ASC_INVALID_FIELD_IN_CDB = 0x24, + SK_ASC_LOGICAL_UNIT_NOT_SUPPORTED = 0x25, + SK_ASC_MEDIUM_NOT_PRESENT = 0x3a }; // SCSI commands @@ -304,6 +308,7 @@ protected: virtual void scsi_message(); virtual void scsi_command(); + virtual bool scsi_command_done(uint8_t command, uint8_t length); void scsi_unknown_command(); void scsi_status_complete(uint8_t st); @@ -444,7 +449,6 @@ private: void target_recv_byte(); void target_send_byte(uint8_t val); void target_send_buffer_byte(); - bool command_done(); }; |