mirror of
https://github.com/holub/mame
synced 2025-06-06 21:03:47 +03:00
Made nscsi use fixed slots support in core (nw)
This commit is contained in:
parent
0f52ef7edc
commit
2e0d8b8f57
@ -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_t(mconfig, NSCSI_CONNECTOR, "NSCSI device connector abstraction", tag, owner, clock),
|
||||||
device_slot_interface(mconfig, *this)
|
device_slot_interface(mconfig, *this)
|
||||||
{
|
{
|
||||||
fixed_subtag = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nscsi_connector::~nscsi_connector()
|
nscsi_connector::~nscsi_connector()
|
||||||
@ -140,15 +139,9 @@ void nscsi_connector::device_start()
|
|||||||
|
|
||||||
nscsi_device *nscsi_connector::get_device()
|
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) :
|
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_t(mconfig, type, name, tag, owner, clock),
|
||||||
device_slot_card_interface(mconfig, *this)
|
device_slot_card_interface(mconfig, *this)
|
||||||
|
@ -6,17 +6,9 @@
|
|||||||
#define MCFG_NSCSI_BUS_ADD(_tag) \
|
#define MCFG_NSCSI_BUS_ADD(_tag) \
|
||||||
MCFG_DEVICE_ADD(_tag, NSCSI_BUS, 0)
|
MCFG_DEVICE_ADD(_tag, NSCSI_BUS, 0)
|
||||||
|
|
||||||
#define MCFG_NSCSI_DEVICE_ADD(_tag, _subtag, _type, _clock) \
|
#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_ADD(_tag, NSCSI_CONNECTOR, 0) \
|
||||||
downcast<nscsi_connector *>(device)->set_fixed_device(_subtag); \
|
MCFG_DEVICE_SLOT_INTERFACE_FULL(_slot_intf, _def_slot, _def_inp, _def_config, _def_clock, _fixed)
|
||||||
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) \
|
|
||||||
MCFG_DEVICE_ADD(_tag, NSCSI_CONNECTOR, 0) \
|
|
||||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
|
|
||||||
|
|
||||||
class nscsi_device;
|
class nscsi_device;
|
||||||
|
|
||||||
@ -61,13 +53,9 @@ public:
|
|||||||
virtual ~nscsi_connector();
|
virtual ~nscsi_connector();
|
||||||
|
|
||||||
nscsi_device *get_device();
|
nscsi_device *get_device();
|
||||||
void set_fixed_device(const char *subtag);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void device_start();
|
virtual void device_start();
|
||||||
|
|
||||||
private:
|
|
||||||
const char *fixed_subtag;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class nscsi_device : public device_t,
|
class nscsi_device : public device_t,
|
||||||
|
@ -4,9 +4,6 @@
|
|||||||
#include "machine/nscsi_bus.h"
|
#include "machine/nscsi_bus.h"
|
||||||
#include "cdrom.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
|
class nscsi_cdrom_device : public nscsi_full_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -4,9 +4,6 @@
|
|||||||
#include "machine/nscsi_bus.h"
|
#include "machine/nscsi_bus.h"
|
||||||
#include "harddisk.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
|
class nscsi_harddisk_device : public nscsi_full_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user