diff options
Diffstat (limited to 'src/devices/cpu/tms1000/tms0970.cpp')
-rw-r--r-- | src/devices/cpu/tms1000/tms0970.cpp | 79 |
1 files changed, 39 insertions, 40 deletions
diff --git a/src/devices/cpu/tms1000/tms0970.cpp b/src/devices/cpu/tms1000/tms0970.cpp index be7a1c717f8..16ae5f1969b 100644 --- a/src/devices/cpu/tms1000/tms0970.cpp +++ b/src/devices/cpu/tms1000/tms0970.cpp @@ -4,65 +4,64 @@ TMS1000 family - TMS0950, TMS0970, TMS1990 +TMS0950 is a TMS1000 with a TMS0980 style opla, it was quickly succeeded by the TMS0970 +- RAM, ROM, microinstructions is the same as TMS1000 +- 10-term inverted output PLA and segment PLA on the top-left + +TMS0970 is a stripped-down version of the TMS0980, itself acting more like a TMS1000 +- RAM and ROM is the same as TMS1000 +- main instructions PLAs at the top half, to the right of the midline + * see TMS0980 notes, except that the fixed instruction list differs: + RETN, SETR, RBIT, SBIT, LDX, COMX, TDO, ..., redir(----0-00), LDP +- 32-term microinstructions PLA between the RAM and ROM, supporting 15 microinstructions +- 16-term inverted output PLA and segment PLA above the RAM (rotate opla 90 degrees) + */ #include "emu.h" #include "tms0970.h" -// TMS0950 is a TMS1000 with a TMS0980 style opla, it was quickly succeeded by the TMS0970 -// - RAM, ROM, microinstructions is the same as TMS1000 -// - 10-term inverted output PLA and segment PLA on the top-left + +// device definitions DEFINE_DEVICE_TYPE(TMS0950, tms0950_cpu_device, "tms0950", "Texas Instruments TMS0950") // 28-pin DIP, 8 O pins, 11? R pins -// TMS0970 is a stripped-down version of the TMS0980, itself acting more like a TMS1000 -// - RAM and ROM is the same as TMS1000 -// - main instructions PLAs at the top half, to the right of the midline -// * see TMS0980 notes, except that the fixed instruction list differs: -// RETN, SETR, RBIT, SBIT, LDX, COMX, TDO, ..., redir(----0-00), LDP -// - 32-term microinstructions PLA between the RAM and ROM, supporting 15 microinstructions -// - 16-term inverted output PLA and segment PLA above the RAM (rotate opla 90 degrees) DEFINE_DEVICE_TYPE(TMS0970, tms0970_cpu_device, "tms0970", "Texas Instruments TMS0970") // 28-pin DIP, 11 R pins (note: pinout may slightly differ from chip to chip) DEFINE_DEVICE_TYPE(TMS1990, tms1990_cpu_device, "tms1990", "Texas Instruments TMS1990") // 28-pin DIP, ? R pins.. -// 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, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : + tms1000_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) +{ } -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) -{ -} +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 */, 1 /* stack levels */, 10 /* rom width */, address_map_constructor(FUNC(tms0970_cpu_device::rom_10bit), this), 6 /* ram width */, address_map_constructor(FUNC(tms0970_cpu_device::ram_6bit), this)) +{ } -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)) -{ -} +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, 1, 10, address_map_constructor(FUNC(tms0950_cpu_device::rom_10bit), this), 6, address_map_constructor(FUNC(tms0950_cpu_device::ram_6bit), 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)) -{ -} +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, 1, 10, address_map_constructor(FUNC(tms1990_cpu_device::rom_10bit), this), 6, address_map_constructor(FUNC(tms1990_cpu_device::ram_6bit), this)) +{ } // machine configs void tms0950_cpu_device::device_add_mconfig(machine_config &config) { // microinstructions PLA, output PLA, segment PLA - PLA(config, "mpla", 8, 16, 30).set_format(pla_device::FMT::BERKELEY); - PLA(config, "opla", 4, 8, 10).set_format(pla_device::FMT::BERKELEY); - PLA(config, "spla", 3, 8, 8).set_format(pla_device::FMT::BERKELEY); + PLA(config, m_mpla, 8, 16, 30).set_format(pla_device::FMT::BERKELEY); + PLA(config, m_opla, 4, 8, 10).set_format(pla_device::FMT::BERKELEY); + PLA(config, m_spla, 3, 8, 8).set_format(pla_device::FMT::BERKELEY); } void tms0970_cpu_device::device_add_mconfig(machine_config &config) { // main opcodes PLA, microinstructions PLA, output PLA, segment PLA - PLA(config, "ipla", 8, 15, 18).set_format(pla_device::FMT::BERKELEY); - PLA(config, "mpla", 5, 15, 32).set_format(pla_device::FMT::BERKELEY); - PLA(config, "opla", 4, 8, 16).set_format(pla_device::FMT::BERKELEY); - PLA(config, "spla", 3, 8, 8).set_format(pla_device::FMT::BERKELEY); + PLA(config, m_ipla, 8, 15, 18).set_format(pla_device::FMT::BERKELEY); + PLA(config, m_mpla, 5, 15, 32).set_format(pla_device::FMT::BERKELEY); + PLA(config, m_opla, 4, 8, 16).set_format(pla_device::FMT::BERKELEY); + PLA(config, m_spla, 3, 8, 8).set_format(pla_device::FMT::BERKELEY); } @@ -74,7 +73,7 @@ void tms0970_cpu_device::device_reset() // pre-decode instructionset m_fixed_decode.resize(0x100); - memset(&m_fixed_decode[0], 0, 0x100*sizeof(u32)); + memset(&m_fixed_decode[0], 0, 0x100*sizeof(u64)); m_micro_decode.resize(0x100); memset(&m_micro_decode[0], 0, 0x100*sizeof(u32)); @@ -92,7 +91,7 @@ void tms0970_cpu_device::device_reset() if (imask & 0x40 && (imask & 0x20) == 0) msel = (op & 0xf) | (op >> 1 & 0x10); - msel = bitswap<8>(msel,7,6,5,0,1,2,3,4); // lines are reversed + msel = bitswap<5>(msel,0,1,2,3,4); // lines are reversed u32 mmask = m_mpla->read(msel); mmask ^= 0x09fe; // invert active-negative @@ -114,11 +113,11 @@ void tms0970_cpu_device::device_reset() // i/o handling -void tms0970_cpu_device::write_o_output(u8 index) +void tms0970_cpu_device::write_o_reg(u8 index) { m_o_index = index; m_o = m_spla->read(index); - m_write_o(0, m_o & m_o_mask, 0xffff); + write_o_output(m_o); } @@ -134,6 +133,6 @@ void tms0970_cpu_device::op_setr() void tms0970_cpu_device::op_tdo() { // TDO: transfer digits to output - write_o_output(m_a & 0x7); - m_write_r(0, m_r & m_r_mask, 0xffff); + write_o_reg(m_a & 0x7); + write_r_output(m_r); } |