-dpb7000: Code cleanup, removed disused individual card devices, hooked up MFM disk image support. [Ryan Holtz, ZrX]

This commit is contained in:
Ryan Holtz 2020-05-01 21:02:13 +02:00
parent 98e78c91f6
commit 0a95ff11dc
11 changed files with 711 additions and 3830 deletions

View File

@ -3211,16 +3211,6 @@ files {
createMESSProjects(_target, _subtarget, "quantel")
files {
MAME_DIR .. "src/mame/drivers/dpb7000.cpp",
MAME_DIR .. "src/mame/video/dpb_combiner.cpp",
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",
MAME_DIR .. "src/mame/video/dpb_storeaddr.h",
MAME_DIR .. "src/mame/drivers/harriet.cpp",
}

File diff suppressed because it is too large Load Diff

View File

@ -1,548 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
/***************************************************************************
dpb_brushproc.cpp
DPB-7000/1 - Brush Processor Card
***************************************************************************/
#include "emu.h"
#include "dpb_brushproc.h"
#define VERBOSE (1)
#include "logmacro.h"
/*****************************************************************************/
DEFINE_DEVICE_TYPE(DPB7000_BRUSHPROC, dpb7000_brushproc_card_device, "dpb_brushproc", "Quantel DPB-7000 Brush Processor Card")
//-------------------------------------------------
// dpb7000_brushproc_card_device - constructor
//-------------------------------------------------
dpb7000_brushproc_card_device::dpb7000_brushproc_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DPB7000_BRUSHPROC, tag, owner, clock)
, m_ext_in(0)
, m_brush_in(0)
, m_cbus_in(0)
, m_k_in(0)
, m_k_enable(0)
, m_k_zero(false)
, m_k_invert(false)
, m_k_product(0)
, m_ext_product(0)
, m_final_product(0)
, m_final_result(0)
, m_brush_value(0)
, m_final_brush_value(0)
, m_compare_b_value(0)
, m_func(0)
, m_subtract_result(false)
, m_sel_eh(false)
, m_b_bus_ah(false)
, m_fcs(false)
, m_use_store1_for_brush(false)
, m_use_store2_for_brush(false)
, m_use_ext_for_brush(false)
, m_use_store1_or_ext_for_brush(false)
, m_use_store2_for_store1(false)
, m_enable_store_ext_multiplicand(false)
, m_output_16bit(false)
, m_pal_proc_in(false)
, m_disable_k_data(false)
, m_prom_addr(0)
, m_prom_base(nullptr)
, m_prom_out(0)
, m_pal_in(0)
, m_pal_base(nullptr)
, m_pal_data_out(0)
, m_pal_bpinv_out(false)
, m_pal_sel_out(false)
, m_store1(*this)
, m_store2(*this)
, m_mult_fa(*this, "mult_fa")
, m_mult_ga(*this, "mult_ga")
, m_mult_gd(*this, "mult_gd")
, m_alu_he(*this, "alu_he")
, m_alu_ge(*this, "alu_ge")
, m_alu_fe(*this, "alu_fe")
, m_alu_ee(*this, "alu_ee")
, m_prom(*this, "prom")
, m_pal(*this, "pal")
{
}
void dpb7000_brushproc_card_device::device_start()
{
save_item(NAME(m_store_in));
save_item(NAME(m_store_out));
save_item(NAME(m_ext_in));
save_item(NAME(m_brush_in));
save_item(NAME(m_cbus_in));
save_item(NAME(m_k_in));
save_item(NAME(m_k_enable));
save_item(NAME(m_k_zero));
save_item(NAME(m_k_invert));
save_item(NAME(m_k_product));
save_item(NAME(m_ext_product));
save_item(NAME(m_final_product));
save_item(NAME(m_final_result));
save_item(NAME(m_brush_value));
save_item(NAME(m_final_brush_value));
save_item(NAME(m_compare_b_value));
save_item(NAME(m_func));
save_item(NAME(m_subtract_result));
save_item(NAME(m_sel_luma));
save_item(NAME(m_sel_eh));
save_item(NAME(m_b_bus_ah));
save_item(NAME(m_fcs));
save_item(NAME(m_oe));
save_item(NAME(m_use_store1_for_brush));
save_item(NAME(m_use_store2_for_brush));
save_item(NAME(m_use_ext_for_brush));
save_item(NAME(m_use_store1_or_ext_for_brush));
save_item(NAME(m_use_store2_for_store1));
save_item(NAME(m_enable_store_ext_multiplicand));
save_item(NAME(m_output_16bit));
save_item(NAME(m_pal_proc_in));
save_item(NAME(m_disable_k_data));
save_item(NAME(m_prom_addr));
save_item(NAME(m_prom_out));
save_item(NAME(m_pal_in));
save_item(NAME(m_pal_data_out));
save_item(NAME(m_pal_bpinv_out));
save_item(NAME(m_pal_sel_out));
m_store1.resolve_safe();
m_store2.resolve_safe();
}
void dpb7000_brushproc_card_device::device_reset()
{
memset(m_store_in, 0, 2);
memset(m_store_out, 0, 2);
m_ext_in = 0;
m_brush_in = 0;
m_cbus_in = 0;
m_k_in = 0;
m_k_enable = false;
m_k_zero = false;
m_k_invert = false;
m_k_product = 0;
m_ext_product = 0;
m_final_product = 0;
m_final_result = 0;
m_brush_value = 0;
m_final_brush_value = 0;
m_compare_b_value = 0;
m_func = 0;
m_subtract_result = false;
memset(m_sel_luma, 0, 2);
m_sel_eh = false;
m_b_bus_ah = false;
m_fcs = false;
memset(m_oe, 0, 4);
m_use_store1_for_brush = false;
m_use_store2_for_brush = false;
m_use_ext_for_brush = false;
m_use_store1_or_ext_for_brush = false;
m_use_store2_for_store1 = false;
m_enable_store_ext_multiplicand = false;
m_output_16bit = false;
m_pal_proc_in = false;
m_disable_k_data = false;
m_prom_addr = 0;
m_prom_base = m_prom->base();
m_prom_out = 0;
m_pal_in = 0;
m_pal_base = m_pal->base();
m_pal_data_out = 0;
m_pal_bpinv_out = false;
m_pal_sel_out = false;
m_mult_fa->xm_w(0);
m_mult_fa->ym_w(0);
m_mult_fa->rs_w(0);
m_mult_fa->ru_w(1);
m_mult_ga->xm_w(0);
m_mult_ga->ym_w(0);
m_mult_ga->rs_w(0);
m_mult_ga->ru_w(1);
m_mult_gd->xm_w(0);
m_mult_gd->ym_w(0);
m_mult_gd->rs_w(0);
m_mult_gd->ru_w(1);
}
void dpb7000_brushproc_card_device::device_add_mconfig(machine_config &config)
{
AM25S558(config, m_mult_fa);
AM25S558(config, m_mult_ga);
AM25S558(config, m_mult_gd);
SN74S381(config, m_alu_he);
SN74S381(config, m_alu_ge);
SN74S381(config, m_alu_fe);
SN74S381(config, m_alu_ee);
}
ROM_START( dpb7000_brushproc )
ROM_REGION(0x200, "prom", 0)
ROM_LOAD("pb-02c-17593-baa.bin", 0x000, 0x200, CRC(a74cc1f5) SHA1(3b789d5a29c70c93dec56f44be8c14b41915bdef))
ROM_REGION16_BE(0x800, "pal", 0)
ROMX_LOAD("pb-02c-17593-hba.bin", 0x000, 0x800, CRC(76018e4f) SHA1(73d995e2e78410676061d45857756d5305a9984a), ROM_GROUPWORD)
ROM_END
const tiny_rom_entry *dpb7000_brushproc_card_device::device_rom_region() const
{
return ROM_NAME( dpb7000_brushproc );
}
void dpb7000_brushproc_card_device::store1_w(uint8_t data)
{
m_store_in[0] = data;
}
void dpb7000_brushproc_card_device::store2_w(uint8_t data)
{
m_store_in[1] = data;
}
void dpb7000_brushproc_card_device::ext_w(uint8_t data)
{
m_ext_in = data;
}
void dpb7000_brushproc_card_device::brush_w(uint8_t data)
{
m_brush_in = data;
}
void dpb7000_brushproc_card_device::cbus_w(uint8_t data)
{
m_cbus_in = data;
update_k_product();
}
void dpb7000_brushproc_card_device::k_w(uint8_t data)
{
m_k_in = data;
if (m_k_enable && !m_disable_k_data)
update_k_product();
}
void dpb7000_brushproc_card_device::k_en_w(int state)
{
const bool old = m_k_enable;
m_k_enable = (bool)state;
if (!old && m_k_enable && !m_disable_k_data)
update_k_product();
}
void dpb7000_brushproc_card_device::k_zero_w(int state)
{
const bool old = m_k_zero;
m_k_zero = (bool)state;
if (old != m_k_zero)
update_ext_product();
}
void dpb7000_brushproc_card_device::k_inv_w(int state)
{
const bool old = m_k_invert;
m_k_invert = (bool)state;
if (old != m_k_invert)
update_pal_signals();
}
void dpb7000_brushproc_card_device::func_w(uint8_t data)
{
m_func = data;
const uint16_t old = m_prom_addr;
m_prom_addr &= 0x1f0;
m_prom_addr |= BIT(data, 3);
m_prom_addr |= BIT(data, 2) << 1;
m_prom_addr |= BIT(data, 1) << 2;
m_prom_addr |= BIT(data, 0) << 3;
if (old != m_prom_addr)
update_prom_signals();
}
void dpb7000_brushproc_card_device::sel_lum1_w(int state)
{
m_sel_luma[0] = (bool)state;
const uint16_t old = m_prom_addr;
m_prom_addr &= ~0x20;
m_prom_addr |= state << 5;
if (old != m_prom_addr)
update_prom_signals();
}
void dpb7000_brushproc_card_device::sel_lum2_w(int state)
{
m_sel_luma[1] = (bool)state;
const uint16_t old = m_prom_addr;
m_prom_addr &= ~0x10;
m_prom_addr |= state << 4;
if (old != m_prom_addr)
update_prom_signals();
}
void dpb7000_brushproc_card_device::sel_eh_w(int state)
{
m_sel_eh = (bool)state;
const uint16_t old = m_prom_addr;
m_prom_addr &= ~0x40;
m_prom_addr |= state << 6;
if (old != m_prom_addr)
update_prom_signals();
}
void dpb7000_brushproc_card_device::b_bus_ah_w(int state)
{
m_b_bus_ah = (bool)state;
const uint16_t old = m_prom_addr;
m_prom_addr &= ~0x80;
m_prom_addr |= state << 7;
if (old != m_prom_addr)
update_prom_signals();
}
void dpb7000_brushproc_card_device::fixed_col_select_w(int state)
{
m_fcs = (bool)state;
const uint16_t old = m_prom_addr;
m_prom_addr &= ~0x80;
m_prom_addr |= state << 8;
if (old != m_prom_addr)
update_prom_signals();
}
void dpb7000_brushproc_card_device::update_prom_signals()
{
const uint8_t old = m_prom_out;
m_prom_out = m_prom_base[m_prom_addr];
if (BIT(old, 0) != BIT(m_prom_out, 0))
set_oe1(BIT(m_prom_out, 0));
if (BIT(old, 1) != BIT(m_prom_out, 1))
set_oe2(BIT(m_prom_out, 1));
if (BIT(old, 2) != BIT(m_prom_out, 2))
set_oe3(BIT(m_prom_out, 2));
if (BIT(old, 3) != BIT(m_prom_out, 3))
set_mask_sel_h(BIT(m_prom_out, 3));
if (BIT(old, 4) != BIT(m_prom_out, 4))
set_16bit_h(BIT(m_prom_out, 4));
if (BIT(old, 5) != BIT(m_prom_out, 5))
set_proc_sel_h(BIT(m_prom_out, 5));
if (BIT(old, 6) != BIT(m_prom_out, 6))
set_k_eq_il(BIT(m_prom_out, 6));
if (BIT(old, 7) != BIT(m_prom_out, 7))
set_oe4(BIT(m_prom_out, 7));
update_brush_value();
update_compare_b_value();
}
void dpb7000_brushproc_card_device::update_pal_signals()
{
const uint16_t old_data = m_pal_data_out;
const bool old_bpinv = m_pal_bpinv_out;
const uint16_t old_addr = m_pal_in;
m_pal_in = m_ext_product | (m_pal_proc_in ? 0x100 : 0) | (m_k_invert ? 0x200 : 0);
if (old_addr != m_pal_in)
{
const uint16_t shifted_addr = m_pal_in << 1;
const uint8_t pal_msb = m_pal_base[shifted_addr];
m_pal_data_out = m_pal_base[shifted_addr + 1];
m_pal_bpinv_out = BIT(pal_msb, 0);
m_pal_sel_out = BIT(pal_msb, 1);
if (old_bpinv != m_pal_bpinv_out)
{
m_final_brush_value = m_brush_value ^ (m_pal_bpinv_out ? 0xff : 0x00);
}
if (old_data != m_pal_data_out)
{
update_final_product();
}
}
}
void dpb7000_brushproc_card_device::update_k_product()
{
const uint16_t x = (uint16_t)m_cbus_in;
const uint16_t y = (m_disable_k_data || !m_k_enable) ? 0x00ff : (uint16_t)m_k_in;
const uint8_t old = m_k_product;
m_k_product = (uint8_t)((x * y + 0x0080) >> 8);
if (old != m_k_product)
update_ext_product();
}
void dpb7000_brushproc_card_device::update_ext_product()
{
const uint16_t y = (uint16_t)m_k_product;
uint16_t x = 0;
if (!m_k_zero)
{
if (m_enable_store_ext_multiplicand)
x = (uint16_t)m_ext_in;
else
x = 0xff;
}
const uint16_t old = m_ext_product;
m_ext_product = (uint8_t)((x * y + 0x0080) >> 8);
if (old != m_ext_product)
update_final_product();
}
void dpb7000_brushproc_card_device::update_final_product()
{
const uint16_t x = (uint16_t)update_brush_alu_result();
const uint16_t y = (uint16_t)m_pal_data_out;
m_final_product = x * y + (m_output_16bit ? 0x80 : 0x00);
uint16_t a = (m_compare_b_value << 8) | m_store_in[1];
m_final_result = m_subtract_result ? (a - m_final_product) : (a + m_final_product);
m_store_out[0] = m_pal_sel_out ? (uint8_t)(m_final_result >> 8) : m_final_brush_value;
m_store_out[1] = m_output_16bit ? (uint8_t)m_final_result : m_store_out[0];
m_store1(m_store_out[0]);
m_store2(m_store_out[1]);
}
uint8_t dpb7000_brushproc_card_device::update_brush_alu_result()
{
// Handled by a pair of 74S85 comparators (BB, CB), a pair of 74S381 ALUs (CD, DD) and a 74S182 carry lookahead generator (ED).
const uint8_t a = m_brush_value;
const uint8_t b = m_compare_b_value;
if (a <= b)
{
m_subtract_result = false;
return b - a;
}
else
{
m_subtract_result = true;
return a - b;
}
}
void dpb7000_brushproc_card_device::set_oe1(int state)
{
// When 0, force Store I or Store Ext. data onto Brush Data lanes
m_oe[0] = (bool)state;
m_use_store1_or_ext_for_brush = !m_oe[0];
m_use_store1_for_brush = m_use_store1_or_ext_for_brush && !m_oe[2];
m_use_ext_for_brush = m_use_store1_or_ext_for_brush && m_oe[2];
}
void dpb7000_brushproc_card_device::set_oe2(int state)
{
// When 0, force Store II data onto Brush Data lanes
m_oe[1] = (bool)state;
m_use_store2_for_brush = !m_oe[1];
}
void dpb7000_brushproc_card_device::set_oe3(int state)
{
// When 0, force Store Ext. data onto Store I data lanes (disables Store I data input)
m_oe[2] = (bool)state;
m_use_store1_for_brush = m_use_store1_or_ext_for_brush && m_oe[2];
m_use_ext_for_brush = m_use_store1_or_ext_for_brush && !m_oe[2];
}
void dpb7000_brushproc_card_device::update_brush_value()
{
if (m_use_store1_for_brush)
{
m_brush_value = m_store_in[0];
}
else if (m_use_store2_for_brush)
{
m_brush_value = m_store_in[1];
}
else if (m_use_ext_for_brush)
{
m_brush_value = m_ext_in;
}
else
{
m_brush_value = m_brush_in;
}
}
void dpb7000_brushproc_card_device::update_compare_b_value()
{
if (m_use_store2_for_store1)
{
m_compare_b_value = m_store_in[1];
}
else if (m_oe[2])
{
m_compare_b_value = m_ext_in;
}
else
{
m_compare_b_value = m_store_in[0];
}
}
void dpb7000_brushproc_card_device::set_oe4(int state)
{
// When 0, force Store II data onto Store I data lanes (disables Store I data input)
m_oe[3] = (bool)state;
m_use_store2_for_store1 = !m_oe[3];
}
void dpb7000_brushproc_card_device::set_mask_sel_h(int state)
{
// When 0, multiplies K product with 1.0 (0xff) instead of Store Ext. data.
m_enable_store_ext_multiplicand = (bool)state;
}
void dpb7000_brushproc_card_device::set_16bit_h(int state)
{
// When 0, enables Store II data output, enables Cx carry-out, and enables Ru pin on multiplier GD.
m_output_16bit = (bool)(1 - state);
}
void dpb7000_brushproc_card_device::set_proc_sel_h(int state)
{
// When 1, enables the PROC input pin on PAL 20L10 HB, not yet dumped.
m_pal_proc_in = (bool)state;
update_pal_signals();
}
void dpb7000_brushproc_card_device::set_k_eq_il(int state)
{
// When 1, disables K data lanes, which collectively get pulled to 1.0 (0xff).
m_disable_k_data = (bool)state;
if (!m_disable_k_data && m_k_enable)
update_k_product();
}

View File

@ -1,148 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
/***************************************************************************
dpb_brushproc.h
DPB-7000/1 - Brush Processor Card
TODO:
- Everything
***************************************************************************/
#ifndef MAME_VIDEO_DPB_BRUSHPROC_H
#define MAME_VIDEO_DPB_BRUSHPROC_H
#pragma once
#include "machine/74381.h"
#include "machine/am25s55x.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> dpb7000_brushproc_card_device
class dpb7000_brushproc_card_device : public device_t
{
public:
// construction/destruction
dpb7000_brushproc_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
void store1_w(uint8_t data);
void store2_w(uint8_t data);
void ext_w(uint8_t data);
void brush_w(uint8_t data);
void cbus_w(uint8_t data);
void k_w(uint8_t data);
void k_en_w(int state);
void k_zero_w(int state);
void k_inv_w(int state);
void func_w(uint8_t data);
void sel_lum1_w(int state);
void sel_lum2_w(int state);
void sel_eh_w(int state);
void b_bus_ah_w(int state);
void fixed_col_select_w(int state);
auto store1() { return m_store1.bind(); }
auto store2() { return m_store2.bind(); }
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
void update_prom_signals();
void update_pal_signals();
void update_k_product();
void update_ext_product();
void update_final_product();
void update_brush_value();
void update_compare_b_value();
uint8_t update_brush_alu_result();
void set_oe1(int state);
void set_oe2(int state);
void set_oe3(int state);
void set_oe4(int state);
void set_mask_sel_h(int state);
void set_16bit_h(int state);
void set_proc_sel_h(int state);
void set_k_eq_il(int state);
uint8_t get_compare_b();
uint8_t m_store_in[2];
uint8_t m_store_out[2];
uint8_t m_ext_in;
uint8_t m_brush_in;
uint8_t m_cbus_in;
uint8_t m_k_in;
bool m_k_enable;
bool m_k_zero;
bool m_k_invert;
uint8_t m_k_product;
uint8_t m_ext_product;
uint16_t m_final_product;
uint16_t m_final_result;
uint8_t m_brush_value;
uint8_t m_final_brush_value;
uint8_t m_compare_b_value;
uint8_t m_func;
bool m_subtract_result;
bool m_sel_luma[2];
bool m_sel_eh;
bool m_b_bus_ah;
bool m_fcs;
bool m_oe[4];
bool m_use_store1_for_brush;
bool m_use_store2_for_brush;
bool m_use_ext_for_brush;
bool m_use_store1_or_ext_for_brush;
bool m_use_store2_for_store1;
bool m_enable_store_ext_multiplicand;
bool m_output_16bit;
bool m_pal_proc_in;
bool m_disable_k_data;
uint16_t m_prom_addr;
uint8_t *m_prom_base;
uint8_t m_prom_out;
uint16_t m_pal_in;
uint8_t *m_pal_base;
uint16_t m_pal_data_out;
bool m_pal_bpinv_out;
bool m_pal_sel_out;
devcb_write8 m_store1;
devcb_write8 m_store2;
required_device<am25s558_device> m_mult_fa;
required_device<am25s558_device> m_mult_ga;
required_device<am25s558_device> m_mult_gd;
required_device<sn74s381_device> m_alu_he;
required_device<sn74s381_device> m_alu_ge;
required_device<sn74s381_device> m_alu_fe;
required_device<sn74s381_device> m_alu_ee;
required_memory_region m_prom;
required_memory_region m_pal;
};
// device type definition
DECLARE_DEVICE_TYPE(DPB7000_BRUSHPROC, dpb7000_brushproc_card_device)
#endif // MAME_VIDEO_DPB_BRUSHPROC_H

View File

@ -1,407 +0,0 @@
// 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_pal_addr(0)
, m_pal_data(0)
, m_addr(0)
, m_a0_chr(0)
, m_data(0)
, m_is_read(false)
, m_is_write(false)
, m_lumen(false)
, m_chren(false)
, m_ca0(false)
, m_ksel(false)
, m_fcs(false)
, m_func(0)
, m_b_bus_a(false)
, m_data_in(false)
, m_fast_wipe(false)
, m_store_write(false)
, m_oe_brush(false)
, m_brush_write(false)
, m_store_write_out(*this)
, m_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(84bf7029) SHA1(9d58322994f6f7e99a9c6478577559c8171670ed))
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_pal_addr));
save_item(NAME(m_pal_data));
save_item(NAME(m_addr));
save_item(NAME(m_a0_chr));
save_item(NAME(m_data));
save_item(NAME(m_is_read));
save_item(NAME(m_is_write));
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_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));
save_item(NAME(m_data_in));
save_item(NAME(m_fast_wipe));
save_item(NAME(m_store_write));
save_item(NAME(m_oe));
save_item(NAME(m_oe_brush));
save_item(NAME(m_brush_write));
save_item(NAME(m_write_enable));
save_item(NAME(m_brush_latches));
save_item(NAME(m_input_latches));
m_store_write_out.resolve_safe();
m_pal_base = m_pal->base();
for (size_t i = 0; i < STRIPE_COUNT; i++)
{
m_data_out[i].resolve_safe();
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_pal_addr = 0;
m_pal_data = 0;
m_addr = 0;
m_a0_chr = 0;
m_data = 0;
m_is_read = false;
m_is_write = false;
m_ras = false;
m_cas = false;
memset(m_rav, 0, STRIPE_COUNT);
memset(m_cav, 0, STRIPE_COUNT);
m_lumen = false;
m_chren = false;
m_ca0 = false;
m_ksel = false;
m_fcs = false;
m_func = 0;
m_b_bus_a = false;
m_data_in = false;
m_fast_wipe = false;
m_store_write = false;
memset(m_oe, 0, STRIPE_COUNT);
m_oe_brush = false;
m_brush_write = false;
memset(m_write_enable, 0, STRIPE_COUNT);
memset(m_brush_latches, 0, STRIPE_COUNT);
memset(m_input_latches, 0, STRIPE_COUNT);
for (size_t i = 0; i < STRIPE_COUNT; i++)
{
memset(&m_stripes[i][0], 0, 0x10000);
}
}
uint16_t dpb7000_brush_store_card_device::read()
{
m_is_read = true;
m_is_write = false;
uint8_t msb = m_brush_latches[STRIPE_CHR];
uint8_t lsb = m_oe[STRIPE_K] ? m_brush_latches[STRIPE_K] : (m_oe[STRIPE_LUM] ? m_brush_latches[STRIPE_LUM] : 0);
return (msb << 8) | lsb;
}
void dpb7000_brush_store_card_device::write(uint16_t data)
{
m_is_read = false;
m_is_write = true;
m_data = data;
update_input_latches();
m_is_write = false;
}
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)
{
const bool old = m_ras;
m_ras = (bool)state;
if (old && !m_ras)
{
m_rav[STRIPE_CHR] = (m_addr & ~1) | m_a0_chr;
m_rav[STRIPE_K] = m_addr;
m_rav[STRIPE_LUM] = m_addr;
}
}
void dpb7000_brush_store_card_device::cas_w(int state)
{
const bool old = m_cas;
m_cas = (bool)state;
if (old && !m_cas)
{
m_cav[STRIPE_CHR] = (m_addr & ~1) | m_a0_chr;
m_cav[STRIPE_K] = m_addr;
m_cav[STRIPE_LUM] = m_addr;
for (size_t i = 0; i < STRIPE_COUNT; i++)
{
const uint8_t addr = (m_rav[i] << 8) | m_cav[i];
if (m_oe_brush && !m_write_enable[i])
{
m_brush_latches[i] = m_stripes[i][addr];
m_data_out[i](m_brush_latches[i]);
}
else if (m_write_enable[i])
{
switch (i)
{
case STRIPE_CHR:
m_stripes[i][addr] = m_oe[i] ? m_brush_latches[i] :
((m_fast_wipe && m_ca0) ? m_input_latches[STRIPE_K] : m_input_latches[i]);
break;
case STRIPE_LUM:
m_stripes[i][addr] = m_oe[i] ? m_brush_latches[i] : m_input_latches[i];
break;
case STRIPE_K:
m_stripes[i][addr] = m_oe[STRIPE_LUM] ? m_brush_latches[STRIPE_LUM] : m_input_latches[STRIPE_LUM];
break;
}
}
}
}
}
void dpb7000_brush_store_card_device::lumen_w(int state)
{
const bool old = m_lumen;
m_lumen = (bool)state;
if (old != m_lumen)
{
update_write_enables();
}
}
void dpb7000_brush_store_card_device::chren_w(int state)
{
const bool old = m_chren;
m_chren = (bool)state;
if (old != m_lumen)
{
update_write_enables();
}
}
void dpb7000_brush_store_card_device::ca0_w(int state)
{
m_ca0 = (bool)state;
}
void dpb7000_brush_store_card_device::ksel_w(int state)
{
const bool old = m_ksel;
m_ksel = (bool)state;
if (old != m_ksel)
{
update_pal_addr();
update_write_enables();
}
}
void dpb7000_brush_store_card_device::fcs_w(int state)
{
const bool old = m_fcs;
m_fcs = (bool)state;
if (old != m_fcs)
{
update_pal_addr();
}
}
void dpb7000_brush_store_card_device::func_w(uint8_t data)
{
const uint8_t old = m_func;
m_func = data;
if (old != m_func)
{
update_pal_addr();
}
}
void dpb7000_brush_store_card_device::b_bus_a_w(int state)
{
const bool old = m_b_bus_a;
m_b_bus_a = (bool)state;
if (old != m_b_bus_a)
{
update_pal_addr();
}
}
void dpb7000_brush_store_card_device::update_pal_addr()
{
const uint8_t old = m_pal_addr;
m_pal_addr = m_func;
m_pal_addr |= m_ksel ? 0x10 : 0x00;
m_pal_addr |= m_b_bus_a ? 0x20 : 0x00;
m_pal_addr |= m_fcs ? 0x40 : 0x00;
if (old != m_pal_addr)
{
update_pal_output();
}
}
void dpb7000_brush_store_card_device::update_pal_output()
{
const uint8_t old = m_pal_data;
m_pal_data = m_pal_base[m_pal_addr];
if (old != m_pal_data)
{
data_in_w(BIT(m_pal_data, 0));
fast_wipe_w(BIT(m_pal_data, 1));
store_write_w(BIT(m_pal_data, 2));
oe_k_w(BIT(m_pal_data, 3));
oe_chr_w(BIT(m_pal_data, 4));
oe_lum_w(BIT(m_pal_data, 5));
oe_brush_w(BIT(m_pal_data, 6));
brush_write_w(BIT(m_pal_data, 7));
}
}
void dpb7000_brush_store_card_device::data_in_w(bool state)
{
m_data_in = state;
}
void dpb7000_brush_store_card_device::fast_wipe_w(bool state)
{
m_fast_wipe = state;
}
void dpb7000_brush_store_card_device::store_write_w(bool state)
{
const bool old = m_store_write;
m_store_write = state;
if (old != m_store_write)
{
m_store_write_out(!m_store_write);
}
}
void dpb7000_brush_store_card_device::oe_k_w(bool state)
{
m_oe[STRIPE_K] = state;
}
void dpb7000_brush_store_card_device::oe_chr_w(bool state)
{
m_oe[STRIPE_CHR] = state;
}
void dpb7000_brush_store_card_device::oe_lum_w(bool state)
{
m_oe[STRIPE_LUM] = state;
}
void dpb7000_brush_store_card_device::oe_brush_w(bool state)
{
m_oe_brush = state;
}
void dpb7000_brush_store_card_device::brush_write_w(bool state)
{
m_brush_write = state;
update_write_enables();
}
void dpb7000_brush_store_card_device::update_write_enables()
{
m_write_enable[STRIPE_CHR] = m_chren && m_brush_write && !m_ksel;
m_write_enable[STRIPE_LUM] = m_lumen && m_brush_write && !m_ksel;
m_write_enable[STRIPE_K] = m_lumen && m_brush_write && m_ksel;
}
void dpb7000_brush_store_card_device::update_input_latches()
{
if (m_is_write && m_data_in)
{
m_input_latches[STRIPE_LUM] = (uint8_t)m_data;
if (!m_ksel)
{
m_input_latches[STRIPE_CHR] = (uint8_t)(m_data >> 8);
}
else
{
m_input_latches[STRIPE_K] = (uint8_t)(m_data >> 8);
}
}
}

View File

@ -1,128 +0,0 @@
// 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;
void update_pal_addr();
void update_pal_output();
void data_in_w(bool state);
void fast_wipe_w(bool state);
void store_write_w(bool state);
void oe_k_w(bool state);
void oe_chr_w(bool state);
void oe_lum_w(bool state);
void oe_brush_w(bool state);
void brush_write_w(bool state);
void update_write_enables();
void update_input_latches();
enum : size_t
{
STRIPE_CHR,
STRIPE_K,
STRIPE_LUM,
STRIPE_COUNT
};
uint8_t *m_pal_base;
uint8_t m_pal_addr;
uint8_t m_pal_data;
uint8_t m_addr;
uint8_t m_a0_chr;
uint16_t m_data;
bool m_is_read;
bool m_is_write;
bool m_ras;
bool m_cas;
uint8_t m_rav[STRIPE_COUNT];
uint8_t m_cav[STRIPE_COUNT];
bool m_lumen;
bool m_chren;
bool m_ca0;
bool m_ksel;
bool m_fcs;
uint8_t m_func;
bool m_b_bus_a;
bool m_data_in;
bool m_fast_wipe;
bool m_store_write;
bool m_oe[STRIPE_COUNT];
bool m_oe_brush;
bool m_brush_write;
bool m_write_enable[STRIPE_COUNT];
uint8_t m_brush_latches[STRIPE_COUNT];
uint8_t m_stripe_outputs[STRIPE_COUNT];
uint8_t m_input_latches[STRIPE_COUNT]; // AC (Y), AB (U), ABB (V)
std::unique_ptr<uint8_t[]> m_stripes[STRIPE_COUNT];
// Output Lines
devcb_write_line m_store_write_out;
devcb_write8::array<STRIPE_COUNT> m_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

View File

@ -1,116 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
/***************************************************************************
dpb_combiner.h
DPB-7000/1 - Combiner Card
***************************************************************************/
#ifndef MAME_VIDEO_DPB_COMBINER_H
#define MAME_VIDEO_DPB_COMBINER_H
#pragma once
#include "machine/tmc208k.h"
//#include "screen.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> dpb7000_combiner_card_device
class dpb7000_combiner_card_device : public device_t
{
public:
// construction/destruction
dpb7000_combiner_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void reg_w(uint16_t data);
void lum1_w(uint8_t data);
void lum2_w(uint8_t data);
void blank1(int state);
void blank2(int state);
void chr1_w(uint8_t data);
void chr2_w(uint8_t data);
void chr_flag_w(int state);
void ext1_w(uint8_t data);
void ext2_w(uint8_t data);
void palette_l_w(int state);
void cursor_enb_w(int state);
void cursor_col_w(int state);
auto lum() { return m_lum.bind(); }
auto chr() { return m_chr.bind(); }
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
static constexpr device_timer_id FSCK_TIMER = 0;
void fsck_tick();
//uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void update_matte_selects();
uint8_t m_lum_in[2];
uint8_t m_latched_lum[2];
uint8_t m_selected_lum[2];
uint8_t m_chr_in[2];
uint8_t m_latched_chr[2];
uint8_t m_selected_chr[2];
uint8_t m_ext_in[2];
uint8_t m_selected_ext[2];
uint8_t m_latched_lum_sum;
uint8_t m_latched_chr_sum;
uint8_t m_lum_out;
uint8_t m_chr_out;
bool m_blank[2];
bool m_chr_i_in;
bool m_chr_i;
bool m_palette_l;
bool m_cursor_enb;
bool m_cursor_col;
bool m_fsck;
uint8_t m_cursor_y;
uint8_t m_cursor_u;
uint8_t m_cursor_v;
uint8_t m_invert_mask;
bool m_select_matte[2];
uint8_t m_matte_ext[2];
uint8_t m_matte_y[2];
uint8_t m_matte_u[2];
uint8_t m_matte_v[2];
bool m_blank_or_suppress[2]; // FH
bool m_output_matte_y[2]; // EB
bool m_output_matte_u[2]; // EG
bool m_output_matte_v[2]; // EG
bool m_output_matte_ext[2]; // FA
devcb_write8 m_lum;
devcb_write8 m_chr;
emu_timer *m_fsck_timer;
//required_device<screen_device> m_screen;
required_device<tmc28ku_device> m_mult_ge;
required_device<tmc28ku_device> m_mult_gd;
required_device<tmc28ku_device> m_mult_gc;
required_device<tmc28ku_device> m_mult_gb;
required_device<tmc28ku_device> m_mult_ga;
};
// device type definition
DECLARE_DEVICE_TYPE(DPB7000_COMBINER, dpb7000_combiner_card_device)
#endif // MAME_VIDEO_DPB_COMBINER_H

View File

@ -1,539 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
/***************************************************************************
dpb_framestore.cpp
DPB-7000/1 - Framestore 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_framestore.h"
/*****************************************************************************/
DEFINE_DEVICE_TYPE(DPB7000_FRAMESTORE, dpb7000_framestore_card_device, "dpb_framestore", "Quantel DPB-7000 Framestore Card")
//-------------------------------------------------
// dpb7000_framestore_card_device - constructor
//-------------------------------------------------
dpb7000_framestore_card_device::dpb7000_framestore_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DPB7000_FRAMESTORE, tag, owner, clock)
, m_vopen(false)
, m_copen(false)
, m_csel(false)
, m_rck(false)
, m_cck(false)
, m_opstr(false)
, m_opwa(false)
, m_opwb(false)
, m_opw(0)
, m_opra(false)
, m_oprb(false)
, m_opr(0)
, m_ras_in(false)
, m_cas(false)
, m_write(false)
, m_ipen(false)
, m_whp(false)
, m_lumen(false)
, m_bdsel(false)
, m_ipsel(0)
, m_cav(0)
, m_front_pal_base(nullptr)
, m_front_pal_addr(0)
, m_front_pal_out(0)
, m_back_pal_base(nullptr)
, m_back_pal_addr(0)
, m_back_pal_out(0)
, m_a(0)
, m_ra(0)
, m_wa(0)
, m_cdata_front(0)
, m_cdata_back(0)
, m_cdata(0)
, m_vdata_front(0)
, m_vdata_back(0)
, m_vdata(0)
, m_cdata_out(*this)
, m_vdata_out(*this)
, m_cbusy_out(*this)
, m_back_pal(*this, "back_pal")
, m_front_pal(*this, "front_pal")
{
}
ROM_START( dpb7000_framestore )
ROM_REGION(0x400, "back_pal", 0)
ROM_LOAD("pb-02f-01748a-aba.bin", 0x000, 0x400, CRC(24b31494) SHA1(f9185a00e5470ec95d234a76c15acbf33cfb285d))
ROM_REGION(0x400, "front_pal", 0)
ROM_LOAD("pb-02f-01748a-bba.bin", 0x000, 0x400, CRC(8f06b632) SHA1(233b841c3957a6df229f3a693f9288cb8feec58c))
ROM_END
const tiny_rom_entry *dpb7000_framestore_card_device::device_rom_region() const
{
return ROM_NAME( dpb7000_framestore );
}
void dpb7000_framestore_card_device::device_start()
{
save_item(NAME(m_vopen));
save_item(NAME(m_copen));
save_item(NAME(m_csel));
save_item(NAME(m_rck));
save_item(NAME(m_cck));
save_item(NAME(m_openx));
save_item(NAME(m_opstr));
save_item(NAME(m_opwa));
save_item(NAME(m_opwb));
save_item(NAME(m_opw));
save_item(NAME(m_opra));
save_item(NAME(m_oprb));
save_item(NAME(m_opr));
save_item(NAME(m_ras_in));
save_pointer(NAME(m_ras), 10);
save_item(NAME(m_cas));
save_item(NAME(m_write));
save_item(NAME(m_ipen));
save_item(NAME(m_whp));
save_item(NAME(m_lumen));
save_item(NAME(m_bdsel));
save_item(NAME(m_ipsel));
save_pointer(NAME(m_ipenx), 10);
save_pointer(NAME(m_rav), 10);
save_item(NAME(m_cav));
save_item(NAME(m_front_pal_addr));
save_item(NAME(m_front_pal_out));
save_item(NAME(m_back_pal_addr));
save_item(NAME(m_back_pal_out));
save_item(NAME(m_a));
for (int i = 0; i < 10; i++)
{
save_item(NAME(m_d_in[i][0]), i);
save_item(NAME(m_d_in[i][1]), i);
save_item(NAME(m_d_out[i][0]), i);
save_item(NAME(m_d_out[i][1]), i);
save_item(NAME(m_d_out[i][2]), i);
save_item(NAME(m_d_out[i][3]), i);
}
save_item(NAME(m_ra));
save_item(NAME(m_wa));
save_item(NAME(m_cdata_front));
save_item(NAME(m_cdata_back));
save_item(NAME(m_cdata));
save_item(NAME(m_vdata_front));
save_item(NAME(m_vdata_back));
save_item(NAME(m_vdata));
for (int i = 0; i < 10; i++)
{
m_stripes[i] = make_unique_clear<uint8_t[]>(0x10000);
save_pointer(NAME(m_stripes[i]), 0x10000, i);
}
m_cdata_out.resolve_safe();
m_vdata_out.resolve_safe();
m_cbusy_out.resolve_safe();
m_front_pal_base = m_front_pal->base();
m_back_pal_base = m_back_pal->base();
}
void dpb7000_framestore_card_device::device_reset()
{
m_vopen = false;
m_copen = false;
m_csel = false;
m_rck = false;
m_cck = false;
memset(m_openx, 0, 5);
m_opstr = false;
m_opwa = false;
m_opwb = false;
m_opw = 0;
m_opra = false;
m_oprb = false;
m_opr = 0;
m_ras_in = false;
memset(m_ras, 0, 10);
m_cas = false;
m_write = false;
m_ipen = false;
m_whp = false;
m_lumen = false;
m_bdsel = false;
m_ipsel = 0;
memset(m_ipenx, 0, 10);
memset(m_rav, 0, 10);
m_cav = 0;
m_front_pal_addr = 0;
m_front_pal_out = 0;
m_back_pal_addr = 0;
m_back_pal_out = 0;
m_a = 0;
m_ra = 0;
m_wa = 0;
m_cdata_front = 0;
m_cdata_back = 0;
m_cdata = 0;
m_vdata_front = 0;
m_vdata_back = 0;
m_vdata = 0;
for (int i = 0; i < 10; i++)
{
memset(&m_stripes[i][0], 0, 0x10000);
}
}
void dpb7000_framestore_card_device::update_vdata_latches(const uint8_t stripe)
{
for (int i = 0; i < 5; i++)
{
if (m_openx[i])
{
m_vdata_front = m_d_out[ i << 1 ][m_opr];
m_vdata_back = m_d_out[(i << 1) | 1][m_opr];
}
}
}
void dpb7000_framestore_card_device::update_cdata_latches(const uint8_t stripe)
{
for (int i = 0; i < 5; i++)
{
if (m_openx[i])
{
m_cdata_front = m_d_out[ i << 1 ][m_opr];
m_cdata_back = m_d_out[(i << 1) | 1][m_opr];
}
}
}
void dpb7000_framestore_card_device::update_cdata_out()
{
if (m_copen)
{
m_cdata_out(m_csel ? m_cdata_back : m_cdata_front);
}
}
void dpb7000_framestore_card_device::update_vdata_out()
{
if (m_vopen)
{
m_vdata_out(BIT(m_ra, 0) ? m_vdata_back : m_vdata_front);
}
}
void dpb7000_framestore_card_device::update_pals()
{
const uint8_t old_front_addr = m_front_pal_addr;
const uint8_t old_back_addr = m_back_pal_addr;
const uint8_t old_front_ras = m_front_pal_out & 0x1f;
const uint8_t old_back_ras = m_back_pal_out & 0x1f;
do
{
m_front_pal_out = m_front_pal_base[m_front_pal_addr];
m_back_pal_out = m_back_pal_base[m_back_pal_addr];
m_front_pal_addr &= 0x0ff;
m_front_pal_addr |= BIT(m_back_pal_out, 6) ? 0x100 : 0x000;
m_front_pal_addr |= BIT(m_back_pal_out, 5) ? 0x200 : 0x000;
m_back_pal_addr &= 0x0ff;
m_back_pal_addr |= BIT(m_front_pal_out, 6) ? 0x100 : 0x000;
m_back_pal_addr |= BIT(m_front_pal_out, 5) ? 0x200 : 0x000;
} while (old_front_addr != m_front_pal_addr || old_back_addr != m_back_pal_addr);
if (old_front_ras != (m_front_pal_out & 0x1f) || old_back_ras != (m_back_pal_out & 0x1f))
{
m_ras[0] = BIT(m_front_pal_out, 4);
m_ras[2] = BIT(m_front_pal_out, 3);
m_ras[4] = BIT(m_front_pal_out, 2);
m_ras[6] = BIT(m_front_pal_out, 1);
m_ras[8] = BIT(m_front_pal_out, 0);
m_ras[1] = BIT(m_back_pal_out, 4);
m_ras[3] = BIT(m_back_pal_out, 3);
m_ras[5] = BIT(m_back_pal_out, 2);
m_ras[7] = BIT(m_back_pal_out, 1);
m_ras[9] = BIT(m_back_pal_out, 0);
for (int i = 0; i < 10; i++)
{
if (!m_ras[i])
{
m_rav[i] = m_a;
}
}
}
}
void dpb7000_framestore_card_device::vopen_w(int state)
{
const bool old = m_vopen;
m_vopen = (bool)state;
if (!old && m_vopen)
{
update_vdata_out();
}
}
void dpb7000_framestore_card_device::copen_w(int state)
{
const bool old = m_copen;
m_copen = (bool)state;
if (!old && m_copen)
{
update_cdata_out();
}
}
void dpb7000_framestore_card_device::csel_w(int state)
{
const bool old = m_csel;
m_csel = (bool)state;
if (old != m_csel)
{
update_cdata_out();
}
}
void dpb7000_framestore_card_device::rck_w(int state)
{
const bool old = m_rck;
m_rck = (bool)state;
if (old != m_rck)
{
update_vdata_latches(m_ra & 0xe);
}
}
void dpb7000_framestore_card_device::cck_w(int state)
{
const bool old = m_cck;
m_cck = (bool)state;
if (old != m_cck)
{
update_cdata_latches(m_ra & 0xe);
}
}
void dpb7000_framestore_card_device::opstr_w(int state)
{
m_opstr = (bool)state;
}
void dpb7000_framestore_card_device::opwa_w(int state)
{
m_opw &= 2;
m_opw |= state;
}
void dpb7000_framestore_card_device::opwb_w(int state)
{
m_opw &= 1;
m_opw |= state << 1;
}
void dpb7000_framestore_card_device::opra_w(int state)
{
m_opr &= 2;
m_opr |= state;
}
void dpb7000_framestore_card_device::oprb_w(int state)
{
m_opr &= 1;
m_opr |= state << 1;
}
void dpb7000_framestore_card_device::ras_w(int state)
{
const bool old = m_ras_in;
m_ras_in = (bool)state;
if (old != m_ras_in)
{
m_front_pal_addr &= ~0x001;
m_back_pal_addr &= ~0x001;
const uint16_t value = m_ras_in ? 0x001 : 0x000;
m_front_pal_addr |= value;
m_back_pal_addr |= value;
update_pals();
}
}
void dpb7000_framestore_card_device::cas_w(int state)
{
const bool old = m_cas;
m_cas = (bool)state;
if (old && !m_cas)
{
m_cav = m_a;
for (int i = 0; i < 10; i++)
{
if (m_ipenx[i])
{
m_stripes[i][(m_cav << 8) | m_rav[i]] = m_d_in[i][m_ipsel];
}
if (!m_opstr)
{
m_d_out[i][m_opw] = m_stripes[i][(m_cav << 8) | m_rav[i]];
}
}
}
}
void dpb7000_framestore_card_device::write_w(int state)
{
const bool old = m_write;
m_write = (bool)state;
if (old != m_write)
{
m_front_pal_addr &= ~0x002;
m_back_pal_addr &= ~0x002;
const uint16_t value = m_write ? 0x000 : 0x002;
m_front_pal_addr |= value;
m_back_pal_addr |= value;
update_pals();
}
}
void dpb7000_framestore_card_device::ipen_w(int state)
{
const bool old = m_ipen;
m_ipen = (bool)state;
if (old != m_ipen)
{
m_front_pal_addr &= ~0x008;
m_back_pal_addr &= ~0x008;
const uint16_t value = m_ipen ? 0x008 : 0x000;
m_front_pal_addr |= value;
m_back_pal_addr |= value;
update_pals();
}
}
void dpb7000_framestore_card_device::whp_w(int state)
{
const bool old = m_whp;
m_whp = (bool)state;
if (old != m_whp)
{
m_front_pal_addr &= ~0x004;
m_back_pal_addr &= ~0x004;
const uint16_t value = m_whp ? 0x004 : 0x000;
m_front_pal_addr |= value;
m_back_pal_addr |= value;
update_pals();
}
}
void dpb7000_framestore_card_device::lumen_w(int state)
{
const bool old = m_lumen;
m_lumen = (bool)state;
if (old != m_lumen)
{
m_front_pal_addr &= ~0x080;
m_back_pal_addr &= ~0x080;
const uint16_t value = m_lumen ? 0x080 : 0x000;
m_front_pal_addr |= value;
m_back_pal_addr |= value;
update_pals();
}
}
void dpb7000_framestore_card_device::bdsel_w(int state)
{
const bool old = m_bdsel;
m_bdsel = (bool)state;
if (old != m_bdsel)
{
m_front_pal_addr &= ~0x040;
m_back_pal_addr &= ~0x040;
const uint16_t value = m_bdsel ? 0x040 : 0x000;
m_front_pal_addr |= value;
m_back_pal_addr |= value;
update_pals();
}
}
void dpb7000_framestore_card_device::ipsel_w(int state)
{
m_ipsel = state;
}
void dpb7000_framestore_card_device::a_w(uint8_t data)
{
m_a = data;
}
void dpb7000_framestore_card_device::d_w(uint8_t data)
{
for (int i = 0; i < 10; i++)
{
if (m_ipenx[i])
{
m_d_in[i][1 - m_ipsel] = data;
}
}
}
void dpb7000_framestore_card_device::ra_w(uint8_t data)
{
m_openx[m_ra >> 1] = false;
m_ra = data & 0xf;
m_openx[m_ra >> 1] = true;
}
void dpb7000_framestore_card_device::wa_w(uint8_t data)
{
const uint8_t old = m_wa;
m_wa = data & 0xf;
if (old != m_wa)
{
m_ipenx[old] = false;
m_ipenx[m_wa] = true;
m_back_pal_addr &= ~0x030;
m_back_pal_addr |= BIT(m_wa, 3) ? 0x010 : 0x000;
m_back_pal_addr |= BIT(m_wa, 2) ? 0x020 : 0x000;
m_front_pal_addr &= ~0x030;
m_front_pal_addr |= BIT(m_wa, 1) ? 0x010 : 0x000;
m_front_pal_addr |= BIT(m_wa, 0) ? 0x020 : 0x000;
update_pals();
}
}

View File

@ -1,131 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
/***************************************************************************
dpb_framestore.h
DPB-7000/1 - Framestore Card
***************************************************************************/
#ifndef MAME_VIDEO_DPB_FRAMESTORE_H
#define MAME_VIDEO_DPB_FRAMESTORE_H
#pragma once
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> dpb7000_framestore_card_device
class dpb7000_framestore_card_device : public device_t
{
public:
// construction/destruction
dpb7000_framestore_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
void vopen_w(int state);
void copen_w(int state);
void csel_w(int state);
void rck_w(int state);
void cck_w(int state);
void opstr_w(int state);
void opwa_w(int state);
void opwb_w(int state);
void opra_w(int state);
void oprb_w(int state);
void ras_w(int state);
void cas_w(int state);
void write_w(int state);
void ipen_w(int state);
void whp_w(int state);
void lumen_w(int state);
void bdsel_w(int state);
void ipsel_w(int state);
void a_w(uint8_t data);
void d_w(uint8_t data);
void ra_w(uint8_t data);
void wa_w(uint8_t data);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual const tiny_rom_entry *device_rom_region() const override;
void update_cdata_latches(const uint8_t stripe);
void update_cdata_out();
void update_vdata_latches(const uint8_t stripe);
void update_vdata_out();
void update_pals();
bool m_vopen;
bool m_copen;
bool m_csel;
bool m_rck;
bool m_cck;
bool m_openx[5];
bool m_opstr;
bool m_opwa;
bool m_opwb;
uint8_t m_opw;
bool m_opra;
bool m_oprb;
uint8_t m_opr;
bool m_ras_in;
bool m_ras[10];
bool m_cas;
bool m_write;
bool m_ipen;
bool m_whp;
bool m_lumen;
bool m_bdsel;
uint8_t m_ipsel;
bool m_ipenx[10];
uint8_t m_rav[10];
uint8_t m_cav;
uint8_t *m_front_pal_base;
uint16_t m_front_pal_addr;
uint8_t m_front_pal_out;
uint8_t *m_back_pal_base;
uint16_t m_back_pal_addr;
uint8_t m_back_pal_out;
uint8_t m_a;
uint8_t m_d_in[10][2];
uint8_t m_d_out[10][4];
uint8_t m_ra;
uint8_t m_wa;
uint8_t m_stripe;
uint8_t m_cdata_front;
uint8_t m_cdata_back;
uint8_t m_cdata;
uint8_t m_vdata_front;
uint8_t m_vdata_back;
uint8_t m_vdata;
std::unique_ptr<uint8_t[]> m_stripes[10];
// Output Lines
devcb_write8 m_cdata_out;
devcb_write8 m_vdata_out;
devcb_write_line m_cbusy_out;
// Devices
required_memory_region m_back_pal;
required_memory_region m_front_pal;
};
// device type definition
DECLARE_DEVICE_TYPE(DPB7000_FRAMESTORE, dpb7000_framestore_card_device)
#endif // MAME_VIDEO_DPB_FRAMESTORE_H

File diff suppressed because it is too large Load Diff

View File

@ -1,285 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
/***************************************************************************
dpb_storeaddr.h
DPB-7000/1 - Store Address Card
***************************************************************************/
#ifndef MAME_VIDEO_DPB_STOREADDR_H
#define MAME_VIDEO_DPB_STOREADDR_H
#pragma once
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> dpb7000_storeaddr_card_device
class dpb7000_storeaddr_card_device : public device_t
{
public:
// construction/destruction
dpb7000_storeaddr_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
void reg_w(uint16_t data);
void s_type_w(int state);
void cen_w(int state);
void cxd_w(int state);
void cxen_w(int state);
void cxld_w(int state);
void cxck_w(int state);
void cxod_w(int state);
void cxoen_w(int state);
void cyd_w(int state);
void cyen_w(int state);
void cyld_w(int state);
void cyck_w(int state);
void cyod_w(int state);
void cyoen_w(int state);
void clrc_w(int state);
void selvideo_w(int state);
void creq_w(int state);
void cr_w(int state);
void prot_a_w(int state);
void prot_b_w(int state);
void preread_w(int state);
void rvl_w(int state);
void rhr_w(int state);
void plt_w(int state);
void zb_w(int state);
void rppck_w(int state);
void rb_w(int state);
void pflag_w(int state);
void b26_w(int state);
void ipen_w(int state);
auto ipsel() { return m_ipsel_out.bind(); }
auto csel() { return m_csel_out.bind(); }
auto rck() { return m_rck_out.bind(); }
auto cck() { return m_cck_out.bind(); }
auto ra() { return m_ra_out.bind(); }
auto opstr() { return m_opstr_out.bind(); }
auto opwa() { return m_opwa_out.bind(); }
auto opwb() { return m_opwb_out.bind(); }
auto opra() { return m_opra_out.bind(); }
auto oprb() { return m_oprb_out.bind(); }
auto blk() { return m_blk_out.bind(); }
auto a() { return m_addr_out.bind(); }
auto r_busy() { return m_r_busy_out.bind(); }
auto ras() { return m_ras_out.bind(); }
auto cas() { return m_cas_out.bind(); }
auto write() { return m_w_out.bind(); }
auto cbusy() { return m_cbusy_out.bind(); }
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
static constexpr device_timer_id DELAY_TIMER = 0;
void set_cxpos(uint16_t data);
void tick_cxck();
void tick_cyck();
void update_r_busy(bool old_ras);
void update_blanking_pal();
void update_prot_proms();
void update_rck();
void update_v0();
void update_opwa();
void update_opstr();
void update_req_clears();
void update_cck();
void update_addr_mux_inputs();
void update_addr_mux_outputs();
void update_addr_select_inputs();
void update_addr_select_outputs();
void check_cycle_start();
void tick_delay_step();
void request_r_read();
void check_r_read();
void request_c_read();
void check_c_read();
void opwb_w(bool state);
// Timed control signals
void mxr_w(bool state);
void ras_w(bool state);
void cas_w(bool state);
void laac_w(bool state);
void t6_w(bool state);
void clrw_w(bool state);
uint8_t *m_bb_base;
uint8_t *m_bc_base;
uint8_t *m_bd_base;
uint8_t *m_protx_base;
uint8_t *m_proty_base;
uint8_t *m_blanking_base;
uint8_t m_bb_out;
uint8_t m_bc_out;
uint8_t m_bd_out;
bool m_protx;
bool m_proty;
emu_timer *m_delay_timer;
uint8_t m_delay_step;
uint8_t m_df_in[2];
uint8_t m_df_out;
uint8_t m_ee_in[2];
uint8_t m_ee_out;
uint8_t m_dg_in[2];
uint8_t m_eg_in[2];
uint8_t m_fg_in[2];
uint8_t m_gg_in[2];
uint8_t m_addr;
uint16_t m_rhscr;
uint16_t m_rvscr;
uint8_t m_rzoom;
uint8_t m_fld_sel;
uint8_t m_hzoom_count;
uint8_t m_vzoom_count;
int8_t m_orig_cx_stripe_addr;
int16_t m_orig_cx_stripe_num;
int16_t m_orig_cy_addr;
int8_t m_cx_stripe_addr;
int16_t m_cx_stripe_num;
int16_t m_cy_addr;
uint8_t m_rhscr_stripe_addr;
uint8_t m_rhscr_stripe_num;
uint16_t m_rvscr_counter;
uint16_t m_rvscr_with_v0;
int m_s_type;
bool m_cen;
bool m_cxd;
bool m_cxen;
bool m_cxld;
bool m_cxck;
bool m_cxod;
bool m_cxoen;
bool m_cyd;
bool m_cyen;
bool m_cyld;
bool m_cyck;
bool m_cyod;
bool m_cyoen;
bool m_clrc;
bool m_selvideo;
bool m_creq;
bool m_cread;
bool m_prot_a;
bool m_prot_b;
bool m_preread;
bool m_rreq_pending;
bool m_rreq_active;
bool m_creq_pending;
bool m_creq_active;
bool m_store_busy;
bool m_rvl;
bool m_rhr;
bool m_plt;
bool m_zb;
bool m_rppck;
bool m_rb;
bool m_pflag;
bool m_mxr;
bool m_ras;
bool m_cas;
bool m_laac;
bool m_t6;
bool m_clrw;
bool m_opstr;
bool m_cck_clear;
bool m_creq_sel;
bool m_write_active;
bool m_window_enable;
bool m_b26;
bool m_blank_d;
bool m_blank_a;
bool m_blank_b;
uint8_t m_blank_q;
bool m_crc;
bool m_ipen;
// Output Signals
bool m_ipsel;
bool m_rck;
uint8_t m_ra;
bool m_opra;
bool m_opwa;
bool m_opwb;
bool m_cck;
bool m_csel;
// Output Handlers
devcb_write_line m_ipsel_out;
devcb_write_line m_rck_out;
devcb_write8 m_ra_out;
devcb_write_line m_opra_out;
devcb_write_line m_oprb_out;
devcb_write_line m_blk_out;
devcb_write8 m_addr_out;
devcb_write_line m_r_busy_out;
devcb_write_line m_ras_out;
devcb_write_line m_cas_out;
devcb_write_line m_opwb_out;
devcb_write_line m_opstr_out;
devcb_write_line m_w_out;
devcb_write_line m_opwa_out;
devcb_write_line m_csel_out;
devcb_write_line m_cck_out;
devcb_write_line m_cbusy_out;
// Devices
required_memory_region m_x_prom;
required_memory_region m_protx_prom;
required_memory_region m_proty_prom;
required_memory_region m_blanking_pal;
};
// device type definition
DECLARE_DEVICE_TYPE(DPB7000_STOREADDR, dpb7000_storeaddr_card_device)
#endif // MAME_VIDEO_DPB_STOREADDR_H