summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/mtx/sdx.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
committer Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
commit97b67170277437131adf6ed4d60139c172529e4f (patch)
tree7a5cbf608f191075f1612b1af15832c206a3fe2d /src/devices/bus/mtx/sdx.h
parentb380514764cf857469bae61c11143a19f79a74c5 (diff)
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
Diffstat (limited to 'src/devices/bus/mtx/sdx.h')
-rw-r--r--src/devices/bus/mtx/sdx.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/src/devices/bus/mtx/sdx.h b/src/devices/bus/mtx/sdx.h
new file mode 100644
index 00000000000..dff83358dd4
--- /dev/null
+++ b/src/devices/bus/mtx/sdx.h
@@ -0,0 +1,105 @@
+// license:BSD-3-Clause
+// copyright-holders:Nigel Barnes
+/**********************************************************************
+
+ MTX SDX Controller
+
+**********************************************************************/
+
+
+#ifndef MAME_BUS_MTX_EXP_SDX_H
+#define MAME_BUS_MTX_EXP_SDX_H
+
+#include "exp.h"
+#include "imagedev/floppy.h"
+#include "machine/wd_fdc.h"
+#include "video/mc6845.h"
+#include "formats/mtx_dsk.h"
+#include "emupal.h"
+#include "screen.h"
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+class mtx_sdx_device :
+ public device_t,
+ public device_mtx_exp_interface
+{
+public:
+ DECLARE_FLOPPY_FORMATS(floppy_formats);
+
+ // optional information overrides
+ virtual ioport_constructor device_input_ports() const override;
+
+ DECLARE_READ8_MEMBER(sdx_status_r);
+ DECLARE_WRITE8_MEMBER(sdx_control_w);
+ DECLARE_WRITE_LINE_MEMBER(motor_w);
+
+protected:
+ // construction/destruction
+ mtx_sdx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+ required_memory_region m_sdx_rom;
+ required_device<mb8877_device> m_fdc;
+ required_device<floppy_connector> m_floppy0;
+ required_device<floppy_connector> m_floppy1;
+ required_ioport_array<2> m_dsw;
+ floppy_image_device *m_floppy;
+ uint8_t m_control;
+};
+
+class mtx_sdxbas_device : public mtx_sdx_device
+{
+public:
+ // construction/destruction
+ mtx_sdxbas_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+};
+
+class mtx_sdxcpm_device : public mtx_sdx_device
+{
+public:
+ // construction/destruction
+ mtx_sdxcpm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+ DECLARE_READ8_MEMBER(mtx_80col_r);
+ DECLARE_WRITE8_MEMBER(mtx_80col_w);
+ MC6845_UPDATE_ROW(crtc_update_row);
+
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ required_device<mc6845_device> m_crtc;
+ required_memory_region m_char_rom;
+ uint8_t m_80col_char_ram[0x800];
+ uint8_t m_80col_attr_ram[0x800];
+ uint8_t m_80col_ascii, m_80col_attr;
+ uint16_t m_80col_addr;
+};
+
+
+
+// device type definition
+DECLARE_DEVICE_TYPE(MTX_SDXBAS, mtx_sdxbas_device)
+DECLARE_DEVICE_TYPE(MTX_SDXCPM, mtx_sdxcpm_device)
+
+
+#endif // MAME_BUS_MTX_EXP_SDX_H