src/mess/drivers/spectrum.c
| r2272 | r2273 | |
| 229 | 229 | int lines = offset>>8; |
| 230 | 230 | int data = 0xff; |
| 231 | 231 | |
| 232 | | int cs_extra1 = readinputport(8) & 0x1f; |
| 233 | | int cs_extra2 = readinputport(9) & 0x1f; |
| 234 | | int cs_extra3 = readinputport(10) & 0x1f; |
| 235 | | int ss_extra1 = readinputport(11) & 0x1f; |
| 236 | | int ss_extra2 = readinputport(12) & 0x1f; |
| 232 | int cs_extra1 = readinputportbytag("PLUS0") & 0x1f; |
| 233 | int cs_extra2 = readinputportbytag("PLUS1") & 0x1f; |
| 234 | int cs_extra3 = readinputportbytag("PLUS2") & 0x1f; |
| 235 | int ss_extra1 = readinputportbytag("PLUS3") & 0x1f; |
| 236 | int ss_extra2 = readinputportbytag("PLUS4") & 0x1f; |
| 237 | 237 | |
| 238 | | if ( readinputport(17) & 0x01 ) { |
| 238 | if ( readinputportbytag("MOTOR") & 0x01 ) { |
| 239 | 239 | if ( motor_toggle_previous == 0 ) { |
| 240 | 240 | cassette_motor_mode = cassette_motor_mode ^ 0x01; |
| 241 | 241 | cassette_change_state( image_from_devtype_and_index( IO_CASSETTE, 0 ), cassette_motor_mode ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR ); |
| r2272 | r2273 | |
| 248 | 248 | /* Caps - V */ |
| 249 | 249 | if ((lines & 1)==0) |
| 250 | 250 | { |
| 251 | | data &= readinputport(0); |
| 251 | data &= readinputportbytag("LINE0"); |
| 252 | 252 | /* CAPS for extra keys */ |
| 253 | 253 | if (cs_extra1 != 0x1f || cs_extra2 != 0x1f || cs_extra3 != 0x1f) |
| 254 | 254 | data &= ~0x01; |
| r2272 | r2273 | |
| 256 | 256 | |
| 257 | 257 | /* A - G */ |
| 258 | 258 | if ((lines & 2)==0) |
| 259 | | data &= readinputport(1); |
| 259 | data &= readinputportbytag("LINE1"); |
| 260 | 260 | |
| 261 | 261 | /* Q - T */ |
| 262 | 262 | if ((lines & 4)==0) |
| 263 | | data &= readinputport(2); |
| 263 | data &= readinputportbytag("LINE2"); |
| 264 | 264 | |
| 265 | 265 | /* 1 - 5 */ |
| 266 | 266 | if ((lines & 8)==0) |
| 267 | | data &= readinputport(3) & cs_extra1; |
| 267 | data &= readinputportbytag("LINE3") & cs_extra1; |
| 268 | 268 | |
| 269 | 269 | /* 6 - 0 */ |
| 270 | 270 | if ((lines & 16)==0) |
| 271 | | data &= readinputport(4) & cs_extra2; |
| 271 | data &= readinputportbytag("LINE4") & cs_extra2; |
| 272 | 272 | |
| 273 | 273 | /* Y - P */ |
| 274 | 274 | if ((lines & 32)==0) |
| 275 | | data &= readinputport(5) & ss_extra1; |
| 275 | data &= readinputportbytag("LINE5") & ss_extra1; |
| 276 | 276 | |
| 277 | 277 | /* H - Enter */ |
| 278 | 278 | if ((lines & 64)==0) |
| 279 | | data &= readinputport(6); |
| 279 | data &= readinputportbytag("LINE6"); |
| 280 | 280 | |
| 281 | 281 | /* B - Space */ |
| 282 | 282 | if ((lines & 128)==0) |
| 283 | 283 | { |
| 284 | | data &= readinputport(7) & cs_extra3 & ss_extra2; |
| 284 | data &= readinputportbytag("LINE7") & cs_extra3 & ss_extra2; |
| 285 | 285 | /* SYMBOL SHIFT for extra keys */ |
| 286 | 286 | if (ss_extra1 != 0x1f || ss_extra2 != 0x1f) |
| 287 | 287 | data &= ~0x02; |
| r2272 | r2273 | |
| 297 | 297 | |
| 298 | 298 | /* Issue 2 Spectrums default to having bits 5, 6 & 7 set. |
| 299 | 299 | Issue 3 Spectrums default to having bits 5 & 7 set and bit 6 reset. */ |
| 300 | | if (readinputport(16) & 0x80) |
| 300 | if (readinputportbytag("CONFIG") & 0x80) |
| 301 | 301 | data ^= (0x40); |
| 302 | 302 | return data; |
| 303 | 303 | } |
| r2272 | r2273 | |
| 305 | 305 | /* kempston joystick interface */ |
| 306 | 306 | static READ8_HANDLER(spectrum_port_1f_r) |
| 307 | 307 | { |
| 308 | | return readinputport(13) & 0x1f; |
| 308 | return readinputportbytag("KEMPSTON") & 0x1f; |
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | /* fuller joystick interface */ |
| 312 | 312 | static READ8_HANDLER(spectrum_port_7f_r) |
| 313 | 313 | { |
| 314 | | return readinputport(14) | (0xff^0x8f); |
| 314 | return readinputportbytag("FULLER") | (0xff^0x8f); |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | /* mikrogen joystick interface */ |
| 318 | 318 | static READ8_HANDLER(spectrum_port_df_r) |
| 319 | 319 | { |
| 320 | | return readinputport(15) | (0xff^0x1f); |
| 320 | return readinputportbytag("MIKROGEN") | (0xff^0x1f); |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | static READ8_HANDLER ( spectrum_port_r ) |
| r2272 | r2273 | |
| 568 | 568 | |
| 569 | 569 | static WRITE8_HANDLER(spectrum_plus3_port_3ffd_w) |
| 570 | 570 | { |
| 571 | | if (~readinputport(16) & 0x20) |
| 571 | if (~readinputportbytag("CONFIG") & 0x20) |
| 572 | 572 | nec765_data_w(machine, 0,data); |
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | static READ8_HANDLER(spectrum_plus3_port_3ffd_r) |
| 576 | 576 | { |
| 577 | | if (readinputport(16) & 0x20) |
| 577 | if (readinputportbytag("CONFIG") & 0x20) |
| 578 | 578 | return 0xff; |
| 579 | 579 | else |
| 580 | 580 | return nec765_data_r(machine, 0); |
| r2272 | r2273 | |
| 583 | 583 | |
| 584 | 584 | static READ8_HANDLER(spectrum_plus3_port_2ffd_r) |
| 585 | 585 | { |
| 586 | | if (readinputport(16) & 0x20) |
| 586 | if (readinputportbytag("CONFIG") & 0x20) |
| 587 | 587 | return 0xff; |
| 588 | 588 | else |
| 589 | 589 | return nec765_status_r(machine, 0); |
| r2272 | r2273 | |
| 1782 | 1782 | GFXDECODE_END |
| 1783 | 1783 | |
| 1784 | 1784 | static INPUT_PORTS_START( spectrum ) |
| 1785 | | PORT_START /* [0] 0xFEFE */ |
| 1785 | PORT_START_TAG("LINE0") /* [0] 0xFEFE */ |
| 1786 | 1786 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS SHIFT") PORT_CODE(KEYCODE_LSHIFT) |
| 1787 | 1787 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z COPY : LN BEEP") PORT_CODE(KEYCODE_Z) |
| 1788 | 1788 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X CLEAR Pound EXP INK") PORT_CODE(KEYCODE_X) |
| 1789 | 1789 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C CONT ? LPRINT PAPER") PORT_CODE(KEYCODE_C) |
| 1790 | 1790 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V CLS / LLIST FLASH") PORT_CODE(KEYCODE_V) |
| 1791 | 1791 | |
| 1792 | | PORT_START /* [1] 0xFDFE */ |
| 1792 | PORT_START_TAG("LINE1") /* [1] 0xFDFE */ |
| 1793 | 1793 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A NEW STOP READ ~") PORT_CODE(KEYCODE_A) |
| 1794 | 1794 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S SAVE NOT RESTORE |") PORT_CODE(KEYCODE_S) |
| 1795 | 1795 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D DIM STEP DATA \\") PORT_CODE(KEYCODE_D) |
| 1796 | 1796 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F FOR TO SGN {") PORT_CODE(KEYCODE_F) |
| 1797 | 1797 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G GOTO THEN ABS }") PORT_CODE(KEYCODE_G) |
| 1798 | 1798 | |
| 1799 | | PORT_START /* [2] 0xFBFE */ |
| 1799 | PORT_START_TAG("LINE2") /* [2] 0xFBFE */ |
| 1800 | 1800 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q PLOT <= SIN ASN") PORT_CODE(KEYCODE_Q) |
| 1801 | 1801 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W DRAW <> COS ACS") PORT_CODE(KEYCODE_W) |
| 1802 | 1802 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E REM >= TAN ATN") PORT_CODE(KEYCODE_E) |
| r2272 | r2273 | |
| 1804 | 1804 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T RAND > RND MERGE") PORT_CODE(KEYCODE_T) |
| 1805 | 1805 | |
| 1806 | 1806 | /* interface II uses this port for joystick */ |
| 1807 | | PORT_START /* [3] 0xF7FE */ |
| 1807 | PORT_START_TAG("LINE3") /* [3] 0xF7FE */ |
| 1808 | 1808 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 ! BLUE DEF FN") PORT_CODE(KEYCODE_1) |
| 1809 | 1809 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 @ RED FN") PORT_CODE(KEYCODE_2) |
| 1810 | 1810 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 # MAGENTA LINE") PORT_CODE(KEYCODE_3) |
| r2272 | r2273 | |
| 1812 | 1812 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 % CYAN CLOSE#") PORT_CODE(KEYCODE_5) |
| 1813 | 1813 | |
| 1814 | 1814 | /* protek clashes with interface II! uses 5 = left, 6 = down, 7 = up, 8 = right, 0 = fire */ |
| 1815 | | PORT_START /* [4] 0xEFFE */ |
| 1815 | PORT_START_TAG("LINE4") /* [4] 0xEFFE */ |
| 1816 | 1816 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 _ BLACK FORMAT") PORT_CODE(KEYCODE_0) |
| 1817 | 1817 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 ) POINT") PORT_CODE(KEYCODE_9) |
| 1818 | 1818 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 ( CAT") PORT_CODE(KEYCODE_8) |
| 1819 | 1819 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 ' WHITE ERASE") PORT_CODE(KEYCODE_7) |
| 1820 | 1820 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6 & YELLOW MOVE") PORT_CODE(KEYCODE_6) |
| 1821 | 1821 | |
| 1822 | | PORT_START /* [5] 0xDFFE */ |
| 1822 | PORT_START_TAG("LINE5") /* [5] 0xDFFE */ |
| 1823 | 1823 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P PRINT \" TAB (c)") PORT_CODE(KEYCODE_P) |
| 1824 | 1824 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O POKE ; PEEK OUT") PORT_CODE(KEYCODE_O) |
| 1825 | 1825 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I INPUT AT CODE IN") PORT_CODE(KEYCODE_I) |
| 1826 | 1826 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U IF OR CHR$ ]") PORT_CODE(KEYCODE_U) |
| 1827 | 1827 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y RETURN AND STR$ [") PORT_CODE(KEYCODE_Y) |
| 1828 | 1828 | |
| 1829 | | PORT_START /* [6] 0xBFFE */ |
| 1829 | PORT_START_TAG("LINE6") /* [6] 0xBFFE */ |
| 1830 | 1830 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) |
| 1831 | 1831 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L LET = USR ATTR") PORT_CODE(KEYCODE_L) |
| 1832 | 1832 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K LIST + LEN SCREEN$") PORT_CODE(KEYCODE_K) |
| 1833 | 1833 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J LOAD - VAL VAL$") PORT_CODE(KEYCODE_J) |
| 1834 | 1834 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H GOSUB ^ SQR CIRCLE") PORT_CODE(KEYCODE_H) |
| 1835 | 1835 | |
| 1836 | | PORT_START /* [7] 0x7FFE */ |
| 1836 | PORT_START_TAG("LINE7") /* [7] 0x7FFE */ |
| 1837 | 1837 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) |
| 1838 | 1838 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SYMBOL SHIFT") PORT_CODE(KEYCODE_RSHIFT) |
| 1839 | 1839 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M PAUSE . PI INVERSE") PORT_CODE(KEYCODE_M) |
| 1840 | 1840 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N NEXT , INKEY$ OVER") PORT_CODE(KEYCODE_N) |
| 1841 | 1841 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B BORDER * BIN BRIGHT") PORT_CODE(KEYCODE_B) |
| 1842 | 1842 | |
| 1843 | | PORT_START /* [8] Spectrum+ Keys (set CAPS + 1-5) */ |
| 1843 | PORT_START_TAG("PLUS0") /* [8] Spectrum+ Keys (set CAPS + 1-5) */ |
| 1844 | 1844 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("EDIT (CAPS + 1)") PORT_CODE(KEYCODE_INSERT) |
| 1845 | 1845 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS LOCK (CAPS + 2)") PORT_CODE(KEYCODE_CAPSLOCK) |
| 1846 | 1846 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRUE VID (CAPS + 3)") PORT_CODE(KEYCODE_HOME) |
| r2272 | r2273 | |
| 1848 | 1848 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor left (CAPS + 5)") PORT_CODE(KEYCODE_LEFT) |
| 1849 | 1849 | PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 1850 | 1850 | |
| 1851 | | PORT_START /* [9] Spectrum+ Keys (set CAPS + 6-0) */ |
| 1851 | PORT_START_TAG("PLUS1") /* [9] Spectrum+ Keys (set CAPS + 6-0) */ |
| 1852 | 1852 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL (CAPS + 0)") PORT_CODE(KEYCODE_BACKSPACE) |
| 1853 | 1853 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPH (CAPS + 9)") PORT_CODE(KEYCODE_LALT) |
| 1854 | 1854 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor right (CAPS + 8)") PORT_CODE(KEYCODE_RIGHT) |
| r2272 | r2273 | |
| 1856 | 1856 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor down (CAPS + 6)") PORT_CODE(KEYCODE_DOWN) |
| 1857 | 1857 | PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 1858 | 1858 | |
| 1859 | | PORT_START /* [10] Spectrum+ Keys (set CAPS + SPACE and CAPS + SYMBOL */ |
| 1859 | PORT_START_TAG("PLUS2") /* [10] Spectrum+ Keys (set CAPS + SPACE and CAPS + SYMBOL */ |
| 1860 | 1860 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BREAK") PORT_CODE(KEYCODE_PAUSE) |
| 1861 | 1861 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("EXT MODE") PORT_CODE(KEYCODE_LCONTROL) |
| 1862 | 1862 | PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNUSED) |
| 1863 | 1863 | |
| 1864 | | PORT_START /* [11] Spectrum+ Keys (set SYMBOL SHIFT + O/P */ |
| 1864 | PORT_START_TAG("PLUS3") /* [11] Spectrum+ Keys (set SYMBOL SHIFT + O/P */ |
| 1865 | 1865 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\"") PORT_CODE(KEYCODE_F4) |
| 1866 | 1866 | /* PORT_BITX(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD, "\"", KEYCODE_QUOTE, CODE_NONE ) */ |
| 1867 | 1867 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) |
| 1868 | 1868 | PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNUSED) |
| 1869 | 1869 | |
| 1870 | | PORT_START /* [12] Spectrum+ Keys (set SYMBOL SHIFT + N/M */ |
| 1870 | PORT_START_TAG("PLUS4") /* [12] Spectrum+ Keys (set SYMBOL SHIFT + N/M */ |
| 1871 | 1871 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) |
| 1872 | 1872 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 1873 | 1873 | PORT_BIT(0xf3, IP_ACTIVE_LOW, IPT_UNUSED) |
| 1874 | 1874 | |
| 1875 | | PORT_START /* [13] Kempston joystick interface */ |
| 1875 | PORT_START_TAG("KEMPSTON") /* [13] Kempston joystick interface */ |
| 1876 | 1876 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KEMPSTON JOYSTICK RIGHT") PORT_CODE(JOYCODE_X_RIGHT_SWITCH) |
| 1877 | 1877 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KEMPSTON JOYSTICK LEFT") PORT_CODE(JOYCODE_X_LEFT_SWITCH) |
| 1878 | 1878 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KEMPSTON JOYSTICK DOWN") PORT_CODE(JOYCODE_Y_DOWN_SWITCH) |
| 1879 | 1879 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KEMPSTON JOYSTICK UP") PORT_CODE(JOYCODE_Y_UP_SWITCH) |
| 1880 | 1880 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KEMPSTON JOYSTICK FIRE") PORT_CODE(JOYCODE_BUTTON1) |
| 1881 | 1881 | |
| 1882 | | PORT_START /* [14] Fuller joystick interface */ |
| 1882 | PORT_START_TAG("FULLER") /* [14] Fuller joystick interface */ |
| 1883 | 1883 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FULLER JOYSTICK UP") PORT_CODE(JOYCODE_Y_UP_SWITCH) |
| 1884 | 1884 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FULLER JOYSTICK DOWN") PORT_CODE(JOYCODE_Y_DOWN_SWITCH) |
| 1885 | 1885 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FULLER JOYSTICK LEFT") PORT_CODE(JOYCODE_X_LEFT_SWITCH) |
| 1886 | 1886 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FULLER JOYSTICK RIGHT") PORT_CODE(JOYCODE_X_RIGHT_SWITCH) |
| 1887 | 1887 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FULLER JOYSTICK FIRE") PORT_CODE(JOYCODE_BUTTON1) |
| 1888 | 1888 | |
| 1889 | | PORT_START /* [15] Mikrogen joystick interface */ |
| 1889 | PORT_START_TAG("MIKROGEN") /* [15] Mikrogen joystick interface */ |
| 1890 | 1890 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MIKROGEN JOYSTICK UP") PORT_CODE(JOYCODE_Y_UP_SWITCH) |
| 1891 | 1891 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MIKROGEN JOYSTICK DOWN") PORT_CODE(JOYCODE_Y_DOWN_SWITCH) |
| 1892 | 1892 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MIKROGEN JOYSTICK RIGHT") PORT_CODE(JOYCODE_X_RIGHT_SWITCH) |
| r2272 | r2273 | |
| 1894 | 1894 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MIKROGEN JOYSTICK FIRE") PORT_CODE(JOYCODE_BUTTON1) |
| 1895 | 1895 | |
| 1896 | 1896 | |
| 1897 | | PORT_START /* [16] */ |
| 1897 | PORT_START_TAG("CONFIG") /* [16] */ |
| 1898 | 1898 | PORT_DIPNAME(0x80, 0x00, "Hardware Version") |
| 1899 | 1899 | PORT_DIPSETTING(0x00, "Issue 2" ) |
| 1900 | 1900 | PORT_DIPSETTING(0x80, "Issue 3" ) |
| r2272 | r2273 | |
| 1906 | 1906 | PORT_DIPSETTING(0x20, "Disabled" ) |
| 1907 | 1907 | PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_UNUSED) |
| 1908 | 1908 | |
| 1909 | | PORT_START /* [17] Toggle cassette motor */ |
| 1909 | PORT_START_TAG("MOTOR") /* [17] Toggle cassette motor */ |
| 1910 | 1910 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Motor") PORT_CODE(KEYCODE_F1) |
| 1911 | 1911 | |
| 1912 | 1912 | INPUT_PORTS_END |
src/mess/drivers/super80.c
| r2272 | r2273 | |
| 436 | 436 | static TIMER_CALLBACK( super80_timer ) |
| 437 | 437 | { |
| 438 | 438 | UINT8 wave_state=0, i, mask=1, out_f8=z80pio_p_r(0,0), in_fa=255; |
| 439 | char port[6]; |
| 439 | 440 | |
| 440 | | for ( i=1; i < 9;i++) |
| 441 | for ( i=0; i < 8;i++) |
| 441 | 442 | { |
| 442 | | if (!(out_f8 & mask)) in_fa &= readinputport(i); |
| 443 | sprintf(port, "LINE%d", i); |
| 444 | if (!(out_f8 & mask)) in_fa &= readinputportbytag(port); |
| 443 | 445 | mask<<=1; |
| 444 | 446 | } |
| 445 | 447 | |
| r2272 | r2273 | |
| 602 | 604 | PORT_DIPSETTING( 0x80, DEF_STR(Off)) |
| 603 | 605 | PORT_DIPSETTING( 0x00, DEF_STR(On)) |
| 604 | 606 | |
| 605 | | PORT_START /* line 0 */ |
| 607 | PORT_START_TAG("LINE0") /* line 0 */ |
| 606 | 608 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@ `") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('@') PORT_CHAR('`') |
| 607 | 609 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') |
| 608 | 610 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') |
| r2272 | r2273 | |
| 611 | 613 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 )") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 612 | 614 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 613 | 615 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("REPT") PORT_CODE(KEYCODE_LALT) |
| 614 | | PORT_START /* line 1 */ |
| 616 | PORT_START_TAG("LINE1") /* line 1 */ |
| 615 | 617 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 616 | 618 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') |
| 617 | 619 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') |
| r2272 | r2273 | |
| 620 | 622 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(": *") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') |
| 621 | 623 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 622 | 624 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 623 | | PORT_START /* line 2 */ |
| 625 | PORT_START_TAG("LINE2") /* line 2 */ |
| 624 | 626 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| 625 | 627 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') |
| 626 | 628 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') |
| r2272 | r2273 | |
| 629 | 631 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("; +") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') |
| 630 | 632 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(9) |
| 631 | 633 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Fire)") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) |
| 632 | | PORT_START /* line 3 */ |
| 634 | PORT_START_TAG("LINE3") /* line 3 */ |
| 633 | 635 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') |
| 634 | 636 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') |
| 635 | 637 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') |
| r2272 | r2273 | |
| 638 | 640 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 639 | 641 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LINEFEED") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(10) |
| 640 | 642 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) |
| 641 | | PORT_START /* line 4 */ |
| 643 | PORT_START_TAG("LINE4") /* line 4 */ |
| 642 | 644 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') |
| 643 | 645 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L') |
| 644 | 646 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') |
| r2272 | r2273 | |
| 647 | 649 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BRK") PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(3) |
| 648 | 650 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 649 | 651 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Right)") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 650 | | PORT_START /* line 5 */ |
| 652 | PORT_START_TAG("LINE5") /* line 5 */ |
| 651 | 653 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') |
| 652 | 654 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M') |
| 653 | 655 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') |
| r2272 | r2273 | |
| 656 | 658 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 657 | 659 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) |
| 658 | 660 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Left)") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 659 | | PORT_START /* line 6 */ |
| 661 | PORT_START_TAG("LINE6") /* line 6 */ |
| 660 | 662 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') |
| 661 | 663 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N') |
| 662 | 664 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') |
| r2272 | r2273 | |
| 665 | 667 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 666 | 668 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL) |
| 667 | 669 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Down)") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 668 | | PORT_START /* line 7 */ |
| 670 | PORT_START_TAG("LINE7") /* line 7 */ |
| 669 | 671 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') |
| 670 | 672 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O') |
| 671 | 673 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') |
src/mess/drivers/ti99_2.c
| r2272 | r2273 | |
| 254 | 254 | /* read keys in the current row */ |
| 255 | 255 | static READ8_HANDLER ( ti99_2_read_kbd ) |
| 256 | 256 | { |
| 257 | | return readinputport(KeyRow); |
| 257 | char port[6]; |
| 258 | |
| 259 | sprintf(port, "LINE%d", KeyRow); |
| 260 | return readinputportbytag(port); |
| 258 | 261 | } |
| 259 | 262 | |
| 260 | 263 | static READ8_HANDLER ( ti99_2_read_misc_cru ) |
| r2272 | r2273 | |
| 273 | 276 | /* ti99/2 : 54-key keyboard */ |
| 274 | 277 | static INPUT_PORTS_START(ti99_2) |
| 275 | 278 | |
| 276 | | PORT_START /* col 0 */ |
| 279 | PORT_START_TAG("LINE0") /* col 0 */ |
| 277 | 280 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 ! DEL") PORT_CODE(KEYCODE_1) |
| 278 | 281 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 @ INS") PORT_CODE(KEYCODE_2) |
| 279 | 282 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 #") PORT_CODE(KEYCODE_3) |
| r2272 | r2273 | |
| 283 | 286 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 & AID") PORT_CODE(KEYCODE_7) |
| 284 | 287 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 * REDO") PORT_CODE(KEYCODE_8) |
| 285 | 288 | |
| 286 | | PORT_START /* col 1 */ |
| 289 | PORT_START_TAG("LINE1") /* col 1 */ |
| 287 | 290 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("q Q") PORT_CODE(KEYCODE_Q) |
| 288 | 291 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("w W ~") PORT_CODE(KEYCODE_W) |
| 289 | 292 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("e E (UP)") PORT_CODE(KEYCODE_E) |
| r2272 | r2273 | |
| 293 | 296 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("i I ?") PORT_CODE(KEYCODE_I) |
| 294 | 297 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 ( BACK") PORT_CODE(KEYCODE_9) |
| 295 | 298 | |
| 296 | | PORT_START /* col 2 */ |
| 299 | PORT_START_TAG("LINE2") /* col 2 */ |
| 297 | 300 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("a A") PORT_CODE(KEYCODE_A) |
| 298 | 301 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("s S (LEFT)") PORT_CODE(KEYCODE_S) |
| 299 | 302 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("d D (RIGHT)") PORT_CODE(KEYCODE_D) |
| r2272 | r2273 | |
| 303 | 306 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("o O '") PORT_CODE(KEYCODE_O) |
| 304 | 307 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 )") PORT_CODE(KEYCODE_0) |
| 305 | 308 | |
| 306 | | PORT_START /* col 3 */ |
| 309 | PORT_START_TAG("LINE3") /* col 3 */ |
| 307 | 310 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("z Z \\") PORT_CODE(KEYCODE_Z) |
| 308 | 311 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("x X (DOWN)") PORT_CODE(KEYCODE_X) |
| 309 | 312 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("c C `") PORT_CODE(KEYCODE_C) |
| r2272 | r2273 | |
| 313 | 316 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("p P \"") PORT_CODE(KEYCODE_P) |
| 314 | 317 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("= + QUIT") PORT_CODE(KEYCODE_EQUALS) |
| 315 | 318 | |
| 316 | | PORT_START /* col 4 */ |
| 319 | PORT_START_TAG("LINE4") /* col 4 */ |
| 317 | 320 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT/*KEYCODE_CAPSLOCK*/) |
| 318 | 321 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) |
| 319 | 322 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("v V") PORT_CODE(KEYCODE_V) |
| r2272 | r2273 | |
| 323 | 326 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("; :") PORT_CODE(KEYCODE_COLON) |
| 324 | 327 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ -") PORT_CODE(KEYCODE_SLASH) |
| 325 | 328 | |
| 326 | | PORT_START /* col 5 */ |
| 329 | PORT_START_TAG("LINE5") /* col 5 */ |
| 327 | 330 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BREAK") PORT_CODE(KEYCODE_ESC) |
| 328 | 331 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(SPACE)") PORT_CODE(KEYCODE_SPACE) |
| 329 | 332 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("b B") PORT_CODE(KEYCODE_B) |
| r2272 | r2273 | |
| 333 | 336 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_RSHIFT) |
| 334 | 337 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) |
| 335 | 338 | |
| 336 | | PORT_START /* col 6 */ |
| 339 | PORT_START_TAG("LINE6") /* col 6 */ |
| 337 | 340 | PORT_BIT(0xFF, IP_ACTIVE_LOW, IPT_UNUSED) |
| 338 | 341 | |
| 339 | | PORT_START /* col 7 */ |
| 342 | PORT_START_TAG("LINE7") /* col 7 */ |
| 340 | 343 | PORT_BIT(0xFF, IP_ACTIVE_LOW, IPT_UNUSED) |
| 341 | 344 | |
| 342 | 345 | INPUT_PORTS_END |
src/mess/drivers/ssystem3.c
| r2272 | r2273 | |
| 144 | 144 | { |
| 145 | 145 | UINT8 data=0xff; |
| 146 | 146 | #if 1 // time switch |
| 147 | | if (!(ssystem3.porta&0x10)) data&=readinputport(1)|0xf1; |
| 148 | | if (!(ssystem3.porta&0x20)) data&=readinputport(2)|0xf1; |
| 149 | | if (!(ssystem3.porta&0x40)) data&=readinputport(3)|0xf1; |
| 150 | | if (!(ssystem3.porta&0x80)) data&=readinputport(4)|0xf1; |
| 147 | if (!(ssystem3.porta&0x10)) data&=readinputportbytag("matrix1")|0xf1; |
| 148 | if (!(ssystem3.porta&0x20)) data&=readinputportbytag("matrix2")|0xf1; |
| 149 | if (!(ssystem3.porta&0x40)) data&=readinputportbytag("matrix3")|0xf1; |
| 150 | if (!(ssystem3.porta&0x80)) data&=readinputportbytag("matrix4")|0xf1; |
| 151 | 151 | #else |
| 152 | | if (!(ssystem3.porta&0x10)) data&=readinputport(1)|0xf0; |
| 153 | | if (!(ssystem3.porta&0x20)) data&=readinputport(2)|0xf0; |
| 154 | | if (!(ssystem3.porta&0x40)) data&=readinputport(3)|0xf0; |
| 155 | | if (!(ssystem3.porta&0x80)) data&=readinputport(4)|0xf0; |
| 152 | if (!(ssystem3.porta&0x10)) data&=readinputportbytag("matrix1")|0xf0; |
| 153 | if (!(ssystem3.porta&0x20)) data&=readinputportbytag("matrix2")|0xf0; |
| 154 | if (!(ssystem3.porta&0x40)) data&=readinputportbytag("matrix3")|0xf0; |
| 155 | if (!(ssystem3.porta&0x80)) data&=readinputportbytag("matrix4")|0xf0; |
| 156 | 156 | #endif |
| 157 | 157 | if (!(ssystem3.porta&1)) { |
| 158 | | if (!(readinputport(1)&1)) data&=~0x10; |
| 159 | | if (!(readinputport(2)&1)) data&=~0x20; |
| 160 | | if (!(readinputport(3)&1)) data&=~0x40; |
| 161 | | if (!(readinputport(4)&1)) data&=~0x80; |
| 158 | if (!(readinputportbytag("matrix1")&1)) data&=~0x10; |
| 159 | if (!(readinputportbytag("matrix2")&1)) data&=~0x20; |
| 160 | if (!(readinputportbytag("matrix3")&1)) data&=~0x40; |
| 161 | if (!(readinputportbytag("matrix4")&1)) data&=~0x80; |
| 162 | 162 | } |
| 163 | 163 | if (!(ssystem3.porta&2)) { |
| 164 | | if (!(readinputport(1)&2)) data&=~0x10; |
| 165 | | if (!(readinputport(2)&2)) data&=~0x20; |
| 166 | | if (!(readinputport(3)&2)) data&=~0x40; |
| 167 | | if (!(readinputport(4)&2)) data&=~0x80; |
| 164 | if (!(readinputportbytag("matrix1")&2)) data&=~0x10; |
| 165 | if (!(readinputportbytag("matrix2")&2)) data&=~0x20; |
| 166 | if (!(readinputportbytag("matrix3")&2)) data&=~0x40; |
| 167 | if (!(readinputportbytag("matrix4")&2)) data&=~0x80; |
| 168 | 168 | } |
| 169 | 169 | if (!(ssystem3.porta&4)) { |
| 170 | | if (!(readinputport(1)&4)) data&=~0x10; |
| 171 | | if (!(readinputport(2)&4)) data&=~0x20; |
| 172 | | if (!(readinputport(3)&4)) data&=~0x40; |
| 173 | | if (!(readinputport(4)&4)) data&=~0x80; |
| 170 | if (!(readinputportbytag("matrix1")&4)) data&=~0x10; |
| 171 | if (!(readinputportbytag("matrix2")&4)) data&=~0x20; |
| 172 | if (!(readinputportbytag("matrix3")&4)) data&=~0x40; |
| 173 | if (!(readinputportbytag("matrix4")&4)) data&=~0x80; |
| 174 | 174 | } |
| 175 | 175 | if (!(ssystem3.porta&8)) { |
| 176 | | if (!(readinputport(1)&8)) data&=~0x10; |
| 177 | | if (!(readinputport(2)&8)) data&=~0x20; |
| 178 | | if (!(readinputport(3)&8)) data&=~0x40; |
| 179 | | if (!(readinputport(4)&8)) data&=~0x80; |
| 176 | if (!(readinputportbytag("matrix1")&8)) data&=~0x10; |
| 177 | if (!(readinputportbytag("matrix2")&8)) data&=~0x20; |
| 178 | if (!(readinputportbytag("matrix3")&8)) data&=~0x40; |
| 179 | if (!(readinputportbytag("matrix4")&8)) data&=~0x80; |
| 180 | 180 | } |
| 181 | 181 | // logerror("%.4x via port a read %02x\n",(int)activecpu_get_pc(), data); |
| 182 | 182 | return data; |
| r2272 | r2273 | |
| 261 | 261 | */ |
| 262 | 262 | // AM_RANGE( 0x4000, 0x40ff) AM_NOP |
| 263 | 263 | /* |
| 264 | | probably zusatzgerät memory (battery powered ram 256x4? at 0x4000) |
| 264 | probably zusatzger�t memory (battery powered ram 256x4? at 0x4000) |
| 265 | 265 | $40ff low nibble ram if playfield module (else init with normal playfield) |
| 266 | 266 | */ |
| 267 | 267 | AM_RANGE( 0x6000, 0x600f) AM_READWRITE( via_0_r, via_0_w ) |
| r2272 | r2273 | |
| 281 | 281 | */ |
| 282 | 282 | |
| 283 | 283 | |
| 284 | | PORT_START_TAG( "Switches" ) |
| 284 | PORT_START_TAG( "Switches" ) |
| 285 | 285 | //PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("NEW GAME") PORT_CODE(KEYCODE_F3) // seams to be direct wired to reset |
| 286 | 286 | // PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("?CLEAR") PORT_CODE(KEYCODE_F1) |
| 287 | 287 | // PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("?ENTER") PORT_CODE(KEYCODE_ENTER) |
| r2272 | r2273 | |
| 301 | 301 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 D turm #") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_D) |
| 302 | 302 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 A white") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_A) |
| 303 | 303 | PORT_START_TAG( "matrix4" ) |
| 304 | | PORT_DIPNAME( 0x01, 0, "Time") PORT_CODE(KEYCODE_T) PORT_TOGGLE PORT_DIPSETTING( 0, DEF_STR(Off) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 304 | PORT_DIPNAME( 0x01, 0, "Time") PORT_CODE(KEYCODE_T) PORT_TOGGLE PORT_DIPSETTING( 0, DEF_STR(Off) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 305 | 305 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 H black") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_H) |
| 306 | 306 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 C dame #50") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_C) |
| 307 | 307 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 B koenig FP") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_B) |
| 308 | 308 | PORT_START_TAG( "Configuration" ) |
| 309 | | PORT_DIPNAME( 0x0001, 0, "Schachbrett") PORT_TOGGLE |
| 310 | | PORT_DIPSETTING( 0, DEF_STR( Off ) ) |
| 311 | | PORT_DIPSETTING( 1, "angeschlossen" ) |
| 309 | PORT_DIPNAME( 0x0001, 0, "Schachbrett") PORT_TOGGLE |
| 310 | PORT_DIPSETTING( 0, DEF_STR( Off ) ) |
| 311 | PORT_DIPSETTING( 1, "angeschlossen" ) |
| 312 | 312 | #if 0 |
| 313 | 313 | PORT_DIPNAME( 0x0002, 0, "Memory") PORT_TOGGLE |
| 314 | 314 | PORT_DIPSETTING( 0, DEF_STR( Off ) ) |