tms1000: added tms1475

This commit is contained in:
hap 2022-08-02 01:44:25 +02:00
parent a03f042c01
commit 800f7efda8
10 changed files with 63 additions and 71 deletions

View File

@ -23,8 +23,7 @@ DEFINE_DEVICE_TYPE(TMS0270, tms0270_cpu_device, "tms0270", "Texas Instruments TM
// device definitions
tms0270_cpu_device::tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0980_cpu_device(mconfig, TMS0270, tag, owner, clock, 16 /* o pins */, 16 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 11 /* prg width */, address_map_constructor(FUNC(tms0270_cpu_device::program_11bit_9), this), 8 /* data width */, address_map_constructor(FUNC(tms0270_cpu_device::data_144x4), this))
{
}
{ }
// machine configs

View File

@ -28,23 +28,19 @@ DEFINE_DEVICE_TYPE(TMS1990, tms1990_cpu_device, "tms1990", "Texas Instruments TM
// device definitions
tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0970_cpu_device(mconfig, TMS0970, tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 10 /* prg width */, address_map_constructor(FUNC(tms0970_cpu_device::program_10bit_8), this), 6 /* data width */, address_map_constructor(FUNC(tms0970_cpu_device::data_64x4), this))
{
}
{ }
tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
: tms1000_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data)
{
}
{ }
tms0950_cpu_device::tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0970_cpu_device(mconfig, TMS0950, tag, owner, clock, 8, 11, 6, 8, 2, 10, address_map_constructor(FUNC(tms0950_cpu_device::program_10bit_8), this), 6, address_map_constructor(FUNC(tms0950_cpu_device::data_64x4), this))
{
}
{ }
tms1990_cpu_device::tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0970_cpu_device(mconfig, TMS1990, tag, owner, clock, 8, 11, 6, 8, 2, 10, address_map_constructor(FUNC(tms1990_cpu_device::program_10bit_8), this), 6, address_map_constructor(FUNC(tms1990_cpu_device::data_64x4), this))
{
}
{ }
// machine configs

View File

@ -45,18 +45,15 @@ void tms0980_cpu_device::data_144x4(address_map &map)
// device definitions
tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0980_cpu_device(mconfig, TMS0980, tag, owner, clock, 8 /* o pins */, 9 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 11 /* prg width */, address_map_constructor(FUNC(tms0980_cpu_device::program_11bit_9), this), 8 /* data width */, address_map_constructor(FUNC(tms0980_cpu_device::data_144x4), this))
{
}
{ }
tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
: tms0970_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data)
{
}
{ }
tms1980_cpu_device::tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0980_cpu_device(mconfig, TMS1980, tag, owner, clock, 7, 10, 7, 9, 4, 11, address_map_constructor(FUNC(tms1980_cpu_device::program_11bit_9), this), 8, address_map_constructor(FUNC(tms1980_cpu_device::data_144x4), this))
{
}
{ }
// machine configs

View File

@ -61,48 +61,39 @@ void tms1000_cpu_device::data_32x4(address_map &map)
// device definitions
tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1000, tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 10 /* prg width */, address_map_constructor(FUNC(tms1000_cpu_device::program_10bit_8), this), 6 /* data width */, address_map_constructor(FUNC(tms1000_cpu_device::data_64x4), this))
{
}
{ }
tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
: tms1k_base_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data)
{
}
{ }
tms1070_cpu_device::tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1070, tag, owner, clock, 8, 11, 6, 8, 2, 10, address_map_constructor(FUNC(tms1070_cpu_device::program_10bit_8), this), 6, address_map_constructor(FUNC(tms1070_cpu_device::data_64x4), this))
{
}
{ }
tms1040_cpu_device::tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1040, tag, owner, clock, 8, 11, 6, 8, 2, 10, address_map_constructor(FUNC(tms1040_cpu_device::program_10bit_8), this), 6, address_map_constructor(FUNC(tms1040_cpu_device::data_64x4), this))
{
}
{ }
tms1200_cpu_device::tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1200, tag, owner, clock, 8, 13, 6, 8, 2, 10, address_map_constructor(FUNC(tms1200_cpu_device::program_10bit_8), this), 6, address_map_constructor(FUNC(tms1200_cpu_device::data_64x4), this))
{
}
{ }
tms1700_cpu_device::tms1700_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1700, tag, owner, clock, 8, 9, 6, 8, 2, 10, address_map_constructor(FUNC(tms1700_cpu_device::program_9bit_8), this), 6, address_map_constructor(FUNC(tms1700_cpu_device::data_32x4), this))
{
}
{ }
tms1730_cpu_device::tms1730_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1730, tag, owner, clock, 8, 9, 6, 8, 2, 10, address_map_constructor(FUNC(tms1730_cpu_device::program_9bit_8), this), 6, address_map_constructor(FUNC(tms1730_cpu_device::data_32x4), this))
{
}
{ }
mc141000_cpu_device::mc141000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, MC141000, tag, owner, clock, 8, 11, 6, 8, 2, 10, address_map_constructor(FUNC(mc141000_cpu_device::program_10bit_8), this), 6, address_map_constructor(FUNC(mc141000_cpu_device::data_64x4), this))
{
}
{ }
mc141200_cpu_device::mc141200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, MC141200, tag, owner, clock, 8, 16, 6, 8, 2, 10, address_map_constructor(FUNC(mc141200_cpu_device::program_10bit_8), this), 6, address_map_constructor(FUNC(mc141200_cpu_device::data_64x4), this))
{
}
{ }
// machine configs

View File

@ -26,8 +26,7 @@ DEFINE_DEVICE_TYPE(TMS1000C, tms1000c_cpu_device, "tms1000c", "Texas Instruments
// device definitions
tms1000c_cpu_device::tms1000c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1000C, tag, owner, clock, 8 /* o pins */, 10 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 10 /* prg width */, address_map_constructor(FUNC(tms1000c_cpu_device::program_10bit_8), this), 6 /* data width */, address_map_constructor(FUNC(tms1000c_cpu_device::data_64x4), this))
{
}
{ }
// machine configs

View File

@ -35,28 +35,23 @@ void tms1100_cpu_device::data_128x4(address_map &map)
// device definitions
tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1100_cpu_device(mconfig, TMS1100, tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 3 /* x width */, 11 /* prg width */, address_map_constructor(FUNC(tms1100_cpu_device::program_11bit_8), this), 7 /* data width */, address_map_constructor(FUNC(tms1100_cpu_device::data_128x4), this))
{
}
{ }
tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
: tms1000_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data)
{
}
{ }
tms1170_cpu_device::tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1100_cpu_device(mconfig, TMS1170, tag, owner, clock, 8, 11, 6, 8, 3, 11, address_map_constructor(FUNC(tms1170_cpu_device::program_11bit_8), this), 7, address_map_constructor(FUNC(tms1170_cpu_device::data_128x4), this))
{
}
{ }
tms1300_cpu_device::tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1100_cpu_device(mconfig, TMS1300, tag, owner, clock, 8, 16, 6, 8, 3, 11, address_map_constructor(FUNC(tms1300_cpu_device::program_11bit_8), this), 7, address_map_constructor(FUNC(tms1300_cpu_device::data_128x4), this))
{
}
{ }
tms1370_cpu_device::tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1100_cpu_device(mconfig, TMS1370, tag, owner, clock, 8, 16, 6, 8, 3, 11, address_map_constructor(FUNC(tms1370_cpu_device::program_11bit_8), this), 7, address_map_constructor(FUNC(tms1370_cpu_device::data_128x4), this))
{
}
{ }
// disasm
@ -83,14 +78,14 @@ void tms1100_cpu_device::device_reset()
// opcode deviations
void tms1100_cpu_device::op_setr()
{
// SETR: same, but X register MSB must be clear
if (~m_x & (1 << (m_x_bits-1)))
tms1k_base_device::op_setr();
// SETR: supports 5-bit index with X register MSB
m_r = m_r | (1 << (BIT(m_x, m_x_bits - 1) << 4 | m_y));
m_write_r(m_r & m_r_mask);
}
void tms1100_cpu_device::op_rstr()
{
// RSTR: same, but X register MSB must be clear
if (~m_x & (1 << (m_x_bits-1)))
tms1k_base_device::op_rstr();
// RSTR: supports 5-bit index with X register MSB
m_r = m_r & ~(1 << (BIT(m_x, m_x_bits - 1) << 4 | m_y));
m_write_r(m_r & m_r_mask);
}

View File

@ -2,7 +2,7 @@
// copyright-holders:hap
/*
TMS1000 family - TMS1400, TMS1470, TMS1600, TMS1670
TMS1000 family - TMS1400, TMS1470, TMS1475, TMS1600, TMS1670
TODO:
- emulate TMS1600 L-pins
@ -17,6 +17,7 @@
// - the opla size is increased from 20 to 32 terms
DEFINE_DEVICE_TYPE(TMS1400, tms1400_cpu_device, "tms1400", "Texas Instruments TMS1400") // 28-pin DIP, 11 R pins (TMS1400CR is same, but with TMS1100 pinout)
DEFINE_DEVICE_TYPE(TMS1470, tms1470_cpu_device, "tms1470", "Texas Instruments TMS1470") // high voltage version, 1 R pin removed for Vdd
DEFINE_DEVICE_TYPE(TMS1475, tms1475_cpu_device, "tms1475", "Texas Instruments TMS1475") // 40-pin DIP, 22 R pins
// TMS1600 adds more I/O to the TMS1400, input pins are doubled with added L1,2,4,8
// - rotate the view and mirror the OR-mask to get the proper layout of the mpla, the default is identical to tms1100
@ -35,34 +36,37 @@ void tms1400_cpu_device::program_12bit_8(address_map &map)
// device definitions
tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1400_cpu_device(mconfig, TMS1400, tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 3 /* x width */, 12 /* prg width */, address_map_constructor(FUNC(tms1400_cpu_device::program_12bit_8), this), 7 /* data width */, address_map_constructor(FUNC(tms1400_cpu_device::data_128x4), this))
{
}
{ }
tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
: tms1100_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data)
{
}
{ }
tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1400_cpu_device(mconfig, TMS1470, tag, owner, clock, 8, 10, 6, 8, 3, 12, address_map_constructor(FUNC(tms1470_cpu_device::program_12bit_8), this), 7, address_map_constructor(FUNC(tms1470_cpu_device::data_128x4), this))
{
}
: tms1470_cpu_device(mconfig, TMS1470, tag, owner, clock, 8, 10, 6, 8, 3, 12, address_map_constructor(FUNC(tms1470_cpu_device::program_12bit_8), this), 7, address_map_constructor(FUNC(tms1470_cpu_device::data_128x4), this))
{ }
tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
: tms1400_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data)
{ }
tms1475_cpu_device::tms1475_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1470_cpu_device(mconfig, TMS1475, tag, owner, clock, 8, 22, 6, 8, 3, 12, address_map_constructor(FUNC(tms1475_cpu_device::program_12bit_8), this), 7, address_map_constructor(FUNC(tms1475_cpu_device::data_128x4), this))
{ }
tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1600_cpu_device(mconfig, TMS1600, tag, owner, clock, 8, 16, 6, 8, 3, 12, address_map_constructor(FUNC(tms1600_cpu_device::program_12bit_8), this), 7, address_map_constructor(FUNC(tms1600_cpu_device::data_128x4), this))
{
}
{ }
tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
: tms1400_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data)
{
}
{ }
tms1670_cpu_device::tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1600_cpu_device(mconfig, TMS1670, tag, owner, clock, 8, 16, 6, 8, 3, 12, address_map_constructor(FUNC(tms1670_cpu_device::program_12bit_8), this), 7, address_map_constructor(FUNC(tms1670_cpu_device::data_128x4), this))
{
}
{ }
// machine configs

View File

@ -2,7 +2,7 @@
// copyright-holders:hap
/*
TMS1000 family - TMS1400, TMS1470, TMS1600, TMS1670
TMS1000 family - TMS1400, TMS1470, TMS1475, TMS1600, TMS1670
*/
@ -40,8 +40,20 @@ class tms1470_cpu_device : public tms1400_cpu_device
{
public:
tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
tms1470_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data);
};
class tms1475_cpu_device : public tms1470_cpu_device
{
public:
tms1475_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
virtual void op_setr() override { tms1100_cpu_device::op_setr(); }
virtual void op_rstr() override { tms1100_cpu_device::op_rstr(); }
};
class tms1600_cpu_device : public tms1400_cpu_device
{
@ -61,6 +73,7 @@ public:
DECLARE_DEVICE_TYPE(TMS1400, tms1400_cpu_device)
DECLARE_DEVICE_TYPE(TMS1470, tms1470_cpu_device)
DECLARE_DEVICE_TYPE(TMS1475, tms1475_cpu_device)
DECLARE_DEVICE_TYPE(TMS1600, tms1600_cpu_device)
DECLARE_DEVICE_TYPE(TMS1670, tms1670_cpu_device)

View File

@ -94,8 +94,7 @@ tms1k_base_device::tms1k_base_device(const machine_config &mconfig, device_type
, m_write_ctl(*this)
, m_write_pdc(*this)
, m_decode_micro(*this)
{
}
{ }
// disasm
void tms1k_base_device::state_string_export(const device_state_entry &entry, std::string &str) const

View File

@ -36,8 +36,7 @@ void tp0320_cpu_device::data_192x4(address_map &map)
// device definitions
tp0320_cpu_device::tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0980_cpu_device(mconfig, TP0320, tag, owner, clock, 7 /* o pins */, 10 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 11 /* prg width */, address_map_constructor(FUNC(tp0320_cpu_device::program_11bit_9), this), 8 /* data width */, address_map_constructor(FUNC(tp0320_cpu_device::data_192x4), this))
{
}
{ }
// machine configs