Previous 15994 Revisions Next

r15591 Friday 13th July, 2012 at 22:49:38 UTC by Michael Zapf
tms9900: Fixed register autoincrement for DIV operation. [Michael Zapf] (nw)
[src/emu/cpu/tms9900]tms9900.c tms9900.h

src/emu/cpu/tms9900/tms9900.c
r15590r15591
13081308   m_state = 0;
13091309   IR = inst;
13101310   m_get_destination = false;
1311   m_byteop = false;
13111312
13121313   while (!complete)
13131314   {
r15590r15591
13361337      MPC = -1;
13371338      m_command = decoded->id;
13381339      if (VERBOSE>7) LOG("tms99xx: Command decoded as id %d, %s, base opcode %04x\n", m_command, opname[m_command], decoded->opcode);
1340      // Byte operations are either format 1 with the byte flag set
1341      // or format 4 (CRU multi bit operations) with 1-8 bits to transfer.
1342      m_byteop = ((decoded->format==1 && ((IR & 0x1000)!=0))
1343            || (decoded->format==4 && (((IR >> 6)&0x000f) > 0) && (((IR >> 6)&0x000f) > 9)));
13391344   }
13401345   m_pass = 1;
13411346}
r15590r15591
15371542   MPC = ircopy & 0x0030;
15381543
15391544   if (((MPC == 0x0020) && (m_regnumber != 0))         // indexed
1540      || ((MPC == 0x0030) && ((IR & 0x1000)!=0)))      // byte flag
1545      || ((MPC == 0x0030) && m_byteop))      // byte operation
15411546   {
15421547      MPC += 8;   // the second option
15431548   }
src/emu/cpu/tms9900/tms9900.h
r15590r15591
193193   // Decoded command
194194   UINT16   m_command;
195195
196   // Is it a byte operation? Only format 1 commands with the byte flag set
197   // and CRU commands with less than 9 bits to transfer are byte operations.
198   bool m_byteop;
199
196200   // Issue clock pulses. Note that each machine cycle has two clock cycles.
197201   void pulse_clock(int count);
198202

Previous 15994 Revisions Next


© 1998-2018 The MESS Team