diff options
Diffstat (limited to 'src/devices/bus/ieee488/shark.cpp')
| -rw-r--r-- | src/devices/bus/ieee488/shark.cpp | 51 |
1 files changed, 42 insertions, 9 deletions
diff --git a/src/devices/bus/ieee488/shark.cpp b/src/devices/bus/ieee488/shark.cpp index 1e160b6c310..c6131ba847b 100644 --- a/src/devices/bus/ieee488/shark.cpp +++ b/src/devices/bus/ieee488/shark.cpp @@ -8,12 +8,15 @@ #include "emu.h" #include "shark.h" + #include "bus/rs232/rs232.h" #include "cpu/i8085/i8085.h" #include "imagedev/harddriv.h" +namespace { + //************************************************************************** // MACROS / CONSTANTS //************************************************************************** @@ -22,14 +25,6 @@ #define RS232_TAG "rs232" - -//************************************************************************** -// DEVICE DEFINITIONS -//************************************************************************** - -DEFINE_DEVICE_TYPE(MSHARK, mshark_device, "mshark", "Mator SHARK") - - //------------------------------------------------- // ROM( mshark ) //------------------------------------------------- @@ -47,6 +42,34 @@ ROM_START( mshark ) ROM_END +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> mshark_device + +class mshark_device : public device_t, + public device_ieee488_interface +{ +public: + // construction/destruction + mshark_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + // device_t implementation + virtual void device_start() override ATTR_COLD; + virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD; + virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; + virtual ioport_constructor device_input_ports() const override ATTR_COLD; + +private: + required_device<cpu_device> m_maincpu; + + void mshark_io(address_map &map) ATTR_COLD; + void mshark_mem(address_map &map) ATTR_COLD; +}; + + //------------------------------------------------- // rom_region - device-specific ROM region //------------------------------------------------- @@ -121,7 +144,7 @@ ioport_constructor mshark_device::device_input_ports() const //------------------------------------------------- mshark_device::mshark_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, MSHARK, tag, owner, clock) + : device_t(mconfig, GPIB_MSHARK, tag, owner, clock) , device_ieee488_interface(mconfig, *this) , m_maincpu(*this, I8085_TAG) { @@ -135,3 +158,13 @@ mshark_device::mshark_device(const machine_config &mconfig, const char *tag, dev void mshark_device::device_start() { } + +} // anonymous namespace + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(GPIB_MSHARK, device_ieee488_interface, mshark_device, "gpib_mshark", "Mator SHARK") |
