summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/target/mame/mess.lua2
-rw-r--r--src/mame/drivers/dpb7000.cpp9
-rw-r--r--src/mame/video/dpb_brushstore.cpp190
-rw-r--r--src/mame/video/dpb_brushstore.h98
4 files changed, 296 insertions, 3 deletions
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index b007fc41f81..45cbcd831b0 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -3909,6 +3909,8 @@ files {
MAME_DIR .. "src/mame/video/dpb_combiner.h",
MAME_DIR .. "src/mame/video/dpb_brushproc.cpp",
MAME_DIR .. "src/mame/video/dpb_brushproc.h",
+ MAME_DIR .. "src/mame/video/dpb_brushstore.cpp",
+ MAME_DIR .. "src/mame/video/dpb_brushstore.h",
MAME_DIR .. "src/mame/video/dpb_framestore.cpp",
MAME_DIR .. "src/mame/video/dpb_framestore.h",
MAME_DIR .. "src/mame/video/dpb_storeaddr.cpp",
diff --git a/src/mame/drivers/dpb7000.cpp b/src/mame/drivers/dpb7000.cpp
index f96524972c3..49007be8f58 100644
--- a/src/mame/drivers/dpb7000.cpp
+++ b/src/mame/drivers/dpb7000.cpp
@@ -19,6 +19,7 @@
#include "machine/input_merger.h"
#include "machine/tdc1008.h"
#include "video/dpb_brushproc.h"
+#include "video/dpb_brushstore.h"
#include "video/dpb_combiner.h"
#include "video/dpb_framestore.h"
#include "video/dpb_storeaddr.h"
@@ -73,6 +74,7 @@ public:
, m_filter_cg(*this, "filter_cg")
, m_store_addr(*this, "store_addr%u", 0U)
, m_brush_proc(*this, "brush_proc%u", 0U)
+ , m_brush_store(*this, "brush_store")
, m_combiner(*this, "combiner")
, m_framestore(*this, "framestore%u", 0U)
{
@@ -166,6 +168,7 @@ private:
required_device_array<dpb7000_storeaddr_card_device, 2> m_store_addr;
required_device_array<dpb7000_brushproc_card_device, 2> m_brush_proc;
+ required_device<dpb7000_brush_store_card_device> m_brush_store;
required_device<dpb7000_combiner_card_device> m_combiner;
required_device_array<dpb7000_framestore_card_device, 6> m_framestore;
@@ -1149,6 +1152,9 @@ void dpb7000_state::dpb7000(machine_config &config)
DPB7000_BRUSHPROC(config, m_brush_proc[0]);
DPB7000_BRUSHPROC(config, m_brush_proc[1]);
+ // Brush Store Card
+ DPB7000_BRUSHSTORE(config, m_brush_store);
+
// Combiner Card
DPB7000_COMBINER(config, m_combiner, 14.318181_MHz_XTAL);
@@ -1218,9 +1224,6 @@ ROM_START( dpb7000 )
ROM_REGION(0x800, "fddprom", 0)
ROM_LOAD("17446a-gd-m2716.bin", 0x000, 0x800, CRC(a0be00ca) SHA1(48c4f8c07b9f6bc9b68698e1e326782e0b01e1b0))
- ROM_REGION(0x100, "brushstore_prom", 0)
- ROM_LOAD("pb-02a-17421-ada.bin", 0x000, 0x100, CRC(84bf7029) SHA1(9d58322994f6f7e99a9c6478577559c8171670ed))
-
ROM_REGION(0x1200, "output_timing_proms", 0)
ROM_LOAD("pb-037-17418-bea.bin", 0x0000, 0x400, CRC(644e82a3) SHA1(d7634e03809abe2db924571c05821c1b2aca051b))
ROM_LOAD("pb-037-17418-bga.bin", 0x0400, 0x400, CRC(3b2c3635) SHA1(2038d616dd7f65ba55497bd037b0ad69aaa801ed))
diff --git a/src/mame/video/dpb_brushstore.cpp b/src/mame/video/dpb_brushstore.cpp
new file mode 100644
index 00000000000..8ab2eeffe5d
--- /dev/null
+++ b/src/mame/video/dpb_brushstore.cpp
@@ -0,0 +1,190 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+/***************************************************************************
+
+ dpb_brushstore.cpp
+ DPB-7000/1 - Brush Store Card
+
+ TODO:
+ - Code is currently a more or less direct translation of the board
+ schematic. It is highly inefficient, but accurate. An equally-
+ accurate, but faster, version can be made once better understanding
+ of the overall DPB-7000 system is had.
+
+***************************************************************************/
+
+#include "emu.h"
+#include "dpb_brushstore.h"
+
+
+/*****************************************************************************/
+
+DEFINE_DEVICE_TYPE(DPB7000_BRUSHSTORE, dpb7000_brush_store_card_device, "dpb_brushstore", "Quantel DPB-7000 Brush Store Card")
+
+
+//-------------------------------------------------
+// dpb7000_brush_store_card_device - constructor
+//-------------------------------------------------
+
+dpb7000_brush_store_card_device::dpb7000_brush_store_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, DPB7000_BRUSHSTORE, tag, owner, clock)
+ , m_pal_base(nullptr)
+ , m_addr(0)
+ , m_a0_chr(0)
+ , m_bck(true)
+ , m_lumen(false)
+ , m_chren(false)
+ , m_ca0(false)
+ , m_ksel(false)
+ , m_fcs(false)
+ , m_func(0)
+ , m_b_bus_a(false)
+ , m_store_write_out(*this)
+ , m_k_data_out(*this)
+ , m_lum_data_out(*this)
+ , m_chr_data_out(*this)
+ , m_pal(*this, "pal")
+{
+}
+
+ROM_START( dpb7000_brush_store )
+ ROM_REGION(0x100, "pal", 0)
+ ROM_LOAD("pb-02a-17421-ada.bin", 0x000, 0x100, CRC(12345678) SHA1(1234567812345678123456781234567812345678))
+ROM_END
+
+const tiny_rom_entry *dpb7000_brush_store_card_device::device_rom_region() const
+{
+ return ROM_NAME( dpb7000_brush_store );
+}
+
+void dpb7000_brush_store_card_device::device_start()
+{
+ save_item(NAME(m_addr));
+ save_item(NAME(m_a0_chr));
+
+ save_item(NAME(m_ras));
+ save_item(NAME(m_cas));
+
+ save_pointer(NAME(m_rav), STRIPE_COUNT);
+ save_pointer(NAME(m_cav), STRIPE_COUNT);
+ save_item(NAME(m_bck));
+
+ save_item(NAME(m_lumen));
+ save_item(NAME(m_chren));
+
+ save_item(NAME(m_ca0));
+
+ save_item(NAME(m_ksel));
+ save_item(NAME(m_fcs));
+ save_item(NAME(m_func));
+ save_item(NAME(m_b_bus_a));
+
+ m_store_write_out.resolve_safe();
+ m_k_data_out.resolve_safe();
+ m_lum_data_out.resolve_safe();
+ m_chr_data_out.resolve_safe();
+
+ m_pal_base = m_pal->base();
+
+ for (size_t i = 0; i < STRIPE_COUNT; i++)
+ {
+ m_stripes[i] = make_unique_clear<uint8_t[]>(0x10000);
+ save_pointer(NAME(m_stripes[i]), 0x10000, i);
+ }
+}
+
+void dpb7000_brush_store_card_device::device_reset()
+{
+ m_addr = 0;
+ m_a0_chr = 0;
+
+ m_ras = false;
+ m_cas = false;
+
+ memset(m_rav, 0, STRIPE_COUNT);
+ memset(m_cav, 0, STRIPE_COUNT);
+ m_bck = true;
+
+ m_lumen = false;
+ m_chren = false;
+
+ m_ca0 = false;
+
+ m_ksel = false;
+ m_fcs = false;
+ m_func = 0;
+ m_b_bus_a = false;
+
+ for (size_t i = 0; i < STRIPE_COUNT; i++)
+ {
+ memset(&m_stripes[i][0], 0, 0x10000);
+ }
+}
+
+uint16_t dpb7000_brush_store_card_device::read()
+{
+ return 0;
+}
+
+void dpb7000_brush_store_card_device::write(uint16_t data)
+{
+}
+
+
+void dpb7000_brush_store_card_device::addr_w(uint8_t data)
+{
+ m_addr = data;
+}
+
+void dpb7000_brush_store_card_device::a0_chr_w(int state)
+{
+ m_a0_chr = (uint8_t)state;
+}
+
+void dpb7000_brush_store_card_device::ras_w(int state)
+{
+ m_ras = (bool)state;
+}
+
+void dpb7000_brush_store_card_device::cas_w(int state)
+{
+ m_cas = (bool)state;
+}
+
+
+void dpb7000_brush_store_card_device::lumen_w(int state)
+{
+ m_lumen = (bool)state;
+}
+
+void dpb7000_brush_store_card_device::chren_w(int state)
+{
+ m_chren = (bool)state;
+}
+
+
+void dpb7000_brush_store_card_device::ca0_w(int state)
+{
+ m_ca0 = (bool)state;
+}
+
+void dpb7000_brush_store_card_device::ksel_w(int state)
+{
+ m_ksel = (bool)state;
+}
+
+
+void dpb7000_brush_store_card_device::fcs_w(int state)
+{
+ m_fcs = (bool)state;
+}
+
+void dpb7000_brush_store_card_device::func_w(uint8_t data)
+{
+ m_func = data;
+}
+
+void dpb7000_brush_store_card_device::b_bus_a_w(int state)
+{
+ m_b_bus_a = (bool)state;
+}
diff --git a/src/mame/video/dpb_brushstore.h b/src/mame/video/dpb_brushstore.h
new file mode 100644
index 00000000000..8909bd31f9c
--- /dev/null
+++ b/src/mame/video/dpb_brushstore.h
@@ -0,0 +1,98 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+/***************************************************************************
+
+ dpb_brushstore.h
+ DPB-7000/1 - Brush Store Card
+
+***************************************************************************/
+
+#ifndef MAME_VIDEO_DPB_BRUSHSTORE_H
+#define MAME_VIDEO_DPB_BRUSHSTORE_H
+
+#pragma once
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> dpb7000_brush_store_card_device
+
+class dpb7000_brush_store_card_device : public device_t
+{
+public:
+ // construction/destruction
+ dpb7000_brush_store_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+
+ uint16_t read();
+ void write(uint16_t data);
+
+ void addr_w(uint8_t data);
+ void a0_chr_w(int state);
+ void ras_w(int state);
+ void cas_w(int state);
+
+ void lumen_w(int state);
+ void chren_w(int state);
+
+ void ca0_w(int state);
+ void ksel_w(int state);
+
+ void fcs_w(int state);
+ void func_w(uint8_t data);
+
+ void b_bus_a_w(int state);
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+
+ enum : size_t
+ {
+ STRIPE_CHR,
+ STRIPE_K,
+ STRIPE_LUM,
+ STRIPE_COUNT
+ };
+
+ uint8_t *m_pal_base;
+
+ uint8_t m_addr;
+ uint8_t m_a0_chr;
+
+ bool m_ras;
+ bool m_cas;
+
+ uint8_t m_rav[STRIPE_COUNT];
+ uint8_t m_cav[STRIPE_COUNT];
+ bool m_bck;
+
+ bool m_lumen;
+ bool m_chren;
+
+ bool m_ca0;
+
+ bool m_ksel;
+ bool m_fcs;
+ uint8_t m_func;
+ bool m_b_bus_a;
+
+ std::unique_ptr<uint8_t[]> m_stripes[STRIPE_COUNT];
+
+ // Output Lines
+ devcb_write_line m_store_write_out;
+ devcb_write8 m_k_data_out;
+ devcb_write8 m_lum_data_out;
+ devcb_write8 m_chr_data_out;
+
+ // Devices
+ required_memory_region m_pal;
+};
+
+// device type definition
+DECLARE_DEVICE_TYPE(DPB7000_BRUSHSTORE, dpb7000_brush_store_card_device)
+
+#endif // MAME_VIDEO_DPB_BRUSHSTORE_H