diff options
Diffstat (limited to 'src/mame/includes/apollo.h')
-rw-r--r-- | src/mame/includes/apollo.h | 59 |
1 files changed, 13 insertions, 46 deletions
diff --git a/src/mame/includes/apollo.h b/src/mame/includes/apollo.h index 7428196a9ca..6c817b4799e 100644 --- a/src/mame/includes/apollo.h +++ b/src/mame/includes/apollo.h @@ -64,7 +64,7 @@ // Do *not* report any issues on Mametesters if this is enabled! // #define APOLLO_XXL -/*----------- drivers/apollo.c -----------*/ +/*----------- drivers/apollo.cpp -----------*/ // return the current CPU context for log file entries std::string apollo_cpu_context(running_machine &machine); @@ -97,7 +97,7 @@ int apollo_instruction_hook(m68000_base_device *device, offs_t curpc); void apollo_set_cache_status_register(device_t *device,uint8_t mask, uint8_t data); -/*----------- machine/apollo.c -----------*/ +/*----------- machine/apollo.cpp -----------*/ #define APOLLO_CONF_TAG "conf" #define APOLLO_DMA1_TAG "dma8237_1" @@ -270,8 +270,6 @@ public: void common(machine_config &config); void apollo(machine_config &config); void apollo_terminal(machine_config &config); - void apollo_graphics(machine_config &config); - void apollo_mono19i(machine_config &config); void dn3500(machine_config &config); void dn5500_19i(machine_config &config); void dn3000(machine_config &config); @@ -297,7 +295,7 @@ private: bool m_cur_eop; }; -/*----------- machine/apollo_config.c -----------*/ +/*----------- machine/apollo_config.cpp -----------*/ // configuration bit definitions @@ -322,7 +320,7 @@ int apollo_config(int mask); INPUT_PORTS_EXTERN(apollo_config); -/*----------- machine/apollo_csr.c -----------*/ +/*----------- machine/apollo_csr.cpp -----------*/ #define APOLLO_CSR_SR_SERVICE 0x0001 #define APOLLO_CSR_SR_ATBUS_IO_TIMEOUT 0x0002 @@ -344,22 +342,7 @@ uint16_t apollo_csr_get_control_register(void); uint16_t apollo_csr_get_status_register(void); void apollo_csr_set_status_register(uint16_t mask, uint16_t data); -/*----------- machine/apollo_sio.c -----------*/ - -#define MCFG_APOLLO_SIO_ADD(_tag, _clock) \ - MCFG_DEVICE_ADD(_tag, APOLLO_SIO, _clock) - -#define MCFG_APOLLO_SIO_IRQ_CALLBACK(_cb) \ - downcast<apollo_sio &>(*device).set_irq_cb(DEVCB_##_cb); - -#define MCFG_APOLLO_SIO_A_TX_CALLBACK(_cb) \ - downcast<apollo_sio &>(*device).set_a_tx_cb(DEVCB_##_cb); - -#define MCFG_APOLLO_SIO_B_TX_CALLBACK(_cb) \ - downcast<apollo_sio &>(*device).set_b_tx_cb(DEVCB_##_cb); - -#define MCFG_APOLLO_SIO_OUTPORT_CALLBACK(_cb) \ - downcast<apollo_sio &>(*device).set_outport_cb(DEVCB_##_cb); +/*----------- machine/apollo_sio.cpp -----------*/ class apollo_sio: public duart_base_device { @@ -378,10 +361,8 @@ private: DECLARE_DEVICE_TYPE(APOLLO_SIO, apollo_sio) -/*----------- machine/apollo_ni.c -----------*/ +/*----------- machine/apollo_ni.cpp -----------*/ -#define MCFG_APOLLO_NI_ADD(_tag, _xtal) \ - MCFG_DEVICE_ADD(_tag, APOLLO_NI, _xtal) /*** Apollo Node ID device ***/ @@ -428,7 +409,7 @@ private: // device type definition DECLARE_DEVICE_TYPE(APOLLO_NI, apollo_ni) -/*----------- video/apollo.c -----------*/ +/*----------- video/apollo.cpp -----------*/ class apollo_graphics_15i : public device_t { @@ -468,6 +449,7 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; protected: class lut_fifo; @@ -666,9 +648,6 @@ private: DECLARE_DEVICE_TYPE(APOLLO_GRAPHICS, apollo_graphics_15i) -#define MCFG_APOLLO_GRAPHICS_ADD( _tag) \ - apollo_graphics(config); \ - MCFG_DEVICE_ADD(_tag, APOLLO_GRAPHICS, 0) class apollo_graphics_19i : public apollo_graphics_15i { @@ -678,6 +657,7 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; private: // internal state @@ -685,20 +665,10 @@ private: DECLARE_DEVICE_TYPE(APOLLO_MONO19I, apollo_graphics_19i) -#define MCFG_APOLLO_MONO19I_ADD(_tag) \ - apollo_mono19i(config); \ - MCFG_DEVICE_ADD(_tag, APOLLO_MONO19I, 0) - #ifdef APOLLO_XXL -/*----------- machine/apollo_stdio.c -----------*/ +/*----------- machine/apollo_stdio.cpp -----------*/ -//************************************************************************** -// DEVICE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_APOLLO_STDIO_TX_CALLBACK(_cb) \ - downcast<apollo_stdio_device &>(*device).set_tx_cb(DEVCB_##_cb); //************************************************************************** // TYPE DEFINITIONS @@ -713,12 +683,7 @@ public: apollo_stdio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template<class Object> devcb_base &set_tx_cb(Object &&object) - { - return m_tx_w.set_callback(std::forward<Object>(object)); - } - - devcb_write_line m_tx_w; + auto tx_cb() { return m_tx_w.bind(); } private: // device-level overrides @@ -741,6 +706,8 @@ private: bool m_tx_busy; emu_timer* m_poll_timer; + + devcb_write_line m_tx_w; }; // device type definition |