Previous 15994 Revisions Next

r15588 Friday 13th July, 2012 at 15:38:24 UTC by Michael Zapf
tms99xx: Handling of status parity bit fixed [Michael Zapf] (nw)
[src/emu/cpu/tms9900]tms9900.c tms9995.c

src/emu/cpu/tms9900/tms9995.c
r15587r15588
22612261   // value in m_current_value
22622262   // The destination address is still in m_address
22632263   // Prefetch will not change m_current_value and m_address
2264   if (m_instruction->byteop)
2265   {
2266      set_status_parity((UINT8)(m_source_value>>8));
2267   }
22642268   compare_and_set_lae(m_source_value, m_current_value);
22652269   if (VERBOSE>7) LOG("tms9995: ST = %04x (val1=%04x, val2=%04x)\n", ST, m_source_value, m_current_value);
22662270}
r15587r15588
27592763void tms9995_device::alu_mov()
27602764{
27612765   m_current_value = m_source_value;
2766   if (m_instruction->byteop)
2767   {
2768      set_status_parity((UINT8)(m_current_value>>8));
2769   }
27622770   compare_and_set_lae(m_current_value, 0);
27632771   if (VERBOSE>7) LOG("tms9995: ST = %04x (val=%04x)\n", ST, m_current_value);
27642772   // No clock pulse, as next instruction is prefetch
r15587r15588
29712979      // O if >8000
29722980      // C is always reset
29732981      set_status_bit(ST_OV, m_current_value == 0x8000);
2982      set_status_bit(ST_C, false);
29742983      compare_and_set_lae(m_current_value, 0);
29752984
29762985      if ((m_current_value & 0x8000)!=0)
src/emu/cpu/tms9900/tms9900.c
r15587r15588
19281928      m_address = 0x0040 + ((IR >> 4) & 0x003c);
19291929      break;
19301930   case 1:
1931      m_value = WP;                     // save the old WP
1931      m_value_copy = WP;                  // save the old WP
19321932      WP = m_current_value & m_prgaddr_mask;   // the new WP has been read in the previous microoperation
19331933      m_current_value = m_address_saved;      // we saved the address of the source operand; retrieve it
19341934      m_address = WP + 0x0016;            // Next register is R11
r15587r15588
19431943      break;
19441944   case 4:
19451945      m_address = WP + 0x001a;
1946      m_current_value = m_value;                  // old WP into new R13
1946      m_current_value = m_value_copy;         // old WP into new R13
19471947      break;
19481948   case 5:
19491949      m_address =  0x0042 + ((IR >> 4) & 0x003c);      // location of new PC
r15587r15588
19841984      check_ov = false;
19851985      break;
19861986   case NEG:
1987      // LAEO
1987      // LAECO
19881988      // Overflow occurs for value=0x8000
19891989      dest_new = ((~src_val) & 0x0000ffff) + 1;
19901990      check_ov = false;
r15587r15588
20442044
20452045   if ((m_current_value & 0x8000)!=0)
20462046   {
2047      m_current_value = (-m_current_value) & 0xffff;
2047      m_current_value = (((~m_current_value) & 0x0000ffff) + 1) & 0xffff;
20482048      pulse_clock(2);      // If ABS is performed it takes one machine cycle more
20492049   }
20502050   else

Previous 15994 Revisions Next


© 1998-2018 The MESS Team