src/mess/machine/mac.c
| r6330 | r6331 | |
| 1428 | 1428 | |
| 1429 | 1429 | // ADB mouse state |
| 1430 | 1430 | static int adb_mouseaddr = 3; |
| 1431 | | static int adb_lastmousex, adb_lastmousey, adb_lastbutton, adb_mouse_wanted_srq, adb_mouse_initialized; |
| 1431 | static int adb_lastmousex, adb_lastmousey, adb_lastbutton, adb_mouse_initialized; |
| 1432 | 1432 | |
| 1433 | 1433 | // ADB keyboard state |
| 1434 | 1434 | static int adb_keybaddr = 2; |
| 1435 | | static int adb_keybinitialized, adb_keyb_wanted_srq; |
| 1435 | static int adb_keybinitialized, adb_currentkeys[2], adb_modifiers; |
| 1436 | 1436 | |
| 1437 | 1437 | #if LOG_ADB |
| 1438 | 1438 | static const char *const adb_statenames[4] = { "NEW", "EVEN", "ODD", "IDLE" }; |
| 1439 | 1439 | #endif |
| 1440 | 1440 | |
| 1441 | static int mac_adb_pollkbd(running_machine *machine, int update) |
| 1442 | { |
| 1443 | int i, j, keybuf, report, codes[2], result; |
| 1444 | static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5" }; |
| 1445 | |
| 1446 | codes[0] = codes[1] = 0x80; // key up |
| 1447 | report = result = 0; |
| 1448 | |
| 1449 | for (i = 0; i < 6; i++) |
| 1450 | { |
| 1451 | keybuf = input_port_read(machine, keynames[i]); |
| 1452 | |
| 1453 | // any changes in this row? |
| 1454 | if ((keybuf != key_matrix[i]) && (report < 2)) |
| 1455 | { |
| 1456 | // check each column bit |
| 1457 | for (j=0; j<16; j++) |
| 1458 | { |
| 1459 | if (((keybuf ^ key_matrix[i]) >> j) & 1) |
| 1460 | { |
| 1461 | // update key_matrix |
| 1462 | if (update) |
| 1463 | { |
| 1464 | key_matrix[i] = (key_matrix[i] & ~ (1 << j)) | (keybuf & (1 << j)); |
| 1465 | } |
| 1466 | |
| 1467 | codes[report] = (i<<4)|j; |
| 1468 | |
| 1469 | // key up? |
| 1470 | if (!(keybuf & (1 << j))) |
| 1471 | { |
| 1472 | codes[report] |= 0x80; |
| 1473 | } |
| 1474 | |
| 1475 | // update modifier state |
| 1476 | if (update) |
| 1477 | { |
| 1478 | if (((i<<4)|j) == 0x39) |
| 1479 | { |
| 1480 | if (codes[report] & 0x80) |
| 1481 | { |
| 1482 | adb_modifiers &= ~0x20; |
| 1483 | } |
| 1484 | else |
| 1485 | { |
| 1486 | adb_modifiers |= 0x20; |
| 1487 | } |
| 1488 | } |
| 1489 | if (((i<<4)|j) == 0x36) |
| 1490 | { |
| 1491 | if (codes[report] & 0x80) |
| 1492 | { |
| 1493 | adb_modifiers &= ~0x8; |
| 1494 | } |
| 1495 | else |
| 1496 | { |
| 1497 | adb_modifiers |= 0x08; |
| 1498 | } |
| 1499 | } |
| 1500 | if (((i<<4)|j) == 0x38) |
| 1501 | { |
| 1502 | if (codes[report] & 0x80) |
| 1503 | { |
| 1504 | adb_modifiers &= ~0x4; |
| 1505 | } |
| 1506 | else |
| 1507 | { |
| 1508 | adb_modifiers |= 0x04; |
| 1509 | } |
| 1510 | } |
| 1511 | if (((i<<4)|j) == 0x3a) |
| 1512 | { |
| 1513 | if (codes[report] & 0x80) |
| 1514 | { |
| 1515 | adb_modifiers &= ~0x2; |
| 1516 | } |
| 1517 | else |
| 1518 | { |
| 1519 | adb_modifiers |= 0x02; |
| 1520 | } |
| 1521 | } |
| 1522 | if (((i<<4)|j) == 0x37) |
| 1523 | { |
| 1524 | if (codes[report] & 0x80) |
| 1525 | { |
| 1526 | adb_modifiers &= ~0x1; |
| 1527 | } |
| 1528 | else |
| 1529 | { |
| 1530 | adb_modifiers |= 0x01; |
| 1531 | } |
| 1532 | } |
| 1533 | } |
| 1534 | |
| 1535 | // we run out of keys we can track? |
| 1536 | report++; |
| 1537 | if (report == 2) |
| 1538 | { |
| 1539 | break; |
| 1540 | } |
| 1541 | } |
| 1542 | } |
| 1543 | |
| 1544 | // we run out of keys we can track? |
| 1545 | if (report == 2) |
| 1546 | { |
| 1547 | break; |
| 1548 | } |
| 1549 | } |
| 1550 | } |
| 1551 | |
| 1552 | // figure out if there was a change |
| 1553 | if ((adb_currentkeys[0] != codes[0]) || (adb_currentkeys[1] != codes[1])) |
| 1554 | { |
| 1555 | result = 1; |
| 1556 | |
| 1557 | // if we want to update the current read, do so |
| 1558 | if (update) |
| 1559 | { |
| 1560 | adb_currentkeys[0] = codes[0]; |
| 1561 | adb_currentkeys[1] = codes[1]; |
| 1562 | } |
| 1563 | } |
| 1564 | |
| 1565 | return result; |
| 1566 | } |
| 1567 | |
| 1441 | 1568 | static int mac_adb_pollmouse(running_machine *machine) |
| 1442 | 1569 | { |
| 1443 | 1570 | int NewX, NewY, NewButton; |
| r6330 | r6331 | |
| 1499 | 1626 | |
| 1500 | 1627 | adb_lastbutton = input_port_read(machine, "MOUSE0") & 0x01; |
| 1501 | 1628 | |
| 1502 | | adb_mouse_wanted_srq = 0; |
| 1503 | | |
| 1504 | 1629 | *MouseX = (UINT8)MouseCountX; |
| 1505 | 1630 | *MouseY = (UINT8)MouseCountY; |
| 1506 | 1631 | } |
| r6330 | r6331 | |
| 1606 | 1731 | { |
| 1607 | 1732 | // read keyboard |
| 1608 | 1733 | case 0: |
| 1609 | | adb_buffer[0] = adb_buffer[1] = 0x80; // nothing pressed |
| 1734 | mac_adb_pollkbd(machine, 1); |
| 1735 | // printf("keyboard = %02x %02x\n", adb_currentkeys[0], adb_currentkeys[1]); |
| 1736 | adb_buffer[0] = adb_currentkeys[0]; |
| 1737 | adb_buffer[1] = adb_currentkeys[1]; |
| 1610 | 1738 | adb_datasize = 2; |
| 1611 | 1739 | break; |
| 1612 | 1740 | |
| 1613 | 1741 | // read modifier keys |
| 1614 | 1742 | case 2: |
| 1615 | | adb_buffer[0] = 0xff; // nothing pressed |
| 1743 | mac_adb_pollkbd(machine, 1); |
| 1744 | adb_buffer[0] = adb_modifiers; // nothing pressed |
| 1616 | 1745 | adb_buffer[1] = 0; |
| 1617 | 1746 | adb_datasize = 2; |
| 1618 | 1747 | break; |
| r6330 | r6331 | |
| 1803 | 1932 | |
| 1804 | 1933 | static void adb_vblank(running_machine *machine) |
| 1805 | 1934 | { |
| 1806 | | // if any device has a service request, show it on the VIA |
| 1807 | | // (no need to actually generate an IRQ, the Mac will see it) |
| 1808 | | if ((adb_mouse_wanted_srq) || (adb_keyb_wanted_srq)) |
| 1935 | if (adb_state == ADB_STATE_IDLE) |
| 1809 | 1936 | { |
| 1810 | | // printf("ADB IRQ: kb %d ms %d (last talk %d)\n", adb_keyb_wanted_srq, adb_mouse_wanted_srq, adb_last_talk); |
| 1811 | | adb_irq_pending = 1; |
| 1812 | | } |
| 1813 | | else |
| 1814 | | { |
| 1815 | | if ((adb_state == ADB_STATE_IDLE) && (mac_adb_pollmouse(machine))) |
| 1937 | if (mac_adb_pollmouse(machine)) |
| 1816 | 1938 | { |
| 1817 | 1939 | // if the mouse was the last TALK, we can just send the new data |
| 1818 | 1940 | // otherwise we need to pull SRQ |
| r6330 | r6331 | |
| 1824 | 1946 | |
| 1825 | 1947 | adb_timer_ticks = 8; |
| 1826 | 1948 | timer_adjust_oneshot(mac_adb_timer, attotime_make(0, ATTOSECONDS_IN_USEC(100)), 0); |
| 1827 | | adb_mouse_wanted_srq = 0; |
| 1828 | 1949 | } |
| 1829 | 1950 | else |
| 1830 | 1951 | { |
| 1831 | | // printf("IDLE, mouse moved, mouse not last TALK, pulling SRQ\n"); |
| 1832 | 1952 | adb_irq_pending = 1; |
| 1833 | 1953 | adb_command = adb_send = 0; |
| 1834 | 1954 | adb_timer_ticks = 1; // one tick should be sufficient to make it see the IRQ |
| 1835 | 1955 | timer_adjust_oneshot(mac_adb_timer, attotime_make(0, ATTOSECONDS_IN_USEC(100)), 0); |
| 1836 | 1956 | } |
| 1837 | 1957 | } |
| 1958 | else if (mac_adb_pollkbd(machine, 0)) |
| 1959 | { |
| 1960 | if (adb_last_talk == adb_keybaddr) |
| 1961 | { |
| 1962 | // repeat last TALK to get updated data |
| 1963 | adb_waiting_cmd = 1; |
| 1964 | mac_adb_talk(machine); |
| 1965 | |
| 1966 | adb_timer_ticks = 8; |
| 1967 | timer_adjust_oneshot(mac_adb_timer, attotime_make(0, ATTOSECONDS_IN_USEC(100)), 0); |
| 1968 | } |
| 1969 | else |
| 1970 | { |
| 1971 | adb_irq_pending = 1; |
| 1972 | adb_command = adb_send = 0; |
| 1973 | adb_timer_ticks = 1; // one tick should be sufficient to make it see the IRQ |
| 1974 | timer_adjust_oneshot(mac_adb_timer, attotime_make(0, ATTOSECONDS_IN_USEC(100)), 0); |
| 1975 | } |
| 1976 | } |
| 1838 | 1977 | } |
| 1839 | 1978 | } |
| 1840 | 1979 | |
| 1841 | 1980 | static void adb_reset(void) |
| 1842 | 1981 | { |
| 1982 | int i; |
| 1983 | |
| 1843 | 1984 | adb_irq_pending = 0; // no interrupt |
| 1844 | 1985 | adb_timer_ticks = 0; |
| 1845 | 1986 | adb_command = 0; |
| r6330 | r6331 | |
| 1854 | 1995 | // mouse |
| 1855 | 1996 | adb_mouseaddr = 3; |
| 1856 | 1997 | adb_lastmousex = adb_lastmousey = adb_lastbutton = 0; |
| 1857 | | adb_mouse_wanted_srq = 0; |
| 1858 | 1998 | adb_mouse_initialized = 0; |
| 1859 | 1999 | |
| 1860 | 2000 | // keyboard |
| 1861 | 2001 | adb_keybaddr = 2; |
| 1862 | | adb_keyb_wanted_srq = 0; |
| 1863 | 2002 | adb_keybinitialized = 0; |
| 2003 | adb_currentkeys[0] = adb_currentkeys[1] = 0x80; |
| 2004 | adb_modifiers = 0; |
| 2005 | for (i=0; i<7; i++) |
| 2006 | { |
| 2007 | key_matrix[i] = 0; |
| 2008 | } |
| 1864 | 2009 | } |
| 1865 | 2010 | |
| 1866 | 2011 | /* ************************************************************************* |
src/mess/drivers/mac.c
| r6330 | r6331 | |
| 939 | 939 | PORT_BIT(0xC000, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 940 | 940 | INPUT_PORTS_END |
| 941 | 941 | |
| 942 | static INPUT_PORTS_START( macadb ) |
| 943 | PORT_START("MOUSE0") /* Mouse - button */ |
| 944 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Mouse Button") PORT_CODE(MOUSECODE_BUTTON1) |
| 942 | 945 | |
| 946 | PORT_START("MOUSE1") /* Mouse - X AXIS */ |
| 947 | PORT_BIT( 0xff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) |
| 943 | 948 | |
| 949 | PORT_START("MOUSE2") /* Mouse - Y AXIS */ |
| 950 | PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) |
| 951 | |
| 952 | /* R Nabet 000531 : pseudo-input ports with keyboard layout */ |
| 953 | /* we only define US layout for keyboard - international layout is different! */ |
| 954 | /* note : 16 bits at most per port! */ |
| 955 | |
| 956 | /* main keyboard pad */ |
| 957 | |
| 958 | PORT_START("KEY0") |
| 959 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 960 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') |
| 961 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
| 962 | PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') |
| 963 | PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| 964 | PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
| 965 | PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| 966 | PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') |
| 967 | PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') |
| 968 | PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') |
| 969 | PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_UNUSED) /* extra key on ISO : */ |
| 970 | PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| 971 | PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 972 | PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 973 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 974 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') |
| 975 | |
| 976 | PORT_START("KEY1") |
| 977 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 978 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') |
| 979 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 980 | PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') |
| 981 | PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 982 | PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 983 | PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') |
| 984 | PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| 985 | PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') |
| 986 | PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') |
| 987 | PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') |
| 988 | PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') |
| 989 | PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') |
| 990 | PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') |
| 991 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') |
| 992 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| 993 | |
| 994 | PORT_START("KEY2") |
| 995 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') |
| 996 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') |
| 997 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| 998 | PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 999 | PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR('\r') |
| 1000 | PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 1001 | PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 1002 | PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') |
| 1003 | PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
| 1004 | PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') |
| 1005 | PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') |
| 1006 | PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 1007 | PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 1008 | PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') |
| 1009 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 1010 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 1011 | |
| 1012 | PORT_START("KEY3") |
| 1013 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') |
| 1014 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 1015 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CHAR('~') |
| 1016 | PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 1017 | PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_UNUSED) /* keyboard Enter : */ |
| 1018 | PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) |
| 1019 | PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL) |
| 1020 | PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Command / Open Apple") PORT_CODE(KEYCODE_LALT) |
| 1021 | PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 1022 | PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE |
| 1023 | PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Option / Solid Apple") PORT_CODE(KEYCODE_RALT) |
| 1024 | PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right Arrow") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 1025 | PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left Arrow") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 1026 | PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Down Arrow") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 1027 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Up Arrow") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 1028 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_UNUSED) /* ??? */ |
| 1029 | |
| 1030 | /* keypad */ |
| 1031 | PORT_START("KEY4") |
| 1032 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_UNUSED) // 0x40 |
| 1033 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) // 0x41 |
| 1034 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_UNUSED) // 0x42 |
| 1035 | PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) // 0x43 |
| 1036 | PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_UNUSED) // 0x44 |
| 1037 | PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) // 0x45 |
| 1038 | PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_UNUSED) // 0x46 |
| 1039 | PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Keypad Clear") PORT_CODE(/*KEYCODE_NUMLOCK*/KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL)) // 0x47 |
| 1040 | PORT_BIT(0x0700, IP_ACTIVE_HIGH, IPT_UNUSED) // 0x48, 49, 4a |
| 1041 | PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) // 0x4b |
| 1042 | PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD)) // 0x4c |
| 1043 | PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_UNUSED) // 0x4d |
| 1044 | PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) // 0x4e |
| 1045 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_UNUSED) // 0x4f |
| 1046 | |
| 1047 | PORT_START("KEY5") |
| 1048 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_UNUSED) // 0x50 |
| 1049 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Keypad =") PORT_CODE(/*CODE_OTHER*/KEYCODE_NUMLOCK) PORT_CHAR(UCHAR_MAMEKEY(NUMLOCK)) // 0x51 |
| 1050 | PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) // 0x52 |
| 1051 | PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) // 0x53 |
| 1052 | PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) // 0x54 |
| 1053 | PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) // 0x55 |
| 1054 | PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) // 0x56 |
| 1055 | PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) // 0x57 |
| 1056 | PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) // 0x58 |
| 1057 | PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) // 0x59 |
| 1058 | PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_UNUSED) // 0x5a |
| 1059 | PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) // 0x5b |
| 1060 | PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) // 0x5c |
| 1061 | PORT_BIT(0xE000, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 1062 | INPUT_PORTS_END |
| 1063 | |
| 1064 | |
| 944 | 1065 | /*************************************************************************** |
| 945 | 1066 | |
| 946 | 1067 | Game driver(s) |
| r6330 | r6331 | |
| 1064 | 1185 | COMP( 1984, mac512k, mac128k, 0, mac512ke, macplus, mac128k512k, 0, "Apple Computer", "Macintosh 512k", GAME_NOT_WORKING ) |
| 1065 | 1186 | COMP( 1986, mac512ke, macplus, 0, mac512ke, macplus, mac512ke, 0, "Apple Computer", "Macintosh 512ke", 0 ) |
| 1066 | 1187 | COMP( 1986, macplus, 0, 0, macplus, macplus, macplus, 0, "Apple Computer", "Macintosh Plus", 0 ) |
| 1067 | | COMP( 1987, macse, 0, 0, macse, macplus, macse, 0, "Apple Computer", "Macintosh SE", 0 ) |
| 1068 | | COMP( 1987, macsefd, 0, 0, macse, macplus, macse, 0, "Apple Computer", "Macintosh SE (FDHD)", 0 ) |
| 1069 | | COMP( 1987, macii, 0, 0, macii, macplus, macii, 0, "Apple Computer", "Macintosh II", GAME_NOT_WORKING ) |
| 1070 | | COMP( 1988, mac2fdhd, 0, 0, macii, macplus, maciifdhd, 0, "Apple Computer", "Macintosh II (FDHD)", GAME_NOT_WORKING ) |
| 1071 | | COMP( 1988, maciix, mac2fdhd, 0, maciix, macplus, maciix, 0, "Apple Computer", "Macintosh IIx", GAME_NOT_WORKING ) |
| 1072 | | COMP( 1989, macse30, mac2fdhd, 0, macse30, macplus, macse30, 0, "Apple Computer", "Macintosh SE/30", GAME_NOT_WORKING ) |
| 1073 | | COMP( 1989, maciicx, mac2fdhd, 0, maciix, macplus, maciicx, 0, "Apple Computer", "Macintosh IIcx", GAME_NOT_WORKING ) |
| 1074 | | COMP( 1989, maciici, 0, 0, maciici, macplus, maciici, 0, "Apple Computer", "Macintosh IIci", GAME_NOT_WORKING ) |
| 1075 | | COMP( 1990, macclasc, 0, 0, macse, macplus, macclassic, 0, "Apple Computer", "Macintosh Classic", GAME_NOT_WORKING ) |
| 1076 | | COMP( 1990, maclc, 0, 0, maclc, macplus, maclc, 0, "Apple Computer", "Macintosh LC", GAME_NOT_WORKING ) |
| 1077 | | COMP( 1990, maciisi, 0, 0, maciisi, macplus, maciici, 0, "Apple Computer", "Macintosh IIsi", GAME_NOT_WORKING ) |
| 1078 | | COMP( 1991, macclas2, 0, 0, macclas2, macplus, macclassic2, 0, "Apple Computer", "Macintosh Classic II", GAME_NOT_WORKING ) |
| 1079 | | COMP( 1991, maclc2, 0, 0, maclc2, macplus, maclc2, 0, "Apple Computer", "Macintosh LC II", GAME_NOT_WORKING ) |
| 1188 | COMP( 1987, macse, 0, 0, macse, macadb, macse, 0, "Apple Computer", "Macintosh SE", 0 ) |
| 1189 | COMP( 1987, macsefd, 0, 0, macse, macadb, macse, 0, "Apple Computer", "Macintosh SE (FDHD)", 0 ) |
| 1190 | COMP( 1987, macii, 0, 0, macii, macadb, macii, 0, "Apple Computer", "Macintosh II", GAME_NOT_WORKING ) |
| 1191 | COMP( 1988, mac2fdhd, 0, 0, macii, macadb, maciifdhd, 0, "Apple Computer", "Macintosh II (FDHD)", GAME_NOT_WORKING ) |
| 1192 | COMP( 1988, maciix, mac2fdhd, 0, maciix, macadb, maciix, 0, "Apple Computer", "Macintosh IIx", GAME_NOT_WORKING ) |
| 1193 | COMP( 1989, macse30, mac2fdhd, 0, macse30, macadb, macse30, 0, "Apple Computer", "Macintosh SE/30", GAME_NOT_WORKING ) |
| 1194 | COMP( 1989, maciicx, mac2fdhd, 0, maciix, macadb, maciicx, 0, "Apple Computer", "Macintosh IIcx", GAME_NOT_WORKING ) |
| 1195 | COMP( 1989, maciici, 0, 0, maciici, macadb, maciici, 0, "Apple Computer", "Macintosh IIci", GAME_NOT_WORKING ) |
| 1196 | COMP( 1990, macclasc, 0, 0, macse, macadb, macclassic, 0, "Apple Computer", "Macintosh Classic", GAME_NOT_WORKING ) |
| 1197 | COMP( 1990, maclc, 0, 0, maclc, macadb, maclc, 0, "Apple Computer", "Macintosh LC", GAME_NOT_WORKING ) |
| 1198 | COMP( 1990, maciisi, 0, 0, maciisi, macadb, maciici, 0, "Apple Computer", "Macintosh IIsi", GAME_NOT_WORKING ) |
| 1199 | COMP( 1991, macclas2, 0, 0, macclas2, macadb, macclassic2, 0, "Apple Computer", "Macintosh Classic II", GAME_NOT_WORKING ) |
| 1200 | COMP( 1991, maclc2, 0, 0, maclc2, macadb, maclc2, 0, "Apple Computer", "Macintosh LC II", GAME_NOT_WORKING ) |