Previous 199869 Revisions Next

r33998 Sunday 21st December, 2014 at 15:53:34 UTC by David Haywood
arcompact: execute first few MOVs (nw)
[src/emu/cpu/arcompact]arcompact.h arcompact_common.c arcompact_execute.c arcompactdasm_ops.c
[src/mess/drivers]tispeak.c
[src/mess/layout]tispeak.lay

trunk/src/emu/cpu/arcompact/arcompact.h
r242509r242510
1818
1919
2020#define ARCOMPACT_HANDLER04_P11_TYPE(name) \
21ARCOMPACT_RETTYPE arcompact_handle##name##_p11(OPS_16) \
21ARCOMPACT_RETTYPE arcompact_handle##name##_p11(OPS_32) \
2222{ \
2323   int M = (op & 0x00000020) >> 5; \
2424    \
r242509r242510
3232}; \
3333
3434#define ARCOMPACT_HANDLER04_TYPE(name) \
35ARCOMPACT_RETTYPE arcompact_handle##name(OPS_16) \
35ARCOMPACT_RETTYPE arcompact_handle##name(OPS_32) \
3636{ \
3737   int p = (op & 0x00c00000) >> 22; \
3838   \
r242509r242510
4949
5050
5151#define ARCOMPACT_HANDLER04_TYPE_PM(name) \
52   ARCOMPACT_RETTYPE arcompact_handle##name##_p00(OPS_16); \
53   ARCOMPACT_RETTYPE arcompact_handle##name##_p01(OPS_16); \
54   ARCOMPACT_RETTYPE arcompact_handle##name##_p10(OPS_16); \
55   ARCOMPACT_RETTYPE arcompact_handle##name##_p11_m0(OPS_16); \
56   ARCOMPACT_RETTYPE arcompact_handle##name##_p11_m1(OPS_16); \
52   ARCOMPACT_RETTYPE arcompact_handle##name##_p00(OPS_32); \
53   ARCOMPACT_RETTYPE arcompact_handle##name##_p01(OPS_32); \
54   ARCOMPACT_RETTYPE arcompact_handle##name##_p10(OPS_32); \
55   ARCOMPACT_RETTYPE arcompact_handle##name##_p11_m0(OPS_32); \
56   ARCOMPACT_RETTYPE arcompact_handle##name##_p11_m1(OPS_32); \
5757   ARCOMPACT_HANDLER04_P11_TYPE(name); \
5858   ARCOMPACT_HANDLER04_TYPE(name); \
5959
r242509r242510
156156   ARCOMPACT_RETTYPE arcompact_handle04_07(OPS_32);
157157   ARCOMPACT_RETTYPE arcompact_handle04_08(OPS_32);
158158   ARCOMPACT_RETTYPE arcompact_handle04_09(OPS_32);
159   ARCOMPACT_RETTYPE arcompact_handle04_0a(OPS_32);
159//   ARCOMPACT_RETTYPE arcompact_handle04_0a(OPS_32);
160160   ARCOMPACT_RETTYPE arcompact_handle04_0b(OPS_32);
161161   ARCOMPACT_RETTYPE arcompact_handle04_0c(OPS_32);
162162   ARCOMPACT_RETTYPE arcompact_handle04_0d(OPS_32);
r242509r242510
769769
770770
771771   ARCOMPACT_HANDLER04_TYPE_PM(04_20);
772   ARCOMPACT_HANDLER04_TYPE_PM(04_0a);
772773
773774
774775private:
trunk/src/emu/cpu/arcompact/arcompact_common.c
r242509r242510
337337   /* 17 */ "r23",
338338   /* 18 */ "r24",
339339   /* 19 */ "r25",
340   /* 1a */ "r26(GP)",
341   /* 1b */ "r27(FP)",
342   /* 1c */ "r28(SP)",
343   /* 1d */ "r29(ILINK1)",
344   /* 1e */ "r30(ILINK2)",
345   /* 1f */ "r31(BLINK)",
340   /* 1a */ "r26_GP",
341   /* 1b */ "r27_FP",
342   /* 1c */ "r28_SP",
343   /* 1d */ "r29_ILINK1",
344   /* 1e */ "r30_ILINK2",
345   /* 1f */ "r31_BLINK",
346346
347347   /* 20 */ "r32(ext)",
348348   /* 21 */ "r33(ext)",
trunk/src/emu/cpu/arcompact/arcompact_execute.c
r242509r242510
44#include "arcompact.h"
55#include "arcompact_common.h"
66
7#define ARCOMPACT_LOGGING 0
7#define ARCOMPACT_LOGGING 1
88
99#define arcompact_fatal if (ARCOMPACT_LOGGING) fatalerror
1010#define arcompact_log if (ARCOMPACT_LOGGING) fatalerror
r242509r242510
13921392}
13931393
13941394
1395ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p00(OPS_32)
1396{
1397   // p00 formats not listed in appendix?
1398
1399   int size = 4;
1400   UINT32 limm = 0;
1401   int got_limm = 0;
1402
1403   COMMON32_GET_breg
1404   COMMON32_GET_creg
1405   COMMON32_GET_F
1406
1407   if (creg == LIMM_REG)
1408   {
1409      // opcode          iiii iBBB ppII IIII FBBB CCCC CC-- ----
1410      // MOV b   <- limm 0010 0RRR 0000 1010 0RRR 1111 10RR RRRR  [LIMM]  (creg = LIMM)
1411      // MOV.F b <- limm 0010 0RRR 0000 1010 1RRR 1111 10RR RRRR  [LIMM]  (creg = LIMM)
1412
1413      if (!got_limm)
1414      {
1415         GET_LIMM_32;
1416         size = 8;
1417      }
1418
1419      m_regs[breg] = limm;
1420
1421      if (F)
1422      { // currently not supported
1423         arcompact_fatal("unimplemented MOV.F %08x", op);
1424      }
1425
1426      return m_pc + (size>>0);
1427
1428   }
1429   else
1430   {
1431      // opcode          iiii iBBB ppII IIII FBBB CCCC CC-- ----
1432      // MOV   b <- c    0010 0RRR 0000 1010 0RRR cccc ccRR RRRR
1433      // MOV.F b <- c    0010 0RRR 0000 1010 1RRR cccc ccRR RRRR
1434
1435      arcompact_fatal("unimplemented MOV b <- c %08x", op);
1436   }
1437
1438   return m_pc + (size>>0);
1439
1440}
1441
1442ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p01(OPS_32)
1443{
1444   // opcode          iiii i--- ppII IIII F--- uuuu uu-- ----
1445   // MOV   b <- u6   0010 0RRR 0100 1010 0RRR uuuu uuRR RRRR
1446   // MOV.F b <- u6   0010 0RRR 0100 1010 1RRR uuuu uuRR RRRR
1447
1448   int size = 4;
1449
1450   COMMON32_GET_breg
1451   COMMON32_GET_u6
1452   COMMON32_GET_F
1453
1454   m_regs[breg] = u;
1455
1456   if (F)
1457   { // currently not supported
1458      arcompact_fatal("unimplemented MOV.F b <- u6 %08x", op);
1459   }
1460
1461   return m_pc + (size>>0);
1462}
1463
1464ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p10(OPS_32)
1465{
1466   int size = 4;
1467   arcompact_fatal("arcompact_handle04_0a_p10\n");
1468   return m_pc + (size >> 0);
1469}
1470
1471ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p11_m0(OPS_32)
1472{
1473   int size = 4;
1474   arcompact_fatal("arcompact_handle04_0a_p11_m0\n");
1475   return m_pc + (size >> 0);
1476}
1477
1478ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p11_m1(OPS_32)
1479{
1480   int size = 4;
1481   arcompact_fatal("arcompact_handle04_0a_p11_m1\n");
1482   return m_pc + (size >> 0);
1483}
1484
1485#if 0
13951486ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a(OPS_32)
13961487{
13971488   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0a], /*"MOV"*/ 1,0);
13981489}
1490#endif
13991491
14001492ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0b(OPS_32)
14011493{
r242509r242510
14921584   return arcompact_handle04_helper(PARAMS, opcodes_04[0x1d], /*"MPYU"*/ 0,0);
14931585} // *
14941586
1587/* handler template for c+p
1588ARCOMPACT_RETTYPE arcompact_device::arcompact_handleXX_xx_p00(OPS_32)
1589{
1590   int size = 4;
1591   arcompact_fatal("arcompact_handleXX_xx_p00\n");
1592   return m_pc + (size >> 0);
1593}
14951594
1595ARCOMPACT_RETTYPE arcompact_device::arcompact_handleXX_xx_p01(OPS_32)
1596{
1597   int size = 4;
1598   arcompact_fatal("arcompact_handleXX_xx_p01\n");
1599   return m_pc + (size >> 0);
1600}
14961601
1497ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p00(OPS_16)
1602ARCOMPACT_RETTYPE arcompact_device::arcompact_handleXX_xx_p10(OPS_32)
14981603{
14991604   int size = 4;
1605   arcompact_fatal("arcompact_handleXX_xx_p10\n");
1606   return m_pc + (size >> 0);
1607}
1608
1609ARCOMPACT_RETTYPE arcompact_device::arcompact_handleXX_xx_p11_m0(OPS_32)
1610{
1611   int size = 4;
1612   arcompact_fatal("arcompact_handleXX_xx_p11_m0\n");
1613   return m_pc + (size >> 0);
1614}
1615
1616ARCOMPACT_RETTYPE arcompact_device::arcompact_handleXX_xx_p11_m1(OPS_32)
1617{
1618   int size = 4;
1619   arcompact_fatal("arcompact_handleXX_xx_p11_m1\n");
1620   return m_pc + (size >> 0);
1621}
1622*/
1623
1624ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p00(OPS_32)
1625{
1626   int size = 4;
15001627   UINT32 limm = 0;
15011628   int got_limm = 0;
15021629
15031630   COMMON32_GET_creg
15041631
1505   if (creg == LIMM_REG)
1632   if (creg == LIMM_REG)
15061633   {
1634      // opcode          iiii i--- ppII IIII F--- CCCC CC-- ----
1635      // J limm          0010 0RRR 0010 0000 0RRR 1111 10RR RRRR  [LIMM]  (creg = LIMM)
1636
15071637      if (!got_limm)
15081638      {
15091639         GET_LIMM_32;
r242509r242510
15141644   }
15151645   else
15161646   {
1647      // opcode          iiii i--- ppII IIII F--- CCCC CC-- ----
1648      // J [c]           0010 0RRR 0010 0000 0RRR CCCC CCRR RRRR
1649      // J.F [ilink1]    0010 0RRR 0010 0000 1RRR 0111 01RR RRRR  (creg = ILINK1, FLAG must be set)
1650      // J.F [ilink2]    0010 0RRR 0010 0000 1RRR 0111 10RR RRRR  (creg = ILINE2, FLAG must be set)
1651
15171652      arcompact_log("unimplemented J %08x", op);
15181653   }
15191654
15201655   return m_pc + (size>>0);
15211656}
15221657
1523ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p01(OPS_16)
1658ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p01(OPS_32)
15241659{
1660   // opcode          iiii i--- ppII IIII F--- uuuu uu-- ----
1661   // J u6            0010 0RRR 0110 0000 0RRR uuuu uuRR RRRR
15251662   int size = 4;
15261663   arcompact_log("unimplemented J %08x", op);
15271664   return m_pc + (size>>0);
15281665}
15291666
1530ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p10(OPS_16)
1667ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p10(OPS_32)
15311668{
1669   // opcode          iiii i--- ppII IIII F--- ssss ssSS SSSS
1670   // J s12           0010 0RRR 1010 0000 0RRR ssss ssSS SSSS
15321671   int size = 4;
15331672   arcompact_log("unimplemented J %08x", op);
15341673   return m_pc + (size>>0);
15351674}
15361675
15371676
1538ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m0(OPS_16)
1677ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m0(OPS_32)
15391678{
15401679   int size = 4;
15411680//   UINT32 limm = 0;
r242509r242510
15451684
15461685   if (creg == LIMM_REG)
15471686   {
1687      // opcode          iiii i--- ppII IIII F--- cccc ccmq qqqq
1688      // Jcc limm        0010 0RRR 1110 0000 0RRR 1111 100Q QQQQ  [LIUMM]
15481689      if (!got_limm)
15491690      {
15501691         //GET_LIMM_32;
r242509r242510
15551696   }
15561697   else
15571698   {
1699      // opcode          iiii i--- ppII IIII F--- cccc ccmq qqqq
1700      // Jcc [c]         0010 0RRR 1110 0000 0RRR CCCC CC0Q QQQQ
1701      // no conditional links to ILINK1, ILINK2?
15581702      arcompact_log("unimplemented J %08x", op);
15591703   }
15601704   return m_pc + (size>>0);
15611705}
15621706
1563ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m1(OPS_16)
1707ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m1(OPS_32)
15641708{
1709   // opcode          iiii i--- ppII IIII F--- uuuu uumq qqqq
1710   // Jcc u6          0010 0RRR 1110 0000 0RRR uuuu uu1Q QQQQ
15651711   int size = 4;
15661712   arcompact_log("unimplemented J %08x", op);
15671713   return m_pc + (size>>0);
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
r242509r242510
505505      if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]);
506506   }
507507
508   output += sprintf(output, "U(%02x) ", u);
508   output += sprintf(output, " 0x%02x ", u);
509509   if (ignore_dst == 0)
510510   {
511511      if (areg != LIMM_REG)  output += sprintf(output, "DST(%s)", regnames[areg]);
trunk/src/mess/drivers/tispeak.c
r242509r242510
11// license:BSD-3-Clause
2// copyright-holders:hap, Lord Nightmare
2// copyright-holders:hap
33/***************************************************************************
44
55  Texas Instruments Speak & Spell hardware
r242509r242510
159159
160160WRITE_LINE_MEMBER(tispeak_state::auto_power_off)
161161{
162   // power-off request from the MCU, when [OFF] is pressed, also typically after a couple of minutes of idling
162   // power-off request from the MCU, usually after a couple of minutes of idling
163163   if (state)
164164      power_off();
165165}
r242509r242510
186186
187187INPUT_CHANGED_MEMBER(tispeak_state::power_button)
188188{
189   // note: even though power buttons are on the matrix, they are not MCU-controlled
189190   int on = (int)(FPTR)param;
190191   
191192   if (on)
r242509r242510
244245   PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_UNUSED )
245246
246247   PORT_START("IN.7") // R7
247   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") // -> auto_power_off
248   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, tispeak_state, power_button, (void *)0)
248249   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_NAME("Go")
249250   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_NAME("Replay")
250251   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_NAME("Repeat")
r242509r242510
285286   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
286287   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter")
287288   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("Go")
288   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") // -> auto_power_off
289   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, tispeak_state, power_button, (void *)0)
289290   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
290291
291292   PORT_START("IN.4") // R4
r242509r242510
299300   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
300301   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
301302   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
302   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE) // /
303   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
303304   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("Mix It")
304305
305306   PORT_START("IN.6") // R6
trunk/src/mess/layout/tispeak.lay
r242509r242510
66<!-- note: the TI Speak & Spell 14seg digits look different from MAME's default, most notably the right half is wider -->
77
88   <element name="digit" defstate="0">
9      <led14seg><color red="0.2" green="1.0" blue="0.85" /></led14seg>
9      <led14seg><color red="0.3" green="1.0" blue="0.7" /></led14seg>
1010   </element>
1111
1212<!-- add our own for DP(display point) and the custom AP(apostrophe) segments -->
1313
1414   <element name="lamp_dp" defstate="0">
15      <disk state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></disk>
16      <disk state="1"><color red="0.2" green="1.0" blue="0.85" /></disk>
15      <disk state="0"><color red="0.0353" green="0.1255" blue="0.0863" /></disk>
16      <disk state="1"><color red="0.3" green="1.0" blue="0.7" /></disk>
1717   </element>
1818   <element name="lamp_ap" defstate="0">
19      <rect state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></rect>
20      <rect state="1"><color red="0.2" green="1.0" blue="0.85" /></rect>
19      <rect state="0"><color red="0.0353" green="0.1255" blue="0.0863" /></rect>
20      <rect state="1"><color red="0.3" green="1.0" blue="0.7" /></rect>
2121   </element>
2222
2323


Previous 199869 Revisions Next


© 1997-2024 The MAME Team