diff options
Diffstat (limited to 'src/devices/cpu/tms32025/tms32025.cpp')
-rw-r--r-- | src/devices/cpu/tms32025/tms32025.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/src/devices/cpu/tms32025/tms32025.cpp b/src/devices/cpu/tms32025/tms32025.cpp index 08a2dfbe180..74529d79894 100644 --- a/src/devices/cpu/tms32025/tms32025.cpp +++ b/src/devices/cpu/tms32025/tms32025.cpp @@ -513,7 +513,7 @@ void tms32025_device::GETDATA(int shift,int signext) m_external_mem_access = 0; } - m_ALU.d = (uint16_t)m_data->read_word(m_memaccess << 1); + m_ALU.d = (uint16_t)m_data->read_word(m_memaccess); if (signext) m_ALU.d = (int16_t)m_ALU.d; m_ALU.d <<= shift; @@ -527,14 +527,14 @@ void tms32025_device::PUTDATA(uint16_t data) if (m_memaccess >= 0x800) m_external_mem_access = 1; /* Pause if hold pin is active */ else m_external_mem_access = 0; - m_data->write_word(IND << 1, data); + m_data->write_word(IND, data); MODIFY_AR_ARP(); } else { if (m_memaccess >= 0x800) m_external_mem_access = 1; /* Pause if hold pin is active */ else m_external_mem_access = 0; - m_data->write_word(DMA << 1, data); + m_data->write_word(DMA, data); } } void tms32025_device::PUTDATA_SST(uint16_t data) @@ -549,7 +549,7 @@ void tms32025_device::PUTDATA_SST(uint16_t data) m_opcode.b.l &= 0xf7; /* Stop ARP changes */ MODIFY_AR_ARP(); } - m_data->write_word(m_memaccess << 1, data); + m_data->write_word(m_memaccess, data); } @@ -637,8 +637,8 @@ void tms32025_device::addt() void tms32025_device::adlk() { m_oldacc.d = m_ACC.d; - if (SXM) m_ALU.d = (int16_t)m_direct->read_word(m_PC << 1); - else m_ALU.d = (uint16_t)m_direct->read_word(m_PC << 1); + if (SXM) m_ALU.d = (int16_t)m_direct->read_word(m_PC); + else m_ALU.d = (uint16_t)m_direct->read_word(m_PC); m_PC++; m_ALU.d <<= (m_opcode.b.h & 0xf); m_ACC.d += m_ALU.d; @@ -657,7 +657,7 @@ void tms32025_device::and_() void tms32025_device::andk() { m_oldacc.d = m_ACC.d; - m_ALU.d = (uint16_t)m_direct->read_word(m_PC << 1); + m_ALU.d = (uint16_t)m_direct->read_word(m_PC); m_PC++; m_ALU.d <<= (m_opcode.b.h & 0xf); m_ACC.d &= m_ALU.d; @@ -672,7 +672,7 @@ void tms32025_device::apac() } void tms32025_device::br() { - m_PC = m_direct->read_word(m_PC << 1); + m_PC = m_direct->read_word(m_PC); MODIFY_AR_ARP(); } void tms32025_device::bacc() @@ -681,43 +681,43 @@ void tms32025_device::bacc() } void tms32025_device::banz() { - if (m_AR[ARP]) m_PC = m_direct->read_word(m_PC << 1); + if (m_AR[ARP]) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } void tms32025_device::bbnz() { - if (TC) m_PC = m_direct->read_word(m_PC << 1); + if (TC) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } void tms32025_device::bbz() { - if (TC == 0) m_PC = m_direct->read_word(m_PC << 1); + if (TC == 0) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } void tms32025_device::bc() { - if (CARRY) m_PC = m_direct->read_word(m_PC << 1); + if (CARRY) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } void tms32025_device::bgez() { - if ( (int32_t)(m_ACC.d) >= 0 ) m_PC = m_direct->read_word(m_PC << 1); + if ( (int32_t)(m_ACC.d) >= 0 ) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } void tms32025_device::bgz() { - if ( (int32_t)(m_ACC.d) > 0 ) m_PC = m_direct->read_word(m_PC << 1); + if ( (int32_t)(m_ACC.d) > 0 ) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } void tms32025_device::bioz() { - if (m_bio_in() != CLEAR_LINE) m_PC = m_direct->read_word(m_PC << 1); + if (m_bio_in() != CLEAR_LINE) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } @@ -735,17 +735,17 @@ void tms32025_device::bitt() } void tms32025_device::blez() { - if ( (int32_t)(m_ACC.d) <= 0 ) m_PC = m_direct->read_word(m_PC << 1); + if ( (int32_t)(m_ACC.d) <= 0 ) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } void tms32025_device::blkd() { /** Fix cycle timing **/ if (m_init_load_addr) { - m_PFC = m_direct->read_word(m_PC << 1); + m_PFC = m_direct->read_word(m_PC); m_PC++; } - m_ALU.d = m_data->read_word(m_PFC << 1); + m_ALU.d = m_data->read_word(m_PFC); PUTDATA(m_ALU.d); m_PFC++; m_tms32025_dec_cycles += (1*CLK); @@ -753,29 +753,29 @@ void tms32025_device::blkd() void tms32025_device::blkp() { /** Fix cycle timing **/ if (m_init_load_addr) { - m_PFC = m_direct->read_word(m_PC << 1); + m_PFC = m_direct->read_word(m_PC); m_PC++; } - m_ALU.d = m_direct->read_word(m_PFC << 1); + m_ALU.d = m_direct->read_word(m_PFC); PUTDATA(m_ALU.d); m_PFC++; m_tms32025_dec_cycles += (2*CLK); } void tms32025_device::blz() { - if ( (int32_t)(m_ACC.d) < 0 ) m_PC = m_direct->read_word(m_PC << 1); + if ( (int32_t)(m_ACC.d) < 0 ) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } void tms32025_device::bnc() { - if (CARRY == 0) m_PC = m_direct->read_word(m_PC << 1); + if (CARRY == 0) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } void tms32025_device::bnv() { - if (OV == 0) m_PC = m_direct->read_word(m_PC << 1); + if (OV == 0) m_PC = m_direct->read_word(m_PC); else { m_PC++ ; CLR0(OV_FLAG); @@ -784,14 +784,14 @@ void tms32025_device::bnv() } void tms32025_device::bnz() { - if (m_ACC.d != 0) m_PC = m_direct->read_word(m_PC << 1); + if (m_ACC.d != 0) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } void tms32025_device::bv() { if (OV) { - m_PC = m_direct->read_word(m_PC << 1); + m_PC = m_direct->read_word(m_PC); CLR0(OV_FLAG); } else m_PC++ ; @@ -799,7 +799,7 @@ void tms32025_device::bv() } void tms32025_device::bz() { - if (m_ACC.d == 0) m_PC = m_direct->read_word(m_PC << 1); + if (m_ACC.d == 0) m_PC = m_direct->read_word(m_PC); else m_PC++ ; MODIFY_AR_ARP(); } @@ -812,7 +812,7 @@ void tms32025_device::call() { m_PC++ ; PUSH_STACK(m_PC); - m_PC = m_direct->read_word((m_PC - 1) << 1); + m_PC = m_direct->read_word(m_PC - 1); MODIFY_AR_ARP(); } void tms32025_device::cmpl() @@ -915,7 +915,7 @@ void tms32025_device::dint() void tms32025_device::dmov() /** Careful with how memory is configured !! */ { GETDATA(0, 0); - m_data->write_word((m_memaccess + 1) << 1, m_ALU.w.l); + m_data->write_word(m_memaccess + 1, m_ALU.w.l); } void tms32025_device::eint() { @@ -933,7 +933,7 @@ void tms32025_device::idle() } void tms32025_device::in() { - m_ALU.w.l = m_io->read_word( (m_opcode.b.h & 0xf) << 1 ); + m_ALU.w.l = m_io->read_word(m_opcode.b.h & 0xf); PUTDATA(m_ALU.w.l); } void tms32025_device::lac() @@ -952,8 +952,8 @@ void tms32025_device::lact() } void tms32025_device::lalk() { - if (SXM) m_ALU.d = (int16_t)m_direct->read_word(m_PC << 1); - else m_ALU.d = (uint16_t)m_direct->read_word(m_PC << 1); + if (SXM) m_ALU.d = (int16_t)m_direct->read_word(m_PC); + else m_ALU.d = (uint16_t)m_direct->read_word(m_PC); m_PC++; m_ALU.d <<= (m_opcode.b.h & 0xf); m_ACC.d = m_ALU.d; @@ -990,7 +990,7 @@ void tms32025_device::lph() } void tms32025_device::lrlk() { - m_ALU.d = (uint16_t)m_direct->read_word(m_PC << 1); + m_ALU.d = (uint16_t)m_direct->read_word(m_PC); m_PC++; m_AR[m_opcode.b.h & 7] = m_ALU.w.l; } @@ -1035,7 +1035,7 @@ void tms32025_device::ltd() /** Careful with how memory is configured !! */ m_oldacc.d = m_ACC.d; GETDATA(0, 0); m_Treg = m_ALU.w.l; - m_data->write_word((m_memaccess+1) << 1, m_ALU.w.l); + m_data->write_word(m_memaccess+1, m_ALU.w.l); SHIFT_Preg_TO_ALU(); m_ACC.d += m_ALU.d; CALCULATE_ADD_OVERFLOW(m_ALU.d); @@ -1063,7 +1063,7 @@ void tms32025_device::mac() /** RAM blocks B0,B1,B2 may be important ! { /** Fix cycle timing **/ m_oldacc.d = m_ACC.d; if (m_init_load_addr) { - m_PFC = m_direct->read_word(m_PC << 1); + m_PFC = m_direct->read_word(m_PC); m_PC++; } SHIFT_Preg_TO_ALU(); @@ -1072,7 +1072,7 @@ void tms32025_device::mac() /** RAM blocks B0,B1,B2 may be important ! CALCULATE_ADD_CARRY(); GETDATA(0, 0); m_Treg = m_ALU.w.l; - m_Preg.d = ( (int16_t)m_ALU.w.l * (int16_t)m_direct->read_word(m_PFC << 1) ); + m_Preg.d = ( (int16_t)m_ALU.w.l * (int16_t)m_direct->read_word(m_PFC) ); m_PFC++; m_tms32025_dec_cycles += (2*CLK); } @@ -1080,7 +1080,7 @@ void tms32025_device::macd() /** RAM blocks B0,B1,B2 may be important ! { /** Fix cycle timing **/ m_oldacc.d = m_ACC.d; if (m_init_load_addr) { - m_PFC = m_direct->read_word(m_PC << 1); + m_PFC = m_direct->read_word(m_PC); m_PC++; } SHIFT_Preg_TO_ALU(); @@ -1089,10 +1089,10 @@ void tms32025_device::macd() /** RAM blocks B0,B1,B2 may be important ! CALCULATE_ADD_CARRY(); GETDATA(0, 0); if ( (m_opcode.b.l & 0x80) || m_init_load_addr ) { /* No writing during repetition, or DMA mode */ - m_data->write_word((m_memaccess+1) << 1, m_ALU.w.l); + m_data->write_word(m_memaccess+1, m_ALU.w.l); } m_Treg = m_ALU.w.l; - m_Preg.d = ( (int16_t)m_ALU.w.l * (int16_t)m_direct->read_word(m_PFC << 1) ); + m_Preg.d = ( (int16_t)m_ALU.w.l * (int16_t)m_direct->read_word(m_PFC) ); m_PFC++; m_tms32025_dec_cycles += (2*CLK); } @@ -1165,7 +1165,7 @@ void tms32025_device::or_() } void tms32025_device::ork() { - m_ALU.d = (uint16_t)m_direct->read_word(m_PC << 1); + m_ALU.d = (uint16_t)m_direct->read_word(m_PC); m_PC++; m_ALU.d <<= (m_opcode.b.h & 0xf); m_ACC.d |= (m_ALU.d); @@ -1173,7 +1173,7 @@ void tms32025_device::ork() void tms32025_device::out() { GETDATA(0, 0); - m_io->write_word( (m_opcode.b.h & 0xf) << 1, m_ALU.w.l ); + m_io->write_word(m_opcode.b.h & 0xf, m_ALU.w.l ); } void tms32025_device::pac() { @@ -1284,8 +1284,8 @@ void tms32025_device::sar_ar7() { PUTDATA(m_AR[7]); } void tms32025_device::sblk() { m_oldacc.d = m_ACC.d; - if (SXM) m_ALU.d = (int16_t)m_direct->read_word(m_PC << 1); - else m_ALU.d = (uint16_t)m_direct->read_word(m_PC << 1); + if (SXM) m_ALU.d = (int16_t)m_direct->read_word(m_PC); + else m_ALU.d = (uint16_t)m_direct->read_word(m_PC); m_PC++; m_ALU.d <<= (m_opcode.b.h & 0xf); m_ACC.d -= m_ALU.d; @@ -1476,7 +1476,7 @@ void tms32025_device::tblr() if (m_init_load_addr) { m_PFC = m_ACC.w.l; } - m_ALU.w.l = m_direct->read_word(m_PFC << 1); + m_ALU.w.l = m_direct->read_word(m_PFC); if ( (CNF0) && ( (uint16_t)(m_PFC) >= 0xff00 ) ) {} /** TMS32025 only */ else m_tms32025_dec_cycles += (1*CLK); PUTDATA(m_ALU.w.l); @@ -1490,7 +1490,7 @@ void tms32025_device::tblw() m_tms32025_dec_cycles += (1*CLK); GETDATA(0, 0); if (m_external_mem_access) m_tms32025_dec_cycles += (1*CLK); - m_program->write_word(m_PFC << 1, m_ALU.w.l); + m_program->write_word(m_PFC, m_ALU.w.l); m_PFC++; } void tms32025_device::trap() @@ -1505,7 +1505,7 @@ void tms32025_device::xor_() } void tms32025_device::xork() { - m_ALU.d = m_direct->read_word(m_PC << 1); + m_ALU.d = m_direct->read_word(m_PC); m_PC++; m_ALU.d <<= (m_opcode.b.h & 0xf); m_ACC.d ^= m_ALU.d; @@ -1619,7 +1619,7 @@ const tms32025_device::tms32025_opcode tms32025_device::s_opcode_Dx_subset[8]= void tms32025_device::device_start() { m_program = &space(AS_PROGRAM); - m_direct = &m_program->direct(); + m_direct = m_program->direct<-1>(); m_data = &space(AS_DATA); m_io = &space(AS_IO); @@ -1967,7 +1967,7 @@ void tms32025_device::execute_run() debugger_instruction_hook(this, m_PC); - m_opcode.d = m_direct->read_word(m_PC << 1); + m_opcode.d = m_direct->read_word(m_PC); m_PC++; if (m_opcode.b.h == 0xCE) /* Opcode 0xCExx has many sub-opcodes in its minor byte */ @@ -2001,7 +2001,7 @@ void tms32025_device::execute_run() debugger_instruction_hook(this, m_PC); - m_opcode.d = m_direct->read_word(m_PC << 1); + m_opcode.d = m_direct->read_word(m_PC); m_PC++; m_tms32025_dec_cycles += (1*CLK); |