Made nscsi use fixed slots support in core (nw)

This commit is contained in:
Miodrag Milanovic 2012-06-05 17:09:31 +00:00
parent 0f52ef7edc
commit 2e0d8b8f57
4 changed files with 3 additions and 28 deletions

View File

@ -127,7 +127,6 @@ nscsi_connector::nscsi_connector(const machine_config &mconfig, const char *tag,
device_t(mconfig, NSCSI_CONNECTOR, "NSCSI device connector abstraction", tag, owner, clock),
device_slot_interface(mconfig, *this)
{
fixed_subtag = 0;
}
nscsi_connector::~nscsi_connector()
@ -140,15 +139,9 @@ void nscsi_connector::device_start()
nscsi_device *nscsi_connector::get_device()
{
return dynamic_cast<nscsi_device *>(fixed_subtag ? subdevice(fixed_subtag) : get_card_device());
return dynamic_cast<nscsi_device *>(get_card_device());
}
void nscsi_connector::set_fixed_device(const char *subtag)
{
fixed_subtag = subtag;
}
nscsi_device::nscsi_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, type, name, tag, owner, clock),
device_slot_card_interface(mconfig, *this)

View File

@ -6,17 +6,9 @@
#define MCFG_NSCSI_BUS_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, NSCSI_BUS, 0)
#define MCFG_NSCSI_DEVICE_ADD(_tag, _subtag, _type, _clock) \
MCFG_DEVICE_ADD(_tag, NSCSI_CONNECTOR, 0) \
downcast<nscsi_connector *>(device)->set_fixed_device(_subtag); \
MCFG_DEVICE_ADD(_tag ":" _subtag, _type, _clock)
#define MCFG_NSCSI_FULL_DEVICE_ADD(_tag, _subtag, _type, _clock) \
MCFG_NSCSI_DEVICE_ADD(_tag, _subtag, _type, _clock)
#define MCFG_NSCSI_ADD(_tag, _slot_intf, _def_slot, _def_inp) \
#define MCFG_NSCSI_ADD(_tag, _slot_intf, _def_slot, _def_inp, _def_config, _def_clock, _fixed) \
MCFG_DEVICE_ADD(_tag, NSCSI_CONNECTOR, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
MCFG_DEVICE_SLOT_INTERFACE_FULL(_slot_intf, _def_slot, _def_inp, _def_config, _def_clock, _fixed)
class nscsi_device;
@ -61,13 +53,9 @@ public:
virtual ~nscsi_connector();
nscsi_device *get_device();
void set_fixed_device(const char *subtag);
protected:
virtual void device_start();
private:
const char *fixed_subtag;
};
class nscsi_device : public device_t,

View File

@ -4,9 +4,6 @@
#include "machine/nscsi_bus.h"
#include "cdrom.h"
#define MCFG_NSCSI_CDROM_ADD(_tag, _subtag) \
MCFG_NSCSI_FULL_DEVICE_ADD(_tag, _subtag, NSCSI_CDROM, 0)
class nscsi_cdrom_device : public nscsi_full_device
{
public:

View File

@ -4,9 +4,6 @@
#include "machine/nscsi_bus.h"
#include "harddisk.h"
#define MCFG_NSCSI_HARDDISK_ADD(_tag, _subtag) \
MCFG_NSCSI_FULL_DEVICE_ADD(_tag, _subtag, NSCSI_HARDDISK, 0)
class nscsi_harddisk_device : public nscsi_full_device
{
public: