diff options
Diffstat (limited to 'src/mess/machine/comxpl80.h')
-rw-r--r-- | src/mess/machine/comxpl80.h | 52 |
1 files changed, 11 insertions, 41 deletions
diff --git a/src/mess/machine/comxpl80.h b/src/mess/machine/comxpl80.h index 188c46f11e3..c5bed225cb7 100644 --- a/src/mess/machine/comxpl80.h +++ b/src/mess/machine/comxpl80.h @@ -9,32 +9,12 @@ #pragma once -#ifndef __COMXPL80__ -#define __COMXPL80__ +#ifndef __COMX_PL80__ +#define __COMX_PL80__ #include "emu.h" #include "cpu/m6805/m6805.h" - - - -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -#define COMXPL80_TAG "comxpl80" - - - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_COMXPL80_ADD() \ - MCFG_DEVICE_ADD(COMXPL80_TAG, COMXPL80, 0) - - -#define COMXPL80_INTERFACE(_name) \ - const comxpl80_interface (_name) = +#include "machine/ctronics.h" @@ -42,28 +22,21 @@ // TYPE DEFINITIONS //************************************************************************** -// ======================> comxpl80_interface +// ======================> comx_pl80_device -struct comxpl80_interface -{ - devcb_write_line m_out_txd_cb; - devcb_write_line m_out_clock_cb; - devcb_write_line m_out_keydown_cb; -}; - -// ======================> comxpl80_device - -class comxpl80_device : public device_t, - public comxpl80_interface +class comx_pl80_device : public device_t, + public device_centronics_peripheral_interface { public: // construction/destruction - comxpl80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + comx_pl80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + // optional information overrides virtual const rom_entry *device_rom_region() const; virtual machine_config_constructor device_mconfig_additions() const; virtual ioport_constructor device_input_ports() const; + // not really public DECLARE_WRITE8_MEMBER( pa_w ); DECLARE_WRITE8_MEMBER( pb_w ); DECLARE_WRITE8_MEMBER( pc_w ); @@ -71,14 +44,11 @@ public: protected: // device-level overrides + virtual void device_config_complete() { m_shortname = "comx_pl80"; } virtual void device_start(); virtual void device_reset(); - virtual void device_config_complete(); private: - // printer state - UINT8 m_centronics_data; // centronics data - // PL-80 plotter state UINT16 m_font_addr; // font ROM pack address latch UINT8 m_x_motor_phase; // X motor phase @@ -91,7 +61,7 @@ private: // device type definition -extern const device_type COMXPL80; +extern const device_type COMX_PL80; |