src/mess/video/rmnimbus.c
| r6798 | r6799 | |
| 116 | 116 | |
| 117 | 117 | vaddr=(BYTES_PER_LINE*y)+(x / ppb);
|
| 118 | 118 | pixel_offset=(x % ppb);
|
| 119 | | last=video_mem[vaddr];
|
| 119 | last=(vaddr<VRAM_SIZE) ? video_mem[vaddr] : 0
|
| 120 | |
| 121 | ;
|
| 120 | 122 | colour=on_off ? (reg024&0x0F) : ((reg024&0xF0)>>4);
|
| 121 | 123 | |
| 122 | 124 | if(bpp==2)
|
| r6798 | r6799 | |
| 134 | 136 | lshifts=4-rshifts; |
| 135 | 137 | }
|
| 136 | 138 | |
| 137 | | if(reg022 & XOR_MASK)
|
| 138 | | video_mem[vaddr]=(video_mem[vaddr] & mask) ^ (colour<<(lshifts)); |
| 139 | if(vaddr<VRAM_SIZE)
|
| 140 | {
|
| 141 | if(reg022 & XOR_MASK)
|
| 142 | video_mem[vaddr]=(video_mem[vaddr] & mask) ^ (colour<<(lshifts)); |
| 143 | else
|
| 144 | video_mem[vaddr]=(video_mem[vaddr] & mask) | (colour<<(lshifts)); |
| 145 | |
| 146 | if(debug_on & (DEBUG_TEXT | DEBUG_PIXEL))
|
| 147 | logerror("set_pixel(X=%04X, y=%04x, pixel_offset=%02X, on_off=%02X), vaddr=%04X, mask=%02X, last=%02X, current=%02X\n",x,y,pixel_offset,on_off,vaddr,mask,last,video_mem[vaddr]);
|
| 148 | }
|
| 139 | 149 | else
|
| 140 | | video_mem[vaddr]=(video_mem[vaddr] & mask) | (colour<<(lshifts)); |
| 141 | | |
| 142 | | if(debug_on & DEBUG_TEXT)
|
| 143 | | logerror("set_pixel(X=%04X, y=%04x, pixel_offset=%02X, on_off=%02X), vaddr=%04X, mask=%02X, last=%02X, current=%02X\n",x,y,pixel_offset,on_off,vaddr,mask,last,video_mem[vaddr]);
|
| 150 | {
|
| 151 | if(debug_on & (DEBUG_TEXT | DEBUG_PIXEL))
|
| 152 | logerror("ERROR: vaddr=%05X > VRAM_SIZE=%05X\n",vaddr,VRAM_SIZE);
|
| 153 | }
|
| 144 | 154 | }
|
| 145 | 155 | |
| 146 | 156 | |
| r6798 | r6799 | |
| 149 | 159 | UINT8 bit;
|
| 150 | 160 | UINT16 pixel_x;
|
| 151 | 161 | UINT8 shifts;
|
| 162 | |
| 163 | if(debug_on & (DEBUG_TEXT | DEBUG_PIXEL))
|
| 164 | logerror("write_pixel_line(x=%04X, y=%04X, data=%04X, mem_mask=%04X,width=%02X)\n",x,y,data,mem_mask,width);
|
| 152 | 165 | |
| 153 | 166 | shifts=(width==4) ? 2 : 1; |
| 154 | 167 | |
| r6798 | r6799 | |
| 162 | 175 | |
| 163 | 176 | static void write_pixel_data(UINT16 x, UINT16 y, UINT16 data, UINT16 mem_mask)
|
| 164 | 177 | { |
| 178 | if(debug_on & (DEBUG_TEXT | DEBUG_PIXEL))
|
| 179 | logerror("write_pixel_data(x=%04X, y=%04X, data=%04X, mem_mask=%04X), reg022=%04X\n",x,y,data,mem_mask,reg022);
|
| 180 | |
| 165 | 181 | switch (reg022 & WIDTH_MASK)
|
| 166 | 182 | {
|
| 167 | 183 | case 0x00 : write_pixel_line(x,y,data,mem_mask,16); break;
|
src/mess/machine/rmnimbus.c
| r6798 | r6799 | |
| 29 | 29 | /*-------------------------------------------------------------------------*/
|
| 30 | 30 | |
| 31 | 31 | /* CPU 80186 */
|
| 32 | | #define LATCH_INTS 1
|
| 33 | | #define LOG_PORTS 0
|
| 34 | | #define LOG_INTERRUPTS 0
|
| 35 | | #define LOG_INTERRUPTS_EXT 0
|
| 36 | | #define LOG_TIMER 0
|
| 37 | | #define LOG_OPTIMIZATION 0
|
| 38 | | #define LOG_DMA 1
|
| 32 | #define LATCH_INTS 1
|
| 33 | #define LOG_PORTS 0
|
| 34 | #define LOG_INTERRUPTS 0
|
| 35 | #define LOG_INTERRUPTS_EXT 0
|
| 36 | #define LOG_TIMER 0
|
| 37 | #define LOG_OPTIMIZATION 0
|
| 38 | #define LOG_DMA 0
|
| 39 | 39 | #define CPU_RESUME_TRIGGER 7123
|
| 40 | #define LOG_KEYBOARD 1
|
| 40 | 41 | |
| 41 | 42 | /* 80186 internal stuff */
|
| 42 | 43 | struct mem_state
|
| r6798 | r6799 | |
| 106 | 107 | sio_serial_receive /* receive handler */
|
| 107 | 108 | };
|
| 108 | 109 | |
| 109 | | static UINT8 keyrows[NIMBUS_KEYROWS];
|
| 110 | struct keybord_state
|
| 111 | {
|
| 112 | UINT8 keyrows[NIMBUS_KEYROWS];
|
| 113 | emu_timer *keyscan_timer;
|
| 114 | UINT8 queue[KEYBOARD_QUEUE_SIZE];
|
| 115 | UINT8 head;
|
| 116 | UINT8 tail;
|
| 117 | } keyboard;
|
| 110 | 118 | |
| 119 | |
| 120 | |
| 111 | 121 | /* Floppy drives WD2793 */
|
| 112 | 122 | |
| 113 | 123 | static WRITE_LINE_DEVICE_HANDLER( nimbus_fdc_intrq_w );
|
| r6798 | r6799 | |
| 133 | 143 | |
| 134 | 144 | static void execute_debug_irq(running_machine *machine, int ref, int params, const char *param[]);
|
| 135 | 145 | static void execute_debug_intmasks(running_machine *machine, int ref, int params, const char *param[]);
|
| 136 | | static void execute_debug_key(running_machine *machine, int ref, int params, const char *param[]);
|
| 137 | 146 | |
| 138 | 147 | static int instruction_hook(const device_config *device, offs_t curpc);
|
| 139 | 148 | static void decode_subbios(const device_config *device,offs_t pc);
|
| r6798 | r6799 | |
| 142 | 151 | static void decode_dssi_f_set_new_clt(const device_config *device,UINT16 ds, UINT16 si);
|
| 143 | 152 | static void fdc_reset(void);
|
| 144 | 153 | |
| 154 | static void keyboard_reset(void);
|
| 155 | static TIMER_CALLBACK(keyscan_callback);
|
| 145 | 156 | |
| 146 | 157 | #define num_ioports 0x80
|
| 147 | 158 | static UINT16 IOPorts[num_ioports];
|
| r6798 | r6799 | |
| 699 | 710 |
|
| 700 | 711 | return;
|
| 701 | 712 | }
|
| 702 | | |
| 703 | 713 |
|
| 704 | 714 | if(dma->control & DEST_MIO)
|
| 705 | 715 | {
|
| 706 | 716 | dest_space=memory_space;
|
| 707 | | logerror("dest=memory\n");
|
| 717 | //logerror("dest=memory\n");
|
| 708 | 718 | }
|
| 709 | 719 | else
|
| 710 | 720 | {
|
| 711 | 721 | dest_space=io_space;
|
| 712 | | logerror("dest=I/O\n");
|
| 722 | //logerror("dest=I/O\n");
|
| 713 | 723 | }
|
| 714 | 724 | |
| 715 | 725 | if(dma->control & SRC_MIO)
|
| 716 | 726 | {
|
| 717 | 727 | src_space=memory_space;
|
| 718 | | logerror("src=memory\n");
|
| 728 | //logerror("src=memory\n");
|
| 719 | 729 | }
|
| 720 | 730 | else
|
| 721 | 731 | {
|
| 722 | 732 | src_space=io_space;
|
| 723 | | logerror("src=I/O\n");
|
| 733 | //logerror("src=I/O\n");
|
| 724 | 734 | }
|
| 725 | 735 | |
| 726 | 736 | // Do the transfer
|
| r6798 | r6799 | |
| 773 | 783 | i186.intr.request |= 0x04 << which;
|
| 774 | 784 | update_interrupt_state(machine); |
| 775 | 785 | }
|
| 776 | | logerror("DMA callback done\n");
|
| 786 | //logerror("DMA callback done\n");
|
| 777 | 787 | }
|
| 778 | 788 | |
| 779 | 789 | /*-------------------------------------------------------------------------*/
|
| r6798 | r6799 | |
| 1249 | 1259 | /* CPU */
|
| 1250 | 1260 | nimbus_cpu_reset(machine); |
| 1251 | 1261 | fdc_reset();
|
| 1262 | keyboard_reset();
|
| 1252 | 1263 | }
|
| 1253 | 1264 | |
| 1254 | 1265 | DRIVER_INIT(nimbus)
|
| r6798 | r6799 | |
| 1259 | 1270 | {
|
| 1260 | 1271 | /* init cpu */
|
| 1261 | 1272 | nimbus_cpu_init(machine);
|
| 1273 | |
| 1274 | keyboard.keyscan_timer=timer_alloc(machine, keyscan_callback, NULL);
|
| 1262 | 1275 | |
| 1263 | 1276 | /* setup debug commands */
|
| 1264 | 1277 | if (machine->debug_flags & DEBUG_FLAG_ENABLED)
|
| 1265 | 1278 | {
|
| 1266 | 1279 | debug_console_register_command(machine, "nimbus_irq", CMDFLAG_NONE, 0, 0, 1, execute_debug_irq);
|
| 1267 | 1280 | debug_console_register_command(machine, "nimbus_intmasks", CMDFLAG_NONE, 0, 0, 0, execute_debug_intmasks);
|
| 1268 | | debug_console_register_command(machine, "nimbus_key", CMDFLAG_NONE, 0, 0, 1, execute_debug_key);
|
| 1269 | | |
| 1270 | | |
| 1281 | |
| 1271 | 1282 | /* set up the instruction hook */
|
| 1272 | 1283 | debug_cpu_set_instruction_hook(cputag_get_cpu(machine, MAINCPU_TAG), instruction_hook);
|
| 1273 | 1284 |
|
| r6798 | r6799 | |
| 1327 | 1338 | debug_console_printf(machine,"i186.intr.in_service= %04X\n",i186.intr.in_service);
|
| 1328 | 1339 | }
|
| 1329 | 1340 | |
| 1330 | | static void execute_debug_key(running_machine *machine, int ref, int params, const char *param[])
|
| 1331 | | {
|
| 1332 | | int Key;
|
| 1333 | | |
| 1334 | | if(params>0)
|
| 1335 | | {
|
| 1336 | | sscanf(param[0],"%d",&Key);
|
| 1337 | | |
| 1338 | | nextkey=Key;
|
| 1339 | | }
|
| 1340 | | else
|
| 1341 | | {
|
| 1342 | | debug_console_printf(machine,"Error, you must supply a keycode\n");
|
| 1343 | | }
|
| 1344 | |
|
| 1345 | | |
| 1346 | | }
|
| 1347 | | |
| 1348 | | |
| 1349 | 1341 | /*-----------------------------------------------
|
| 1350 | 1342 | instruction_hook - per-instruction hook
|
| 1351 | 1343 | -----------------------------------------------*/
|
| r6798 | r6799 | |
| 1736 | 1728 | }
|
| 1737 | 1729 | }
|
| 1738 | 1730 | |
| 1731 | |
| 1739 | 1732 | /* |
| 1733 | Keyboard emulation |
| 1734 | |
| 1735 | */
|
| 1740 | 1736 | |
| 1737 | static void keyboard_reset(void)
|
| 1738 | {
|
| 1739 | memset(keyboard.keyrows,0xFF,NIMBUS_KEYROWS);
|
| 1740 | |
| 1741 | // Setup timer to scan keyboard.
|
| 1742 | timer_adjust_periodic(keyboard.keyscan_timer, attotime_zero, 0, ATTOTIME_IN_HZ(50));
|
| 1743 | |
| 1744 | }
|
| 1745 | |
| 1746 | static void queue_scancode(UINT8 scancode)
|
| 1747 | {
|
| 1748 | keyboard.queue[keyboard.head] = scancode;
|
| 1749 | keyboard.head++;
|
| 1750 | keyboard.head %= (sizeof(keyboard.queue) / sizeof(keyboard.queue[0]));
|
| 1751 | }
|
| 1752 | |
| 1753 | static int keyboard_queue_read(void)
|
| 1754 | {
|
| 1755 | int data;
|
| 1756 | if (keyboard.tail == keyboard.head)
|
| 1757 | return -1;
|
| 1758 | |
| 1759 | data = keyboard.queue[keyboard.tail];
|
| 1760 | |
| 1761 | if (LOG_KEYBOARD)
|
| 1762 | logerror("at_keyboard_read(): Keyboard Read 0x%02x\n",data);
|
| 1763 | |
| 1764 | keyboard.tail++;
|
| 1765 | keyboard.tail %= sizeof(keyboard.queue) / sizeof(keyboard.queue[0]);
|
| 1766 | return data;
|
| 1767 | }
|
| 1768 | |
| 1769 | static TIMER_CALLBACK(keyscan_callback)
|
| 1770 | {
|
| 1771 | UINT8 keyrow;
|
| 1772 | UINT8 row;
|
| 1773 | UINT8 bitno;
|
| 1774 | UINT8 mask;
|
| 1775 | static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4",
|
| 1776 | "KEY5", "KEY6", "KEY7", "KEY8", "KEY9", |
| 1777 | "KEY10"};
|
| 1778 | |
| 1779 | for(row=0;row<NIMBUS_KEYROWS;row++)
|
| 1780 | {
|
| 1781 | keyrow=input_port_read(machine, keynames[row]);
|
| 1782 | |
| 1783 | for(mask=0x80, bitno=7;mask>0;mask=mask>>1, bitno-=1)
|
| 1784 | {
|
| 1785 | if(!(keyrow & mask) && (keyboard.keyrows[row] & mask))
|
| 1786 | {
|
| 1787 | logerror("keypress %02X\n",(row<<3)+bitno);
|
| 1788 | queue_scancode((row<<3)+bitno);
|
| 1789 | }
|
| 1790 |
|
| 1791 | if((keyrow & mask) && !(keyboard.keyrows[row] & mask))
|
| 1792 | {
|
| 1793 | logerror("keyrelease %02X\n",0x80+(row<<3)+bitno); |
| 1794 | queue_scancode(0x80+(row<<3)+bitno);
|
| 1795 | }
|
| 1796 | }
|
| 1797 | |
| 1798 | keyboard.keyrows[row]=keyrow;
|
| 1799 | }
|
| 1800 | }
|
| 1801 | |
| 1802 | |
| 1803 | /* |
| 1804 | |
| 1741 | 1805 | Z80SIO, used for the keyboard interface |
| 1742 | 1806 | |
| 1743 | 1807 | */
|
| r6798 | r6799 | |
| 1820 | 1884 | |
| 1821 | 1885 | int sio_serial_receive( const device_config *device, int channel )
|
| 1822 | 1886 | {
|
| 1823 | | UINT8 keyrow;
|
| 1824 | | UINT8 row;
|
| 1825 | | static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4",
|
| 1826 | | "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" };
|
| 1827 | | int key;
|
| 1828 | | |
| 1829 | 1887 | if(channel==0)
|
| 1830 | 1888 | {
|
| 1831 | | key=-1;
|
| 1832 | | |
| 1833 | | //logerror("Read keyboard\n");
|
| 1834 | | for(row=0;row<NIMBUS_KEYROWS;row++)
|
| 1835 | | {
|
| 1836 | | keyrow=input_port_read(device->machine, keynames[row]);
|
| 1837 | | if(keyrows[row]!=keyrow)
|
| 1838 | | {
|
| 1839 | | keyrows[row]=keyrow;
|
| 1840 | | key=~keyrow & 0xff;
|
| 1841 | | }
|
| 1842 | | }
|
| 1843 | | |
| 1844 | | if (nextkey!=0)
|
| 1845 | | {
|
| 1846 | | key=nextkey;
|
| 1847 | | nextkey=0;
|
| 1848 | | }
|
| 1849 | | |
| 1850 | | if(key!=-1) |
| 1851 | | logerror("Keypressed=%02X\n",key);
|
| 1852 | | |
| 1853 | | return key;
|
| 1889 | return keyboard_queue_read(); |
| 1854 | 1890 | }
|
| 1855 | 1891 | else
|
| 1856 | 1892 | return -1;
|
src/mess/drivers/rmnimbus.c
| r6798 | r6799 | |
| 67 | 67 | ADDRESS_MAP_END
|
| 68 | 68 | |
| 69 | 69 | static INPUT_PORTS_START( nimbus )
|
| 70 | | PORT_START("KEY0") /* Key row 10 */
|
| 71 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
|
| 72 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2')
|
| 73 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3')
|
| 74 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4')
|
| 75 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5')
|
| 76 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6')
|
| 77 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7')
|
| 78 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8')
|
| 70 | PORT_START("KEY0") /* Key row 0 scancodes 00..07 */
|
| 71 | //PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
|
| 72 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(0x1B)
|
| 73 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
|
| 74 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2')
|
| 75 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3')
|
| 76 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4')
|
| 77 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5')
|
| 78 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6')
|
| 79 | 79 | |
| 80 | PORT_START("KEY1") /* Key row 1 scancodes 08..0F */
|
| 81 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_1) PORT_CHAR('7')
|
| 82 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_ESC) PORT_CHAR('8')
|
| 83 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_1) PORT_CHAR('9')
|
| 84 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_2) PORT_CHAR('0')
|
| 85 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')
|
| 86 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=')
|
| 87 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(0x08)
|
| 88 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(0x09)
|
| 89 | |
| 90 | PORT_START("KEY2") /* Key row 2 scancodes 10..17 */
|
| 91 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
|
| 92 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W')
|
| 93 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E')
|
| 94 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R')
|
| 95 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T')
|
| 96 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
|
| 97 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U')
|
| 98 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I')
|
| 99 | |
| 100 | PORT_START("KEY3") /* Key row 3 scancodes 18..1F */
|
| 101 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O')
|
| 102 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P')
|
| 103 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[')
|
| 104 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']')
|
| 105 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(0x0D)
|
| 106 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) // Ether control
|
| 107 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A')
|
| 108 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S')
|
| 109 | |
| 110 | PORT_START("KEY4") /* Key row 4 scancodes 20..27 */
|
| 111 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D')
|
| 112 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F')
|
| 113 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G')
|
| 114 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H')
|
| 115 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J')
|
| 116 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K')
|
| 117 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L')
|
| 118 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';')
|
| 119 | |
| 120 | PORT_START("KEY5") /* Key row 5 scancodes 28..2F */
|
| 121 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("#") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('#')
|
| 122 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\')
|
| 123 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LSHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
| 124 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TILDE") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`')
|
| 125 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
|
| 126 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X')
|
| 127 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C')
|
| 128 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V')
|
| 129 |
|
| 130 | |
| 131 | PORT_START("KEY6") /* Key row 6 scancodes 30..37 */
|
| 132 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B')
|
| 133 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N')
|
| 134 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M')
|
| 135 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')
|
| 136 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.')
|
| 137 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/')
|
| 138 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RSHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_2)
|
| 139 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PRSCR") PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('*')
|
| 140 |
|
| 141 | PORT_START("KEY7") /* Key row 7 scancodes 38..3F */
|
| 142 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ALT") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT)
|
| 143 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
| 144 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) |
| 145 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
|
| 146 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2)
|
| 147 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3)
|
| 148 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4)
|
| 149 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5)
|
| 150 | |
| 151 |
|
| 152 | PORT_START("KEY8") /* Key row 8 scancodes 40..47 */
|
| 153 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) |
| 154 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) |
| 155 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) |
| 156 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) |
| 157 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F10") PORT_CODE(KEYCODE_F10) |
| 158 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NUMLK") PORT_CODE(KEYCODE_NUMLOCK) |
| 159 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SCRLK") PORT_CODE(KEYCODE_SCRLOCK) |
| 160 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP7") PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('7')
|
| 161 | |
| 162 | PORT_START("KEY9") /* Key row 9 scancodes 48..4F */
|
| 163 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP8") PORT_CODE(KEYCODE_8_PAD) PORT_CHAR('8')
|
| 164 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP9") PORT_CODE(KEYCODE_9_PAD) PORT_CHAR('9')
|
| 165 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP-") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR('-')
|
| 166 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP4") PORT_CODE(KEYCODE_4_PAD) PORT_CHAR('4')
|
| 167 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP5") PORT_CODE(KEYCODE_5_PAD) PORT_CHAR('5')
|
| 168 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP6") PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('6')
|
| 169 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP+") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR('+')
|
| 170 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP1") PORT_CODE(KEYCODE_1_PAD) PORT_CHAR('1')
|
| 171 | |
| 172 | PORT_START("KEY10") /* Key row 10 scancodes 50..57 */
|
| 173 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP2") PORT_CODE(KEYCODE_2_PAD) PORT_CHAR('2')
|
| 174 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP3") PORT_CODE(KEYCODE_3_PAD) PORT_CHAR('3')
|
| 175 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP0") PORT_CODE(KEYCODE_0_PAD) PORT_CHAR('0')
|
| 176 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP.") PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR('.')
|
| 177 | //PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP5") PORT_CODE(KEYCODE_5_PAD) PORT_CHAR('5')
|
| 178 | //PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP6") PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('6')
|
| 179 | //PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP+") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR('+')
|
| 180 | //PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP1") PORT_CODE(KEYCODE_1_PAD) PORT_CHAR('1')
|
| 80 | 181 | INPUT_PORTS_END
|
| 81 | 182 | |
| 82 | 183 | |