mirror of
https://github.com/holub/mame
synced 2025-10-04 08:28:39 +03:00
-tdc1008: Fixed latching of RND, TC, ACC, and SUB signals. [Ryan Holtz]
-tmc208k: Added device for TRW TMC208K/TMC28KU 8x8-bit Parallel Multiplier. [Ryan Holtz] -dpb7000: Added placeholder devices for TMC multipliers on the Combiner Card, nw
This commit is contained in:
parent
872d6aa866
commit
ccc03cab08
@ -2831,6 +2831,18 @@ if (MACHINES["TMC0430"]~=null) then
|
||||
}
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/machine/tmc208k.h,MACHINES["TMC208K"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (MACHINES["TMC208K"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/machine/tmc208k.cpp",
|
||||
MAME_DIR .. "src/devices/machine/tmc208k.h",
|
||||
}
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/machine/tmp68301.h,MACHINES["TMP68301"] = true
|
||||
|
@ -598,6 +598,7 @@ MACHINES["TC0091LVC"] = true
|
||||
MACHINES["TE7750"] = true
|
||||
MACHINES["TICKET"] = true
|
||||
MACHINES["TIMEKPR"] = true
|
||||
--MACHINES["TMC208K"] = true
|
||||
MACHINES["TMP68301"] = true
|
||||
--MACHINES["TMS5501"] = true
|
||||
MACHINES["TMS6100"] = true
|
||||
|
@ -608,6 +608,7 @@ MACHINES["TDC1008"] = true
|
||||
--MACHINES["TE7750"] = true
|
||||
MACHINES["TIMEKPR"] = true
|
||||
MACHINES["TMC0430"] = true
|
||||
MACHINES["TMC208K"] = true
|
||||
MACHINES["TMP68301"] = true
|
||||
MACHINES["TMS5501"] = true
|
||||
MACHINES["TMS6100"] = true
|
||||
|
@ -5,9 +5,6 @@
|
||||
tdc1008.cpp
|
||||
TRW TDC1008 VLSI Multiplier - Accumulator
|
||||
|
||||
TODO:
|
||||
- Three-State Control lines (TSX, TSM, TSL) are not yet implemented.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
@ -36,9 +33,13 @@ tdc1008_device::tdc1008_device(const machine_config &mconfig, const char *tag, d
|
||||
, m_clk_y(false)
|
||||
, m_clk_p(false)
|
||||
, m_prel(false)
|
||||
, m_rnd_in(false)
|
||||
, m_rnd(false)
|
||||
, m_tc_in(false)
|
||||
, m_tc(false)
|
||||
, m_acc_in(false)
|
||||
, m_acc(false)
|
||||
, m_sub_in(false)
|
||||
, m_sub(false)
|
||||
, m_xtp(*this)
|
||||
, m_msp(*this)
|
||||
@ -63,9 +64,13 @@ void tdc1008_device::device_start()
|
||||
save_item(NAME(m_clk_y));
|
||||
save_item(NAME(m_clk_p));
|
||||
save_item(NAME(m_prel));
|
||||
save_item(NAME(m_rnd_in));
|
||||
save_item(NAME(m_rnd));
|
||||
save_item(NAME(m_tc_in));
|
||||
save_item(NAME(m_tc));
|
||||
save_item(NAME(m_acc_in));
|
||||
save_item(NAME(m_acc));
|
||||
save_item(NAME(m_sub_in));
|
||||
save_item(NAME(m_sub));
|
||||
save_item(NAME(m_x.u));
|
||||
save_item(NAME(m_y.u));
|
||||
@ -92,9 +97,13 @@ void tdc1008_device::device_reset()
|
||||
m_clk_y = false;
|
||||
m_clk_p = false;
|
||||
m_prel = false;
|
||||
m_rnd_in = false;
|
||||
m_rnd = false;
|
||||
m_tc_in = false;
|
||||
m_tc = false;
|
||||
m_acc_in = false;
|
||||
m_acc = false;
|
||||
m_sub_in = false;
|
||||
m_sub = false;
|
||||
|
||||
m_x.u = 0;
|
||||
@ -164,7 +173,10 @@ WRITE_LINE_MEMBER(tdc1008_device::clk_x_w)
|
||||
bool old = m_clk_x;
|
||||
m_clk_x = (bool)state;
|
||||
if (!old && m_clk_x)
|
||||
{
|
||||
m_x.u = m_x_in;
|
||||
latch_flags();
|
||||
}
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(tdc1008_device::clk_y_w)
|
||||
@ -172,7 +184,10 @@ WRITE_LINE_MEMBER(tdc1008_device::clk_y_w)
|
||||
bool old = m_clk_y;
|
||||
m_clk_y = (bool)state;
|
||||
if (!old && m_clk_y)
|
||||
{
|
||||
m_y.u = m_y_in;
|
||||
latch_flags();
|
||||
}
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(tdc1008_device::clk_p_w)
|
||||
@ -246,20 +261,28 @@ WRITE_LINE_MEMBER(tdc1008_device::prel_w)
|
||||
|
||||
WRITE_LINE_MEMBER(tdc1008_device::rnd_w)
|
||||
{
|
||||
m_rnd = (bool)state;
|
||||
m_rnd_in = (bool)state;
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(tdc1008_device::tc_w)
|
||||
{
|
||||
m_tc = (bool)state;
|
||||
m_tc_in = (bool)state;
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(tdc1008_device::acc_w)
|
||||
{
|
||||
m_acc = (bool)state;
|
||||
m_acc_in = (bool)state;
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(tdc1008_device::sub_w)
|
||||
{
|
||||
m_sub = (bool)state;
|
||||
m_sub_in = (bool)state;
|
||||
}
|
||||
|
||||
void tdc1008_device::latch_flags()
|
||||
{
|
||||
m_rnd = m_rnd_in;
|
||||
m_tc = m_tc_in;
|
||||
m_acc = m_acc_in;
|
||||
m_sub = m_sub_in;
|
||||
}
|
||||
|
@ -59,6 +59,8 @@ protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
void latch_flags();
|
||||
|
||||
union input_reg
|
||||
{
|
||||
int8_t s;
|
||||
@ -84,9 +86,13 @@ protected:
|
||||
bool m_clk_y;
|
||||
bool m_clk_p;
|
||||
bool m_prel;
|
||||
bool m_rnd_in;
|
||||
bool m_rnd;
|
||||
bool m_tc_in;
|
||||
bool m_tc;
|
||||
bool m_acc_in;
|
||||
bool m_acc;
|
||||
bool m_sub_in;
|
||||
bool m_sub;
|
||||
|
||||
input_reg m_x;
|
||||
|
182
src/devices/machine/tmc208k.cpp
Normal file
182
src/devices/machine/tmc208k.cpp
Normal file
@ -0,0 +1,182 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Ryan Holtz
|
||||
/***************************************************************************
|
||||
|
||||
tmc208k.cpp
|
||||
TRW TMC208K/TMC28KU 8x8-bit Parallel Multiplier
|
||||
|
||||
Known Equivalents:
|
||||
- Logic Devices Inc. LMU08/8U
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "tmc208k.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
DEFINE_DEVICE_TYPE(TMC208K, tmc208k_device, "tmc208k", "TRW TMC208K 8x8-bit Multiplier")
|
||||
DEFINE_DEVICE_TYPE(TMC28KU, tmc28ku_device, "tmc28ku", "TRW TMC28KU 8x8-bit Multiplier")
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// tdc1008_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
tmc208_base_device<RegType, OutType>::tmc208_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, m_a_in(0)
|
||||
, m_a(0)
|
||||
, m_b_in(0)
|
||||
, m_b(0)
|
||||
, m_r_out(0)
|
||||
, m_trim(false)
|
||||
, m_tril(false)
|
||||
, m_clk_a(false)
|
||||
, m_clk_b(false)
|
||||
, m_clk_r(false)
|
||||
, m_rnd_in(false)
|
||||
, m_rnd(false)
|
||||
, m_msp(*this)
|
||||
, m_lsp(*this)
|
||||
, m_r(*this)
|
||||
{
|
||||
}
|
||||
|
||||
tmc208k_device::tmc208k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: tmc208_base_device<int8_t, int16_t>(mconfig, TMC208K, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
tmc28ku_device::tmc28ku_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: tmc208_base_device<uint8_t, uint16_t>(mconfig, TMC28KU, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::device_start()
|
||||
{
|
||||
save_item(NAME(m_a_in));
|
||||
save_item(NAME(m_a));
|
||||
save_item(NAME(m_b_in));
|
||||
save_item(NAME(m_b));
|
||||
save_item(NAME(m_r_out));
|
||||
save_item(NAME(m_trim));
|
||||
save_item(NAME(m_tril));
|
||||
save_item(NAME(m_clk_a));
|
||||
save_item(NAME(m_clk_b));
|
||||
save_item(NAME(m_clk_r));
|
||||
save_item(NAME(m_rnd_in));
|
||||
save_item(NAME(m_rnd));
|
||||
|
||||
m_msp.resolve_safe();
|
||||
m_lsp.resolve_safe();
|
||||
m_r.resolve_safe();
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::device_reset()
|
||||
{
|
||||
m_a_in = 0;
|
||||
m_a = 0;
|
||||
m_b_in = 0;
|
||||
m_b = 0;
|
||||
m_r_out = 0;
|
||||
m_trim = false;
|
||||
m_tril = false;
|
||||
m_clk_a = false;
|
||||
m_clk_b = false;
|
||||
m_clk_r = false;
|
||||
m_rnd_in = false;
|
||||
m_rnd = false;
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::a_w(uint8_t data)
|
||||
{
|
||||
m_a_in = (RegType)data;
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::b_w(uint8_t data)
|
||||
{
|
||||
m_b_in = (RegType)data;
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::trim_w(int state)
|
||||
{
|
||||
m_trim = (bool)state;
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::tril_w(int state)
|
||||
{
|
||||
m_tril = (bool)state;
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::clk_a_w(int state)
|
||||
{
|
||||
bool old = m_clk_a;
|
||||
m_clk_a = (bool)state;
|
||||
if (!old && m_clk_a)
|
||||
clock_a();
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::clk_b_w(int state)
|
||||
{
|
||||
bool old = m_clk_b;
|
||||
m_clk_b = (bool)state;
|
||||
if (!old && m_clk_b)
|
||||
clock_b();
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::clk_r_w(int state)
|
||||
{
|
||||
bool old = m_clk_r;
|
||||
m_clk_r = (bool)state;
|
||||
if (!old && m_clk_r)
|
||||
multiply();
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::rnd_w(int state)
|
||||
{
|
||||
m_rnd_in = (bool)state;
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::multiply()
|
||||
{
|
||||
m_r_out = (OutType)m_a * (OutType)m_b;
|
||||
if (!m_trim)
|
||||
m_msp((uint8_t)(m_r_out >> 8));
|
||||
if (!m_tril)
|
||||
m_lsp((uint8_t)m_r_out);
|
||||
m_r(m_r_out);
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::clock_a()
|
||||
{
|
||||
m_a = m_a_in;
|
||||
m_rnd = m_rnd_in;
|
||||
}
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
void tmc208_base_device<RegType, OutType>::clock_b()
|
||||
{
|
||||
m_b = m_b_in;
|
||||
m_rnd = m_rnd_in;
|
||||
}
|
||||
|
||||
// TMC208KU - Unsigned 8x8 Multiply
|
||||
|
||||
void tmc28ku_device::clock_b()
|
||||
{
|
||||
m_b = m_b_in;
|
||||
}
|
102
src/devices/machine/tmc208k.h
Normal file
102
src/devices/machine/tmc208k.h
Normal file
@ -0,0 +1,102 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Ryan Holtz
|
||||
/***************************************************************************
|
||||
|
||||
tmc208k.h
|
||||
TRW TMC208K/TMC28KU 8x8-bit Parallel Multiplier
|
||||
|
||||
Known Equivalents:
|
||||
- Logic Devices Inc. LMU08/8U
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MAME_MACHINE_TMC208K_TMC208K_H
|
||||
#define MAME_MACHINE_TMC208K_TMC208K_H
|
||||
|
||||
#pragma once
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> tmc208_base_device
|
||||
|
||||
template <typename RegType, typename OutType>
|
||||
class tmc208_base_device : public device_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
tmc208_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
|
||||
void a_w(uint8_t data);
|
||||
void b_w(uint8_t data);
|
||||
void trim_w(int state);
|
||||
void tril_w(int state);
|
||||
void clk_a_w(int state);
|
||||
void clk_b_w(int state);
|
||||
void clk_r_w(int state);
|
||||
void rnd_w(int state);
|
||||
|
||||
// Outputs by group
|
||||
auto msp() { return m_msp.bind(); }
|
||||
auto lsp() { return m_lsp.bind(); }
|
||||
|
||||
// Full output
|
||||
auto r() { return m_r.bind(); }
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
void clock_a();
|
||||
virtual void clock_b();
|
||||
void multiply();
|
||||
|
||||
RegType m_a_in;
|
||||
RegType m_a;
|
||||
RegType m_b_in;
|
||||
RegType m_b;
|
||||
OutType m_r_out;
|
||||
|
||||
bool m_trim;
|
||||
bool m_tril;
|
||||
bool m_clk_a;
|
||||
bool m_clk_b;
|
||||
bool m_clk_r;
|
||||
bool m_rnd_in;
|
||||
bool m_rnd;
|
||||
|
||||
devcb_write8 m_msp;
|
||||
devcb_write8 m_lsp;
|
||||
devcb_write16 m_r;
|
||||
};
|
||||
|
||||
|
||||
// ======================> tmc208k_device
|
||||
|
||||
class tmc208k_device : public tmc208_base_device<int8_t, int16_t>
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
tmc208k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
};
|
||||
|
||||
|
||||
// ======================> tmc28ku_device
|
||||
|
||||
class tmc28ku_device : public tmc208_base_device<uint8_t, uint16_t>
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
tmc28ku_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
|
||||
protected:
|
||||
virtual void clock_b() override;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(TMC208K, tmc208k_device)
|
||||
DECLARE_DEVICE_TYPE(TMC28KU, tmc28ku_device)
|
||||
|
||||
#endif // MAME_MACHINE_TMC208K_TMC208K_H
|
@ -17,6 +17,7 @@
|
||||
#include "machine/com8116.h"
|
||||
#include "machine/input_merger.h"
|
||||
#include "machine/tdc1008.h"
|
||||
#include "machine/tmc208k.h"
|
||||
#include "video/mc6845.h"
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
@ -67,6 +68,11 @@ public:
|
||||
, m_filter_ce(*this, "filter_ce")
|
||||
, m_filter_cf(*this, "filter_cf")
|
||||
, m_filter_cg(*this, "filter_cg")
|
||||
, m_combiner_ge(*this, "combiner_ge") // Lum I
|
||||
, m_combiner_gd(*this, "combiner_gd") // Lum II
|
||||
, m_combiner_gc(*this, "combiner_gc") // Chroma I
|
||||
, m_combiner_gb(*this, "combiner_gb") // Chroma II
|
||||
, m_combiner_ga(*this, "combiner_ga") // Ext I & II
|
||||
{
|
||||
}
|
||||
|
||||
@ -156,6 +162,12 @@ private:
|
||||
required_device<tdc1008_device> m_filter_cf;
|
||||
required_device<tdc1008_device> m_filter_cg;
|
||||
|
||||
required_device<tmc28ku_device> m_combiner_ge;
|
||||
required_device<tmc28ku_device> m_combiner_gd;
|
||||
required_device<tmc28ku_device> m_combiner_gc;
|
||||
required_device<tmc28ku_device> m_combiner_gb;
|
||||
required_device<tmc28ku_device> m_combiner_ga;
|
||||
|
||||
emu_timer *m_diskseq_clk;
|
||||
emu_timer *m_field_in_clk;
|
||||
emu_timer *m_field_out_clk;
|
||||
@ -855,7 +867,7 @@ WRITE16_MEMBER(dpb7000_state::cpu_ctrlbus_w)
|
||||
}
|
||||
break;
|
||||
|
||||
case 10: // Output Timing Card, cursor registers
|
||||
case 10: // Output Timing Card - cursor registers, Combiner Card
|
||||
{
|
||||
const uint8_t hi_bits = (data >> 14) & 3;
|
||||
if (hi_bits == 0) // Cursor Parameters
|
||||
@ -1111,6 +1123,13 @@ void dpb7000_state::dpb7000(machine_config &config)
|
||||
TDC1008(config, m_filter_ce);
|
||||
TDC1008(config, m_filter_cf);
|
||||
TDC1008(config, m_filter_cg);
|
||||
|
||||
// Combiner Card
|
||||
TMC28KU(config, m_combiner_ge);
|
||||
TMC28KU(config, m_combiner_gd);
|
||||
TMC28KU(config, m_combiner_gc);
|
||||
TMC28KU(config, m_combiner_gb);
|
||||
TMC28KU(config, m_combiner_ga);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user