summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/coco/coco_wpk.h
diff options
context:
space:
mode:
author Nigel Barnes <Pernod70@users.noreply.github.com>2021-06-14 13:13:17 +0100
committer Nigel Barnes <Pernod70@users.noreply.github.com>2021-06-14 13:20:35 +0100
commitefcdeeaed4cf00263f23de8a77b990b4b92893a4 (patch)
tree1ed1f14fbbfc7705e8747c9a152e1cfc6a9f9533 /src/devices/bus/coco/coco_wpk.h
parent47d8ac8698d14e03a39c6c3ffb6569f2768e4e90 (diff)
bus/coco: Added the Dragon MSX 2+, The Dragon's Claw, Peaksoft Prestel, and CoCo WordPak/WordPak II/WordPak RS/WordPak 2+ devices.
Diffstat (limited to 'src/devices/bus/coco/coco_wpk.h')
-rw-r--r--src/devices/bus/coco/coco_wpk.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/src/devices/bus/coco/coco_wpk.h b/src/devices/bus/coco/coco_wpk.h
new file mode 100644
index 00000000000..65534dd3709
--- /dev/null
+++ b/src/devices/bus/coco/coco_wpk.h
@@ -0,0 +1,94 @@
+// license:BSD-3-Clause
+// copyright-holders:Nigel Barnes
+#ifndef MAME_BUS_COCO_COCO_WPK_H
+#define MAME_BUS_COCO_COCO_WPK_H
+
+#pragma once
+
+#include "cococart.h"
+#include "video/mc6845.h"
+#include "emupal.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> coco_wpk_device
+
+class coco_wpk_device :
+ public device_t,
+ public device_cococart_interface
+{
+public:
+ static constexpr feature_type imperfect_features() { return feature::GRAPHICS; }
+
+ // construction/destruction
+ coco_wpk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ // construction/destruction
+ coco_wpk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+
+ required_device<r6545_1_device> m_crtc;
+ required_device<palette_device> m_palette;
+ required_memory_region m_chargen;
+
+ u16 m_video_addr;
+ u8 m_video_data;
+
+ std::unique_ptr<u8[]> m_video_ram;
+
+ void crtc_display_w(u8 data);
+ MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr);
+ MC6845_UPDATE_ROW(crtc_update_row);
+};
+
+
+// ======================> coco_wpk2_device
+
+class coco_wpk2_device : public coco_wpk_device
+{
+public:
+ // construction/destruction
+ coco_wpk2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+ void video_select_w(u8 data);
+};
+
+
+// ======================> coco_wpkrs_device
+
+class coco_wpkrs_device : public coco_wpk_device
+{
+public:
+ // construction/destruction
+ coco_wpkrs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+};
+
+
+// device type definition
+DECLARE_DEVICE_TYPE(COCO_WPK, coco_wpk_device)
+DECLARE_DEVICE_TYPE(COCO_WPK2, coco_wpk2_device)
+DECLARE_DEVICE_TYPE(COCO_WPKRS, coco_wpkrs_device)
+
+#endif // MAME_BUS_COCO_COCO_WPK_H