mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
bus/cgenie/expansion, bus/einstein/pipe, bus/nasbus, bus/spectrum, bus/vtech: Install spaces through finders (nw)
This commit is contained in:
parent
7a8a8cc5db
commit
d4370f150d
@ -30,8 +30,8 @@ DEFINE_DEVICE_TYPE(CG_EXP_SLOT, cg_exp_slot_device, "cg_exp_slot", "Colour Genie
|
||||
cg_exp_slot_device::cg_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, CG_EXP_SLOT, tag, owner, clock),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_program(nullptr),
|
||||
m_io(nullptr),
|
||||
m_program(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_io(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_cart(nullptr),
|
||||
m_int_handler(*this),
|
||||
m_nmi_handler(*this),
|
||||
@ -67,24 +67,6 @@ void cg_exp_slot_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_program_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void cg_exp_slot_device::set_program_space(address_space *program)
|
||||
{
|
||||
m_program = program;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_io_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void cg_exp_slot_device::set_io_space(address_space *io)
|
||||
{
|
||||
m_io = io;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CARTRIDGE INTERFACE
|
||||
|
@ -64,8 +64,8 @@ public:
|
||||
cg_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
virtual ~cg_exp_slot_device();
|
||||
|
||||
void set_program_space(address_space *program);
|
||||
void set_io_space(address_space *io);
|
||||
template <typename T> void set_program_space(T &&tag, int spacenum) { m_program.set_tag(std::forward<T>(tag), spacenum); }
|
||||
template <typename T> void set_io_space(T &&tag, int spacenum) { m_io.set_tag(std::forward<T>(tag), spacenum); }
|
||||
|
||||
// callbacks
|
||||
auto int_handler() { return m_int_handler.bind(); }
|
||||
@ -77,8 +77,8 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_nmi_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( reset_w ) { m_reset_handler(state); }
|
||||
|
||||
address_space *m_program;
|
||||
address_space *m_io;
|
||||
required_address_space m_program;
|
||||
required_address_space m_io;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -33,8 +33,8 @@ DEFINE_DEVICE_TYPE(TATUNG_PIPE, tatung_pipe_device, "tatung_pipe", "Tatung Pipe
|
||||
tatung_pipe_device::tatung_pipe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, TATUNG_PIPE, tag, owner, clock),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_program(nullptr),
|
||||
m_io(nullptr),
|
||||
m_program(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_io(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_card(nullptr),
|
||||
m_int_handler(*this),
|
||||
m_nmi_handler(*this),
|
||||
@ -50,6 +50,28 @@ tatung_pipe_device::~tatung_pipe_device()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
void tatung_pipe_device::device_config_complete()
|
||||
{
|
||||
// for passthrough connectors, use the parent slot's spaces
|
||||
if (dynamic_cast<device_tatung_pipe_interface *>(owner()) != nullptr)
|
||||
{
|
||||
auto parent = dynamic_cast<tatung_pipe_device *>(owner()->owner());
|
||||
if (parent != nullptr)
|
||||
{
|
||||
if (m_program.finder_tag() == finder_base::DUMMY_TAG)
|
||||
m_program.set_tag(parent->m_program, parent->m_program.spacenum());
|
||||
if (m_io.finder_tag() == finder_base::DUMMY_TAG)
|
||||
m_io.set_tag(parent->m_io, parent->m_io.spacenum());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
@ -83,24 +105,6 @@ WRITE_LINE_MEMBER( tatung_pipe_device::host_int_w )
|
||||
m_card->int_w(state);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_program_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void tatung_pipe_device::set_program_space(address_space *program)
|
||||
{
|
||||
m_program = program;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_io_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void tatung_pipe_device::set_io_space(address_space *io)
|
||||
{
|
||||
m_io = io;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CARD INTERFACE
|
||||
|
@ -68,8 +68,8 @@ public:
|
||||
}
|
||||
virtual ~tatung_pipe_device();
|
||||
|
||||
void set_program_space(address_space *program);
|
||||
void set_io_space(address_space *io);
|
||||
template <typename T> void set_program_space(T &&tag, int spacenum) { m_program.set_tag(std::forward<T>(tag), spacenum); }
|
||||
template <typename T> void set_io_space(T &&tag, int spacenum) { m_io.set_tag(std::forward<T>(tag), spacenum); }
|
||||
|
||||
// callbacks
|
||||
auto int_handler() { return m_int_handler.bind(); }
|
||||
@ -86,11 +86,12 @@ public:
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete() override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
address_space *m_program;
|
||||
address_space *m_io;
|
||||
required_address_space m_program;
|
||||
required_address_space m_io;
|
||||
|
||||
device_tatung_pipe_interface *m_card;
|
||||
|
||||
|
@ -159,9 +159,6 @@ void tk02_device::device_start()
|
||||
|
||||
void tk02_device::device_reset()
|
||||
{
|
||||
m_pipe->set_io_space(&io_space());
|
||||
m_pipe->set_program_space(&program_space());
|
||||
|
||||
io_space().install_device(0x40, 0x4f, *this, &tk02_device::map);
|
||||
io_space().install_readwrite_handler(0x40, 0x47, 0, 0, 0xff00, read8_delegate(FUNC(tk02_device::ram_r), this), write8_delegate(FUNC(tk02_device::ram_w), this));
|
||||
}
|
||||
|
@ -61,8 +61,8 @@ DEFINE_DEVICE_TYPE(NASBUS, nasbus_device, "nasbus", "NASBUS Backplane")
|
||||
|
||||
nasbus_device::nasbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, NASBUS, tag, owner, clock),
|
||||
m_program(nullptr),
|
||||
m_io(nullptr),
|
||||
m_program(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_io(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_ram_disable_handler(*this)
|
||||
{
|
||||
}
|
||||
@ -104,24 +104,6 @@ void nasbus_device::add_card(device_nasbus_card_interface *card)
|
||||
m_dev.append(*card);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_program_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void nasbus_device::set_program_space(address_space *program)
|
||||
{
|
||||
m_program = program;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_io_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void nasbus_device::set_io_space(address_space *io)
|
||||
{
|
||||
m_io = io;
|
||||
}
|
||||
|
||||
// callbacks from slot device to the host
|
||||
WRITE_LINE_MEMBER( nasbus_device::ram_disable_w ) { m_ram_disable_handler(state); }
|
||||
|
||||
|
@ -149,8 +149,8 @@ public:
|
||||
|
||||
void add_card(device_nasbus_card_interface *card);
|
||||
|
||||
void set_program_space(address_space *program);
|
||||
void set_io_space(address_space *io);
|
||||
template <typename T> void set_program_space(T &&tag, int spacenum) { m_program.set_tag(std::forward<T>(tag), spacenum); }
|
||||
template <typename T> void set_io_space(T &&tag, int spacenum) { m_io.set_tag(std::forward<T>(tag), spacenum); }
|
||||
|
||||
// from cards
|
||||
DECLARE_WRITE_LINE_MEMBER( ram_disable_w );
|
||||
@ -161,8 +161,8 @@ protected:
|
||||
virtual void device_reset() override;
|
||||
|
||||
private:
|
||||
address_space *m_program;
|
||||
address_space *m_io;
|
||||
required_address_space m_program;
|
||||
required_address_space m_io;
|
||||
|
||||
simple_list<device_nasbus_card_interface> m_dev;
|
||||
|
||||
|
@ -43,7 +43,7 @@ device_spectrum_expansion_interface::device_spectrum_expansion_interface(const m
|
||||
spectrum_expansion_slot_device::spectrum_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, SPECTRUM_EXPANSION_SLOT, tag, owner, clock),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_io(nullptr),
|
||||
m_io(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_card(nullptr),
|
||||
m_irq_handler(*this),
|
||||
m_nmi_handler(*this)
|
||||
@ -51,6 +51,23 @@ spectrum_expansion_slot_device::spectrum_expansion_slot_device(const machine_con
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
void spectrum_expansion_slot_device::device_config_complete()
|
||||
{
|
||||
// for passthrough connectors, use the parent slot's I/O space
|
||||
if (m_io.finder_tag() == finder_base::DUMMY_TAG && dynamic_cast<device_spectrum_expansion_interface *>(owner()) != nullptr)
|
||||
{
|
||||
auto parent = dynamic_cast<spectrum_expansion_slot_device *>(owner()->owner());
|
||||
if (parent != nullptr)
|
||||
m_io.set_tag(parent->m_io, parent->m_io.spacenum());
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_validity_check - device-specific checks
|
||||
//-------------------------------------------------
|
||||
@ -86,15 +103,6 @@ void spectrum_expansion_slot_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_io_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void spectrum_expansion_slot_device::set_io_space(address_space *io)
|
||||
{
|
||||
m_io = io;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// port_fe_r
|
||||
//-------------------------------------------------
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
|
||||
spectrum_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0);
|
||||
|
||||
void set_io_space(address_space *io);
|
||||
template <typename T> void set_io_space(T &&tag, int spacenum) { m_io.set_tag(std::forward<T>(tag), spacenum); }
|
||||
|
||||
// callbacks
|
||||
auto irq_handler() { return m_irq_handler.bind(); }
|
||||
@ -83,10 +83,11 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_irq_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_nmi_handler(state); }
|
||||
|
||||
address_space *m_io;
|
||||
required_address_space m_io;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete() override;
|
||||
virtual void device_validity_check(validity_checker &valid) const override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
@ -90,8 +90,6 @@ void spectrum_fuller_device::device_start()
|
||||
|
||||
void spectrum_fuller_device::device_reset()
|
||||
{
|
||||
m_exp->set_io_space(&io_space());
|
||||
|
||||
io_space().install_write_handler(0x3f, 0x3f, 0, 0xff00, 0, write8smo_delegate(FUNC(ay8910_device::address_w), m_psg.target()));
|
||||
io_space().install_readwrite_handler(0x5f, 0x5f, 0, 0xff00, 0, read8smo_delegate(FUNC(ay8910_device::data_r), m_psg.target()), write8smo_delegate(FUNC(ay8910_device::data_w), m_psg.target()));
|
||||
io_space().install_read_handler(0x7f, 0x7f, 0, 0xff00, 0, read8_delegate(FUNC(spectrum_fuller_device::joystick_r), this));
|
||||
|
@ -93,8 +93,6 @@ void spectrum_intf1_device::device_start()
|
||||
|
||||
void spectrum_intf1_device::device_reset()
|
||||
{
|
||||
m_exp->set_io_space(&io_space());
|
||||
|
||||
m_romcs = 0;
|
||||
}
|
||||
|
||||
|
@ -66,8 +66,6 @@ void spectrum_melodik_device::device_start()
|
||||
|
||||
void spectrum_melodik_device::device_reset()
|
||||
{
|
||||
m_exp->set_io_space(&io_space());
|
||||
|
||||
io_space().install_write_handler(0x8000, 0x8000, 0, 0x3ffd, 0, write8smo_delegate(FUNC(ay8910_device::address_w), m_psg.target()));
|
||||
io_space().install_readwrite_handler(0xc000, 0xc000, 0, 0x3ffd, 0, read8smo_delegate(FUNC(ay8910_device::data_r), m_psg.target()), write8smo_delegate(FUNC(ay8910_device::data_w), m_psg.target()));
|
||||
}
|
||||
|
@ -64,8 +64,6 @@ void spectrum_uslot_device::device_start()
|
||||
|
||||
void spectrum_uslot_device::device_reset()
|
||||
{
|
||||
m_exp1->set_io_space(&io_space());
|
||||
m_exp2->set_io_space(&io_space());
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(VTECH_IOEXP_SLOT, vtech_ioexp_slot_device, "vtech_ioexp_slot"
|
||||
vtech_ioexp_slot_device::vtech_ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, VTECH_IOEXP_SLOT, tag, owner, clock),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_io(nullptr),
|
||||
m_io(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_cart(nullptr)
|
||||
{
|
||||
}
|
||||
@ -59,15 +59,6 @@ void vtech_ioexp_slot_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_io_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void vtech_ioexp_slot_device::set_io_space(address_space *io)
|
||||
{
|
||||
m_io = io;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CARTRIDGE INTERFACE
|
||||
|
@ -54,14 +54,14 @@ public:
|
||||
vtech_ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
virtual ~vtech_ioexp_slot_device();
|
||||
|
||||
void set_io_space(address_space *io);
|
||||
template <typename T> void set_io_space(T &&tag, int spacenum) { m_io.set_tag(std::forward<T>(tag), spacenum); }
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
address_space *m_io;
|
||||
required_address_space m_io;
|
||||
|
||||
device_vtech_ioexp_interface *m_cart;
|
||||
};
|
||||
|
@ -107,9 +107,6 @@ void vtech_floppy_controller_device::device_start()
|
||||
|
||||
void vtech_floppy_controller_device::device_reset()
|
||||
{
|
||||
m_memexp->set_io_space(&io_space());
|
||||
m_memexp->set_program_space(&program_space());
|
||||
|
||||
program_space().install_rom(0x4000, 0x5fff, memregion("software")->base());
|
||||
|
||||
io_space().install_device(0x10, 0x1f, *this, &vtech_floppy_controller_device::map);
|
||||
|
@ -30,8 +30,8 @@ DEFINE_DEVICE_TYPE(VTECH_MEMEXP_SLOT, vtech_memexp_slot_device, "vtech_memexp_sl
|
||||
vtech_memexp_slot_device::vtech_memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, VTECH_MEMEXP_SLOT, tag, owner, clock),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_program(nullptr),
|
||||
m_io(nullptr),
|
||||
m_program(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_io(*this, finder_base::DUMMY_TAG, -1),
|
||||
m_cart(nullptr),
|
||||
m_int_handler(*this),
|
||||
m_nmi_handler(*this),
|
||||
@ -47,6 +47,28 @@ vtech_memexp_slot_device::~vtech_memexp_slot_device()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
void vtech_memexp_slot_device::device_config_complete()
|
||||
{
|
||||
// for passthrough connectors, use the parent slot's spaces
|
||||
if (dynamic_cast<device_vtech_memexp_interface *>(owner()) != nullptr)
|
||||
{
|
||||
auto parent = dynamic_cast<vtech_memexp_slot_device *>(owner()->owner());
|
||||
if (parent != nullptr)
|
||||
{
|
||||
if (m_program.finder_tag() == finder_base::DUMMY_TAG)
|
||||
m_program.set_tag(parent->m_program, parent->m_program.spacenum());
|
||||
if (m_io.finder_tag() == finder_base::DUMMY_TAG)
|
||||
m_io.set_tag(parent->m_io, parent->m_io.spacenum());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
@ -67,24 +89,6 @@ void vtech_memexp_slot_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_program_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void vtech_memexp_slot_device::set_program_space(address_space *program)
|
||||
{
|
||||
m_program = program;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_io_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void vtech_memexp_slot_device::set_io_space(address_space *io)
|
||||
{
|
||||
m_io = io;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CARTRIDGE INTERFACE
|
||||
|
@ -61,8 +61,8 @@ public:
|
||||
vtech_memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
virtual ~vtech_memexp_slot_device();
|
||||
|
||||
void set_program_space(address_space *program);
|
||||
void set_io_space(address_space *io);
|
||||
template <typename T> void set_program_space(T &&tag, int spacenum) { m_program.set_tag(std::forward<T>(tag), spacenum); }
|
||||
template <typename T> void set_io_space(T &&tag, int spacenum) { m_io.set_tag(std::forward<T>(tag), spacenum); }
|
||||
|
||||
// callbacks
|
||||
auto int_handler() { return m_int_handler.bind(); }
|
||||
@ -76,11 +76,12 @@ public:
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete() override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
address_space *m_program;
|
||||
address_space *m_io;
|
||||
required_address_space m_program;
|
||||
required_address_space m_io;
|
||||
|
||||
device_vtech_memexp_interface *m_cart;
|
||||
|
||||
|
@ -306,10 +306,6 @@ void cgenie_state::machine_start()
|
||||
{
|
||||
// setup ram
|
||||
m_maincpu->space(AS_PROGRAM).install_ram(0x4000, 0x4000 + m_ram->size() - 1, m_ram->pointer());
|
||||
|
||||
// setup expansion bus
|
||||
m_exp->set_program_space(&m_maincpu->space(AS_PROGRAM));
|
||||
m_exp->set_io_space(&m_maincpu->space(AS_IO));
|
||||
}
|
||||
|
||||
|
||||
@ -480,6 +476,8 @@ void cgenie_state::cgenie(machine_config &config)
|
||||
|
||||
// cartridge expansion slot
|
||||
CG_EXP_SLOT(config, m_exp);
|
||||
m_exp->set_program_space(m_maincpu, AS_PROGRAM);
|
||||
m_exp->set_io_space(m_maincpu, AS_IO);
|
||||
m_exp->int_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
|
||||
|
||||
// parallel slot
|
||||
|
@ -390,10 +390,6 @@ void einstein_state::machine_start()
|
||||
m_bank1->configure_entry(1, m_bios->base());
|
||||
m_bank2->set_base(m_ram->pointer());
|
||||
m_bank3->set_base(m_ram->pointer() + 0x8000);
|
||||
|
||||
// setup expansion slot
|
||||
m_pipe->set_program_space(&m_maincpu->space(AS_PROGRAM));
|
||||
m_pipe->set_io_space(&m_maincpu->space(AS_IO));
|
||||
}
|
||||
|
||||
void einstein_state::machine_reset()
|
||||
@ -674,6 +670,8 @@ void einstein_state::einstein(machine_config &config)
|
||||
|
||||
// tatung pipe connector
|
||||
TATUNG_PIPE(config, m_pipe, XTAL_X002 / 2, tatung_pipe_cards, nullptr);
|
||||
m_pipe->set_program_space(m_maincpu, AS_PROGRAM);
|
||||
m_pipe->set_io_space(m_maincpu, AS_IO);
|
||||
m_pipe->nmi_handler().set_inputline(IC_I001, INPUT_LINE_NMI);
|
||||
|
||||
// user port
|
||||
|
@ -120,7 +120,6 @@ public:
|
||||
void nascom2(machine_config &config);
|
||||
void nascom2c(machine_config &config);
|
||||
|
||||
void init_nascom2();
|
||||
void init_nascom2c();
|
||||
|
||||
private:
|
||||
@ -394,15 +393,6 @@ void nascom2_state::machine_reset()
|
||||
m_maincpu->set_state_int(Z80_PC, m_lsw1->read() << 12);
|
||||
}
|
||||
|
||||
void nascom2_state::init_nascom2()
|
||||
{
|
||||
init_nascom();
|
||||
|
||||
// setup nasbus
|
||||
m_nasbus->set_program_space(&m_maincpu->space(AS_PROGRAM));
|
||||
m_nasbus->set_io_space(&m_maincpu->space(AS_IO));
|
||||
}
|
||||
|
||||
// since we don't know for which regions we should disable ram, we just let other devices
|
||||
// overwrite the region they need, and re-install our ram when they are disabled
|
||||
WRITE_LINE_MEMBER( nascom2_state::ram_disable_w )
|
||||
@ -418,10 +408,6 @@ void nascom2_state::init_nascom2c()
|
||||
{
|
||||
// install memory
|
||||
m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x0000 + m_ram->size() - 1, m_ram->pointer());
|
||||
|
||||
// setup nasbus
|
||||
m_nasbus->set_program_space(&m_maincpu->space(AS_PROGRAM));
|
||||
m_nasbus->set_io_space(&m_maincpu->space(AS_IO));
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( nascom2_state::ram_disable_cpm_w )
|
||||
@ -764,6 +750,8 @@ void nascom2_state::nascom2(machine_config &config)
|
||||
// nasbus expansion bus
|
||||
nasbus_device &nasbus(NASBUS(config, NASBUS_TAG));
|
||||
nasbus.ram_disable().set(FUNC(nascom2_state::ram_disable_w));
|
||||
nasbus.set_program_space(m_maincpu, AS_PROGRAM);
|
||||
nasbus.set_io_space(m_maincpu, AS_IO);
|
||||
NASBUS_SLOT(config, "nasbus1", nasbus_slot_cards, nullptr);
|
||||
NASBUS_SLOT(config, "nasbus2", nasbus_slot_cards, nullptr);
|
||||
NASBUS_SLOT(config, "nasbus3", nasbus_slot_cards, nullptr);
|
||||
@ -848,5 +836,5 @@ ROM_END
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1978, nascom1, 0, 0, nascom1, nascom1, nascom1_state, init_nascom, "Nascom Microcomputers", "Nascom 1", MACHINE_NO_SOUND_HW )
|
||||
COMP( 1979, nascom2, 0, 0, nascom2, nascom2, nascom2_state, init_nascom2, "Nascom Microcomputers", "Nascom 2", MACHINE_NO_SOUND_HW )
|
||||
COMP( 1979, nascom2, 0, 0, nascom2, nascom2, nascom2_state, init_nascom, "Nascom Microcomputers", "Nascom 2", MACHINE_NO_SOUND_HW )
|
||||
COMP( 1980, nascom2c, nascom2, 0, nascom2c, nascom2c, nascom2_state, init_nascom2c, "Nascom Microcomputers", "Nascom 2 (CP/M)", MACHINE_NO_SOUND_HW )
|
||||
|
@ -250,12 +250,6 @@ void spectrum_state::spectrum_128_mem(address_map &map)
|
||||
map(0xc000, 0xffff).bankrw("bank4");
|
||||
}
|
||||
|
||||
void spectrum_state::init_spec128()
|
||||
{
|
||||
// setup expansion slot
|
||||
m_exp->set_io_space(&m_maincpu->space(AS_IO));
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(spectrum_state,spectrum_128)
|
||||
{
|
||||
uint8_t *messram = m_ram->pointer();
|
||||
@ -319,6 +313,7 @@ void spectrum_state::spectrum_128(machine_config &config)
|
||||
|
||||
/* expansion port */
|
||||
SPECTRUM_EXPANSION_SLOT(config.replace(), m_exp, spec128_expansion_devices, nullptr);
|
||||
m_exp->set_io_space(m_maincpu, AS_IO);
|
||||
m_exp->irq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
|
||||
m_exp->nmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI);
|
||||
|
||||
@ -380,8 +375,8 @@ ROM_START(hc2000)
|
||||
ROMX_LOAD("hc2000.v2", 0x14000,0x4000, CRC(65d90464) SHA1(5e2096e6460ff2120c8ada97579fdf82c1199c09), ROM_BIOS(1))
|
||||
ROM_END
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE CLASS STATE INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1986, spec128, 0, 0, spectrum_128, spec128, spectrum_state, init_spec128, "Sinclair Research Ltd", "ZX Spectrum 128", 0 )
|
||||
COMP( 1986, specpls2, spec128, 0, spectrum_128, spec_plus, spectrum_state, init_spec128, "Amstrad plc", "ZX Spectrum +2", 0 )
|
||||
COMP( 1991, hc128, spec128, 0, spectrum_128, spec_plus, spectrum_state, init_spec128, "ICE-Felix", "HC-128", 0 )
|
||||
COMP( 1992, hc2000, spec128, 0, spectrum_128, spec_plus, spectrum_state, init_spec128, "ICE-Felix", "HC-2000", MACHINE_NOT_WORKING )
|
||||
// YEAR NAME PARENT COMPAT MACHINE CLASS STATE INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1986, spec128, 0, 0, spectrum_128, spec128, spectrum_state, empty_init, "Sinclair Research Ltd", "ZX Spectrum 128", 0 )
|
||||
COMP( 1986, specpls2, spec128, 0, spectrum_128, spec_plus, spectrum_state, empty_init, "Amstrad plc", "ZX Spectrum +2", 0 )
|
||||
COMP( 1991, hc128, spec128, 0, spectrum_128, spec_plus, spectrum_state, empty_init, "ICE-Felix", "HC-128", 0 )
|
||||
COMP( 1992, hc2000, spec128, 0, spectrum_128, spec_plus, spectrum_state, empty_init, "ICE-Felix", "HC-2000", MACHINE_NOT_WORKING )
|
||||
|
@ -341,17 +341,11 @@ MACHINE_RESET_MEMBER(spectrum_state,spectrum_plus3)
|
||||
void spectrum_state::init_plus3()
|
||||
{
|
||||
m_floppy = 1;
|
||||
|
||||
// setup expansion slot
|
||||
m_exp->set_io_space(&m_maincpu->space(AS_IO));
|
||||
}
|
||||
|
||||
void spectrum_state::init_plus2()
|
||||
{
|
||||
m_floppy = 0;
|
||||
|
||||
// setup expansion slot
|
||||
m_exp->set_io_space(&m_maincpu->space(AS_IO));
|
||||
}
|
||||
|
||||
static void specpls3_floppies(device_slot_interface &device)
|
||||
@ -396,6 +390,7 @@ void spectrum_state::spectrum_plus3(machine_config &config)
|
||||
FLOPPY_CONNECTOR(config, "upd765:1", specpls3_floppies, "3ssdd", floppy_image_device::default_floppy_formats);
|
||||
|
||||
SPECTRUM_EXPANSION_SLOT(config.replace(), m_exp, specpls3_expansion_devices, nullptr);
|
||||
m_exp->set_io_space(m_maincpu, AS_IO);
|
||||
m_exp->irq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
|
||||
m_exp->nmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI);
|
||||
|
||||
|
@ -617,9 +617,6 @@ void spectrum_state::init_spectrum()
|
||||
case 16*1024:
|
||||
space.install_ram(0x5b00, 0x7fff, nullptr);
|
||||
}
|
||||
|
||||
// setup expansion slot
|
||||
m_exp->set_io_space(&m_maincpu->space(AS_IO));
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(spectrum_state,spectrum)
|
||||
@ -699,6 +696,7 @@ void spectrum_state::spectrum_common(machine_config &config)
|
||||
|
||||
/* expansion port */
|
||||
SPECTRUM_EXPANSION_SLOT(config, m_exp, spectrum_expansion_devices, "kempjoy");
|
||||
m_exp->set_io_space(m_maincpu, AS_IO);
|
||||
m_exp->irq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
|
||||
m_exp->nmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI);
|
||||
|
||||
|
@ -583,12 +583,6 @@ void spectrum_state::tc2048_mem(address_map &map)
|
||||
map(0x4000, 0xffff).bankr("bank1").bankw("bank2");
|
||||
}
|
||||
|
||||
void spectrum_state::init_timex()
|
||||
{
|
||||
// setup expansion slot
|
||||
m_exp->set_io_space(&m_maincpu->space(AS_IO));
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(spectrum_state,tc2048)
|
||||
{
|
||||
uint8_t *messram = m_ram->pointer();
|
||||
@ -784,6 +778,6 @@ ROM_START(uk2086)
|
||||
ROM_END
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1984, tc2048, spectrum, 0, tc2048, spectrum, spectrum_state, init_timex, "Timex of Portugal", "TC-2048" , 0 )
|
||||
COMP( 1983, ts2068, spectrum, 0, ts2068, spectrum, spectrum_state, init_timex, "Timex Sinclair", "TS-2068" , 0 )
|
||||
COMP( 1986, uk2086, spectrum, 0, uk2086, spectrum, spectrum_state, init_timex, "Unipolbrit", "UK-2086 ver. 1.2" , 0 )
|
||||
COMP( 1984, tc2048, spectrum, 0, tc2048, spectrum, spectrum_state, empty_init, "Timex of Portugal", "TC-2048" , 0 )
|
||||
COMP( 1983, ts2068, spectrum, 0, ts2068, spectrum, spectrum_state, empty_init, "Timex Sinclair", "TS-2068" , 0 )
|
||||
COMP( 1986, uk2086, spectrum, 0, uk2086, spectrum, spectrum_state, empty_init, "Unipolbrit", "UK-2086 ver. 1.2" , 0 )
|
||||
|
@ -83,7 +83,6 @@ public:
|
||||
void laser110(machine_config &config);
|
||||
void laser210(machine_config &config);
|
||||
|
||||
void init_vtech1();
|
||||
void init_vtech1h();
|
||||
|
||||
private:
|
||||
@ -280,18 +279,8 @@ READ8_MEMBER( vtech1_state::mc6847_videoram_r )
|
||||
DRIVER INIT
|
||||
***************************************************************************/
|
||||
|
||||
void vtech1_state::init_vtech1()
|
||||
{
|
||||
// setup expansion slots
|
||||
m_ioexp->set_io_space(&m_maincpu->space(AS_IO));
|
||||
m_memexp->set_program_space(&m_maincpu->space(AS_PROGRAM));
|
||||
m_memexp->set_io_space(&m_maincpu->space(AS_IO));
|
||||
}
|
||||
|
||||
void vtech1_state::init_vtech1h()
|
||||
{
|
||||
init_vtech1();
|
||||
|
||||
// the SHRG mod replaces the standard videoram chip with an 8k chip
|
||||
m_videoram.allocate(0x2000);
|
||||
|
||||
@ -463,7 +452,10 @@ void vtech1_state::laser110(machine_config &config)
|
||||
|
||||
// peripheral and memory expansion slots
|
||||
VTECH_IOEXP_SLOT(config, m_ioexp);
|
||||
m_ioexp->set_io_space(m_maincpu, AS_IO);
|
||||
VTECH_MEMEXP_SLOT(config, m_memexp);
|
||||
m_memexp->set_program_space(m_maincpu, AS_PROGRAM);
|
||||
m_memexp->set_io_space(m_maincpu, AS_IO);
|
||||
|
||||
// snapshot
|
||||
snapshot_image_device &snapshot(SNAPSHOT(config, "snapshot", 0));
|
||||
@ -574,13 +566,13 @@ ROM_END
|
||||
***************************************************************************/
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1983, laser110, 0, 0, laser110, vtech1, vtech1_state, init_vtech1, "Video Technology", "Laser 110", 0 )
|
||||
COMP( 1983, laser200, 0, 0, laser200, vtech1, vtech1_state, init_vtech1, "Video Technology", "Laser 200", 0 )
|
||||
COMP( 1983, vz200de, laser200, 0, laser200, vtech1, vtech1_state, init_vtech1, "Video Technology", "VZ-200 (Germany & Netherlands)", MACHINE_NOT_WORKING )
|
||||
COMP( 1983, fellow, laser200, 0, laser200, vtech1, vtech1_state, init_vtech1, "Salora", "Fellow (Finland)", 0 )
|
||||
COMP( 1983, tx8000, laser200, 0, laser200, vtech1, vtech1_state, init_vtech1, "Texet", "TX-8000 (UK)", 0 )
|
||||
COMP( 1984, laser210, 0, 0, laser210, vtech1, vtech1_state, init_vtech1, "Video Technology", "Laser 210", 0 )
|
||||
COMP( 1984, vz200, laser210, 0, laser210, vtech1, vtech1_state, init_vtech1, "Dick Smith Electronics", "VZ-200 (Oceania)", 0 )
|
||||
COMP( 1984, laser310, 0, 0, laser310, vtech1, vtech1_state, init_vtech1, "Video Technology", "Laser 310", 0 )
|
||||
COMP( 1984, vz300, laser310, 0, laser310, vtech1, vtech1_state, init_vtech1, "Dick Smith Electronics", "VZ-300 (Oceania)", 0 )
|
||||
COMP( 1983, laser110, 0, 0, laser110, vtech1, vtech1_state, empty_init, "Video Technology", "Laser 110", 0 )
|
||||
COMP( 1983, laser200, 0, 0, laser200, vtech1, vtech1_state, empty_init, "Video Technology", "Laser 200", 0 )
|
||||
COMP( 1983, vz200de, laser200, 0, laser200, vtech1, vtech1_state, empty_init, "Video Technology", "VZ-200 (Germany & Netherlands)", MACHINE_NOT_WORKING )
|
||||
COMP( 1983, fellow, laser200, 0, laser200, vtech1, vtech1_state, empty_init, "Salora", "Fellow (Finland)", 0 )
|
||||
COMP( 1983, tx8000, laser200, 0, laser200, vtech1, vtech1_state, empty_init, "Texet", "TX-8000 (UK)", 0 )
|
||||
COMP( 1984, laser210, 0, 0, laser210, vtech1, vtech1_state, empty_init, "Video Technology", "Laser 210", 0 )
|
||||
COMP( 1984, vz200, laser210, 0, laser210, vtech1, vtech1_state, empty_init, "Dick Smith Electronics", "VZ-200 (Oceania)", 0 )
|
||||
COMP( 1984, laser310, 0, 0, laser310, vtech1, vtech1_state, empty_init, "Video Technology", "Laser 310", 0 )
|
||||
COMP( 1984, vz300, laser310, 0, laser310, vtech1, vtech1_state, empty_init, "Dick Smith Electronics", "VZ-300 (Oceania)", 0 )
|
||||
COMP( 1984, laser310h, laser310, 0, laser310h, vtech1, vtech1_state, init_vtech1h, "Video Technology", "Laser 310 (SHRG)", MACHINE_UNOFFICIAL )
|
||||
|
@ -518,7 +518,7 @@ MACHINE_CONFIG_START(vtech2_state::laser350)
|
||||
m_cassette->set_formats(vtech2_cassette_formats);
|
||||
m_cassette->set_default_state(CASSETTE_PLAY);
|
||||
|
||||
VTECH_IOEXP_SLOT(config, "io");
|
||||
VTECH_IOEXP_SLOT(config, "io").set_io_space(m_maincpu, AS_IO);
|
||||
|
||||
/* cartridge */
|
||||
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "vtech_cart")
|
||||
|
@ -107,8 +107,6 @@ public:
|
||||
void spectrum_128(machine_config &config);
|
||||
|
||||
void init_spectrum();
|
||||
void init_spec128();
|
||||
void init_timex();
|
||||
void init_plus2();
|
||||
void init_plus3();
|
||||
|
||||
|
@ -43,9 +43,6 @@ void vtech2_state::init_laser()
|
||||
// check ROM expansion
|
||||
std::string region_tag;
|
||||
m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
|
||||
// setup expansion slot
|
||||
m_ioexp->set_io_space(&m_maincpu->space(AS_IO));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user