Previous 199869 Revisions Next

r26453 Saturday 30th November, 2013 at 16:56:40 UTC by Michael Zapf
tms9900: More cycle fine-tuning. (nw)
[src/emu/cpu/tms9900]tms9900.c

trunk/src/emu/cpu/tms9900/tms9900.c
r26452r26453
703703{
704704   ALU_SHIFT,
705705   MEMORY_READ,
706   ALU_SHIFT,              // 2 cycles if count != 0, else 4
707   MEMORY_READ,            // skipped if count != 0
708   ALU_SHIFT,              // skipped if count != 0  (4 cycles)
706709   ALU_SHIFT,
707   MEMORY_READ,
708   ALU_SHIFT,
709710   MEMORY_WRITE,
711   ALU_NOP,
710712   END
711713};
712714
r26452r26453
24552457   {
24562458   case 0:
24572459      m_address = WP + ((IR & 0x000f)<<1);
2460      pulse_clock(2);
24582461      break;
24592462   case 1:
24602463      // we have the value of the register in m_current_value
r26452r26453
24662469
24672470      if (m_current_value != 0)
24682471      {
2469         // skip the next read operation
2470         MPC++;
2472         // skip the next read and ALU operation
2473         MPC = MPC+2;
2474         m_state++;
24712475      }
24722476      else
24732477      {
24742478         if (TRACE_ALU) logerror("tms99xx: Shift operation gets count from R0\n");
2479         pulse_clock(2);
24752480      }
2481      pulse_clock(2);
24762482      break;
24772483   case 2:
2484      // after READ
2485      pulse_clock(2);
2486      pulse_clock(2);
2487      break;
2488   case 3:
24782489      count = m_current_value & 0x000f; // from the instruction or from R0
24792490      if (count==0) count = 16;
24802491
r26452r26453
25172528      break;
25182529   }
25192530   m_state++;
2520   pulse_clock(2);
25212531}
25222532
25232533void tms99xx_device::alu_ai_ori()

Previous 199869 Revisions Next


© 1997-2024 The MAME Team