src/mess/drivers/vidbrain.c
| r7769 | r7770 | |
| 13 | 13 | |
| 14 | 14 | TODO: |
| 15 | 15 | |
| 16 | | - video |
| 16 | - colors |
| 17 | - low resolution mode |
| 17 | 18 | - discrete sound |
| 18 | 19 | - keyboard column 8 |
| 19 | 20 | - joystick scan timer 555 |
| 21 | - reset on cartridge eject |
| 20 | 22 | - expander 1 (cassette, RS-232) |
| 21 | 23 | - expander 2 (modem) |
| 22 | 24 | |
| r7769 | r7770 | |
| 83 | 85 | |
| 84 | 86 | vidbrain_state *state = (vidbrain_state *)space->machine->driver_data; |
| 85 | 87 | |
| 86 | | UINT8 data = input_port_read(space->machine, "JOY-R"); |
| 88 | UINT8 data = 0;//input_port_read(space->machine, "JOY-R"); |
| 87 | 89 | |
| 88 | | if (!BIT(state->keylatch, 0)) data &= input_port_read(space->machine, "IO00"); |
| 89 | | if (!BIT(state->keylatch, 1)) data &= input_port_read(space->machine, "IO01"); |
| 90 | | if (!BIT(state->keylatch, 2)) data &= input_port_read(space->machine, "IO02"); |
| 91 | | if (!BIT(state->keylatch, 3)) data &= input_port_read(space->machine, "IO03"); |
| 92 | | if (!BIT(state->keylatch, 4)) data &= input_port_read(space->machine, "IO04"); |
| 93 | | if (!BIT(state->keylatch, 5)) data &= input_port_read(space->machine, "IO05"); |
| 94 | | if (!BIT(state->keylatch, 6)) data &= input_port_read(space->machine, "IO06"); |
| 95 | | if (!BIT(state->keylatch, 7)) data &= input_port_read(space->machine, "IO07"); |
| 90 | if (BIT(state->keylatch, 0)) data |= input_port_read(space->machine, "IO00"); |
| 91 | if (BIT(state->keylatch, 1)) data |= input_port_read(space->machine, "IO01"); |
| 92 | if (BIT(state->keylatch, 2)) data |= input_port_read(space->machine, "IO02"); |
| 93 | if (BIT(state->keylatch, 3)) data |= input_port_read(space->machine, "IO03"); |
| 94 | if (BIT(state->keylatch, 4)) data |= input_port_read(space->machine, "IO04"); |
| 95 | if (BIT(state->keylatch, 5)) data |= input_port_read(space->machine, "IO05"); |
| 96 | if (BIT(state->keylatch, 6)) data |= input_port_read(space->machine, "IO06"); |
| 97 | if (BIT(state->keylatch, 7)) data |= input_port_read(space->machine, "IO07"); |
| 98 | // if () data |= input_port_read(space->machine, "UV201-31"); |
| 96 | 99 | |
| 97 | 100 | return data; |
| 98 | 101 | } |
| r7769 | r7770 | |
| 121 | 124 | vidbrain_state *state = (vidbrain_state *)space->machine->driver_data; |
| 122 | 125 | |
| 123 | 126 | /* sound clock */ |
| 124 | | discrete_sound_w(state->discrete, NODE_01, BIT(state->keylatch, 0)); |
| 125 | | discrete_sound_w(state->discrete, NODE_02, BIT(state->keylatch, 1)); |
| 127 | int sound_clk = BIT(data, 7); |
| 126 | 128 | |
| 129 | if (!state->sound_clk && sound_clk) |
| 130 | { |
| 131 | state->sound_q[0] = BIT(state->keylatch, 0); |
| 132 | state->sound_q[1] = BIT(state->keylatch, 1); |
| 133 | |
| 134 | discrete_sound_w(state->discrete, NODE_01, state->sound_q[0]); |
| 135 | discrete_sound_w(state->discrete, NODE_02, state->sound_q[1]); |
| 136 | } |
| 137 | |
| 138 | state->sound_clk = sound_clk; |
| 139 | |
| 127 | 140 | /* joystick enable */ |
| 128 | 141 | state->joy_enable = BIT(data, 7); |
| 129 | 142 | } |
| r7769 | r7770 | |
| 137 | 150 | -------------------------------------------------*/ |
| 138 | 151 | |
| 139 | 152 | static ADDRESS_MAP_START( vidbrain_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 153 | ADDRESS_MAP_UNMAP_HIGH |
| 140 | 154 | AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0xc000) AM_ROM |
| 141 | 155 | // AM_RANGE(0x0800, 0x08ff) video chip |
| 142 | | AM_RANGE(0x0c00, 0x0fff) AM_MIRROR(0xe000) AM_RAM |
| 156 | AM_RANGE(0x0c00, 0x0fff) AM_MIRROR(0xe000) AM_RAM AM_BASE_MEMBER(vidbrain_state, video_ram) |
| 143 | 157 | AM_RANGE(0x1000, 0x1fff) AM_ROM |
| 144 | 158 | AM_RANGE(0x2000, 0x27ff) AM_MIRROR(0xc000) AM_ROM |
| 145 | 159 | ADDRESS_MAP_END |
| r7769 | r7770 | |
| 168 | 182 | |
| 169 | 183 | static INPUT_PORTS_START( vidbrain ) |
| 170 | 184 | PORT_START("IO00") |
| 171 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('"') |
| 172 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('#') |
| 173 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("P \xC2\xA2") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR(0x00a2) |
| 174 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("; \xC2\xB6") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(0x00b6) |
| 175 | | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 185 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('"') |
| 186 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('#') |
| 187 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("P \xC2\xA2") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR(0x00a2) |
| 188 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("; \xC2\xB6") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(0x00b6) |
| 176 | 189 | |
| 177 | 190 | PORT_START("IO01") |
| 178 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('!') |
| 179 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR(')') |
| 180 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('$') |
| 181 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR('\'') PORT_CHAR('*') |
| 182 | | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 191 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('!') |
| 192 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR(')') |
| 193 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('$') |
| 194 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR('\'') PORT_CHAR('*') |
| 183 | 195 | |
| 184 | 196 | PORT_START("IO02") |
| 185 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Y \xC3\xB7") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR(0x00f7) |
| 186 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('(') |
| 187 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR(':') |
| 188 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 189 | | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 197 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Y \xC3\xB7") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR(0x00f7) |
| 198 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('(') |
| 199 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR(':') |
| 200 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 190 | 201 | |
| 191 | 202 | PORT_START("IO03") |
| 192 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("T \xC3\x97") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR(0x00d7) |
| 193 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('/') |
| 194 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR(',') |
| 195 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ERASE RESTART") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 196 | | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 203 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("T \xC3\x97") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR(0x00d7) |
| 204 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('/') |
| 205 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR(',') |
| 206 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("ERASE RESTART") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 197 | 207 | |
| 198 | 208 | PORT_START("IO04") |
| 199 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('9') |
| 200 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('-') |
| 201 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('=') |
| 202 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE RUN/STOP") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 203 | | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 209 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('9') |
| 210 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('-') |
| 211 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('=') |
| 212 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SPACE RUN/STOP") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 204 | 213 | |
| 205 | 214 | PORT_START("IO05") |
| 206 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('8') |
| 207 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('6') |
| 208 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('+') |
| 209 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPECIAL ALARM") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) |
| 210 | | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 215 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('8') |
| 216 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('6') |
| 217 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('+') |
| 218 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SPECIAL ALARM") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) |
| 211 | 219 | |
| 212 | 220 | PORT_START("IO06") |
| 213 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('7') |
| 214 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('5') |
| 215 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('3') |
| 216 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("NEXT CLOCK") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) |
| 217 | | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 221 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('7') |
| 222 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('5') |
| 223 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('3') |
| 224 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NEXT CLOCK") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) |
| 218 | 225 | |
| 219 | 226 | PORT_START("IO07") |
| 220 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('%') |
| 221 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('4') |
| 222 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('2') |
| 223 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("PREVIOUS COLOR") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) |
| 224 | | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 227 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('%') |
| 228 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('4') |
| 229 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('2') |
| 230 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PREVIOUS COLOR") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) |
| 225 | 231 | |
| 226 | 232 | PORT_START("UV201-31") |
| 227 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('.') |
| 228 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('1') |
| 229 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('?') PORT_CHAR('0') |
| 230 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("BACK TEXT") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) |
| 231 | | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 233 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('.') |
| 234 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('1') |
| 235 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('?') PORT_CHAR('0') |
| 236 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("BACK TEXT") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) |
| 232 | 237 | |
| 233 | 238 | PORT_START("RESET") |
| 234 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("MASTER CONTROL") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CHANGED(trigger_reset, 0) |
| 239 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("MASTER CONTROL") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CHANGED(trigger_reset, 0) |
| 235 | 240 | |
| 236 | 241 | PORT_START("JOY1-X") |
| 237 | 242 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_PLAYER(1) |
| r7769 | r7770 | |
| 262 | 267 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 263 | 268 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) |
| 264 | 269 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) |
| 265 | | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 266 | 270 | INPUT_PORTS_END |
| 267 | 271 | |
| 268 | 272 | /*************************************************************************** |
| r7769 | r7770 | |
| 283 | 287 | |
| 284 | 288 | static VIDEO_UPDATE( vidbrain ) |
| 285 | 289 | { |
| 290 | vidbrain_state *state = (vidbrain_state *)screen->machine->driver_data; |
| 291 | |
| 292 | UINT16 addr = 0x2f; |
| 293 | |
| 294 | for (int y = 0; y < 49; y++) |
| 295 | { |
| 296 | for (int sx = 0; sx < 16; sx++) |
| 297 | { |
| 298 | UINT8 data = state->video_ram[addr++]; |
| 299 | |
| 300 | for (int x = 0; x < 8; x++) |
| 301 | { |
| 302 | *BITMAP_ADDR16(bitmap, y, (sx * 8) + x) = BIT(data, 7); |
| 303 | data <<= 1; |
| 304 | } |
| 305 | } |
| 306 | } |
| 307 | |
| 286 | 308 | return 0; |
| 287 | 309 | } |
| 288 | 310 | |
| r7769 | r7770 | |
| 358 | 380 | /* register for state saving */ |
| 359 | 381 | state_save_register_global(machine, state->keylatch); |
| 360 | 382 | state_save_register_global(machine, state->joy_enable); |
| 383 | state_save_register_global(machine, state->sound_clk); |
| 384 | state_save_register_global_array(machine, state->sound_q); |
| 361 | 385 | } |
| 362 | 386 | |
| 363 | 387 | /*************************************************************************** |
| r7769 | r7770 | |
| 383 | 407 | MDRV_SCREEN_REFRESH_RATE(50) |
| 384 | 408 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 385 | 409 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 386 | | MDRV_SCREEN_SIZE(640, 480) |
| 387 | | MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) |
| 410 | MDRV_SCREEN_SIZE(128, 49) |
| 411 | MDRV_SCREEN_VISIBLE_AREA(0, 128-1, 0, 49-1) |
| 388 | 412 | MDRV_GFXDECODE(vidbrain) |
| 389 | 413 | MDRV_PALETTE_LENGTH(16) |
| 390 | 414 | |
| r7769 | r7770 | |
| 416 | 440 | |
| 417 | 441 | ROM_START( vidbrain ) |
| 418 | 442 | ROM_REGION( 0x3000, F3850_TAG, 0 ) |
| 419 | | ROM_LOAD( "res1.d67", 0x0000, 0x0800, CRC(065fe7c2) SHA1(9776f9b18cd4d7142e58eff45ac5ee4bc1fa5a2a) ) |
| 443 | ROM_LOAD( "uvres 1n.d67", 0x0000, 0x0800, CRC(065fe7c2) SHA1(9776f9b18cd4d7142e58eff45ac5ee4bc1fa5a2a) ) |
| 420 | 444 | ROM_CART_LOAD( "cart", 0x1000, 0x1000, 0 ) |
| 421 | | ROM_LOAD( "res2.e5", 0x2000, 0x0800, CRC(1d85d7be) SHA1(26c5a25d1289dedf107fa43aa8dfc14692fd9ee6) ) |
| 445 | ROM_LOAD( "resn2.e5", 0x2000, 0x0800, CRC(1d85d7be) SHA1(26c5a25d1289dedf107fa43aa8dfc14692fd9ee6) ) |
| 422 | 446 | ROM_END |
| 423 | 447 | |
| 424 | 448 | /*************************************************************************** |