Previous 199869 Revisions Next

r18130 Tuesday 25th September, 2012 at 03:45:16 UTC by Angelo Salese
Quick and dirty porting of r2 opcode table into m68k based games, nw
[src/mame/machine]seicop.c

trunk/src/mame/machine/seicop.c
r18129r18130
16971697static void copd2_set_tabledata(running_machine &machine, UINT16 data)
16981698{
16991699   copd2_table[copd2_offs] = data;
1700
1701   if(data) {
1702      int off = data & 31;
1703      int reg = (data >> 5) & 3;
1704      int op = (data >> 7) & 31;
1705
1706      logerror("COPDIS: %04x s=%02x f1=%x l=%x f2=%02x %x %04x %02x %03x %02x.%x.%02x ", cop_43c,  (cop_43c >> 11) << 3, (cop_43c >> 10) & 1, ((cop_43c >> 7) & 7)+1, cop_43c & 0x7f, cop_438, cop_43a, copd2_offs, data, op, reg, off);
1707
1708      off *= 2;
1709
1710      // COPDIS: 0205 s=00 f1=0 l=5 f2=05 6 ffeb 00 188 03.0.08 read32 10(r0)
1711      // COPDIS: 0205 s=00 f1=0 l=5 f2=05 6 ffeb 01 282 05.0.02 add32 4(r0)
1712      // COPDIS: 0205 s=00 f1=0 l=5 f2=05 6 ffeb 02 082 01.0.02 write32 4(r0)
1713      // COPDIS: 0205 s=00 f1=0 l=5 f2=05 6 ffeb 03 b8e 17.0.0e add16h 1c(r0)
1714      // COPDIS: 0205 s=00 f1=0 l=5 f2=05 6 ffeb 04 98e 13.0.0e write16h 1c(r0)
1715
1716      // 188 182 082 b8e 98e -> 04  = 04+04    1ch = 1c+04
1717      // 188 188 082 b8e 98e -> 04  = 04+10    1ch = 1c+10
1718      // 188 18e 082 b8e 98e -> 04  = 04+1c    1ch = 1c+1c
1719      // 188 282 082 b8e 98e -> 04  = 04+10    1ch = 1c+10
1720      // 188 288 082 b8e 98e -> 04  = 10+10    1ch = 1c+10
1721      // 188 28e 082 b8e 98e -> 04  = 1c+10    1ch = 1c+10
1722      // 188 282 282 282 082 -> 04  = 04+04+10 10h = 04+10
1723      // 188 188 188 188 082 -> 04h = 04+10    04l = 04+10+10
1724      // 188 188 188 188 082 -> 04  = 04+10    04l = 04+10+10  10h = 04+10 (same, but trigger = 020b)
1725
1726      switch(op) {
1727      case 0x01:
1728         if(off)
1729            logerror("addmem32 %x(r%x)\n", off, reg);
1730         else
1731            logerror("addmem32 (r%x)\n", reg);
1732         break;
1733      case 0x03:
1734         if(off)
1735            logerror("read32 %x(r%x)\n", off, reg);
1736         else
1737            logerror("read32 (r%x)\n", reg);
1738         break;
1739      case 0x05:
1740         if(off)
1741            logerror("add32 %x(r%x)\n", off, reg);
1742         else
1743            logerror("add32 (r%x)\n", reg);
1744         break;
1745      case 0x13:
1746         if(off)
1747            logerror("write16h %x(r%x)\n", off, reg);
1748         else
1749            logerror("write16h (r%x)\n", reg);
1750         break;
1751      case 0x15:
1752         if(off)
1753            logerror("sub32 %x(r%x)\n", off, reg);
1754         else
1755            logerror("sub32 (r%x)\n", reg);
1756         break;
1757      case 0x17:
1758         if(off)
1759            logerror("addmem16 %x(r%x)\n", off, reg);
1760         else
1761            logerror("addmem16 (r%x)\n", reg);
1762         break;
1763      default:
1764         logerror("?\n");
1765         break;
1766      }
1767   }
17001768   //logerror("mcu_data %04x\n", data);
17011769#if 0
17021770    {

Previous 199869 Revisions Next


© 1997-2024 The MAME Team