diff options
author | 2017-12-13 21:01:10 -0700 | |
---|---|---|
committer | 2017-12-13 21:01:10 -0700 | |
commit | 54155441e9ba9941e85d80c4834a66376a11e791 (patch) | |
tree | aa44bdaf0035cbe188d64c447f225f10f7d76d8d /src/devices/cpu/tms1000/tms1k_base.cpp | |
parent | f537428e5a40ba6dde8ca9bf0fe9ae6b1f189ac4 (diff) |
Revert "Merge branch 'master' of https://github.com/mamedev/mame"
This reverts commit f537428e5a40ba6dde8ca9bf0fe9ae6b1f189ac4, reversing
changes made to 0d70d798107d4e4e8fb9f230410aeb1e888d65c5.
Diffstat (limited to 'src/devices/cpu/tms1000/tms1k_base.cpp')
-rw-r--r-- | src/devices/cpu/tms1000/tms1k_base.cpp | 43 |
1 files changed, 11 insertions, 32 deletions
diff --git a/src/devices/cpu/tms1000/tms1k_base.cpp b/src/devices/cpu/tms1000/tms1k_base.cpp index eaac999b2ce..eb389fc6bc9 100644 --- a/src/devices/cpu/tms1000/tms1k_base.cpp +++ b/src/devices/cpu/tms1000/tms1k_base.cpp @@ -5,7 +5,7 @@ TMS1000 family - base/shared TODO: - - accurate INIT pin (currently, just use INPUT_LINE_RESET) + - INIT pin The TMS0980 and TMS1000-family MCU cores are very similar. The TMS0980 has a @@ -144,7 +144,6 @@ void tms1k_base_device::device_start() m_r = 0; m_o = 0; m_o_index = 0; - m_halt = false; m_cki_bus = 0; m_c4 = 0; m_p = 0; @@ -184,7 +183,6 @@ void tms1k_base_device::device_start() save_item(NAME(m_r)); save_item(NAME(m_o)); save_item(NAME(m_o_index)); - save_item(NAME(m_halt)); save_item(NAME(m_cki_bus)); save_item(NAME(m_c4)); save_item(NAME(m_p)); @@ -226,14 +224,6 @@ void tms1k_base_device::device_start() m_icountptr = &m_icount; } -device_memory_interface::space_config_vector tms1k_base_device::memory_space_config() const -{ - return space_config_vector { - std::make_pair(AS_PROGRAM, &m_program_config), - std::make_pair(AS_DATA, &m_data_config) - }; -} - //------------------------------------------------- @@ -269,6 +259,13 @@ void tms1k_base_device::device_reset() m_power_off(0); } +device_memory_interface::space_config_vector tms1k_base_device::memory_space_config() const +{ + return space_config_vector { + std::make_pair(AS_PROGRAM, &m_program_config), + std::make_pair(AS_DATA, &m_data_config) + }; +} //------------------------------------------------- @@ -294,7 +291,7 @@ void tms1k_base_device::read_opcode() { debugger_instruction_hook(this, m_rom_address); m_opcode = m_program->read_byte(m_rom_address); - m_c4 = bitswap<8>(m_opcode,7,6,5,4,0,1,2,3) & 0xf; // opcode operand is bitswapped for most opcodes + m_c4 = BITSWAP8(m_opcode,7,6,5,4,0,1,2,3) & 0xf; // opcode operand is bitswapped for most opcodes m_fixed = m_fixed_decode[m_opcode]; m_micro = m_micro_decode[m_opcode]; @@ -308,15 +305,6 @@ void tms1k_base_device::read_opcode() // i/o handling //------------------------------------------------- -void tms1k_base_device::execute_set_input(int line, int state) -{ - if (line != TMS1XXX_INPUT_LINE_HALT) - return; - - // HALT pin (CMOS only) - m_halt = bool(state); -} - void tms1k_base_device::write_o_output(u8 index) { // a hardcoded table is supported if the output pla is unknown @@ -609,17 +597,9 @@ void tms1k_base_device::op_sbl() void tms1k_base_device::execute_run() { - while (m_icount > 0) + do { m_icount--; - - if (m_halt) - { - // not running (output pins remain unchanged) - m_icount = 0; - return; - } - switch (m_subcycle) { case 0: @@ -742,7 +722,6 @@ void tms1k_base_device::execute_run() // execute: br/call 1/2 break; } - m_subcycle = (m_subcycle + 1) % 6; - } + } while (m_icount > 0); } |