trunk/src/emu/cpu/arcompact/arcompact_execute.c
| r242544 | r242545 | |
| 17 | 17 | |
| 18 | 18 | while (m_icount > 0) |
| 19 | 19 | { |
| 20 | | debugger_instruction_hook(this, m_pc<<1); |
| 20 | debugger_instruction_hook(this, m_pc); |
| 21 | 21 | |
| 22 | 22 | // printf("new pc %04x\n", m_pc); |
| 23 | 23 | |
| r242544 | r242545 | |
| 1123 | 1123 | return m_pc + (size>>0); |
| 1124 | 1124 | } |
| 1125 | 1125 | |
| 1126 | |
| 1127 | |
| 1126 | 1128 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_00_01dasm(OPS_32) |
| 1127 | 1129 | { |
| 1128 | 1130 | int size = 4; |
| r242544 | r242545 | |
| 1145 | 1147 | } |
| 1146 | 1148 | else |
| 1147 | 1149 | { |
| 1150 | m_regs[REG_BLINK] = m_pc + (size >> 0); |
| 1148 | 1151 | return realaddress; |
| 1149 | 1152 | } |
| 1150 | 1153 | |
| r242544 | r242545 | |
| 1182 | 1185 | |
| 1183 | 1186 | |
| 1184 | 1187 | // register - register cases |
| 1185 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_00(OPS_32) { return arcompact_01_01_00_helper( PARAMS, "BREQ"); } |
| 1186 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_01(OPS_32) { return arcompact_01_01_00_helper( PARAMS, "BRNE"); } |
| 1188 | |
| 1189 | #define BR_REGREG_SETUP \ |
| 1190 | /* Branch on Compare / Bit Test - Register-Register */ \ |
| 1191 | int size = 4; \ |
| 1192 | GET_01_01_01_BRANCH_ADDR; \ |
| 1193 | COMMON32_GET_creg; \ |
| 1194 | COMMON32_GET_breg; \ |
| 1195 | int n = (op & 0x00000020) >> 5; \ |
| 1196 | UINT32 b,c; \ |
| 1197 | if ((breg != LIMM_REG) && (creg != LIMM_REG)) \ |
| 1198 | { \ |
| 1199 | b = m_regs[breg]; \ |
| 1200 | c = m_regs[creg]; \ |
| 1201 | } \ |
| 1202 | else \ |
| 1203 | { \ |
| 1204 | UINT32 limm; \ |
| 1205 | GET_LIMM_32; \ |
| 1206 | size = 8; \ |
| 1207 | \ |
| 1208 | if (breg == LIMM_REG) \ |
| 1209 | b = limm; \ |
| 1210 | else \ |
| 1211 | b = m_regs[breg]; \ |
| 1212 | \ |
| 1213 | if (creg == LIMM_REG) \ |
| 1214 | c = limm; \ |
| 1215 | else \ |
| 1216 | c = m_regs[creg]; \ |
| 1217 | } \ |
| 1218 | |
| 1219 | #define BR_TAKEJUMP \ |
| 1220 | /* take jump */ \ |
| 1221 | UINT32 realaddress = PC_ALIGNED32 + (address * 2); \ |
| 1222 | \ |
| 1223 | if (n) \ |
| 1224 | { \ |
| 1225 | m_delayactive = 1; \ |
| 1226 | m_delayjump = realaddress; \ |
| 1227 | m_delaylinks = 0; \ |
| 1228 | } \ |
| 1229 | else \ |
| 1230 | { \ |
| 1231 | return realaddress; \ |
| 1232 | } \ |
| 1233 | |
| 1234 | |
| 1235 | |
| 1236 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_00(OPS_32) // register - register BREQ |
| 1237 | { |
| 1238 | BR_REGREG_SETUP |
| 1239 | |
| 1240 | // BREQ |
| 1241 | if (b == c) |
| 1242 | { |
| 1243 | BR_TAKEJUMP |
| 1244 | } |
| 1245 | |
| 1246 | return m_pc + (size>>0); |
| 1247 | } |
| 1248 | |
| 1249 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_01(OPS_32) // register - register BRNE |
| 1250 | { |
| 1251 | BR_REGREG_SETUP |
| 1252 | |
| 1253 | // BRNE |
| 1254 | if (b != c) |
| 1255 | { |
| 1256 | BR_TAKEJUMP |
| 1257 | } |
| 1258 | |
| 1259 | return m_pc + (size>>0); |
| 1260 | } |
| 1261 | |
| 1187 | 1262 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_02(OPS_32) { return arcompact_01_01_00_helper( PARAMS, "BRLT"); } |
| 1188 | 1263 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_03(OPS_32) { return arcompact_01_01_00_helper( PARAMS, "BRGE"); } |
| 1189 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_04(OPS_32) { return arcompact_01_01_00_helper( PARAMS, "BRLO"); } |
| 1190 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_05(OPS_32) { return arcompact_01_01_00_helper( PARAMS, "BRHS"); } |
| 1264 | |
| 1265 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_04(OPS_32) // register - register BRLO |
| 1266 | { |
| 1267 | BR_REGREG_SETUP |
| 1268 | |
| 1269 | // BRLO (unsigned operation) |
| 1270 | if (b < c) |
| 1271 | { |
| 1272 | BR_TAKEJUMP |
| 1273 | } |
| 1274 | |
| 1275 | return m_pc + (size>>0); |
| 1276 | } |
| 1277 | |
| 1278 | |
| 1279 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_05(OPS_32) // register - register BRHS |
| 1280 | { |
| 1281 | BR_REGREG_SETUP |
| 1282 | |
| 1283 | // BRHS (unsigned operation) |
| 1284 | if (b >= c) |
| 1285 | { |
| 1286 | BR_TAKEJUMP |
| 1287 | } |
| 1288 | |
| 1289 | return m_pc + (size>>0); |
| 1290 | } |
| 1291 | |
| 1292 | |
| 1191 | 1293 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_0e(OPS_32) { return arcompact_01_01_00_helper( PARAMS, "BBIT0");} |
| 1192 | 1294 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_0f(OPS_32) { return arcompact_01_01_00_helper( PARAMS, "BBIT1");} |
| 1193 | 1295 | |
| r242544 | r242545 | |
| 1198 | 1300 | return m_pc + (size>>0); |
| 1199 | 1301 | } |
| 1200 | 1302 | |
| 1303 | #define BR_REGIMM_SETUP \ |
| 1304 | int size = 4; \ |
| 1305 | GET_01_01_01_BRANCH_ADDR \ |
| 1306 | COMMON32_GET_u6; \ |
| 1307 | COMMON32_GET_breg; \ |
| 1308 | int n = (op & 0x00000020) >> 5; \ |
| 1309 | UINT32 b,c; \ |
| 1310 | c = u; \ |
| 1311 | /* comparing a LIMM to an immediate is pointless, is it a valid encoding? */ \ |
| 1312 | if ((breg != LIMM_REG)) \ |
| 1313 | { \ |
| 1314 | b = m_regs[breg]; \ |
| 1315 | } \ |
| 1316 | else \ |
| 1317 | { \ |
| 1318 | UINT32 limm; \ |
| 1319 | GET_LIMM_32; \ |
| 1320 | size = 8; \ |
| 1321 | b = limm; \ |
| 1322 | } \ |
| 1323 | |
| 1324 | |
| 1201 | 1325 | // register -immediate cases |
| 1202 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_00(OPS_32) { return arcompact_01_01_01_helper(PARAMS, "BREQ"); } |
| 1203 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_01(OPS_32) { return arcompact_01_01_01_helper(PARAMS, "BRNE"); } |
| 1204 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_02(OPS_32) { return arcompact_01_01_01_helper(PARAMS, "BRLT"); } |
| 1326 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_00(OPS_32) // BREQ reg-imm |
| 1327 | { |
| 1328 | BR_REGIMM_SETUP |
| 1329 | |
| 1330 | // BREQ |
| 1331 | if (b == c) |
| 1332 | { |
| 1333 | BR_TAKEJUMP |
| 1334 | } |
| 1335 | |
| 1336 | return m_pc + (size>>0); |
| 1337 | } |
| 1338 | |
| 1339 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_01(OPS_32) // BRNE reg-imm |
| 1340 | { |
| 1341 | BR_REGIMM_SETUP |
| 1342 | |
| 1343 | // BRNE |
| 1344 | if (b != c) |
| 1345 | { |
| 1346 | BR_TAKEJUMP |
| 1347 | } |
| 1348 | |
| 1349 | return m_pc + (size>>0); |
| 1350 | } |
| 1351 | |
| 1352 | |
| 1353 | |
| 1354 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_02(OPS_32) // BRLT reg-imm |
| 1355 | { |
| 1356 | BR_REGIMM_SETUP |
| 1357 | |
| 1358 | // BRLT (signed operation) |
| 1359 | if ((INT32)b < (INT32)c) |
| 1360 | { |
| 1361 | BR_TAKEJUMP |
| 1362 | } |
| 1363 | |
| 1364 | return m_pc + (size>>0); |
| 1365 | |
| 1366 | } |
| 1205 | 1367 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_03(OPS_32) { return arcompact_01_01_01_helper(PARAMS, "BRGE"); } |
| 1206 | 1368 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_04(OPS_32) { return arcompact_01_01_01_helper(PARAMS, "BRLO"); } |
| 1207 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_05(OPS_32) { return arcompact_01_01_01_helper(PARAMS, "BRHS"); } |
| 1369 | |
| 1370 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_05(OPS_32) // register - immediate BRHS |
| 1371 | { |
| 1372 | BR_REGIMM_SETUP |
| 1373 | |
| 1374 | // BRHS (unsigned operation) |
| 1375 | if (b >= c) |
| 1376 | { |
| 1377 | BR_TAKEJUMP |
| 1378 | } |
| 1379 | |
| 1380 | return m_pc + (size>>0); |
| 1381 | } |
| 1382 | |
| 1208 | 1383 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_0e(OPS_32) { return arcompact_01_01_01_helper(PARAMS, "BBIT0"); } |
| 1209 | 1384 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_0f(OPS_32) { return arcompact_01_01_01_helper(PARAMS, "BBIT1"); } |
| 1210 | 1385 | |
| r242544 | r242545 | |
| 1212 | 1387 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle02(OPS_32) |
| 1213 | 1388 | { |
| 1214 | 1389 | int size = 4; |
| 1390 | UINT32 limm = 0; |
| 1391 | |
| 1392 | int S = (op & 0x00008000) >> 15;// op &= ~0x00008000; |
| 1393 | int s = (op & 0x00ff0000) >> 16;// op &= ~0x00ff0000; |
| 1394 | if (S) s = -0x100 + s; |
| 1395 | |
| 1215 | 1396 | COMMON32_GET_breg; |
| 1397 | COMMON32_GET_areg |
| 1216 | 1398 | |
| 1217 | | //UINT32 limm = 0; |
| 1399 | int X = (op & 0x00000040) >> 6; //op &= ~0x00000040; |
| 1400 | int Z = (op & 0x00000180) >> 7; //op &= ~0x00000180; |
| 1401 | int a = (op & 0x00000600) >> 9; //op &= ~0x00000600; |
| 1402 | // int D = (op & 0x00000800) >> 11;// op &= ~0x00000800; // we don't use the data cache currently |
| 1403 | |
| 1404 | UINT32 address = m_regs[breg]; |
| 1405 | |
| 1218 | 1406 | if (breg == LIMM_REG) |
| 1219 | 1407 | { |
| 1220 | | //GET_LIMM_32; |
| 1408 | GET_LIMM_32; |
| 1221 | 1409 | size = 8; |
| 1410 | |
| 1411 | address = limm; |
| 1222 | 1412 | } |
| 1223 | 1413 | |
| 1224 | | arcompact_log("unimplemented LD %08x", op); |
| 1414 | // address manipulation |
| 1415 | if ((a == 0) || (a == 1)) |
| 1416 | { |
| 1417 | address = address + s; |
| 1418 | } |
| 1419 | else if (a == 2) |
| 1420 | { |
| 1421 | //address = address; |
| 1422 | } |
| 1423 | else if (a == 3) |
| 1424 | { |
| 1425 | if (Z == 0) |
| 1426 | address = address + (s << 2); |
| 1427 | else if (Z==2) |
| 1428 | address = address + (s << 1); |
| 1429 | else // Z == 1 and Z == 3 are invalid here |
| 1430 | arcompact_fatal("illegal LD %08x (data size %d mode %d)", op, Z, a); |
| 1431 | } |
| 1432 | |
| 1433 | UINT32 readdata = 0; |
| 1434 | |
| 1435 | // read data |
| 1436 | if (Z == 0) |
| 1437 | { |
| 1438 | readdata = READ32(address >> 2); |
| 1439 | |
| 1440 | if (X) // sign extend is not supported for long reads |
| 1441 | arcompact_fatal("illegal LD %08x (data size %d mode %d with X)", op, Z, a); |
| 1442 | |
| 1443 | } |
| 1444 | else if (Z == 1) |
| 1445 | { |
| 1446 | readdata = READ8(address >> 0); |
| 1447 | |
| 1448 | if (X) // todo |
| 1449 | arcompact_fatal("illegal LD %08x (data size %d mode %d with X)", op, Z, a); |
| 1450 | |
| 1451 | } |
| 1452 | else if (Z == 2) |
| 1453 | { |
| 1454 | readdata = READ16(address >> 1); |
| 1455 | |
| 1456 | if (X) // todo |
| 1457 | arcompact_fatal("illegal LD %08x (data size %d mode %d with X)", op, Z, a); |
| 1458 | |
| 1459 | } |
| 1460 | else if (Z == 3) |
| 1461 | { // Z == 3 is always illegal |
| 1462 | arcompact_fatal("illegal LD %08x (data size %d mode %d)", op, Z, a); |
| 1463 | } |
| 1464 | |
| 1465 | m_regs[areg] = readdata; |
| 1466 | |
| 1467 | // writeback / increment |
| 1468 | if ((a == 1) || (a == 2)) |
| 1469 | { |
| 1470 | if (breg==limm) |
| 1471 | arcompact_fatal("illegal LD %08x (data size %d mode %d)", op, Z, a); // using the LIMM as the base register and an increment mode is illegal |
| 1472 | |
| 1473 | m_regs[breg] = m_regs[breg] + s; |
| 1474 | } |
| 1475 | |
| 1225 | 1476 | return m_pc + (size>>0); |
| 1226 | 1477 | |
| 1227 | 1478 | } |
| r242544 | r242545 | |
| 1233 | 1484 | int got_limm = 0; |
| 1234 | 1485 | int S = (op & 0x00008000) >> 15; |
| 1235 | 1486 | int s = (op & 0x00ff0000) >> 16; |
| 1487 | if (S) s = -0x100 + s; |
| 1236 | 1488 | |
| 1237 | 1489 | COMMON32_GET_breg; |
| 1238 | 1490 | COMMON32_GET_creg; |
| 1239 | | |
| 1240 | | if (S) s = -0x100 + s; |
| 1241 | | |
| 1491 | |
| 1242 | 1492 | // int R = (op & 0x00000001) >> 0; // bit 0 is reserved |
| 1243 | 1493 | int Z = (op & 0x00000006) >> 1; |
| 1244 | 1494 | int a = (op & 0x00000018) >> 3; |
| r242544 | r242545 | |
| 1406 | 1656 | return m_pc + (size>>0); |
| 1407 | 1657 | } |
| 1408 | 1658 | |
| 1409 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00(OPS_32) |
| 1659 | |
| 1660 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p00(OPS_32) |
| 1410 | 1661 | { |
| 1411 | | return arcompact_handle04_helper(PARAMS, opcodes_04[0x00], /*"ADD"*/ 0,0); |
| 1662 | int size = 4; |
| 1663 | UINT32 limm = 0; |
| 1664 | int got_limm = 0; |
| 1665 | |
| 1666 | COMMON32_GET_breg; |
| 1667 | COMMON32_GET_F; |
| 1668 | COMMON32_GET_creg |
| 1669 | COMMON32_GET_areg |
| 1670 | |
| 1671 | UINT32 b, c; |
| 1672 | |
| 1673 | if (breg == LIMM_REG) |
| 1674 | { |
| 1675 | GET_LIMM_32; |
| 1676 | size = 8; |
| 1677 | got_limm = 1; |
| 1678 | b = limm; |
| 1679 | } |
| 1680 | else |
| 1681 | { |
| 1682 | b = m_regs[breg]; |
| 1683 | } |
| 1684 | |
| 1685 | if (creg == LIMM_REG) |
| 1686 | { |
| 1687 | if (!got_limm) |
| 1688 | { |
| 1689 | GET_LIMM_32; |
| 1690 | size = 8; |
| 1691 | } |
| 1692 | c = limm; |
| 1693 | } |
| 1694 | else |
| 1695 | { |
| 1696 | c = m_regs[creg]; |
| 1697 | } |
| 1698 | |
| 1699 | // todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) |
| 1700 | m_regs[areg] = b + c; |
| 1701 | |
| 1702 | if (F) |
| 1703 | { |
| 1704 | arcompact_fatal("arcompact_handle04_00_p00 (ADD) (F set)\n"); // not yet supported |
| 1705 | } |
| 1706 | |
| 1707 | return m_pc + (size >> 0); |
| 1412 | 1708 | } |
| 1413 | 1709 | |
| 1710 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p01(OPS_32) |
| 1711 | { |
| 1712 | int size = 4; |
| 1713 | arcompact_fatal("arcompact_handle04_00_p01 (ADD)\n"); |
| 1714 | return m_pc + (size >> 0); |
| 1715 | } |
| 1716 | |
| 1717 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p10(OPS_32) |
| 1718 | { |
| 1719 | int size = 4; |
| 1720 | arcompact_fatal("arcompact_handle04_00_p10 (ADD)\n"); |
| 1721 | return m_pc + (size >> 0); |
| 1722 | } |
| 1723 | |
| 1724 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p11_m0(OPS_32) |
| 1725 | { |
| 1726 | int size = 4; |
| 1727 | arcompact_fatal("arcompact_handle04_00_p11_m0 (ADD)\n"); |
| 1728 | return m_pc + (size >> 0); |
| 1729 | } |
| 1730 | |
| 1731 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p11_m1(OPS_32) |
| 1732 | { |
| 1733 | int size = 4; |
| 1734 | arcompact_fatal("arcompact_handle04_00_p11_m1 (ADD)\n"); |
| 1735 | return m_pc + (size >> 0); |
| 1736 | } |
| 1737 | |
| 1738 | |
| 1414 | 1739 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_01(OPS_32) |
| 1415 | 1740 | { |
| 1416 | 1741 | return arcompact_handle04_helper(PARAMS, opcodes_04[0x01], /*"ADC"*/ 0,0); |
| r242544 | r242545 | |
| 1426 | 1751 | return arcompact_handle04_helper(PARAMS, opcodes_04[0x03], /*"SBC"*/ 0,0); |
| 1427 | 1752 | } |
| 1428 | 1753 | |
| 1429 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04(OPS_32) |
| 1754 | |
| 1755 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p00(OPS_32) |
| 1430 | 1756 | { |
| 1431 | | return arcompact_handle04_helper(PARAMS, opcodes_04[0x04], /*"AND"*/ 0,0); |
| 1757 | int size = 4; |
| 1758 | UINT32 limm = 0; |
| 1759 | int got_limm = 0; |
| 1760 | |
| 1761 | COMMON32_GET_breg; |
| 1762 | COMMON32_GET_F; |
| 1763 | COMMON32_GET_creg |
| 1764 | COMMON32_GET_areg |
| 1765 | |
| 1766 | UINT32 b, c; |
| 1767 | |
| 1768 | if (breg == LIMM_REG) |
| 1769 | { |
| 1770 | GET_LIMM_32; |
| 1771 | size = 8; |
| 1772 | got_limm = 1; |
| 1773 | b = limm; |
| 1774 | } |
| 1775 | else |
| 1776 | { |
| 1777 | b = m_regs[breg]; |
| 1778 | } |
| 1779 | |
| 1780 | if (creg == LIMM_REG) |
| 1781 | { |
| 1782 | if (!got_limm) |
| 1783 | { |
| 1784 | GET_LIMM_32; |
| 1785 | size = 8; |
| 1786 | } |
| 1787 | c = limm; |
| 1788 | } |
| 1789 | else |
| 1790 | { |
| 1791 | c = m_regs[creg]; |
| 1792 | } |
| 1793 | // todo: is and a, limm, limm valid? (it's pointless.) |
| 1794 | |
| 1795 | // todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) |
| 1796 | m_regs[areg] = b & c; |
| 1797 | |
| 1798 | if (F) |
| 1799 | { |
| 1800 | arcompact_fatal("arcompact_handle04_04_p00 (AND) (F set)\n"); // not yet supported |
| 1801 | } |
| 1802 | |
| 1803 | return m_pc + (size >> 0);} |
| 1804 | |
| 1805 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p01(OPS_32) |
| 1806 | { |
| 1807 | int size = 4; |
| 1808 | arcompact_fatal("arcompact_handle04_04_p01 (AND)\n"); |
| 1809 | return m_pc + (size >> 0); |
| 1432 | 1810 | } |
| 1433 | 1811 | |
| 1812 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p10(OPS_32) |
| 1813 | { |
| 1814 | int size = 4; |
| 1815 | arcompact_fatal("arcompact_handle04_04_p10 (AND)\n"); |
| 1816 | return m_pc + (size >> 0); |
| 1817 | } |
| 1818 | |
| 1819 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p11_m0(OPS_32) |
| 1820 | { |
| 1821 | int size = 4; |
| 1822 | arcompact_fatal("arcompact_handle04_04_p11_m0 (AND)\n"); |
| 1823 | return m_pc + (size >> 0); |
| 1824 | } |
| 1825 | |
| 1826 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p11_m1(OPS_32) |
| 1827 | { |
| 1828 | int size = 4; |
| 1829 | arcompact_fatal("arcompact_handle04_04_p11_m1 (AND)\n"); |
| 1830 | return m_pc + (size >> 0); |
| 1831 | } |
| 1832 | |
| 1833 | |
| 1434 | 1834 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05(OPS_32) |
| 1435 | 1835 | { |
| 1436 | 1836 | return arcompact_handle04_helper(PARAMS, opcodes_04[0x05], /*"OR"*/ 0,0); |
| 1437 | 1837 | } |
| 1438 | 1838 | |
| 1439 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06(OPS_32) |
| 1839 | |
| 1840 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p00(OPS_32) |
| 1440 | 1841 | { |
| 1441 | | return arcompact_handle04_helper(PARAMS, opcodes_04[0x06], /*"BIC"*/ 0,0); |
| 1842 | int size = 4; |
| 1843 | arcompact_fatal("arcompact_handle04_06_p00 (BIC)\n"); |
| 1844 | return m_pc + (size >> 0); |
| 1845 | |
| 1442 | 1846 | } |
| 1443 | 1847 | |
| 1848 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p01(OPS_32) |
| 1849 | { |
| 1850 | int size = 4; |
| 1851 | arcompact_fatal("arcompact_handle04_06_p01 (BIC)\n"); |
| 1852 | return m_pc + (size >> 0); |
| 1853 | } |
| 1854 | |
| 1855 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p10(OPS_32) |
| 1856 | { |
| 1857 | int size = 4; |
| 1858 | arcompact_fatal("arcompact_handle04_06_p10 (BIC)\n"); |
| 1859 | return m_pc + (size >> 0); |
| 1860 | } |
| 1861 | |
| 1862 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p11_m0(OPS_32) |
| 1863 | { |
| 1864 | int size = 4; |
| 1865 | arcompact_fatal("arcompact_handle04_06_p11_m0 (BIC)\n"); |
| 1866 | return m_pc + (size >> 0); |
| 1867 | } |
| 1868 | |
| 1869 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p11_m1(OPS_32) |
| 1870 | { |
| 1871 | int size = 4; |
| 1872 | arcompact_fatal("arcompact_handle04_06_p11_m1 (BIC)\n"); |
| 1873 | return m_pc + (size >> 0); |
| 1874 | } |
| 1875 | |
| 1876 | |
| 1444 | 1877 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07(OPS_32) |
| 1445 | 1878 | { |
| 1446 | 1879 | return arcompact_handle04_helper(PARAMS, opcodes_04[0x07], /*"XOR"*/ 0,0); |
| r242544 | r242545 | |
| 2017 | 2450 | { |
| 2018 | 2451 | } |
| 2019 | 2452 | |
| 2020 | | arcompact_log("unimplemented LD %08x", op); |
| 2453 | arcompact_log("unimplemented LD %08x (type 04_3x)", op); |
| 2021 | 2454 | return m_pc + (size>>0); |
| 2022 | 2455 | } |
| 2023 | 2456 | |
| r242544 | r242545 | |
| 2108 | 2541 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle06(OPS_32) |
| 2109 | 2542 | { |
| 2110 | 2543 | arcompact_log("op a,b,c (06 ARC ext) (%08x)", op ); |
| 2111 | | return m_pc + (4 >> 0);; |
| 2544 | return m_pc + (4 >> 0); |
| 2112 | 2545 | } |
| 2113 | 2546 | |
| 2114 | 2547 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle07(OPS_32) |
| 2115 | 2548 | { |
| 2116 | 2549 | arcompact_log("op a,b,c (07 User ext) (%08x)", op ); |
| 2117 | | return m_pc + (4 >> 0);; |
| 2550 | return m_pc + (4 >> 0); |
| 2118 | 2551 | } |
| 2119 | 2552 | |
| 2120 | 2553 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle08(OPS_32) |
| 2121 | 2554 | { |
| 2122 | 2555 | arcompact_log("op a,b,c (08 User ext) (%08x)", op ); |
| 2123 | | return m_pc + (4 >> 0);; |
| 2556 | return m_pc + (4 >> 0); |
| 2124 | 2557 | } |
| 2125 | 2558 | |
| 2126 | 2559 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle09(OPS_32) |
| 2127 | 2560 | { |
| 2128 | 2561 | arcompact_log("op a,b,c (09 Market ext) (%08x)", op ); |
| 2129 | | return m_pc + (4 >> 0);; |
| 2562 | return m_pc + (4 >> 0); |
| 2130 | 2563 | } |
| 2131 | 2564 | |
| 2132 | 2565 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0a(OPS_32) |
| 2133 | 2566 | { |
| 2134 | 2567 | arcompact_log("op a,b,c (0a Market ext) (%08x)", op ); |
| 2135 | | return m_pc + (4 >> 0);; |
| 2568 | return m_pc + (4 >> 0); |
| 2136 | 2569 | } |
| 2137 | 2570 | |
| 2138 | 2571 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0b(OPS_32) |
| 2139 | 2572 | { |
| 2140 | 2573 | arcompact_log("op a,b,c (0b Market ext) (%08x)", op ); |
| 2141 | | return m_pc + (4 >> 0);; |
| 2574 | return m_pc + (4 >> 0); |
| 2142 | 2575 | } |
| 2143 | 2576 | |
| 2144 | 2577 | |
| r242544 | r242545 | |
| 2146 | 2579 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0c_helper(OPS_16, const char* optext) |
| 2147 | 2580 | { |
| 2148 | 2581 | arcompact_log("unimplemented %s %04x (0x0c group)", optext, op); |
| 2149 | | return m_pc + (2 >> 0);; |
| 2582 | return m_pc + (2 >> 0); |
| 2150 | 2583 | } |
| 2151 | 2584 | |
| 2152 | 2585 | |
| r242544 | r242545 | |
| 2165 | 2598 | return arcompact_handle0c_helper(PARAMS, "LDW_S"); |
| 2166 | 2599 | } |
| 2167 | 2600 | |
| 2168 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0c_03(OPS_16) |
| 2601 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0c_03(OPS_16) // ADD_S a <- b + c |
| 2169 | 2602 | { |
| 2170 | | return arcompact_handle0c_helper(PARAMS, "ADD_S"); |
| 2603 | int areg, breg, creg; |
| 2604 | |
| 2605 | COMMON16_GET_areg; |
| 2606 | COMMON16_GET_breg; |
| 2607 | COMMON16_GET_creg; |
| 2608 | |
| 2609 | REG_16BIT_RANGE(areg); |
| 2610 | REG_16BIT_RANGE(breg); |
| 2611 | REG_16BIT_RANGE(creg); |
| 2612 | |
| 2613 | m_regs[areg] = m_regs[breg] + m_regs[creg]; |
| 2614 | |
| 2615 | return m_pc + (2 >> 0); |
| 2171 | 2616 | } |
| 2172 | 2617 | |
| 2173 | 2618 | |
| 2174 | 2619 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_helper(OPS_16, const char* optext) |
| 2175 | 2620 | { |
| 2176 | | arcompact_log("unimplemented %s %04x", optext, op); |
| 2177 | | return m_pc + (2 >> 0);; |
| 2621 | arcompact_log("unimplemented %s %04x (0x0d group)", optext, op); |
| 2622 | return m_pc + (2 >> 0); |
| 2178 | 2623 | } |
| 2179 | 2624 | |
| 2180 | 2625 | |
| r242544 | r242545 | |
| 2218 | 2663 | |
| 2219 | 2664 | } |
| 2220 | 2665 | |
| 2221 | | arcompact_log("unimplemented %s %04x", optext, op); |
| 2666 | arcompact_log("unimplemented %s %04x (0x0e_0x group)", optext, op); |
| 2222 | 2667 | |
| 2223 | 2668 | return m_pc+ (size>>0); |
| 2224 | 2669 | |
| r242544 | r242545 | |
| 2266 | 2711 | return arcompact_handle0e_0x_helper(PARAMS, "CMP_S", 0); |
| 2267 | 2712 | } |
| 2268 | 2713 | |
| 2269 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0e_03(OPS_16) |
| 2714 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0e_03(OPS_16) // MOV_S h <- b |
| 2270 | 2715 | { |
| 2271 | | return arcompact_handle0e_0x_helper(PARAMS, "MOV_S (0e_03 type)", 1); |
| 2716 | int h,breg; |
| 2717 | int size = 2; |
| 2718 | |
| 2719 | GROUP_0e_GET_h; |
| 2720 | COMMON16_GET_breg; |
| 2721 | REG_16BIT_RANGE(breg); |
| 2722 | |
| 2723 | if (h == LIMM_REG) // no result.. |
| 2724 | { |
| 2725 | |
| 2726 | } |
| 2727 | |
| 2728 | m_regs[h] = m_regs[breg]; |
| 2729 | |
| 2730 | return m_pc+ (size>>0); |
| 2272 | 2731 | } |
| 2273 | 2732 | |
| 2274 | 2733 | |
| r242544 | r242545 | |
| 2276 | 2735 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_0x_helper(OPS_16, const char* optext) |
| 2277 | 2736 | { |
| 2278 | 2737 | arcompact_log("unimplemented %s %04x", optext, op); |
| 2279 | | return m_pc + (2 >> 0);; |
| 2738 | return m_pc + (2 >> 0); |
| 2280 | 2739 | } |
| 2281 | 2740 | |
| 2282 | 2741 | |
| r242544 | r242545 | |
| 2284 | 2743 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_00(OPS_16) { return arcompact_handle0f_00_0x_helper(PARAMS, "J_S"); } |
| 2285 | 2744 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_01(OPS_16) { return arcompact_handle0f_00_0x_helper(PARAMS, "J_S.D"); } |
| 2286 | 2745 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_02(OPS_16) { return arcompact_handle0f_00_0x_helper(PARAMS, "JL_S"); } |
| 2287 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_03(OPS_16) { return arcompact_handle0f_00_0x_helper(PARAMS, "JL_S.D"); } |
| 2746 | |
| 2747 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_03(OPS_16) // JL_S.D |
| 2748 | { |
| 2749 | int breg; |
| 2750 | |
| 2751 | COMMON16_GET_breg; |
| 2752 | REG_16BIT_RANGE(breg); |
| 2753 | |
| 2754 | m_delayactive = 1; |
| 2755 | m_delayjump = m_regs[breg]; |
| 2756 | m_delaylinks = 1; |
| 2757 | |
| 2758 | return m_pc + (2 >> 0); |
| 2759 | } |
| 2760 | |
| 2288 | 2761 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_06(OPS_16) { return arcompact_handle0f_00_0x_helper(PARAMS, "SUB_S.NE"); } |
| 2289 | 2762 | |
| 2290 | 2763 | |
| 2291 | 2764 | |
| 2292 | 2765 | |
| 2293 | 2766 | // Zero parameters (ZOP) |
| 2294 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_00(OPS_16) { arcompact_log("NOP_S"); return m_pc + (2 >> 0);;} |
| 2295 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_01(OPS_16) { arcompact_log("UNIMP_S"); return m_pc + (2 >> 0);;} // Unimplemented Instruction, same as illegal, but recommended to fill blank space |
| 2296 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_04(OPS_16) { arcompact_log("JEQ_S [blink]"); return m_pc + (2 >> 0);;} |
| 2297 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_05(OPS_16) { arcompact_log("JNE_S [blink]"); return m_pc + (2 >> 0);;} |
| 2298 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_06(OPS_16) { arcompact_log("J_S [blink]"); return m_pc + (2 >> 0);;} |
| 2299 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_07(OPS_16) { arcompact_log("J_S.D [blink]"); return m_pc + (2 >> 0);;} |
| 2767 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_00(OPS_16) { arcompact_log("NOP_S"); return m_pc + (2 >> 0);} |
| 2768 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_01(OPS_16) { arcompact_log("UNIMP_S"); return m_pc + (2 >> 0);} // Unimplemented Instruction, same as illegal, but recommended to fill blank space |
| 2769 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_04(OPS_16) { arcompact_log("JEQ_S [blink]"); return m_pc + (2 >> 0);} |
| 2770 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_05(OPS_16) { arcompact_log("JNE_S [blink]"); return m_pc + (2 >> 0);} |
| 2300 | 2771 | |
| 2772 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_06(OPS_16) // J_S [blink] |
| 2773 | { |
| 2774 | return m_regs[REG_BLINK]; |
| 2775 | } |
| 2301 | 2776 | |
| 2302 | 2777 | |
| 2778 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_07(OPS_16) { arcompact_log("J_S.D [blink]"); return m_pc + (2 >> 0);} |
| 2303 | 2779 | |
| 2304 | 2780 | |
| 2781 | |
| 2782 | |
| 2783 | |
| 2305 | 2784 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0x_helper(OPS_16, const char* optext, int nodst) |
| 2306 | 2785 | { |
| 2307 | | arcompact_log("unimplemented %s %04x", optext, op); |
| 2308 | | return m_pc + (2 >> 0);; |
| 2786 | arcompact_log("unimplemented %s %04x (0xf_0x group)", optext, op); |
| 2787 | return m_pc + (2 >> 0); |
| 2309 | 2788 | } |
| 2310 | 2789 | |
| 2311 | 2790 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_02(OPS_16) { return arcompact_handle0f_0x_helper(PARAMS, "SUB_S",0); } |
| r242544 | r242545 | |
| 2317 | 2796 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0c(OPS_16) { return arcompact_handle0f_0x_helper(PARAMS, "MUL64_S",2); } // actual destination is special multiply registers |
| 2318 | 2797 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0d(OPS_16) { return arcompact_handle0f_0x_helper(PARAMS, "SEXB_S",0); } |
| 2319 | 2798 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0e(OPS_16) { return arcompact_handle0f_0x_helper(PARAMS, "SEXW_S",0); } |
| 2320 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0f(OPS_16) { return arcompact_handle0f_0x_helper(PARAMS, "EXTB_S",0); } |
| 2799 | |
| 2800 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0f(OPS_16) // EXTB_S |
| 2801 | { |
| 2802 | int breg, creg; |
| 2803 | |
| 2804 | COMMON16_GET_breg; |
| 2805 | COMMON16_GET_creg; |
| 2806 | |
| 2807 | REG_16BIT_RANGE(breg); |
| 2808 | REG_16BIT_RANGE(creg); |
| 2809 | |
| 2810 | m_regs[breg] = m_regs[creg] & 0xff; |
| 2811 | |
| 2812 | return m_pc + (2 >> 0); |
| 2813 | |
| 2814 | } |
| 2815 | |
| 2321 | 2816 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_10(OPS_16) { return arcompact_handle0f_0x_helper(PARAMS, "EXTW_S",0); } |
| 2322 | 2817 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_11(OPS_16) { return arcompact_handle0f_0x_helper(PARAMS, "ABS_S",0); } |
| 2323 | 2818 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_12(OPS_16) { return arcompact_handle0f_0x_helper(PARAMS, "NOT_S",0); } |
| r242544 | r242545 | |
| 2336 | 2831 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1e(OPS_16) // special |
| 2337 | 2832 | { |
| 2338 | 2833 | arcompact_log("unimplemented TRAP_S %04x", op); |
| 2339 | | return m_pc + (2 >> 0);; |
| 2834 | return m_pc + (2 >> 0); |
| 2340 | 2835 | } |
| 2341 | 2836 | |
| 2342 | 2837 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1f(OPS_16) // special |
| 2343 | 2838 | { |
| 2344 | 2839 | arcompact_log("unimplemented BRK_S %04x", op); |
| 2345 | | return m_pc + (2 >> 0);; |
| 2840 | return m_pc + (2 >> 0); |
| 2346 | 2841 | } |
| 2347 | 2842 | |
| 2348 | 2843 | |
| 2349 | 2844 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle_ld_helper(OPS_16, const char* optext, int shift, int swap) |
| 2350 | 2845 | { |
| 2351 | 2846 | arcompact_log("unimplemented %s %04x (ld/st group %d %d)", optext, op, shift, swap); |
| 2352 | | return m_pc + (2 >> 0);; |
| 2847 | return m_pc + (2 >> 0); |
| 2353 | 2848 | } |
| 2354 | 2849 | |
| 2355 | 2850 | |
| r242544 | r242545 | |
| 2416 | 2911 | |
| 2417 | 2912 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle_l7_0x_helper(OPS_16, const char* optext) |
| 2418 | 2913 | { |
| 2419 | | arcompact_log("unimplemented %s %04x", optext, op); |
| 2420 | | return m_pc + (2 >> 0);; |
| 2914 | arcompact_log("unimplemented %s %04x (l7_0x group)", optext, op); |
| 2915 | return m_pc + (2 >> 0); |
| 2421 | 2916 | } |
| 2422 | 2917 | |
| 2423 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_00(OPS_16) |
| 2918 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_00(OPS_16) // ASL_S b, b, u5 |
| 2424 | 2919 | { |
| 2425 | | return arcompact_handle_l7_0x_helper(PARAMS, "ASL_S"); |
| 2920 | int breg, u; |
| 2921 | |
| 2922 | COMMON16_GET_breg; |
| 2923 | COMMON16_GET_u5; |
| 2924 | |
| 2925 | REG_16BIT_RANGE(breg); |
| 2926 | |
| 2927 | // only bottom 5 bits are used if ASL operations, we only have 5 bits anyway here |
| 2928 | m_regs[breg] = m_regs[breg] << (u&0x1f); |
| 2929 | |
| 2930 | return m_pc + (2 >> 0); |
| 2931 | |
| 2426 | 2932 | } |
| 2427 | 2933 | |
| 2428 | 2934 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_01(OPS_16) |
| r242544 | r242545 | |
| 2430 | 2936 | return arcompact_handle_l7_0x_helper(PARAMS, "LSR_S"); |
| 2431 | 2937 | } |
| 2432 | 2938 | |
| 2433 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_02(OPS_16) |
| 2939 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_02(OPS_16) // ASR_S b,b,u5 |
| 2434 | 2940 | { |
| 2435 | | return arcompact_handle_l7_0x_helper(PARAMS, "ASR_S"); |
| 2941 | int breg, u; |
| 2942 | |
| 2943 | COMMON16_GET_breg; |
| 2944 | COMMON16_GET_u5; |
| 2945 | |
| 2946 | REG_16BIT_RANGE(breg); |
| 2947 | |
| 2948 | // only bottom 5 bits are used if ASR operations, we only have 5 bits anyway here |
| 2949 | INT32 temp = (INT32)m_regs[breg]; // treat it as a signed value, so sign extension occurs during shift |
| 2950 | |
| 2951 | m_regs[breg] = temp >> (u&0x1f); |
| 2952 | |
| 2953 | return m_pc + (2 >> 0); |
| 2436 | 2954 | } |
| 2437 | 2955 | |
| 2438 | 2956 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_03(OPS_16) |
| r242544 | r242545 | |
| 2463 | 2981 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_0x_helper(OPS_16, const char* optext, int st) |
| 2464 | 2982 | { |
| 2465 | 2983 | arcompact_log("unimplemented %s %04x (0x18_0x group)", optext, op); |
| 2466 | | return m_pc + (2 >> 0);; |
| 2984 | return m_pc + (2 >> 0); |
| 2467 | 2985 | } |
| 2468 | 2986 | |
| 2469 | 2987 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_00(OPS_16) |
| r242544 | r242545 | |
| 2494 | 3012 | // op bits remaining for 0x18_05_xx subgroups 0x001f |
| 2495 | 3013 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_00(OPS_16) |
| 2496 | 3014 | { |
| 2497 | | arcompact_log("unimplemented ADD_S SP, SP %04x", op); |
| 2498 | | return m_pc + (2 >> 0);; |
| 3015 | int u; |
| 3016 | COMMON16_GET_u5; |
| 3017 | |
| 3018 | m_regs[REG_SP] = m_regs[REG_SP] + (u << 2); |
| 3019 | |
| 3020 | return m_pc + (2 >> 0); |
| 2499 | 3021 | } |
| 2500 | 3022 | |
| 2501 | 3023 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_01(OPS_16) |
| 2502 | 3024 | { |
| 2503 | | arcompact_log("unimplemented SUB_S SP, SP %04x", op); |
| 2504 | | return m_pc + (2 >> 0);; |
| 3025 | int u; |
| 3026 | COMMON16_GET_u5; |
| 3027 | |
| 3028 | m_regs[REG_SP] = m_regs[REG_SP] - (u << 2); |
| 3029 | |
| 3030 | return m_pc + (2 >> 0); |
| 2505 | 3031 | } |
| 2506 | 3032 | |
| 2507 | 3033 | // op bits remaining for 0x18_06_xx subgroups 0x0700 |
| 2508 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_01(OPS_16) |
| 3034 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_01(OPS_16) // POP_S b |
| 2509 | 3035 | { |
| 2510 | | arcompact_log("unimplemented POP_S %04x", op); |
| 2511 | | return m_pc + (2 >> 0);; |
| 3036 | int breg; |
| 3037 | COMMON16_GET_breg; |
| 3038 | REG_16BIT_RANGE(breg); |
| 3039 | |
| 3040 | m_regs[breg] = READ32(m_regs[REG_SP] >> 2); |
| 3041 | m_regs[REG_SP] += 4; |
| 3042 | |
| 3043 | return m_pc + (2 >> 0); |
| 2512 | 3044 | } |
| 2513 | 3045 | |
| 2514 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_11(OPS_16) |
| 3046 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_11(OPS_16) // POP_S blink |
| 2515 | 3047 | { |
| 2516 | | arcompact_log("unimplemented POP_S [BLINK] %04x", op); |
| 2517 | | return m_pc + (2 >> 0);; |
| 3048 | // breg bits are reserved |
| 3049 | m_regs[REG_BLINK] = READ32(m_regs[REG_SP] >> 2 ); |
| 3050 | m_regs[REG_SP] += 4; |
| 3051 | |
| 3052 | return m_pc + (2 >> 0); |
| 2518 | 3053 | } |
| 2519 | 3054 | |
| 2520 | 3055 | // op bits remaining for 0x18_07_xx subgroups 0x0700 |
| 2521 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_01(OPS_16) |
| 3056 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_01(OPS_16) // PUSH_S b |
| 2522 | 3057 | { |
| 2523 | 3058 | int breg; |
| 2524 | 3059 | COMMON16_GET_breg; |
| r242544 | r242545 | |
| 2532 | 3067 | } |
| 2533 | 3068 | |
| 2534 | 3069 | |
| 2535 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_11(OPS_16) |
| 3070 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_11(OPS_16) // PUSH_S [blink] |
| 2536 | 3071 | { |
| 2537 | 3072 | // breg bits are reserved |
| 2538 | 3073 | |
| r242544 | r242545 | |
| 2547 | 3082 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle19_0x_helper(OPS_16, const char* optext, int shift, int format) |
| 2548 | 3083 | { |
| 2549 | 3084 | arcompact_log("unimplemented %s %04x (0x19_0x group)", optext, op); |
| 2550 | | return m_pc + (2 >> 0);; |
| 3085 | return m_pc + (2 >> 0); |
| 2551 | 3086 | } |
| 2552 | 3087 | |
| 2553 | 3088 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle19_00(OPS_16) { return arcompact_handle19_0x_helper(PARAMS, "LD_S", 2, 0); } |
| r242544 | r242545 | |
| 2558 | 3093 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1a(OPS_16) |
| 2559 | 3094 | { |
| 2560 | 3095 | arcompact_log("unimplemented MOV_S x, [PCL, x] %04x", op); |
| 2561 | | return m_pc + (2 >> 0);; |
| 3096 | return m_pc + (2 >> 0); |
| 2562 | 3097 | } |
| 2563 | 3098 | |
| 2564 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1b(OPS_16) |
| 3099 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1b(OPS_16) // MOV_S b, u8 |
| 2565 | 3100 | { |
| 2566 | | arcompact_log("unimplemented MOV_S (1b type) %04x", op); |
| 2567 | | return m_pc + (2 >> 0);; |
| 3101 | int breg; |
| 3102 | UINT32 u; |
| 3103 | COMMON16_GET_breg; |
| 3104 | COMMON16_GET_u8; |
| 3105 | REG_16BIT_RANGE(breg); |
| 3106 | |
| 3107 | m_regs[breg] = u; |
| 3108 | |
| 3109 | return m_pc + (2 >> 0); |
| 2568 | 3110 | } |
| 2569 | 3111 | |
| 2570 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1c_00(OPS_16) |
| 3112 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1c_00(OPS_16) // ADD_S b, b, u7 |
| 2571 | 3113 | { |
| 2572 | | arcompact_log("unimplemented ADD_S %04x", op); |
| 2573 | | return m_pc + (2 >> 0);; |
| 3114 | int breg; |
| 3115 | UINT32 u; |
| 3116 | COMMON16_GET_breg; |
| 3117 | COMMON16_GET_u7; |
| 3118 | REG_16BIT_RANGE(breg); |
| 3119 | |
| 3120 | m_regs[breg] = m_regs[breg] + u; |
| 3121 | |
| 3122 | return m_pc + (2 >> 0); |
| 2574 | 3123 | } |
| 2575 | 3124 | |
| 2576 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1c_01(OPS_16) |
| 3125 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1c_01(OPS_16) // CMP b, u7 |
| 2577 | 3126 | { |
| 2578 | | arcompact_log("unimplemented CMP_S %04x", op); |
| 2579 | | return m_pc + (2 >> 0);; |
| 3127 | int breg; |
| 3128 | UINT32 u; |
| 3129 | COMMON16_GET_breg; |
| 3130 | COMMON16_GET_u7; |
| 3131 | REG_16BIT_RANGE(breg); |
| 3132 | |
| 3133 | // flag setting ALWAYS occurs on CMP operations, even 16-bit ones even without a .F opcode type |
| 3134 | |
| 3135 | // TODO: verify this flag setting logic |
| 3136 | |
| 3137 | // unsigned checks |
| 3138 | if (m_regs[breg] == u) |
| 3139 | { |
| 3140 | STATUS32_SET_Z; |
| 3141 | } |
| 3142 | else |
| 3143 | { |
| 3144 | STATUS32_CLEAR_Z; |
| 3145 | } |
| 3146 | |
| 3147 | if (m_regs[breg] < u) |
| 3148 | { |
| 3149 | STATUS32_SET_C; |
| 3150 | } |
| 3151 | else |
| 3152 | { |
| 3153 | STATUS32_CLEAR_C; |
| 3154 | } |
| 3155 | // signed checks |
| 3156 | INT32 temp = (INT32)m_regs[breg] - (INT32)u; |
| 3157 | |
| 3158 | if (temp < 0) |
| 3159 | { |
| 3160 | STATUS32_SET_N; |
| 3161 | } |
| 3162 | else |
| 3163 | { |
| 3164 | STATUS32_CLEAR_N; |
| 3165 | } |
| 3166 | |
| 3167 | // if signs of source values don't match, and sign of result doesn't match the first source value, then we've overflowed? |
| 3168 | if ((m_regs[breg] & 0x80000000) != (u & 0x80000000)) |
| 3169 | { |
| 3170 | if ((m_regs[breg] & 0x80000000) != (temp & 0x80000000)) |
| 3171 | { |
| 3172 | STATUS32_SET_V; |
| 3173 | } |
| 3174 | else |
| 3175 | { |
| 3176 | STATUS32_CLEAR_V; |
| 3177 | } |
| 3178 | } |
| 3179 | |
| 3180 | // only sets flags, no result written |
| 3181 | |
| 3182 | return m_pc + (2 >> 0); |
| 2580 | 3183 | } |
| 2581 | 3184 | |
| 2582 | 3185 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1d_helper(OPS_16, const char* optext) |
| 2583 | 3186 | { |
| 2584 | 3187 | arcompact_log("unimplemented %s %04x", optext, op); |
| 2585 | | return m_pc + (2 >> 0);; |
| 3188 | return m_pc + (2 >> 0); |
| 2586 | 3189 | } |
| 2587 | 3190 | |
| 2588 | 3191 | |
| 2589 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1d_00(OPS_16) { return arcompact_handle1d_helper(PARAMS,"BREQ_S"); } |
| 3192 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1d_00(OPS_16) // BREQ b,0,s8 |
| 3193 | { |
| 3194 | int breg; |
| 3195 | COMMON16_GET_breg; |
| 3196 | REG_16BIT_RANGE(breg); |
| 3197 | |
| 3198 | if (!m_regs[breg]) |
| 3199 | { |
| 3200 | int s = (op & 0x007f) >> 0; op &= ~0x007f; |
| 3201 | if (s & 0x40) s = -0x40 + (s & 0x3f); |
| 3202 | UINT32 realaddress = PC_ALIGNED32 + (s * 2); |
| 3203 | //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link |
| 3204 | return realaddress; |
| 3205 | } |
| 3206 | |
| 3207 | return m_pc + (2 >> 0); |
| 3208 | } |
| 3209 | |
| 3210 | |
| 2590 | 3211 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1d_01(OPS_16) { return arcompact_handle1d_helper(PARAMS,"BRNE_S"); } |
| 2591 | 3212 | |
| 2592 | 3213 | |
| 2593 | 3214 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_0x_helper(OPS_16, const char* optext) |
| 2594 | 3215 | { |
| 2595 | | arcompact_log("unimplemented %s %04x", optext, op); |
| 2596 | | return m_pc + (2 >> 0);; |
| 3216 | arcompact_log("unimplemented %s %04x (1e_0x type)", optext, op); |
| 3217 | return m_pc + (2 >> 0); |
| 2597 | 3218 | } |
| 2598 | 3219 | |
| 2599 | 3220 | |
| 2600 | 3221 | |
| 2601 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_00(OPS_16) { return arcompact_handle1e_0x_helper(PARAMS, "BL_S"); } |
| 3222 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_00(OPS_16) // B_S s10 (branch always) |
| 3223 | { |
| 3224 | int s = (op & 0x01ff) >> 0; op &= ~0x01ff; |
| 3225 | if (s & 0x100) s = -0x100 + (s & 0xff); |
| 3226 | UINT32 realaddress = PC_ALIGNED32 + (s * 2); |
| 3227 | //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link |
| 3228 | return realaddress; |
| 3229 | } |
| 3230 | |
| 2602 | 3231 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_01(OPS_16) { return arcompact_handle1e_0x_helper(PARAMS, "BEQ_S"); } |
| 2603 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_02(OPS_16) { return arcompact_handle1e_0x_helper(PARAMS, "BNE_S"); } |
| 2604 | 3232 | |
| 3233 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_02(OPS_16) // BNE_S s10 (branch if zero bit isn't set) |
| 3234 | { |
| 3235 | if (!STATUS32_CHECK_Z) |
| 3236 | { |
| 3237 | int s = (op & 0x01ff) >> 0; op &= ~0x01ff; |
| 3238 | if (s & 0x100) s = -0x100 + (s & 0xff); |
| 3239 | UINT32 realaddress = PC_ALIGNED32 + (s * 2); |
| 3240 | //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link |
| 3241 | return realaddress; |
| 3242 | } |
| 3243 | |
| 3244 | return m_pc + (2 >> 0); |
| 3245 | } |
| 3246 | |
| 2605 | 3247 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_0x_helper(OPS_16, const char* optext) |
| 2606 | 3248 | { |
| 2607 | 3249 | arcompact_log("unimplemented %s %04x", optext, op); |
| 2608 | | return m_pc + (2 >> 0);; |
| 3250 | return m_pc + (2 >> 0); |
| 2609 | 3251 | } |
| 2610 | 3252 | |
| 2611 | 3253 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_00(OPS_16) { return arcompact_handle1e_03_0x_helper(PARAMS, "BGT_S"); } |
| r242544 | r242545 | |
| 2617 | 3259 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_06(OPS_16) { return arcompact_handle1e_03_0x_helper(PARAMS, "BLO_S"); } |
| 2618 | 3260 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_07(OPS_16) { return arcompact_handle1e_03_0x_helper(PARAMS, "BLS_S"); } |
| 2619 | 3261 | |
| 2620 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1f(OPS_16) |
| 3262 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1f(OPS_16) // BL_S s13 |
| 2621 | 3263 | { |
| 2622 | | arcompact_log("unimplemented BL_S %04x", op); |
| 2623 | | return m_pc + (2 >> 0);; |
| 3264 | int s = (op & 0x07ff) >> 0; op &= ~0x07ff; |
| 3265 | if (s & 0x400) s = -0x400 + (s & 0x3ff); |
| 3266 | |
| 3267 | UINT32 realaddress = PC_ALIGNED32 + (s * 4); |
| 3268 | |
| 3269 | m_regs[REG_BLINK] = m_pc + (2 >> 0); |
| 3270 | return realaddress; |
| 2624 | 3271 | } |
| 2625 | 3272 | |
| 2626 | 3273 | /************************************************************************************************************************************ |
| r242544 | r242545 | |
| 2960 | 3607 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_3e(OPS_32) { arcompact_fatal("<illegal 0x05_3e> (%08x)", op); return m_pc + (4 >> 0);} |
| 2961 | 3608 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_3f(OPS_32) { arcompact_fatal("<illegal 0x05_3f> (%08x)", op); return m_pc + (4 >> 0);} |
| 2962 | 3609 | |
| 2963 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_04(OPS_16) { arcompact_fatal("<illegal 0x0f_00_00> (%08x)", op); return m_pc + (2 >> 0);;} |
| 2964 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_05(OPS_16) { arcompact_fatal("<illegal 0x0f_00_00> (%08x)", op); return m_pc + (2 >> 0);;} |
| 2965 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_02(OPS_16) { arcompact_fatal("<illegal 0x0f_00_07_02> (%08x)", op); return m_pc + (2 >> 0);;} |
| 2966 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_03(OPS_16) { arcompact_fatal("<illegal 0x0f_00_07_03> (%08x)", op); return m_pc + (2 >> 0);;} |
| 2967 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_01(OPS_16) { arcompact_fatal("<illegal 0x0f_01> (%08x)", op); return m_pc + (2 >> 0);;} |
| 2968 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_03(OPS_16) { arcompact_fatal("<illegal 0x0f_03> (%08x)", op); return m_pc + (2 >> 0);;} |
| 2969 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_08(OPS_16) { arcompact_fatal("<illegal 0x0f_08> (%08x)", op); return m_pc + (2 >> 0);;} |
| 2970 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_09(OPS_16) { arcompact_fatal("<illegal 0x0f_09> (%08x)", op); return m_pc + (2 >> 0);;} |
| 2971 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0a(OPS_16) { arcompact_fatal("<illegal 0x0f_0a> (%08x)", op); return m_pc + (2 >> 0);;} |
| 2972 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_17(OPS_16) { arcompact_fatal("<illegal 0x0f_17> (%08x)", op); return m_pc + (2 >> 0);;} |
| 3610 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_04(OPS_16) { arcompact_fatal("<illegal 0x0f_00_00> (%08x)", op); return m_pc + (2 >> 0);} |
| 3611 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_05(OPS_16) { arcompact_fatal("<illegal 0x0f_00_00> (%08x)", op); return m_pc + (2 >> 0);} |
| 3612 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_02(OPS_16) { arcompact_fatal("<illegal 0x0f_00_07_02> (%08x)", op); return m_pc + (2 >> 0);} |
| 3613 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_03(OPS_16) { arcompact_fatal("<illegal 0x0f_00_07_03> (%08x)", op); return m_pc + (2 >> 0);} |
| 3614 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_01(OPS_16) { arcompact_fatal("<illegal 0x0f_01> (%08x)", op); return m_pc + (2 >> 0);} |
| 3615 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_03(OPS_16) { arcompact_fatal("<illegal 0x0f_03> (%08x)", op); return m_pc + (2 >> 0);} |
| 3616 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_08(OPS_16) { arcompact_fatal("<illegal 0x0f_08> (%08x)", op); return m_pc + (2 >> 0);} |
| 3617 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_09(OPS_16) { arcompact_fatal("<illegal 0x0f_09> (%08x)", op); return m_pc + (2 >> 0);} |
| 3618 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0a(OPS_16) { arcompact_fatal("<illegal 0x0f_0a> (%08x)", op); return m_pc + (2 >> 0);} |
| 3619 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_17(OPS_16) { arcompact_fatal("<illegal 0x0f_17> (%08x)", op); return m_pc + (2 >> 0);} |
| 2973 | 3620 | |
| 2974 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_02(OPS_16) { arcompact_fatal("<illegal 0x18_05_02> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2975 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_03(OPS_16) { arcompact_fatal("<illegal 0x18_05_03> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2976 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_04(OPS_16) { arcompact_fatal("<illegal 0x18_05_04> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2977 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_05(OPS_16) { arcompact_fatal("<illegal 0x18_05_05> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2978 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_06(OPS_16) { arcompact_fatal("<illegal 0x18_05_06> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2979 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_07(OPS_16) { arcompact_fatal("<illegal 0x18_05_07> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2980 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_00(OPS_16) { arcompact_fatal("<illegal 0x18_06_00> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2981 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_02(OPS_16) { arcompact_fatal("<illegal 0x18_06_02> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2982 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_03(OPS_16) { arcompact_fatal("<illegal 0x18_06_03> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2983 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_04(OPS_16) { arcompact_fatal("<illegal 0x18_06_04> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2984 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_05(OPS_16) { arcompact_fatal("<illegal 0x18_06_05> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2985 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_06(OPS_16) { arcompact_fatal("<illegal 0x18_06_06> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2986 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_07(OPS_16) { arcompact_fatal("<illegal 0x18_06_07> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2987 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_08(OPS_16) { arcompact_fatal("<illegal 0x18_06_08> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2988 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_09(OPS_16) { arcompact_fatal("<illegal 0x18_06_09> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2989 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0a(OPS_16) { arcompact_fatal("<illegal 0x18_06_0a> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2990 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0b(OPS_16) { arcompact_fatal("<illegal 0x18_06_0b> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2991 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0c(OPS_16) { arcompact_fatal("<illegal 0x18_06_0c> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2992 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0d(OPS_16) { arcompact_fatal("<illegal 0x18_06_0d> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2993 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0e(OPS_16) { arcompact_fatal("<illegal 0x18_06_0e> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2994 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0f(OPS_16) { arcompact_fatal("<illegal 0x18_06_0f> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2995 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_10(OPS_16) { arcompact_fatal("<illegal 0x18_06_10> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2996 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_12(OPS_16) { arcompact_fatal("<illegal 0x18_06_12> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2997 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_13(OPS_16) { arcompact_fatal("<illegal 0x18_06_13> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2998 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_14(OPS_16) { arcompact_fatal("<illegal 0x18_06_14> (%04x)", op); return m_pc + (2 >> 0);;} |
| 2999 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_15(OPS_16) { arcompact_fatal("<illegal 0x18_06_15> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3000 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_16(OPS_16) { arcompact_fatal("<illegal 0x18_06_16> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3001 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_17(OPS_16) { arcompact_fatal("<illegal 0x18_06_17> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3002 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_18(OPS_16) { arcompact_fatal("<illegal 0x18_06_18> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3003 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_19(OPS_16) { arcompact_fatal("<illegal 0x18_06_19> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3004 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1a(OPS_16) { arcompact_fatal("<illegal 0x18_06_1a> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3005 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1b(OPS_16) { arcompact_fatal("<illegal 0x18_06_1b> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3006 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1c(OPS_16) { arcompact_fatal("<illegal 0x18_06_1c> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3007 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1d(OPS_16) { arcompact_fatal("<illegal 0x18_06_1d> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3008 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1e(OPS_16) { arcompact_fatal("<illegal 0x18_06_1e> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3009 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1f(OPS_16) { arcompact_fatal("<illegal 0x18_06_1f> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3010 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_00(OPS_16) { arcompact_fatal("<illegal 0x18_07_00> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3011 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_02(OPS_16) { arcompact_fatal("<illegal 0x18_07_02> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3012 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_03(OPS_16) { arcompact_fatal("<illegal 0x18_07_03> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3013 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_04(OPS_16) { arcompact_fatal("<illegal 0x18_07_04> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3014 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_05(OPS_16) { arcompact_fatal("<illegal 0x18_07_05> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3015 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_06(OPS_16) { arcompact_fatal("<illegal 0x18_07_06> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3016 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_07(OPS_16) { arcompact_fatal("<illegal 0x18_07_07> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3017 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_08(OPS_16) { arcompact_fatal("<illegal 0x18_07_08> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3018 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_09(OPS_16) { arcompact_fatal("<illegal 0x18_07_09> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3019 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0a(OPS_16) { arcompact_fatal("<illegal 0x18_07_0a> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3020 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0b(OPS_16) { arcompact_fatal("<illegal 0x18_07_0b> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3021 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0c(OPS_16) { arcompact_fatal("<illegal 0x18_07_0c> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3022 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0d(OPS_16) { arcompact_fatal("<illegal 0x18_07_0d> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3023 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0e(OPS_16) { arcompact_fatal("<illegal 0x18_07_0e> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3024 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0f(OPS_16) { arcompact_fatal("<illegal 0x18_07_0f> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3025 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_10(OPS_16) { arcompact_fatal("<illegal 0x18_07_10> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3026 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_12(OPS_16) { arcompact_fatal("<illegal 0x18_07_12> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3027 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_13(OPS_16) { arcompact_fatal("<illegal 0x18_07_13> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3028 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_14(OPS_16) { arcompact_fatal("<illegal 0x18_07_14> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3029 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_15(OPS_16) { arcompact_fatal("<illegal 0x18_07_15> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3030 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_16(OPS_16) { arcompact_fatal("<illegal 0x18_07_16> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3031 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_17(OPS_16) { arcompact_fatal("<illegal 0x18_07_17> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3032 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_18(OPS_16) { arcompact_fatal("<illegal 0x18_07_18> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3033 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_19(OPS_16) { arcompact_fatal("<illegal 0x18_07_19> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3034 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1a(OPS_16) { arcompact_fatal("<illegal 0x18_07_1a> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3035 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1b(OPS_16) { arcompact_fatal("<illegal 0x18_07_1b> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3036 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1c(OPS_16) { arcompact_fatal("<illegal 0x18_07_1c> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3037 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1d(OPS_16) { arcompact_fatal("<illegal 0x18_07_1d> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3038 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1e(OPS_16) { arcompact_fatal("<illegal 0x18_07_1e> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3039 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1f(OPS_16) { arcompact_fatal("<illegal 0x18_07_1f> (%04x)", op); return m_pc + (2 >> 0);;} |
| 3621 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_02(OPS_16) { arcompact_fatal("<illegal 0x18_05_02> (%04x)", op); return m_pc + (2 >> 0);} |
| 3622 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_03(OPS_16) { arcompact_fatal("<illegal 0x18_05_03> (%04x)", op); return m_pc + (2 >> 0);} |
| 3623 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_04(OPS_16) { arcompact_fatal("<illegal 0x18_05_04> (%04x)", op); return m_pc + (2 >> 0);} |
| 3624 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_05(OPS_16) { arcompact_fatal("<illegal 0x18_05_05> (%04x)", op); return m_pc + (2 >> 0);} |
| 3625 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_06(OPS_16) { arcompact_fatal("<illegal 0x18_05_06> (%04x)", op); return m_pc + (2 >> 0);} |
| 3626 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05_07(OPS_16) { arcompact_fatal("<illegal 0x18_05_07> (%04x)", op); return m_pc + (2 >> 0);} |
| 3627 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_00(OPS_16) { arcompact_fatal("<illegal 0x18_06_00> (%04x)", op); return m_pc + (2 >> 0);} |
| 3628 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_02(OPS_16) { arcompact_fatal("<illegal 0x18_06_02> (%04x)", op); return m_pc + (2 >> 0);} |
| 3629 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_03(OPS_16) { arcompact_fatal("<illegal 0x18_06_03> (%04x)", op); return m_pc + (2 >> 0);} |
| 3630 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_04(OPS_16) { arcompact_fatal("<illegal 0x18_06_04> (%04x)", op); return m_pc + (2 >> 0);} |
| 3631 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_05(OPS_16) { arcompact_fatal("<illegal 0x18_06_05> (%04x)", op); return m_pc + (2 >> 0);} |
| 3632 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_06(OPS_16) { arcompact_fatal("<illegal 0x18_06_06> (%04x)", op); return m_pc + (2 >> 0);} |
| 3633 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_07(OPS_16) { arcompact_fatal("<illegal 0x18_06_07> (%04x)", op); return m_pc + (2 >> 0);} |
| 3634 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_08(OPS_16) { arcompact_fatal("<illegal 0x18_06_08> (%04x)", op); return m_pc + (2 >> 0);} |
| 3635 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_09(OPS_16) { arcompact_fatal("<illegal 0x18_06_09> (%04x)", op); return m_pc + (2 >> 0);} |
| 3636 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0a(OPS_16) { arcompact_fatal("<illegal 0x18_06_0a> (%04x)", op); return m_pc + (2 >> 0);} |
| 3637 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0b(OPS_16) { arcompact_fatal("<illegal 0x18_06_0b> (%04x)", op); return m_pc + (2 >> 0);} |
| 3638 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0c(OPS_16) { arcompact_fatal("<illegal 0x18_06_0c> (%04x)", op); return m_pc + (2 >> 0);} |
| 3639 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0d(OPS_16) { arcompact_fatal("<illegal 0x18_06_0d> (%04x)", op); return m_pc + (2 >> 0);} |
| 3640 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0e(OPS_16) { arcompact_fatal("<illegal 0x18_06_0e> (%04x)", op); return m_pc + (2 >> 0);} |
| 3641 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_0f(OPS_16) { arcompact_fatal("<illegal 0x18_06_0f> (%04x)", op); return m_pc + (2 >> 0);} |
| 3642 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_10(OPS_16) { arcompact_fatal("<illegal 0x18_06_10> (%04x)", op); return m_pc + (2 >> 0);} |
| 3643 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_12(OPS_16) { arcompact_fatal("<illegal 0x18_06_12> (%04x)", op); return m_pc + (2 >> 0);} |
| 3644 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_13(OPS_16) { arcompact_fatal("<illegal 0x18_06_13> (%04x)", op); return m_pc + (2 >> 0);} |
| 3645 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_14(OPS_16) { arcompact_fatal("<illegal 0x18_06_14> (%04x)", op); return m_pc + (2 >> 0);} |
| 3646 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_15(OPS_16) { arcompact_fatal("<illegal 0x18_06_15> (%04x)", op); return m_pc + (2 >> 0);} |
| 3647 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_16(OPS_16) { arcompact_fatal("<illegal 0x18_06_16> (%04x)", op); return m_pc + (2 >> 0);} |
| 3648 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_17(OPS_16) { arcompact_fatal("<illegal 0x18_06_17> (%04x)", op); return m_pc + (2 >> 0);} |
| 3649 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_18(OPS_16) { arcompact_fatal("<illegal 0x18_06_18> (%04x)", op); return m_pc + (2 >> 0);} |
| 3650 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_19(OPS_16) { arcompact_fatal("<illegal 0x18_06_19> (%04x)", op); return m_pc + (2 >> 0);} |
| 3651 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1a(OPS_16) { arcompact_fatal("<illegal 0x18_06_1a> (%04x)", op); return m_pc + (2 >> 0);} |
| 3652 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1b(OPS_16) { arcompact_fatal("<illegal 0x18_06_1b> (%04x)", op); return m_pc + (2 >> 0);} |
| 3653 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1c(OPS_16) { arcompact_fatal("<illegal 0x18_06_1c> (%04x)", op); return m_pc + (2 >> 0);} |
| 3654 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1d(OPS_16) { arcompact_fatal("<illegal 0x18_06_1d> (%04x)", op); return m_pc + (2 >> 0);} |
| 3655 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1e(OPS_16) { arcompact_fatal("<illegal 0x18_06_1e> (%04x)", op); return m_pc + (2 >> 0);} |
| 3656 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_1f(OPS_16) { arcompact_fatal("<illegal 0x18_06_1f> (%04x)", op); return m_pc + (2 >> 0);} |
| 3657 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_00(OPS_16) { arcompact_fatal("<illegal 0x18_07_00> (%04x)", op); return m_pc + (2 >> 0);} |
| 3658 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_02(OPS_16) { arcompact_fatal("<illegal 0x18_07_02> (%04x)", op); return m_pc + (2 >> 0);} |
| 3659 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_03(OPS_16) { arcompact_fatal("<illegal 0x18_07_03> (%04x)", op); return m_pc + (2 >> 0);} |
| 3660 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_04(OPS_16) { arcompact_fatal("<illegal 0x18_07_04> (%04x)", op); return m_pc + (2 >> 0);} |
| 3661 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_05(OPS_16) { arcompact_fatal("<illegal 0x18_07_05> (%04x)", op); return m_pc + (2 >> 0);} |
| 3662 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_06(OPS_16) { arcompact_fatal("<illegal 0x18_07_06> (%04x)", op); return m_pc + (2 >> 0);} |
| 3663 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_07(OPS_16) { arcompact_fatal("<illegal 0x18_07_07> (%04x)", op); return m_pc + (2 >> 0);} |
| 3664 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_08(OPS_16) { arcompact_fatal("<illegal 0x18_07_08> (%04x)", op); return m_pc + (2 >> 0);} |
| 3665 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_09(OPS_16) { arcompact_fatal("<illegal 0x18_07_09> (%04x)", op); return m_pc + (2 >> 0);} |
| 3666 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0a(OPS_16) { arcompact_fatal("<illegal 0x18_07_0a> (%04x)", op); return m_pc + (2 >> 0);} |
| 3667 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0b(OPS_16) { arcompact_fatal("<illegal 0x18_07_0b> (%04x)", op); return m_pc + (2 >> 0);} |
| 3668 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0c(OPS_16) { arcompact_fatal("<illegal 0x18_07_0c> (%04x)", op); return m_pc + (2 >> 0);} |
| 3669 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0d(OPS_16) { arcompact_fatal("<illegal 0x18_07_0d> (%04x)", op); return m_pc + (2 >> 0);} |
| 3670 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0e(OPS_16) { arcompact_fatal("<illegal 0x18_07_0e> (%04x)", op); return m_pc + (2 >> 0);} |
| 3671 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_0f(OPS_16) { arcompact_fatal("<illegal 0x18_07_0f> (%04x)", op); return m_pc + (2 >> 0);} |
| 3672 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_10(OPS_16) { arcompact_fatal("<illegal 0x18_07_10> (%04x)", op); return m_pc + (2 >> 0);} |
| 3673 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_12(OPS_16) { arcompact_fatal("<illegal 0x18_07_12> (%04x)", op); return m_pc + (2 >> 0);} |
| 3674 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_13(OPS_16) { arcompact_fatal("<illegal 0x18_07_13> (%04x)", op); return m_pc + (2 >> 0);} |
| 3675 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_14(OPS_16) { arcompact_fatal("<illegal 0x18_07_14> (%04x)", op); return m_pc + (2 >> 0);} |
| 3676 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_15(OPS_16) { arcompact_fatal("<illegal 0x18_07_15> (%04x)", op); return m_pc + (2 >> 0);} |
| 3677 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_16(OPS_16) { arcompact_fatal("<illegal 0x18_07_16> (%04x)", op); return m_pc + (2 >> 0);} |
| 3678 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_17(OPS_16) { arcompact_fatal("<illegal 0x18_07_17> (%04x)", op); return m_pc + (2 >> 0);} |
| 3679 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_18(OPS_16) { arcompact_fatal("<illegal 0x18_07_18> (%04x)", op); return m_pc + (2 >> 0);} |
| 3680 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_19(OPS_16) { arcompact_fatal("<illegal 0x18_07_19> (%04x)", op); return m_pc + (2 >> 0);} |
| 3681 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1a(OPS_16) { arcompact_fatal("<illegal 0x18_07_1a> (%04x)", op); return m_pc + (2 >> 0);} |
| 3682 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1b(OPS_16) { arcompact_fatal("<illegal 0x18_07_1b> (%04x)", op); return m_pc + (2 >> 0);} |
| 3683 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1c(OPS_16) { arcompact_fatal("<illegal 0x18_07_1c> (%04x)", op); return m_pc + (2 >> 0);} |
| 3684 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1d(OPS_16) { arcompact_fatal("<illegal 0x18_07_1d> (%04x)", op); return m_pc + (2 >> 0);} |
| 3685 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1e(OPS_16) { arcompact_fatal("<illegal 0x18_07_1e> (%04x)", op); return m_pc + (2 >> 0);} |
| 3686 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1f(OPS_16) { arcompact_fatal("<illegal 0x18_07_1f> (%04x)", op); return m_pc + (2 >> 0);} |
| 3040 | 3687 | |
| 3041 | 3688 | |
| 3042 | 3689 | |
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
| r242544 | r242545 | |
| 209 | 209 | |
| 210 | 210 | if ((breg != LIMM_REG) && (creg != LIMM_REG)) |
| 211 | 211 | { |
| 212 | | print("%s%s %s, %s %08x (%08x)", optext, delaybit[n], regnames[breg], regnames[creg], PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f); |
| 212 | print("%s%s %s, %s to 0x%08x", optext, delaybit[n], regnames[breg], regnames[creg], PC_ALIGNED32 + (address * 2) ); |
| 213 | 213 | } |
| 214 | 214 | else |
| 215 | 215 | { |
| r242544 | r242545 | |
| 219 | 219 | |
| 220 | 220 | if ((breg == LIMM_REG) && (creg != LIMM_REG)) |
| 221 | 221 | { |
| 222 | | print("%s%s (%08x) %s %08x (%08x)", optext, delaybit[n], limm, regnames[creg], PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f); |
| 222 | print("%s%s 0x%08x, %s to 0x%08x", optext, delaybit[n], limm, regnames[creg], PC_ALIGNED32 + (address * 2) ); |
| 223 | 223 | } |
| 224 | 224 | else if ((creg == LIMM_REG) && (breg != LIMM_REG)) |
| 225 | 225 | { |
| 226 | | print("%s%s %s, (%08x) %08x (%08x)", optext, delaybit[n], regnames[breg], limm, PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f); |
| 226 | print("%s%s %s, 0x%08x to 0x%08x", optext, delaybit[n], regnames[breg], limm, PC_ALIGNED32 + (address * 2) ); |
| 227 | 227 | } |
| 228 | 228 | else |
| 229 | 229 | { |
| 230 | 230 | // b and c are LIMM? invalid?? |
| 231 | | print("%s%s (%08x), (%08x) (illegal?) %08x (%08x)", optext, delaybit[n], limm, limm, PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f); |
| 231 | print("%s%s 0x%08x, 0x%08x (illegal?) to 0x%08x", optext, delaybit[n], limm, limm, PC_ALIGNED32 + (address * 2) ); |
| 232 | 232 | |
| 233 | 233 | } |
| 234 | 234 | } |
| r242544 | r242545 | |
| 404 | 404 | // output += sprintf( output, " p(%d)", p); |
| 405 | 405 | |
| 406 | 406 | |
| 407 | | if (!b_reserved) |
| 407 | if ((!b_reserved) && (breg == LIMM_REG)) |
| 408 | 408 | { |
| 409 | | if (breg == LIMM_REG) |
| 410 | | { |
| 411 | | GET_LIMM_32; |
| 412 | | size = 8; |
| 413 | | got_limm = 1; |
| 414 | | output += sprintf(output, " 0x%08x ", limm); |
| 415 | | |
| 416 | | } |
| 417 | | else |
| 418 | | { |
| 419 | | output += sprintf(output, " %s, ", regnames[breg]); |
| 420 | | } |
| 409 | GET_LIMM_32; |
| 410 | size = 8; |
| 411 | got_limm = 1; |
| 421 | 412 | } |
| 422 | | else |
| 423 | | { |
| 424 | | if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]); |
| 425 | | } |
| 426 | 413 | |
| 427 | 414 | if (creg == LIMM_REG) |
| 428 | 415 | { |
| r242544 | r242545 | |
| 431 | 418 | GET_LIMM_32; |
| 432 | 419 | size = 8; |
| 433 | 420 | } |
| 421 | } |
| 434 | 422 | |
| 435 | | output += sprintf(output, " 0x%08x ", limm); |
| 436 | | if (ignore_dst == 0) |
| 437 | | { |
| 438 | | if (areg != LIMM_REG) output += sprintf(output, "DST(%s)", regnames[areg]); |
| 439 | | else output += sprintf(output, "<no dst>"); |
| 440 | | } |
| 423 | // areg can be LIMM too, but in that case LIMM indicates 'no destination' rather than an actual LIMM value following |
| 424 | |
| 425 | if (ignore_dst == 0) |
| 426 | { |
| 427 | if (areg != LIMM_REG) output += sprintf(output, " %s <-", regnames[areg]); |
| 428 | else output += sprintf(output, " <no dst> <-"); |
| 429 | } |
| 430 | else if (ignore_dst == 1) // certain opcode types ignore the 'a' field entirely, it should be set to 0. |
| 431 | { |
| 432 | if (areg) output += sprintf(output, " <reserved %d> <-", areg); |
| 433 | } |
| 434 | else if (ignore_dst == 2) // for multiply operations areg should always be set to LIMM |
| 435 | { |
| 436 | if (areg != LIMM_REG) output += sprintf(output, " <invalid %d> <-", areg); |
| 437 | else output += sprintf(output, " <mulres> <-"); |
| 438 | } |
| 439 | |
| 440 | if (!b_reserved) |
| 441 | { |
| 442 | if (breg == LIMM_REG) |
| 443 | output += sprintf(output, " 0x%08x,", limm); |
| 441 | 444 | else |
| 442 | | { |
| 443 | | if (ignore_dst == 1) { if (areg) output += sprintf(output, "unused(%s)", regnames[areg]); } |
| 444 | | else |
| 445 | | { |
| 446 | | if (areg != LIMM_REG) output += sprintf(output, "invalid(%s)", regnames[areg]); |
| 447 | | else output += sprintf(output, "<mulres>"); |
| 448 | | } // mul operations expect A to be set to LIMM (no output) |
| 449 | | } |
| 445 | output += sprintf(output, " %s,", regnames[breg]); |
| 450 | 446 | } |
| 451 | 447 | else |
| 452 | 448 | { |
| 453 | | output += sprintf(output, "C(%s) ", regnames[creg]); |
| 454 | | if (ignore_dst == 0) |
| 455 | | { |
| 456 | | if (areg != LIMM_REG) output += sprintf(output, "DST(%s)", regnames[areg]); |
| 457 | | else output += sprintf(output, "<no dst>"); |
| 458 | | } |
| 459 | | else |
| 460 | | { |
| 461 | | if (ignore_dst == 1) { if (areg) output += sprintf(output, "unused(%s)", regnames[areg]); } |
| 462 | | else |
| 463 | | { |
| 464 | | if (areg != LIMM_REG) output += sprintf(output, "invalid(%s)", regnames[areg]); |
| 465 | | else output += sprintf(output, "<mulres>"); |
| 466 | | } // mul operations expect A to be set to LIMM (no output) |
| 467 | | } |
| 468 | | |
| 449 | if (breg) output += sprintf(output, "<reserved %d>,", breg); |
| 469 | 450 | } |
| 451 | |
| 452 | if (creg == LIMM_REG) |
| 453 | output += sprintf(output, " 0x%08x", limm); |
| 454 | else |
| 455 | output += sprintf(output, " %s", regnames[creg]); |
| 456 | |
| 470 | 457 | return size; |
| 471 | 458 | } |
| 472 | 459 | |
| r242544 | r242545 | |
| 1385 | 1372 | |
| 1386 | 1373 | |
| 1387 | 1374 | |
| 1388 | | int arcompact_handle0c_helper_dasm(DASM_OPS_16, const char* optext) |
| 1375 | int arcompact_handle0c_helper_dasm(DASM_OPS_16, const char* optext, int format) |
| 1389 | 1376 | { |
| 1390 | 1377 | int areg, breg, creg; |
| 1391 | 1378 | |
| r242544 | r242545 | |
| 1398 | 1385 | REG_16BIT_RANGE(creg); |
| 1399 | 1386 | |
| 1400 | 1387 | |
| 1401 | | print("%s %s <- [%s, %s]", optext, regnames[areg], regnames[breg], regnames[creg]); |
| 1388 | if (format==0) print("%s %s <- [%s, %s]", optext, regnames[areg], regnames[breg], regnames[creg]); |
| 1389 | else print("%s %s <- %s, %s", optext, regnames[areg], regnames[breg], regnames[creg]); |
| 1390 | |
| 1402 | 1391 | return 2; |
| 1403 | 1392 | } |
| 1404 | 1393 | |
| 1405 | 1394 | |
| 1406 | 1395 | int arcompact_handle0c_00_dasm(DASM_OPS_16) |
| 1407 | 1396 | { |
| 1408 | | return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LD_S"); |
| 1397 | return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LD_S", 0); |
| 1409 | 1398 | } |
| 1410 | 1399 | |
| 1411 | 1400 | int arcompact_handle0c_01_dasm(DASM_OPS_16) |
| 1412 | 1401 | { |
| 1413 | | return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LDB_S"); |
| 1402 | return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LDB_S", 0); |
| 1414 | 1403 | } |
| 1415 | 1404 | |
| 1416 | 1405 | int arcompact_handle0c_02_dasm(DASM_OPS_16) |
| 1417 | 1406 | { |
| 1418 | | return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LDW_S"); |
| 1407 | return arcompact_handle0c_helper_dasm(DASM_PARAMS, "LDW_S", 0); |
| 1419 | 1408 | } |
| 1420 | 1409 | |
| 1421 | 1410 | int arcompact_handle0c_03_dasm(DASM_OPS_16) |
| 1422 | 1411 | { |
| 1423 | | return arcompact_handle0c_helper_dasm(DASM_PARAMS, "ADD_S"); |
| 1412 | return arcompact_handle0c_helper_dasm(DASM_PARAMS, "ADD_S", 1); |
| 1424 | 1413 | } |
| 1425 | 1414 | |
| 1426 | 1415 | |
| r242544 | r242545 | |
| 1772 | 1761 | // op bits remaining for 0x18_05_xx subgroups 0x001f |
| 1773 | 1762 | int arcompact_handle18_05_00_dasm(DASM_OPS_16) |
| 1774 | 1763 | { |
| 1775 | | int u = op & 0x001f; |
| 1776 | | op &= ~0x001f; // all bits now used |
| 1764 | int u; |
| 1765 | COMMON16_GET_u5; |
| 1777 | 1766 | |
| 1778 | | print("ADD_S SP, SP, %02x", u*4); |
| 1767 | print("ADD_S SP, SP, 0x%02x", u*4); |
| 1779 | 1768 | return 2; |
| 1780 | 1769 | |
| 1781 | 1770 | } |
| 1782 | 1771 | |
| 1783 | 1772 | int arcompact_handle18_05_01_dasm(DASM_OPS_16) |
| 1784 | 1773 | { |
| 1785 | | int u = op & 0x001f; |
| 1786 | | op &= ~0x001f; // all bits now used |
| 1774 | int u; |
| 1775 | COMMON16_GET_u5; |
| 1787 | 1776 | |
| 1788 | | print("SUB_S SP, SP, %02x", u*4); |
| 1777 | print("SUB_S SP, SP, 0x%02x", u*4); |
| 1789 | 1778 | return 2; |
| 1790 | 1779 | } |
| 1791 | 1780 | |
| r242544 | r242545 | |
| 1887 | 1876 | COMMON16_GET_u8; |
| 1888 | 1877 | REG_16BIT_RANGE(breg); |
| 1889 | 1878 | |
| 1890 | | print("MOV_S %s, %02x", regnames[breg], u); |
| 1879 | print("MOV_S %s <- 0x%02x", regnames[breg], u); |
| 1891 | 1880 | return 2; |
| 1892 | 1881 | } |
| 1893 | 1882 | |
| r242544 | r242545 | |
| 1898 | 1887 | COMMON16_GET_u7; |
| 1899 | 1888 | REG_16BIT_RANGE(breg); |
| 1900 | 1889 | |
| 1901 | | print("ADD_S %s, %02x", regnames[breg], u); |
| 1890 | print("ADD_S %s <- %s, %02x", regnames[breg], regnames[breg], u); |
| 1902 | 1891 | return 2; |
| 1903 | 1892 | } |
| 1904 | 1893 | |
| r242544 | r242545 | |
| 1922 | 1911 | int s = (op & 0x007f) >> 0; op &= ~0x007f; |
| 1923 | 1912 | if (s & 0x40) s = -0x40 + (s & 0x3f); |
| 1924 | 1913 | |
| 1925 | | print("%s %s %08x", optext, regnames[breg], PC_ALIGNED32 + s*2); |
| 1914 | print("%s %s, 0 to 0x%08x", optext, regnames[breg], PC_ALIGNED32 + s*2); |
| 1926 | 1915 | return 2; |
| 1927 | 1916 | } |
| 1928 | 1917 | |
| r242544 | r242545 | |
| 1942 | 1931 | |
| 1943 | 1932 | |
| 1944 | 1933 | |
| 1945 | | int arcompact_handle1e_00_dasm(DASM_OPS_16) { return arcompact_handle1e_0x_helper_dasm(DASM_PARAMS, "BL_S"); } |
| 1934 | int arcompact_handle1e_00_dasm(DASM_OPS_16) { return arcompact_handle1e_0x_helper_dasm(DASM_PARAMS, "B_S"); } |
| 1946 | 1935 | int arcompact_handle1e_01_dasm(DASM_OPS_16) { return arcompact_handle1e_0x_helper_dasm(DASM_PARAMS, "BEQ_S"); } |
| 1947 | 1936 | int arcompact_handle1e_02_dasm(DASM_OPS_16) { return arcompact_handle1e_0x_helper_dasm(DASM_PARAMS, "BNE_S"); } |
| 1948 | 1937 | |
trunk/src/mame/includes/galaxold.h
| r242544 | r242545 | |
| 27 | 27 | public: |
| 28 | 28 | galaxold_state(const machine_config &mconfig, device_type type, const char *tag) |
| 29 | 29 | : driver_device(mconfig, type, tag), |
| 30 | m_maincpu(*this, "maincpu"), |
| 31 | m_audiocpu(*this, "audiocpu"), |
| 32 | m_7474_9m_1(*this, "7474_9m_1"), |
| 33 | m_7474_9m_2(*this, "7474_9m_2"), |
| 34 | m_gfxdecode(*this, "gfxdecode"), |
| 35 | m_screen(*this, "screen"), |
| 36 | m_palette(*this, "palette"), |
| 30 | 37 | m_videoram(*this,"videoram"), |
| 31 | 38 | m_spriteram(*this,"spriteram"), |
| 32 | 39 | m_spriteram2(*this,"spriteram2"), |
| 33 | 40 | m_attributesram(*this,"attributesram"), |
| 34 | 41 | m_bulletsram(*this,"bulletsram"), |
| 35 | 42 | m_rockclim_videoram(*this,"rockclim_vram"), |
| 36 | | m_racknrol_tiles_bank(*this,"racknrol_tbank"), |
| 37 | | m_maincpu(*this, "maincpu"), |
| 38 | | m_audiocpu(*this, "audiocpu"), |
| 39 | | m_7474_9m_1(*this, "7474_9m_1"), |
| 40 | | m_7474_9m_2(*this, "7474_9m_2"), |
| 41 | | m_gfxdecode(*this, "gfxdecode"), |
| 42 | | m_screen(*this, "screen"), |
| 43 | | m_palette(*this, "palette") |
| 43 | m_racknrol_tiles_bank(*this,"racknrol_tbank") |
| 44 | 44 | { |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | /* devices */ |
| 48 | required_device<cpu_device> m_maincpu; |
| 49 | optional_device<cpu_device> m_audiocpu; |
| 50 | optional_device<ttl7474_device> m_7474_9m_1; |
| 51 | optional_device<ttl7474_device> m_7474_9m_2; |
| 52 | required_device<gfxdecode_device> m_gfxdecode; |
| 53 | required_device<screen_device> m_screen; |
| 54 | required_device<palette_device> m_palette; |
| 55 | |
| 56 | /* memory pointers */ |
| 47 | 57 | required_shared_ptr<UINT8> m_videoram; |
| 48 | 58 | required_shared_ptr<UINT8> m_spriteram; |
| 49 | 59 | optional_shared_ptr<UINT8> m_spriteram2; |
| r242544 | r242545 | |
| 64 | 74 | UINT8 m_color_mask; |
| 65 | 75 | tilemap_t *m_dambustr_tilemap2; |
| 66 | 76 | UINT8 *m_dambustr_videoram2; |
| 77 | |
| 67 | 78 | void (galaxold_state::*m_modify_charcode)(UINT16 *code, UINT8 x); /* function to call to do character banking */ |
| 68 | 79 | void (galaxold_state::*m_modify_spritecode)(UINT8 *spriteram, int*, int*, int*, int); /* function to call to do sprite banking */ |
| 69 | 80 | void (galaxold_state::*m_modify_color)(UINT8 *color); /* function to call to do modify how the color codes map to the PROM */ |
| r242544 | r242545 | |
| 132 | 143 | DECLARE_WRITE8_MEMBER(rockclim_videoram_w); |
| 133 | 144 | DECLARE_WRITE8_MEMBER(rockclim_scroll_w); |
| 134 | 145 | DECLARE_WRITE8_MEMBER(guttang_rombank_w); |
| 135 | | |
| 136 | | |
| 137 | | |
| 138 | 146 | DECLARE_READ8_MEMBER(rockclim_videoram_r); |
| 139 | 147 | DECLARE_WRITE8_MEMBER(dambustr_bg_split_line_w); |
| 140 | 148 | DECLARE_WRITE8_MEMBER(dambustr_bg_color_w); |
| 149 | DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_2_q_callback); |
| 150 | DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_1_callback); |
| 151 | |
| 141 | 152 | DECLARE_CUSTOM_INPUT_MEMBER(_4in1_fake_port_r); |
| 142 | 153 | DECLARE_CUSTOM_INPUT_MEMBER(vpool_lives_r); |
| 143 | 154 | DECLARE_CUSTOM_INPUT_MEMBER(ckongg_coinage_r); |
| 144 | 155 | DECLARE_CUSTOM_INPUT_MEMBER(dkongjrm_coinage_r); |
| 156 | |
| 145 | 157 | DECLARE_DRIVER_INIT(bullsdrtg); |
| 146 | 158 | DECLARE_DRIVER_INIT(ladybugg); |
| 147 | 159 | DECLARE_DRIVER_INIT(4in1); |
| 148 | 160 | DECLARE_DRIVER_INIT(guttangt); |
| 149 | 161 | DECLARE_DRIVER_INIT(ckonggx); |
| 162 | |
| 150 | 163 | TILE_GET_INFO_MEMBER(drivfrcg_get_tile_info); |
| 151 | 164 | TILE_GET_INFO_MEMBER(racknrol_get_tile_info); |
| 152 | 165 | TILE_GET_INFO_MEMBER(dambustr_get_tile_info2); |
| 153 | 166 | TILE_GET_INFO_MEMBER(get_tile_info); |
| 154 | 167 | TILE_GET_INFO_MEMBER(rockclim_get_tile_info); |
| 155 | 168 | TILE_GET_INFO_MEMBER(harem_get_tile_info); |
| 169 | |
| 156 | 170 | DECLARE_MACHINE_RESET(galaxold); |
| 171 | DECLARE_MACHINE_RESET(devilfsg); |
| 172 | DECLARE_MACHINE_RESET(hunchbkg); |
| 173 | |
| 174 | DECLARE_PALETTE_INIT(galaxold); |
| 175 | DECLARE_PALETTE_INIT(rockclim); |
| 176 | DECLARE_PALETTE_INIT(scrambold); |
| 177 | DECLARE_PALETTE_INIT(stratgyx); |
| 178 | DECLARE_PALETTE_INIT(darkplnt); |
| 179 | DECLARE_PALETTE_INIT(minefld); |
| 180 | DECLARE_PALETTE_INIT(rescue); |
| 181 | DECLARE_PALETTE_INIT(mariner); |
| 182 | DECLARE_PALETTE_INIT(dambustr); |
| 183 | DECLARE_PALETTE_INIT(turtles); |
| 184 | |
| 157 | 185 | DECLARE_VIDEO_START(galaxold); |
| 158 | | DECLARE_PALETTE_INIT(galaxold); |
| 159 | 186 | DECLARE_VIDEO_START(drivfrcg); |
| 160 | | DECLARE_PALETTE_INIT(rockclim); |
| 161 | 187 | DECLARE_VIDEO_START(racknrol); |
| 162 | 188 | DECLARE_VIDEO_START(batman2); |
| 163 | 189 | DECLARE_VIDEO_START(mooncrst); |
| 164 | 190 | DECLARE_VIDEO_START(scrambold); |
| 165 | | DECLARE_PALETTE_INIT(scrambold); |
| 166 | 191 | DECLARE_VIDEO_START(pisces); |
| 167 | | DECLARE_MACHINE_RESET(devilfsg); |
| 168 | 192 | DECLARE_VIDEO_START(dkongjrm); |
| 169 | 193 | DECLARE_VIDEO_START(rockclim); |
| 170 | 194 | DECLARE_VIDEO_START(galaxold_plain); |
| 171 | 195 | DECLARE_VIDEO_START(ozon1); |
| 172 | 196 | DECLARE_VIDEO_START(bongo); |
| 173 | | DECLARE_MACHINE_RESET(hunchbkg); |
| 174 | 197 | DECLARE_VIDEO_START(ckongs); |
| 175 | | DECLARE_PALETTE_INIT(stratgyx); |
| 176 | | DECLARE_PALETTE_INIT(darkplnt); |
| 177 | | DECLARE_PALETTE_INIT(minefld); |
| 178 | | DECLARE_PALETTE_INIT(rescue); |
| 179 | | DECLARE_PALETTE_INIT(mariner); |
| 180 | | DECLARE_PALETTE_INIT(dambustr); |
| 181 | | DECLARE_PALETTE_INIT(turtles); |
| 182 | 198 | DECLARE_VIDEO_START(darkplnt); |
| 183 | 199 | DECLARE_VIDEO_START(rescue); |
| 184 | 200 | DECLARE_VIDEO_START(minefld); |
| r242544 | r242545 | |
| 189 | 205 | DECLARE_VIDEO_START(ad2083); |
| 190 | 206 | DECLARE_VIDEO_START(dambustr); |
| 191 | 207 | DECLARE_VIDEO_START(harem); |
| 208 | DECLARE_VIDEO_START(bagmanmc); |
| 209 | |
| 192 | 210 | UINT32 screen_update_galaxold(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 193 | 211 | UINT32 screen_update_dambustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 212 | |
| 194 | 213 | INTERRUPT_GEN_MEMBER(hunchbks_vh_interrupt); |
| 195 | 214 | TIMER_CALLBACK_MEMBER(stars_blink_callback); |
| 196 | 215 | TIMER_CALLBACK_MEMBER(stars_scroll_callback); |
| 197 | 216 | TIMER_DEVICE_CALLBACK_MEMBER(galaxold_interrupt_timer); |
| 198 | | DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_2_q_callback); |
| 199 | | DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_1_callback); |
| 200 | | DECLARE_VIDEO_START(bagmanmc); |
| 201 | 217 | IRQ_CALLBACK_MEMBER(hunchbkg_irq_callback); |
| 218 | |
| 202 | 219 | void state_save_register(); |
| 203 | 220 | void video_start_common(); |
| 204 | 221 | void pisces_modify_spritecode(UINT8 *spriteram, int *code, int *flipx, int *flipy, int offs); |
| r242544 | r242545 | |
| 247 | 264 | void bagmanmc_modify_charcode(UINT16 *code, UINT8 x); |
| 248 | 265 | void bagmanmc_modify_spritecode(UINT8 *spriteram, int *code, int *flipx, int *flipy, int offs); |
| 249 | 266 | void machine_reset_common(int line); |
| 250 | | required_device<cpu_device> m_maincpu; |
| 251 | | optional_device<cpu_device> m_audiocpu; |
| 252 | | optional_device<ttl7474_device> m_7474_9m_1; |
| 253 | | optional_device<ttl7474_device> m_7474_9m_2; |
| 254 | | required_device<gfxdecode_device> m_gfxdecode; |
| 255 | | required_device<screen_device> m_screen; |
| 256 | | required_device<palette_device> m_palette; |
| 257 | 267 | }; |
| 258 | 268 | |
| 259 | 269 | #define galaxold_coin_counter_0_w galaxold_coin_counter_w |
trunk/src/mess/drivers/excali64.c
| r242544 | r242545 | |
| 20 | 20 | ToDo: |
| 21 | 21 | - Colours are approximate. |
| 22 | 22 | - Disk controller, works with old wd17xx but crashes on new wd. |
| 23 | | - Hardware supports 8 and 5.25 inch floppies, but we only support 5.25 as this |
| 23 | - Hardware supports 20cm and 13cm floppies, but we only support 13cm as this |
| 24 | 24 | is the only software that exists. |
| 25 | 25 | - The schematic shows the audio counter connected to 2MHz, but this produces |
| 26 | 26 | sounds that are too high. Connected to 1MHz for now. |
| 27 | 27 | - Serial |
| 28 | | - Parallel / Centronics |
| 29 | | - Need more software |
| 30 | 28 | - Pasting can sometimes drop a character. |
| 31 | 29 | |
| 32 | 30 | ****************************************************************************/ |
| r242544 | r242545 | |
| 42 | 40 | //#include "machine/clock.h" |
| 43 | 41 | #include "machine/pit8253.h" |
| 44 | 42 | #include "machine/i8255.h" |
| 45 | | //#include "bus/centronics/ctronics.h" |
| 43 | #include "bus/centronics/ctronics.h" |
| 46 | 44 | #include "imagedev/cassette.h" |
| 47 | 45 | #include "sound/wave.h" |
| 48 | 46 | #include "sound/speaker.h" |
| r242544 | r242545 | |
| 70 | 68 | , m_io_keyboard(*this, "KEY") |
| 71 | 69 | , m_dma(*this, "dma") |
| 72 | 70 | , m_u12(*this, "u12") |
| 71 | , m_centronics(*this, "centronics") |
| 73 | 72 | , m_fdc(*this, "fdc") |
| 74 | 73 | #if NEWFDC |
| 75 | 74 | , m_floppy0(*this, "fdc:0") |
| r242544 | r242545 | |
| 90 | 89 | #if NEWFDC |
| 91 | 90 | DECLARE_FLOPPY_FORMATS(floppy_formats); |
| 92 | 91 | #endif |
| 92 | DECLARE_WRITE_LINE_MEMBER(cent_busy_w); |
| 93 | 93 | DECLARE_WRITE_LINE_MEMBER(busreq_w); |
| 94 | 94 | DECLARE_READ8_MEMBER(memory_read_byte); |
| 95 | 95 | DECLARE_WRITE8_MEMBER(memory_write_byte); |
| r242544 | r242545 | |
| 111 | 111 | bool m_crtc_vs; |
| 112 | 112 | bool m_crtc_hs; |
| 113 | 113 | bool m_motor; |
| 114 | bool m_centronics_busy; |
| 114 | 115 | required_device<cpu_device> m_maincpu; |
| 115 | 116 | required_device<cassette_image_device> m_cass; |
| 116 | 117 | required_device<mc6845_device> m_crtc; |
| 117 | 118 | required_ioport_array<8> m_io_keyboard; |
| 118 | 119 | required_device<z80dma_device> m_dma; |
| 119 | 120 | required_device<ttl74123_device> m_u12; |
| 121 | required_device<centronics_device> m_centronics; |
| 120 | 122 | #if NEWFDC |
| 121 | 123 | required_device<wd2793_t> m_fdc; |
| 122 | 124 | required_device<floppy_connector> m_floppy0; |
| r242544 | r242545 | |
| 239 | 241 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 &") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') |
| 240 | 242 | INPUT_PORTS_END |
| 241 | 243 | |
| 244 | WRITE_LINE_MEMBER( excali64_state::cent_busy_w ) |
| 245 | { |
| 246 | m_centronics_busy = state; |
| 247 | } |
| 248 | |
| 242 | 249 | #if NEWFDC |
| 243 | 250 | FLOPPY_FORMATS_MEMBER( excali64_state::floppy_formats ) |
| 244 | 251 | FLOPPY_EXCALI64_FORMAT |
| r242544 | r242545 | |
| 270 | 277 | { |
| 271 | 278 | m_motor = BIT(data, 0); |
| 272 | 279 | #if NEWFDC |
| 280 | m_floppy1->get_device()->mon_w(!m_motor); |
| 273 | 281 | m_floppy0->get_device()->mon_w(!m_motor); |
| 274 | 282 | #else |
| 275 | | //const char *floppy_tags[4] = { FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3 }; |
| 276 | 283 | legacy_floppy_image_device *flop = subdevice<legacy_floppy_image_device>(FLOPPY_0); |
| 277 | 284 | flop->floppy_mon_w(!m_motor); // motor on |
| 278 | | //flop->floppy_drive_set_ready_state(1, 0); // this is commented out in flopdrv.c, so does nothing |
| 285 | flop = subdevice<legacy_floppy_image_device>(FLOPPY_1); |
| 286 | flop->floppy_mon_w(!m_motor); // motor on |
| 279 | 287 | #endif |
| 280 | 288 | } |
| 281 | 289 | |
| r242544 | r242545 | |
| 288 | 296 | { |
| 289 | 297 | #if NEWFDC |
| 290 | 298 | floppy_image_device *floppy = NULL; |
| 291 | | if (BIT(data, 0)) floppy = m_floppy0->get_device(); |
| 292 | | //if (BIT(data, 1)) floppy = m_floppy1->get_device(); |
| 293 | | m_fdc->set_floppy(floppy); |
| 299 | if (BIT(data, 0)) |
| 300 | floppy = m_floppy0->get_device(); |
| 301 | |
| 302 | if (BIT(data, 1)) |
| 303 | floppy = m_floppy1->get_device(); |
| 304 | |
| 294 | 305 | if (floppy) |
| 306 | { |
| 307 | m_fdc->set_floppy(floppy); |
| 295 | 308 | floppy->ss_w(BIT(data, 4)); |
| 309 | } |
| 296 | 310 | #else |
| 297 | | //UINT8 i; |
| 298 | | //for (i = 0; i < 4; i++) |
| 299 | | //{ |
| 300 | | // if BIT(data, i) |
| 301 | | // { |
| 302 | | // m_fdc->set_drive(i); |
| 303 | | // break; |
| 304 | | // } |
| 305 | | //} |
| 306 | | if BIT(data, 0) m_fdc->set_drive(0); |
| 307 | | //if BIT(data, 1) m_fdc->set_drive(1); |
| 308 | | //if BIT(data, 2) m_fdc->set_drive(2); |
| 309 | | //if BIT(data, 3) m_fdc->set_drive(3); |
| 311 | if BIT(data, 0) |
| 312 | m_fdc->set_drive(0); |
| 313 | |
| 314 | if BIT(data, 1) |
| 315 | m_fdc->set_drive(1); |
| 316 | |
| 310 | 317 | m_fdc->set_side(BIT(data, 4)); |
| 318 | #endif |
| 311 | 319 | |
| 312 | | m_fdc->dden_w(1);//!BIT(data, 6)); // we want double density |
| 313 | | #endif |
| 314 | | m_u12->b_w(space,offset, BIT(data, 5)); |
| 320 | m_u12->b_w(space,offset, BIT(data, 5)); // motor pulse |
| 315 | 321 | } |
| 316 | 322 | |
| 323 | /* |
| 324 | d0 = precomp (selectable by jumper) |
| 325 | d1 = size select (we only support 13cm) |
| 326 | d2 = density select (0 = double) |
| 327 | */ |
| 317 | 328 | WRITE8_MEMBER( excali64_state::portec_w ) |
| 318 | 329 | { |
| 330 | #if NEWFDC |
| 331 | m_fdc->dden_w(BIT(data, 2)); |
| 332 | #else |
| 333 | m_fdc->dden_w(!BIT(data, 2)); |
| 334 | #endif |
| 319 | 335 | } |
| 320 | 336 | |
| 321 | 337 | WRITE_LINE_MEMBER( excali64_state::busreq_w ) |
| 322 | 338 | { |
| 323 | 339 | // since our Z80 has no support for BUSACK, we assume it is granted immediately |
| 324 | 340 | m_maincpu->set_input_line(Z80_INPUT_LINE_BUSRQ, state); |
| 325 | | //m_maincpu->set_input_line(INPUT_LINE_HALT, state); // do we need this? |
| 326 | 341 | m_dma->bai_w(state); // tell dma that bus has been granted |
| 327 | 342 | } |
| 328 | 343 | |
| r242544 | r242545 | |
| 357 | 372 | |
| 358 | 373 | READ8_MEMBER( excali64_state::ppic_r ) |
| 359 | 374 | { |
| 360 | | UINT8 data = 0xf7; |
| 375 | UINT8 data = 0xf4; // READY line must be low to print |
| 376 | data |= (UINT8)m_centronics_busy; |
| 361 | 377 | data |= (m_cass->input() > 0.1) << 3; |
| 362 | 378 | return data; |
| 363 | 379 | } |
| r242544 | r242545 | |
| 365 | 381 | WRITE8_MEMBER( excali64_state::ppic_w ) |
| 366 | 382 | { |
| 367 | 383 | m_cass->output(BIT(data, 7) ? -1.0 : +1.0); |
| 384 | m_centronics->write_strobe(BIT(data, 4)); |
| 368 | 385 | } |
| 369 | 386 | |
| 370 | 387 | READ8_MEMBER( excali64_state::port00_r ) |
| r242544 | r242545 | |
| 521 | 538 | membank("bankr4")->configure_entry(2, &m_p_hiresram[0x0000]); |
| 522 | 539 | membank("bankw4")->configure_entry(2, &m_p_hiresram[0x0000]); |
| 523 | 540 | |
| 524 | | // Set up foreground palettes |
| 541 | // Set up foreground colours |
| 525 | 542 | UINT8 r,g,b,i,code; |
| 526 | 543 | for (i = 0; i < 32; i++) |
| 527 | 544 | { |
| r242544 | r242545 | |
| 599 | 616 | MCFG_DEVICE_ADD("pit", PIT8253, 0) |
| 600 | 617 | MCFG_PIT8253_CLK0(XTAL_16MHz / 16) /* Timer 0: tone gen for speaker */ |
| 601 | 618 | MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("speaker", speaker_sound_device, level_w)) |
| 602 | | MCFG_PIT8253_CLK1(XTAL_16MHz / 8) /* Timer 1: baud rate gen for 8251 */ |
| 619 | //MCFG_PIT8253_CLK1(XTAL_16MHz / 16) /* Timer 1: baud rate gen for 8251 */ |
| 603 | 620 | //MCFG_PIT8253_OUT1_HANDLER(WRITELINE(excali64_state, write_uart_clock)) |
| 604 | | //MCFG_PIT8253_CLK2(XTAL_16MHz / 8) /* Timer 2: not used */ |
| 621 | //MCFG_PIT8253_CLK2(XTAL_16MHz / 16) /* Timer 2: not used */ |
| 605 | 622 | |
| 606 | 623 | MCFG_DEVICE_ADD("ppi", I8255A, 0 ) |
| 607 | | //MCFG_I8255_IN_PORTA_CB(READ8(excali64_state, ppia_r)) |
| 608 | | //MCFG_I8255_OUT_PORTA_CB(WRITE8(excali64_state, ppia_w)) // parallel port |
| 609 | | //MCFG_I8255_IN_PORTB_CB(READ8(excali64_state, ppib_r)) |
| 624 | MCFG_I8255_OUT_PORTA_CB(DEVWRITE8("cent_data_out", output_latch_device, write)) // parallel port |
| 610 | 625 | MCFG_I8255_OUT_PORTB_CB(WRITE8(excali64_state, ppib_w)) |
| 611 | 626 | MCFG_I8255_IN_PORTC_CB(READ8(excali64_state, ppic_r)) |
| 612 | 627 | MCFG_I8255_OUT_PORTC_CB(WRITE8(excali64_state, ppic_w)) |
| 613 | 628 | |
| 614 | | //MCFG_DEVICE_ADD("acia_clock", CLOCK, 153600) |
| 615 | | //MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(excali64_state, write_acia_clock)) |
| 616 | | |
| 617 | 629 | /* sound hardware */ |
| 618 | 630 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 619 | 631 | MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) |
| r242544 | r242545 | |
| 645 | 657 | MCFG_WD_FDC_FORCE_READY |
| 646 | 658 | MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("dma", z80dma_device, rdy_w)) |
| 647 | 659 | MCFG_FLOPPY_DRIVE_ADD("fdc:0", excali64_floppies, "525dd", floppy_image_device::default_floppy_formats)// excali64_state::floppy_formats) |
| 648 | | //MCFG_FLOPPY_DRIVE_ADD("fdc:1", excali64_floppies, "525dd", floppy_image_device::default_floppy_formats) |
| 660 | MCFG_FLOPPY_DRIVE_ADD("fdc:1", excali64_floppies, "525dd", floppy_image_device::default_floppy_formats) |
| 649 | 661 | #else |
| 650 | 662 | MCFG_DEVICE_ADD("fdc", WD2793, 0) |
| 651 | | MCFG_WD17XX_DEFAULT_DRIVE1_TAGS |
| 663 | MCFG_WD17XX_DEFAULT_DRIVE2_TAGS |
| 652 | 664 | MCFG_WD17XX_DRQ_CALLBACK(DEVWRITELINE("dma", z80dma_device, rdy_w)) |
| 653 | | MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, excali64_floppy_interface) |
| 654 | | //MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(excali64_floppy_interface) |
| 665 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(excali64_floppy_interface) |
| 655 | 666 | #endif |
| 656 | 667 | MCFG_DEVICE_ADD("dma", Z80DMA, XTAL_16MHz/4) |
| 657 | 668 | MCFG_Z80DMA_OUT_BUSREQ_CB(WRITELINE(excali64_state, busreq_w)) |
| r242544 | r242545 | |
| 661 | 672 | MCFG_Z80DMA_OUT_IORQ_CB(WRITE8(excali64_state, io_write_byte)) |
| 662 | 673 | |
| 663 | 674 | MCFG_DEVICE_ADD("u12", TTL74123, 0) |
| 664 | | MCFG_TTL74123_CONNECTION_TYPE(TTL74123_GROUNDED) /* the hook up type (no idea what this means */ |
| 675 | MCFG_TTL74123_CONNECTION_TYPE(TTL74123_GROUNDED) /* Hook up type (no idea what this means) */ |
| 665 | 676 | MCFG_TTL74123_RESISTOR_VALUE(RES_K(100)) /* resistor connected between RCext & 5v */ |
| 666 | 677 | MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(100)) /* capacitor connected between Cext and RCext */ |
| 667 | 678 | MCFG_TTL74123_A_PIN_VALUE(0) /* A pin - grounded */ |
| 668 | 679 | MCFG_TTL74123_B_PIN_VALUE(1) /* B pin - driven by port e4 bit 5 */ |
| 669 | 680 | MCFG_TTL74123_CLEAR_PIN_VALUE(1) /* Clear pin - pulled high */ |
| 670 | 681 | MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(excali64_state, motor_w)) |
| 682 | |
| 683 | MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") |
| 684 | MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") |
| 685 | MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(excali64_state, cent_busy_w)) |
| 671 | 686 | MACHINE_CONFIG_END |
| 672 | 687 | |
| 673 | 688 | /* ROM definition */ |
| r242544 | r242545 | |
| 692 | 707 | /* Driver */ |
| 693 | 708 | |
| 694 | 709 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ |
| 695 | | COMP( 1984, excali64, 0, 0, excali64, excali64, driver_device, 0, "BGR Computers", "Excalibur 64", GAME_NOT_WORKING ) |
| 710 | COMP( 1984, excali64, 0, 0, excali64, excali64, driver_device, 0, "BGR Computers", "Excalibur 64", 0 ) |
trunk/src/mess/drivers/tispeak.c
| r242544 | r242545 | |
| 3 | 3 | /*************************************************************************** |
| 4 | 4 | |
| 5 | 5 | Texas Instruments Speak & Spell hardware |
| 6 | |
| 7 | (still need to write notes here..) |
| 6 | 8 | |
| 7 | 9 | ***************************************************************************/ |
| 8 | 10 | |
| r242544 | r242545 | |
| 10 | 12 | #include "cpu/tms0980/tms0980.h" |
| 11 | 13 | #include "sound/tms5110.h" |
| 12 | 14 | #include "machine/tms6100.h" |
| 15 | #include "bus/generic/slot.h" |
| 16 | #include "bus/generic/carts.h" |
| 13 | 17 | |
| 14 | 18 | #include "tispeak.lh" |
| 15 | 19 | |
| 20 | // The master clock is a single stage RC oscillator into TMS5100 RCOSC: |
| 21 | // C is 68pf, R is a 50kohm trimpot wich is set to 33.6kohm. CPUCLK is this/2, ROMCLK is this/4. |
| 22 | // The typical osc freq curve for TMS5100 is unknown. Let's assume it is set to the default frequency, |
| 23 | // which is 640kHz according to the TMS5100 documentation. |
| 16 | 24 | |
| 25 | #define MASTER_CLOCK (640000) |
| 26 | |
| 27 | |
| 17 | 28 | class tispeak_state : public driver_device |
| 18 | 29 | { |
| 19 | 30 | public: |
| r242544 | r242545 | |
| 22 | 33 | m_maincpu(*this, "maincpu"), |
| 23 | 34 | m_tms5100(*this, "tms5100"), |
| 24 | 35 | m_tms6100(*this, "tms6100"), |
| 36 | m_cart(*this, "cartslot"), |
| 25 | 37 | m_filoff_timer(*this, "filoff"), |
| 26 | 38 | m_button_matrix(*this, "IN") |
| 27 | 39 | { } |
| r242544 | r242545 | |
| 29 | 41 | required_device<tms0270_cpu_device> m_maincpu; |
| 30 | 42 | required_device<tms5100_device> m_tms5100; |
| 31 | 43 | required_device<tms6100_device> m_tms6100; |
| 44 | optional_device<generic_slot_device> m_cart; |
| 32 | 45 | required_device<timer_device> m_filoff_timer; |
| 33 | 46 | required_ioport_array<9> m_button_matrix; |
| 34 | 47 | |
| r242544 | r242545 | |
| 50 | 63 | DECLARE_WRITE_LINE_MEMBER(auto_power_off); |
| 51 | 64 | void power_off(); |
| 52 | 65 | |
| 66 | DECLARE_DEVICE_IMAGE_LOAD_MEMBER(tispeak_cartridge); |
| 53 | 67 | virtual void machine_reset(); |
| 54 | 68 | virtual void machine_start(); |
| 55 | 69 | }; |
| r242544 | r242545 | |
| 58 | 72 | |
| 59 | 73 | /*************************************************************************** |
| 60 | 74 | |
| 75 | File Handling |
| 76 | |
| 77 | ***************************************************************************/ |
| 78 | |
| 79 | DEVICE_IMAGE_LOAD_MEMBER(tispeak_state, tispeak_cartridge) |
| 80 | { |
| 81 | UINT32 size = m_cart->common_get_size("rom"); |
| 82 | |
| 83 | // max size is 16KB |
| 84 | if (size > 0x4000) |
| 85 | { |
| 86 | image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid file size"); |
| 87 | return IMAGE_INIT_FAIL; |
| 88 | } |
| 89 | |
| 90 | m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); |
| 91 | m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); |
| 92 | |
| 93 | return IMAGE_INIT_PASS; |
| 94 | } |
| 95 | |
| 96 | |
| 97 | |
| 98 | /*************************************************************************** |
| 99 | |
| 61 | 100 | VFD Display |
| 62 | 101 | |
| 63 | 102 | ***************************************************************************/ |
| r242544 | r242545 | |
| 188 | 227 | { |
| 189 | 228 | int on = (int)(FPTR)param; |
| 190 | 229 | |
| 191 | | if (on) |
| 230 | if (on && !m_power_on) |
| 192 | 231 | { |
| 193 | 232 | m_power_on = 1; |
| 194 | 233 | m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 195 | 234 | } |
| 196 | | else if (m_power_on) |
| 235 | else if (!on && m_power_on) |
| 197 | 236 | power_off(); |
| 198 | 237 | } |
| 199 | 238 | |
| r242544 | r242545 | |
| 345 | 384 | save_item(NAME(m_o)); |
| 346 | 385 | save_item(NAME(m_filament_on)); |
| 347 | 386 | save_item(NAME(m_power_on)); |
| 387 | |
| 388 | // init cartridge |
| 389 | if (m_cart != NULL && m_cart->exists()) |
| 390 | { |
| 391 | astring region_tag; |
| 392 | memory_region *src = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG)); |
| 393 | if (src) |
| 394 | { |
| 395 | UINT8 *dest_ptr = memregion("tms6100")->base() + 0x8000; |
| 396 | memcpy(dest_ptr, src->base(), src->bytes()); |
| 397 | } |
| 398 | } |
| 348 | 399 | } |
| 349 | 400 | |
| 350 | 401 | |
| 351 | | static MACHINE_CONFIG_START( snspell, tispeak_state ) |
| 402 | static MACHINE_CONFIG_START( snmath, tispeak_state ) |
| 352 | 403 | |
| 353 | 404 | /* basic machine hardware */ |
| 354 | | MCFG_CPU_ADD("maincpu", TMS0270, XTAL_640kHz/2) |
| 405 | MCFG_CPU_ADD("maincpu", TMS0270, MASTER_CLOCK/2) |
| 355 | 406 | MCFG_TMS1XXX_READ_K_CB(READ8(tispeak_state, snspell_read_k)) |
| 356 | | MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snspell_write_o)) |
| 407 | MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snmath_write_o)) |
| 357 | 408 | MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tispeak_state, snspell_write_r)) |
| 358 | 409 | MCFG_TMS1XXX_POWER_OFF_CB(WRITELINE(tispeak_state, auto_power_off)) |
| 359 | 410 | |
| r242544 | r242545 | |
| 367 | 418 | /* no video! */ |
| 368 | 419 | |
| 369 | 420 | /* sound hardware */ |
| 370 | | MCFG_DEVICE_ADD("tms6100", TMS6100, 0) |
| 421 | MCFG_DEVICE_ADD("tms6100", TMS6100, MASTER_CLOCK/4) |
| 371 | 422 | |
| 372 | 423 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 373 | | MCFG_SOUND_ADD("tms5100", TMS5100, XTAL_640kHz) |
| 424 | MCFG_SOUND_ADD("tms5100", TMS5100, MASTER_CLOCK) |
| 374 | 425 | MCFG_TMS5110_M0_CB(DEVWRITELINE("tms6100", tms6100_device, tms6100_m0_w)) |
| 375 | 426 | MCFG_TMS5110_M1_CB(DEVWRITELINE("tms6100", tms6100_device, tms6100_m1_w)) |
| 376 | 427 | MCFG_TMS5110_ADDR_CB(DEVWRITE8("tms6100", tms6100_device, tms6100_addr_w)) |
| r242544 | r242545 | |
| 379 | 430 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 380 | 431 | MACHINE_CONFIG_END |
| 381 | 432 | |
| 382 | | static MACHINE_CONFIG_DERIVED( snmath, snspell ) |
| 433 | static MACHINE_CONFIG_DERIVED( snspell, snmath ) |
| 383 | 434 | |
| 384 | 435 | /* basic machine hardware */ |
| 385 | 436 | MCFG_CPU_MODIFY("maincpu") |
| 386 | | MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snmath_write_o)) |
| 437 | MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snspell_write_o)) |
| 438 | |
| 439 | /* cartridge */ |
| 440 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "snspell") |
| 441 | MCFG_GENERIC_EXTENSIONS("vsm") |
| 442 | MCFG_GENERIC_LOAD(tispeak_state, tispeak_cartridge) |
| 443 | |
| 444 | MCFG_SOFTWARE_LIST_ADD("cart_list", "snspell") |
| 387 | 445 | MACHINE_CONFIG_END |
| 388 | 446 | |
| 389 | 447 | |
| r242544 | r242545 | |
| 396 | 454 | |
| 397 | 455 | ROM_START( snspell ) |
| 398 | 456 | ROM_REGION( 0x1000, "maincpu", 0 ) |
| 457 | ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have |
| 458 | |
| 459 | ROM_REGION( 1246, "maincpu:ipla", 0 ) |
| 460 | ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) |
| 461 | ROM_REGION( 2127, "maincpu:mpla", 0 ) |
| 462 | ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as tmc0271 |
| 463 | ROM_REGION( 1246, "maincpu:opla", 0 ) |
| 464 | ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) |
| 465 | |
| 466 | ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge |
| 467 | ROM_LOAD( "tmc0351.vsm", 0x0000, 0x4000, CRC(beea3373) SHA1(8b0f7586d2f12c3d4a885fdb528cf23feffa1a3b) ) // cd2300 |
| 468 | ROM_LOAD( "tmc0352.vsm", 0x4000, 0x4000, CRC(d51f0587) SHA1(ddaa484be1bba5fef46b481cafae517e4acaa8ed) ) // cd2301 |
| 469 | ROM_END |
| 470 | |
| 471 | ROM_START( snspella ) |
| 472 | ROM_REGION( 0x1000, "maincpu", 0 ) |
| 473 | ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have |
| 474 | |
| 475 | ROM_REGION( 1246, "maincpu:ipla", 0 ) |
| 476 | ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) |
| 477 | ROM_REGION( 2127, "maincpu:mpla", 0 ) |
| 478 | ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have |
| 479 | ROM_REGION( 1246, "maincpu:opla", 0 ) |
| 480 | ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) |
| 481 | |
| 482 | ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge |
| 483 | ROM_LOAD( "cd2350a.vsm", 0x0000, 0x4000, CRC(2adda742) SHA1(3f868ed8284b723c815a30343057e03467c043b5) ) |
| 484 | ROM_END |
| 485 | |
| 486 | ROM_START( snspellp ) |
| 487 | ROM_REGION( 0x1000, "maincpu", 0 ) |
| 399 | 488 | ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // typed in from patent 4189779, may have errors |
| 400 | 489 | |
| 401 | 490 | ROM_REGION( 1246, "maincpu:ipla", 0 ) |
| r242544 | r242545 | |
| 405 | 494 | ROM_REGION( 1246, "maincpu:opla", 0 ) |
| 406 | 495 | ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) |
| 407 | 496 | |
| 408 | | ROM_REGION( 0x8000, "tms6100", 0 ) |
| 497 | ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge |
| 409 | 498 | ROM_LOAD( "tmc0351.vsm", 0x0000, 0x4000, CRC(beea3373) SHA1(8b0f7586d2f12c3d4a885fdb528cf23feffa1a3b) ) |
| 410 | 499 | ROM_LOAD( "tmc0352.vsm", 0x4000, 0x4000, CRC(d51f0587) SHA1(ddaa484be1bba5fef46b481cafae517e4acaa8ed) ) |
| 411 | 500 | ROM_END |
| 412 | 501 | |
| 502 | ROM_START( snspelluk ) |
| 503 | ROM_REGION( 0x1000, "maincpu", 0 ) |
| 504 | ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have |
| 505 | |
| 506 | ROM_REGION( 1246, "maincpu:ipla", 0 ) |
| 507 | ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) |
| 508 | ROM_REGION( 2127, "maincpu:mpla", 0 ) |
| 509 | ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as tmc0271 |
| 510 | ROM_REGION( 1246, "maincpu:opla", 0 ) |
| 511 | ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) |
| 512 | |
| 513 | ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge |
| 514 | ROM_LOAD( "cd2303.vsm", 0x0000, 0x4000, CRC(0fae755c) SHA1(b68c3120a63a61db474feb5d71a6e5dd67910d80) ) |
| 515 | ROM_LOAD( "cd2304.vsm", 0x4000, 0x4000, CRC(e2a270eb) SHA1(c13c95ad15f1923a4841f66504e0f22646e71d99) ) |
| 516 | ROM_END |
| 517 | |
| 518 | ROM_START( snspelluka ) |
| 519 | ROM_REGION( 0x1000, "maincpu", 0 ) |
| 520 | ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have |
| 521 | |
| 522 | ROM_REGION( 1246, "maincpu:ipla", 0 ) |
| 523 | ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) |
| 524 | ROM_REGION( 2127, "maincpu:mpla", 0 ) |
| 525 | ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have |
| 526 | ROM_REGION( 1246, "maincpu:opla", 0 ) |
| 527 | ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) |
| 528 | |
| 529 | ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge |
| 530 | ROM_LOAD( "cd62175.vsm", 0x0000, 0x4000, CRC(6e1063d4) SHA1(b5c66c51148c5921ecb8ffccd7a460ae639cdb68) ) |
| 531 | ROM_END |
| 532 | |
| 533 | ROM_START( ladictee ) |
| 534 | ROM_REGION( 0x1000, "maincpu", 0 ) |
| 535 | ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have |
| 536 | |
| 537 | ROM_REGION( 1246, "maincpu:ipla", 0 ) |
| 538 | ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) |
| 539 | ROM_REGION( 2127, "maincpu:mpla", 0 ) |
| 540 | ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have |
| 541 | ROM_REGION( 1246, "maincpu:opla", 0 ) |
| 542 | ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, BAD_DUMP CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) // placeholder, use the one we have |
| 543 | |
| 544 | ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge |
| 545 | ROM_LOAD( "cd2352.vsm", 0x0000, 0x4000, CRC(181a239e) SHA1(e16043766c385e152b7005c1c010be4c5fccdd9b) ) |
| 546 | ROM_END |
| 547 | |
| 548 | |
| 549 | |
| 413 | 550 | ROM_START( snmath ) |
| 414 | 551 | ROM_REGION( 0x1000, "maincpu", 0 ) |
| 415 | | ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) ) // typed in from patent 4946391, verified with source code (mark BAD_DUMP just to be unsure) |
| 552 | ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) ) // placeholder, use the one we have |
| 416 | 553 | |
| 417 | 554 | ROM_REGION( 1246, "maincpu:ipla", 0 ) |
| 418 | 555 | ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) |
| 419 | 556 | ROM_REGION( 2127, "maincpu:mpla", 0 ) |
| 557 | ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have |
| 558 | ROM_REGION( 1246, "maincpu:opla", 0 ) |
| 559 | ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // placeholder, use the one we have |
| 560 | |
| 561 | ROM_REGION( 0x8000, "tms6100", 0 ) |
| 562 | ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) ) |
| 563 | ROM_LOAD( "cd2393.vsm", 0x4000, 0x4000, CRC(571d5b5a) SHA1(83284755d9b77267d320b5b87fdc39f352433715) ) |
| 564 | ROM_END |
| 565 | |
| 566 | ROM_START( snmatha ) |
| 567 | ROM_REGION( 0x1000, "maincpu", 0 ) |
| 568 | ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) ) // placeholder, use the one we have |
| 569 | |
| 570 | ROM_REGION( 1246, "maincpu:ipla", 0 ) |
| 571 | ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) |
| 572 | ROM_REGION( 2127, "maincpu:mpla", 0 ) |
| 573 | ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have |
| 574 | ROM_REGION( 1246, "maincpu:opla", 0 ) |
| 575 | ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // placeholder, use the one we have |
| 576 | |
| 577 | ROM_REGION( 0x8000, "tms6100", 0 ) |
| 578 | ROM_LOAD( "cd2381.vsm", 0x0000, 0x4000, CRC(f048dc81) SHA1(e97667d1002de40ab3d702c63b82311480032e0f) ) |
| 579 | ROM_LOAD( "cd2614.vsm", 0x4000, 0x1000, CRC(11989074) SHA1(0e9cf906de9bcdf4acb425535dc442846fc48fa2) ) |
| 580 | ROM_RELOAD( 0x5000, 0x1000 ) |
| 581 | ROM_RELOAD( 0x6000, 0x1000 ) |
| 582 | ROM_RELOAD( 0x7000, 0x1000 ) |
| 583 | ROM_END |
| 584 | |
| 585 | ROM_START( snmathp ) |
| 586 | ROM_REGION( 0x1000, "maincpu", 0 ) |
| 587 | // typed in from patent 4946391, verified with source code (mark BAD_DUMP just to be unsure) |
| 588 | // BTANB note: Mix It does not work at all, this is an original bug in the prototype. There are probably other minor bugs too. |
| 589 | ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) ) |
| 590 | |
| 591 | ROM_REGION( 1246, "maincpu:ipla", 0 ) |
| 592 | ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) |
| 593 | ROM_REGION( 2127, "maincpu:mpla", 0 ) |
| 420 | 594 | ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as cd2704 |
| 421 | 595 | ROM_REGION( 1246, "maincpu:opla", 0 ) |
| 422 | 596 | ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // " |
| r242544 | r242545 | |
| 427 | 601 | ROM_END |
| 428 | 602 | |
| 429 | 603 | |
| 430 | | COMP( 1978, snspell, 0, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US, prototype)", GAME_NOT_WORKING ) |
| 431 | | COMP( 1980, snmath, 0, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, prototype)", GAME_NOT_WORKING ) |
| 604 | |
| 605 | COMP( 1978, snspell, 0, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) |
| 606 | COMP( 1980, snspella, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) |
| 607 | COMP( 1978, snspellp, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US prototype)", GAME_IMPERFECT_SOUND ) |
| 608 | COMP( 1978, snspelluk, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (UK set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) |
| 609 | COMP( 1981, snspelluka, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (UK set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // different voice actor |
| 610 | COMP( 1980, ladictee, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "La Dictee Magnifique (France)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // doesn't work, custom MCU ROM? |
| 611 | |
| 612 | COMP( 1980, snmath, 0, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) |
| 613 | COMP( 1986, snmatha, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) |
| 614 | COMP( 1980, snmathp, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US prototype)", GAME_IMPERFECT_SOUND ) |