src/mess/machine/ut88.c
| r2764 | r2765 | |
| 21 | 21 | /* set initialy ROM to be visible on first bank */ |
| 22 | 22 | UINT8 *RAM = memory_region(REGION_CPU1); |
| 23 | 23 | memset(RAM,0x0000,0x0800); // make frist page empty by default |
| 24 | | memory_configure_bank(1, 1, 2, RAM, 0x0000); |
| 24 | memory_configure_bank(1, 1, 2, RAM, 0x0000); |
| 25 | 25 | memory_configure_bank(1, 0, 2, RAM, 0xf800); |
| 26 | 26 | } |
| 27 | 27 | |
| r2764 | r2765 | |
| 102 | 102 | |
| 103 | 103 | READ8_HANDLER( ut88mini_keyboard_r ) |
| 104 | 104 | { |
| 105 | | return input_port_read_indexed(machine, 0); |
| 105 | // This is real keyboard implementation |
| 106 | UINT8 *keyrom1 = memory_region(REGION_CPU1)+ 0x10000; |
| 107 | UINT8 *keyrom2 = memory_region(REGION_CPU1)+ 0x10100; |
| 108 | |
| 109 | UINT8 key = keyrom2[input_port_read_indexed(machine, 1)]; |
| 110 | // if keyboard 2nd part returned 0 on 4th bit output from |
| 111 | // first part is used |
| 112 | if ((key & 0x08) ==0x00) { |
| 113 | key = keyrom1[input_port_read_indexed(machine, 0)]; |
| 114 | } |
| 115 | // for delete key there is special key producing code 0x80 |
| 116 | key = (input_port_read_indexed(machine, 2) & 0x80)==0x80 ? key : 0x80; |
| 117 | // If key 0 is pressed it value is 0x10 this is done by additional |
| 118 | // discrete logic |
| 119 | key = (input_port_read_indexed(machine, 0) & 0x01)==0x01 ? key : 0x10; |
| 120 | return key; |
| 106 | 121 | } |
| 107 | 122 | |
| 108 | 123 | static int lcd_digit[6]; |
src/mess/drivers/ut88.c
| r2764 | r2765 | |
| 134 | 134 | |
| 135 | 135 | INPUT_PORTS_START( ut88mini ) |
| 136 | 136 | PORT_START /* line 0 */ |
| 137 | | PORT_BIT(0x00, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 138 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 139 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 140 | | PORT_BIT(0x03, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 141 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 142 | | PORT_BIT(0x05, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 143 | | PORT_BIT(0x06, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 144 | | PORT_BIT(0x07, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 145 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 146 | | PORT_BIT(0x09, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 147 | | PORT_BIT(0x0A, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 148 | | PORT_BIT(0x0B, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 149 | | PORT_BIT(0x0C, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 150 | | PORT_BIT(0x0D, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 151 | | PORT_BIT(0x0E, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 152 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 153 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) |
| 137 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 138 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 139 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 140 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 141 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 142 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 143 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 144 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 145 | PORT_START /* line 1 */ |
| 146 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 147 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 148 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 149 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 150 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 151 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 152 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 153 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 154 | PORT_START /* line 2 */ |
| 155 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) |
| 154 | 156 | INPUT_PORTS_END |
| 155 | 157 | |
| 156 | 158 | /* Machine driver */ |
| r2764 | r2765 | |
| 225 | 227 | ROM_END |
| 226 | 228 | |
| 227 | 229 | ROM_START( ut88mini ) |
| 228 | | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 230 | ROM_REGION( 0x10200, REGION_CPU1, ROMREGION_ERASEFF ) |
| 229 | 231 | ROM_LOAD( "ut88mini.rom", 0x0000, 0x0400, CRC(ce9213ee) SHA1(16b71b3051a800386d664dbcc5983b783475d0c6) ) |
| 232 | ROM_LOAD( "ut88key1.rom", 0x10000, 0x0100, CRC(ecfe42c7) SHA1(d7f10bbb05934150c1a258db1c8b4eb65771af59) ) |
| 233 | ROM_LOAD( "ut88key2.rom", 0x10100, 0x0100, CRC(96324d23) SHA1(9dca3f639fc29d87df56505b3dde668ef2849da3) ) |
| 230 | 234 | ROM_END |
| 231 | 235 | |
| 232 | 236 | /* Driver */ |