mirror of
https://github.com/holub/mame
synced 2025-04-28 03:02:52 +03:00
bus/einstein/pipe: Eliminate MCFG_ macros; add bus clock (nw)
This commit is contained in:
parent
a69a5011ea
commit
4019540f53
@ -45,24 +45,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_TATUNG_PIPE_ADD(_tag) \
|
||||
MCFG_DEVICE_ADD(_tag, TATUNG_PIPE, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(tatung_pipe_cards, nullptr, false)
|
||||
|
||||
#define MCFG_TATUNG_PIPE_INT_HANDLER(_devcb) \
|
||||
downcast<tatung_pipe_device &>(*device).set_int_handler(DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_TATUNG_PIPE_NMI_HANDLER(_devcb) \
|
||||
downcast<tatung_pipe_device &>(*device).set_nmi_handler(DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_TATUNG_PIPE_RESET_HANDLER(_devcb) \
|
||||
downcast<tatung_pipe_device &>(*device).set_reset_handler(DEVCB_##_devcb);
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
@ -75,15 +57,24 @@ class tatung_pipe_device : public device_t, public device_slot_interface
|
||||
public:
|
||||
// construction/destruction
|
||||
tatung_pipe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
template <typename T>
|
||||
tatung_pipe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt)
|
||||
: tatung_pipe_device(mconfig, tag, owner, clock)
|
||||
{
|
||||
option_reset();
|
||||
opts(*this);
|
||||
set_default_option(dflt);
|
||||
set_fixed(false);
|
||||
}
|
||||
virtual ~tatung_pipe_device();
|
||||
|
||||
void set_program_space(address_space *program);
|
||||
void set_io_space(address_space *io);
|
||||
|
||||
// callbacks
|
||||
template <class Object> devcb_base &set_int_handler(Object &&cb) { return m_int_handler.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> devcb_base &set_nmi_handler(Object &&cb) { return m_nmi_handler.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> devcb_base &set_reset_handler(Object &&cb) { return m_reset_handler.set_callback(std::forward<Object>(cb)); }
|
||||
auto int_handler() { return m_int_handler.bind(); }
|
||||
auto nmi_handler() { return m_nmi_handler.bind(); }
|
||||
auto reset_handler() { return m_reset_handler.bind(); }
|
||||
|
||||
// called from host
|
||||
DECLARE_WRITE_LINE_MEMBER( host_int_w );
|
||||
|
@ -96,14 +96,16 @@ GFXDECODE_END
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_START(tk02_device::device_add_mconfig)
|
||||
MCFG_SCREEN_ADD_MONOCHROME("mono", RASTER, rgb_t::green())
|
||||
MCFG_SCREEN_RAW_PARAMS(XTAL(8'000'000) * 2, 1024, 0, 640, 312, 0, 250)
|
||||
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
|
||||
void tk02_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
screen_device &screen(SCREEN(config, "mono", SCREEN_TYPE_RASTER));
|
||||
screen.set_color(rgb_t::green());
|
||||
screen.set_raw(XTAL(8'000'000) * 2, 1024, 0, 640, 312, 0, 250);
|
||||
screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
|
||||
|
||||
PALETTE(config, m_palette, palette_device::MONOCHROME);
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_tk02)
|
||||
GFXDECODE(config, "gfxdecode", "palette", gfx_tk02);
|
||||
|
||||
MC6845(config, m_crtc, XTAL(8'000'000) / 4);
|
||||
m_crtc->set_screen("mono");
|
||||
@ -112,8 +114,8 @@ MACHINE_CONFIG_START(tk02_device::device_add_mconfig)
|
||||
m_crtc->set_update_row_callback(FUNC(tk02_device::crtc_update_row), this);
|
||||
m_crtc->out_de_callback().set(FUNC(tk02_device::de_w));
|
||||
|
||||
MCFG_TATUNG_PIPE_ADD("pipe")
|
||||
MACHINE_CONFIG_END
|
||||
TATUNG_PIPE(config, m_pipe, DERIVED_CLOCK(1, 1), tatung_pipe_cards, nullptr);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
|
@ -671,8 +671,8 @@ MACHINE_CONFIG_START(einstein_state::einstein)
|
||||
RAM(config, RAM_TAG).set_default_size("64K");
|
||||
|
||||
// tatung pipe connector
|
||||
MCFG_TATUNG_PIPE_ADD("pipe")
|
||||
MCFG_TATUNG_PIPE_NMI_HANDLER(INPUTLINE(IC_I001, INPUT_LINE_NMI))
|
||||
TATUNG_PIPE(config, m_pipe, XTAL_X002 / 2, tatung_pipe_cards, nullptr);
|
||||
m_pipe->nmi_handler().set_inputline(IC_I001, INPUT_LINE_NMI);
|
||||
|
||||
// user port
|
||||
MCFG_EINSTEIN_USERPORT_ADD("user")
|
||||
|
Loading…
Reference in New Issue
Block a user