mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
imagedev\printer: removed MCFG macro (nw)
This commit is contained in:
parent
b8dfc7ea23
commit
869cf9337c
@ -32,10 +32,11 @@ centronics_printer_device::centronics_printer_device(const machine_config &mconf
|
||||
//-------------------------------------------------
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(centronics_printer_device::device_add_mconfig)
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
MCFG_PRINTER_ONLINE_CB(WRITELINE(*this, centronics_printer_device, printer_online))
|
||||
MACHINE_CONFIG_END
|
||||
void centronics_printer_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
PRINTER(config, m_printer, 0);
|
||||
m_printer->online_callback().set(FUNC(centronics_printer_device::printer_online));
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
printer_online - callback that
|
||||
|
@ -16,10 +16,11 @@ serial_printer_device::serial_printer_device(const machine_config &mconfig, cons
|
||||
{
|
||||
}
|
||||
|
||||
MACHINE_CONFIG_START(serial_printer_device::device_add_mconfig)
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
MCFG_PRINTER_ONLINE_CB(WRITELINE(*this, serial_printer_device, printer_online))
|
||||
MACHINE_CONFIG_END
|
||||
void serial_printer_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
PRINTER(config, m_printer, 0);
|
||||
m_printer->online_callback().set(FUNC(serial_printer_device::printer_online));
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START(serial_printer)
|
||||
MCFG_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", serial_printer_device, update_serial)
|
||||
|
@ -13,8 +13,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define MCFG_PRINTER_ONLINE_CB(_devcb) \
|
||||
downcast<printer_image_device &>(*device).set_online_callback(DEVCB_##_devcb);
|
||||
|
||||
/***************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
@ -29,7 +27,7 @@ public:
|
||||
// construction/destruction
|
||||
printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
template <class Object> devcb_base &set_online_callback(Object &&cb) { return m_online_cb.set_callback(std::forward<Object>(cb)); }
|
||||
auto online_callback() { return m_online_cb.bind(); }
|
||||
|
||||
// image-level overrides
|
||||
virtual image_init_result call_load() override;
|
||||
|
@ -11,24 +11,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
///*************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
///*************************************************************************
|
||||
|
||||
#define MCFG_PLA_ADD(tag, inputs, outputs, terms) \
|
||||
MCFG_DEVICE_ADD((tag), PLA, 0) \
|
||||
downcast<pla_device &>(*device).set_num_inputs((inputs)); \
|
||||
downcast<pla_device &>(*device).set_num_outputs((outputs)); \
|
||||
downcast<pla_device &>(*device).set_num_terms((terms));
|
||||
|
||||
#define MCFG_PLA_INPUTMASK(mask) \
|
||||
downcast<pla_device &>(*device).set_inputmask((mask));
|
||||
|
||||
#define MCFG_PLA_FILEFORMAT(format) \
|
||||
downcast<pla_device &>(*device).set_format((pla_device::FMT::format));
|
||||
|
||||
|
||||
// macros for known (and used) devices
|
||||
|
||||
// 82S100, 82S101, PLS100, PLS101
|
||||
// 16x48x8 PLA, 28-pin:
|
||||
@ -48,8 +30,7 @@
|
||||
F4 13 | | 16 F2
|
||||
GND 14 |_____________| 15 F3
|
||||
*/
|
||||
#define MCFG_PLS100_ADD(tag) \
|
||||
MCFG_DEVICE_ADD((tag), PLS100)
|
||||
|
||||
|
||||
///*************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
|
@ -221,7 +221,7 @@ MACHINE_CONFIG_START(dragon_state::dragon_base)
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
|
||||
MCFG_CASSETTE_INTERFACE("dragon_cass")
|
||||
|
||||
MCFG_DEVICE_ADD(PRINTER_TAG, PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
|
||||
// video hardware
|
||||
SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
|
||||
|
@ -419,7 +419,7 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hr)
|
||||
MCFG_CASSETTE_FORMATS(hector_cassette_formats)
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
|
||||
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(hec2hrp_state::hec2hrp)
|
||||
@ -447,7 +447,7 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hrp)
|
||||
MCFG_CASSETTE_FORMATS(hector_cassette_formats)
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
|
||||
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static void hector_floppies(device_slot_interface &device)
|
||||
@ -489,7 +489,7 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mx40)
|
||||
MCFG_CASSETTE_FORMATS(hector_cassette_formats)
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
|
||||
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -527,7 +527,7 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hrx)
|
||||
MCFG_CASSETTE_FORMATS(hector_cassette_formats)
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
|
||||
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(hec2hrp_state::hec2mdhrx)
|
||||
@ -560,7 +560,7 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mdhrx)
|
||||
MCFG_CASSETTE_FORMATS(hector_cassette_formats)
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
|
||||
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -598,7 +598,7 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mx80)
|
||||
MCFG_CASSETTE_FORMATS(hector_cassette_formats)
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
|
||||
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
ROM_START( hec2hr )
|
||||
|
@ -160,7 +160,7 @@ MACHINE_CONFIG_START(interact_state::interact)
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_list","interact")
|
||||
|
||||
/* printer */
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -195,7 +195,7 @@ MACHINE_CONFIG_START(interact_state::hector1)
|
||||
MCFG_CASSETTE_INTERFACE("interact_cass")
|
||||
|
||||
/* printer */
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -531,7 +531,7 @@ MACHINE_CONFIG_START(mc10_state::mc10)
|
||||
MCFG_CASSETTE_INTERFACE("mc10_cass")
|
||||
|
||||
/* printer */
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
|
||||
/* internal ram */
|
||||
RAM(config, m_ram).set_default_size("20K").set_extra_options("4K");
|
||||
@ -573,7 +573,7 @@ MACHINE_CONFIG_START(mc10_state::alice32)
|
||||
MCFG_CASSETTE_INTERFACE("mc10_cass")
|
||||
|
||||
/* printer */
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
|
||||
/* internal ram */
|
||||
RAM(config, m_ram).set_default_size("24K").set_extra_options("8K");
|
||||
|
@ -406,7 +406,7 @@ MACHINE_CONFIG_START(vg5k_state::vg5k)
|
||||
MCFG_CASSETTE_INTERFACE("vg5k_cass")
|
||||
|
||||
/* printer */
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
|
||||
/* internal ram */
|
||||
RAM(config, RAM_TAG).set_default_size("16K").set_extra_options("32K,48K");
|
||||
|
@ -1504,7 +1504,7 @@ MACHINE_CONFIG_START(x07_state::x07)
|
||||
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
|
||||
/* printer */
|
||||
MCFG_DEVICE_ADD("printer", PRINTER, 0)
|
||||
PRINTER(config, m_printer, 0);
|
||||
|
||||
TIMER(config, "blink_timer").configure_periodic(FUNC(x07_state::blink_timer), attotime::from_msec(300));
|
||||
|
||||
|
@ -83,6 +83,7 @@ class hec2hrp_state : public driver_device
|
||||
public:
|
||||
hec2hrp_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_printer(*this, "printer"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_disc2cpu(*this, "disc2cpu"),
|
||||
m_cassette(*this, "cassette"),
|
||||
@ -95,8 +96,7 @@ public:
|
||||
m_minidisc_fdc(*this, "wd179x"),
|
||||
m_floppy0(*this, "wd179x:0"),
|
||||
m_upd_fdc(*this, "upd765"),
|
||||
m_upd_connector(*this, "upd765:%u", 0U),
|
||||
m_printer(*this, "printer")
|
||||
m_upd_connector(*this, "upd765:%u", 0U)
|
||||
{}
|
||||
|
||||
void hec2mx80(machine_config &config);
|
||||
@ -123,6 +123,8 @@ protected:
|
||||
DECLARE_WRITE8_MEMBER(color_a_w);
|
||||
DECLARE_WRITE8_MEMBER(color_b_w);
|
||||
|
||||
optional_device<printer_image_device> m_printer;
|
||||
|
||||
private:
|
||||
DECLARE_WRITE8_MEMBER(minidisc_control_w);
|
||||
|
||||
@ -162,8 +164,6 @@ private:
|
||||
optional_device<upd765a_device> m_upd_fdc;
|
||||
optional_device_array<floppy_connector, 2> m_upd_connector;
|
||||
|
||||
optional_device<printer_image_device> m_printer;
|
||||
|
||||
uint8_t m_hector_flag_hr;
|
||||
uint8_t m_hector_flag_80c;
|
||||
uint8_t m_hector_color[4];
|
||||
|
Loading…
Reference in New Issue
Block a user