trunk/src/mess/drivers/hh_tms1k.c
r244660 | r244661 | |
11 | 11 | |
12 | 12 | serial device etc. |
13 | 13 | -------------------------------------------------------------------- |
14 | | @MP0904A TMS0970 1977, Milton Bradley Comp IV |
| 14 | @CP0904A TMS0970 1977, Milton Bradley Comp IV |
15 | 15 | @MP0905B TMS0970 1977, Parker Brothers Codename Sector |
16 | | @MP0914 TMS1000 1979, Entex Baseball |
| 16 | @MP0914 TMS1000 1978, Entex Baseball 1 |
17 | 17 | @MP1030 TMS1100 1980, APF Mathemagician |
18 | 18 | @MP3226 TMS1000 1978, Milton Bradley Simon |
19 | 19 | @MP3403 TMS1100 1978, unknown |
r244660 | r244661 | |
371 | 371 | |
372 | 372 | void hh_tms1k_state::mathmagi_display() |
373 | 373 | { |
| 374 | m_display_maxx = 8; |
374 | 375 | m_display_maxy = 11; |
375 | | m_display_maxx = 8; |
376 | 376 | |
377 | 377 | // R0-R7: 7seg leds |
378 | 378 | for (int y = 0; y < 8; y++) |
r244660 | r244661 | |
535 | 535 | |
536 | 536 | void hh_tms1k_state::amaztron_display() |
537 | 537 | { |
| 538 | m_display_maxx = 8; |
538 | 539 | m_display_maxy = 3; |
539 | | m_display_maxx = 8; |
540 | 540 | |
541 | 541 | // R8,R9: select digit |
542 | 542 | for (int y = 0; y < 2; y++) |
r244660 | r244661 | |
1347 | 1347 | |
1348 | 1348 | WRITE16_MEMBER(hh_tms1k_state::cnsector_write_r) |
1349 | 1349 | { |
| 1350 | m_display_maxx = 8; |
1350 | 1351 | m_display_maxy = 7; |
1351 | | m_display_maxx = 8; |
1352 | 1352 | |
1353 | 1353 | // R0-R5: select digit (right-to-left) |
1354 | 1354 | for (int y = 0; y < 6; y++) |
r244660 | r244661 | |
1555 | 1555 | |
1556 | 1556 | WRITE16_MEMBER(hh_tms1k_state::stopthief_write_r) |
1557 | 1557 | { |
| 1558 | m_display_maxx = 7; |
1558 | 1559 | m_display_maxy = 3; |
1559 | | m_display_maxx = 7; |
1560 | 1560 | |
1561 | 1561 | // R0-R2: select digit |
1562 | 1562 | UINT8 o = BITSWAP8(m_o,3,5,2,1,4,0,6,7) & 0x7f; |
r244660 | r244661 | |
2294 | 2294 | CONS( 1979, amaztron, 0, 0, amaztron, amaztron, driver_device, 0, "Coleco", "Amaze-A-Tron", GAME_SUPPORTS_SAVE ) |
2295 | 2295 | CONS( 1981, tc4, 0, 0, tc4, tc4, driver_device, 0, "Coleco", "Total Control 4", GAME_SUPPORTS_SAVE ) |
2296 | 2296 | |
2297 | | CONS( 1979, ebball, 0, 0, ebball, ebball, driver_device, 0, "Entex", "Baseball (Entex)", GAME_SUPPORTS_SAVE ) |
| 2297 | CONS( 1978, ebball, 0, 0, ebball, ebball, driver_device, 0, "Entex", "Electronic Baseball (Entex)", GAME_SUPPORTS_SAVE ) |
2298 | 2298 | |
2299 | 2299 | CONS( 1979, elecdet, 0, 0, elecdet, elecdet, driver_device, 0, "Ideal", "Electronic Detective", GAME_SUPPORTS_SAVE ) |
2300 | 2300 | |
trunk/src/mess/drivers/hh_ucom4.c
r244660 | r244661 | |
86 | 86 | void tmtennis_set_clock(); |
87 | 87 | DECLARE_INPUT_CHANGED_MEMBER(tmtennis_difficulty_switch); |
88 | 88 | DECLARE_MACHINE_RESET(tmtennis); |
| 89 | |
| 90 | DECLARE_WRITE8_MEMBER(tmpacman_grid_w); |
| 91 | DECLARE_WRITE8_MEMBER(tmpacman_plate_w); |
| 92 | DECLARE_WRITE8_MEMBER(tmpacman_port_e_w); |
89 | 93 | |
90 | 94 | DECLARE_READ8_MEMBER(alnchase_input_r); |
91 | 95 | DECLARE_WRITE8_MEMBER(alnchase_display_w); |
r244660 | r244661 | |
232 | 236 | |
233 | 237 | WRITE8_MEMBER(hh_ucom4_state::edracula_grid_w) |
234 | 238 | { |
235 | | // port C/D: vfd matrix grid |
| 239 | // ports C,D: vfd matrix grid |
236 | 240 | int shift = (offset - NEC_UCOM4_PORTC) * 4; |
237 | 241 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
238 | 242 | |
r244660 | r244661 | |
241 | 245 | |
242 | 246 | WRITE8_MEMBER(hh_ucom4_state::edracula_plate_w) |
243 | 247 | { |
244 | | // port E/F/G/H/I01: vfd matrix plate |
| 248 | // ports E-H,I01: vfd matrix plate |
245 | 249 | int shift = (offset - NEC_UCOM4_PORTE) * 4; |
246 | 250 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
247 | 251 | |
r244660 | r244661 | |
258 | 262 | |
259 | 263 | |
260 | 264 | static INPUT_PORTS_START( edracula ) |
261 | | PORT_START("IN.0") |
| 265 | PORT_START("IN.0") // port A |
262 | 266 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) |
263 | 267 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START ) |
264 | 268 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
265 | 269 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
266 | 270 | |
267 | | PORT_START("IN.1") |
| 271 | PORT_START("IN.1") // port B |
268 | 272 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) |
269 | 273 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) |
270 | 274 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) |
r244660 | r244661 | |
321 | 325 | |
322 | 326 | READ8_MEMBER(hh_ucom4_state::tmtennis_input_r) |
323 | 327 | { |
324 | | // port A/B: buttons |
| 328 | // ports A,B: buttons |
325 | 329 | return ~read_inputs(2) >> (offset*4); |
326 | 330 | } |
327 | 331 | |
328 | | WRITE8_MEMBER(hh_ucom4_state::tmtennis_port_e_w) |
| 332 | WRITE8_MEMBER(hh_ucom4_state::tmtennis_grid_w) |
329 | 333 | { |
330 | | // E0/E1: input mux |
331 | | // E2: speaker out |
332 | | // E3: N/C |
333 | | m_inp_mux = data & 3; |
334 | | m_speaker->level_w(data >> 2 & 1); |
| 334 | // ports G-I: vfd matrix grid |
| 335 | int shift = (offset - NEC_UCOM4_PORTG) * 4; |
| 336 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
| 337 | |
| 338 | display_matrix(12, 12, m_plate, m_grid); |
335 | 339 | } |
336 | 340 | |
337 | 341 | WRITE8_MEMBER(hh_ucom4_state::tmtennis_plate_w) |
338 | 342 | { |
339 | | // port C/D/F: vfd matrix plate |
| 343 | // ports C-F: vfd matrix plate |
340 | 344 | if (offset == NEC_UCOM4_PORTF) offset--; |
341 | 345 | int shift = (offset - NEC_UCOM4_PORTC) * 4; |
342 | 346 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
r244660 | r244661 | |
344 | 348 | display_matrix(12, 12, m_plate, m_grid); |
345 | 349 | } |
346 | 350 | |
347 | | WRITE8_MEMBER(hh_ucom4_state::tmtennis_grid_w) |
| 351 | WRITE8_MEMBER(hh_ucom4_state::tmtennis_port_e_w) |
348 | 352 | { |
349 | | // port G/H/I: vfd matrix grid |
350 | | int shift = (offset - NEC_UCOM4_PORTG) * 4; |
351 | | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
352 | | |
353 | | display_matrix(12, 12, m_plate, m_grid); |
| 353 | // E0,E1: input mux |
| 354 | // E2: speaker out |
| 355 | // E3: N/C |
| 356 | m_inp_mux = data & 3; |
| 357 | m_speaker->level_w(data >> 2 & 1); |
354 | 358 | } |
355 | 359 | |
356 | 360 | |
357 | | |
358 | 361 | /* Pro-Tennis physical button layout and labels is like this: |
359 | 362 | |
360 | 363 | [SERVE] [1] [2] [3] [3] [2] [1] [SERVE] |
r244660 | r244661 | |
456 | 459 | |
457 | 460 | ***************************************************************************/ |
458 | 461 | |
| 462 | WRITE8_MEMBER(hh_ucom4_state::tmpacman_grid_w) |
| 463 | { |
| 464 | // ports C,D: vfd matrix grid |
| 465 | int shift = (offset - NEC_UCOM4_PORTC) * 4; |
| 466 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
| 467 | |
| 468 | display_matrix(19, 8, m_plate, m_grid); |
| 469 | } |
| 470 | |
| 471 | WRITE8_MEMBER(hh_ucom4_state::tmpacman_plate_w) |
| 472 | { |
| 473 | // ports E-I: vfd matrix plate |
| 474 | int shift = (offset - NEC_UCOM4_PORTE) * 4; |
| 475 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 476 | |
| 477 | display_matrix(19, 8, m_plate, m_grid); |
| 478 | } |
| 479 | |
| 480 | WRITE8_MEMBER(hh_ucom4_state::tmpacman_port_e_w) |
| 481 | { |
| 482 | // E1: speaker out |
| 483 | m_speaker->level_w(data >> 1 & 1); |
| 484 | |
| 485 | tmpacman_plate_w(space, offset, data); |
| 486 | } |
| 487 | |
| 488 | |
459 | 489 | static INPUT_PORTS_START( tmpacman ) |
| 490 | PORT_START("IN.0") // port A |
| 491 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // 4 separate directional buttons, hence 16way |
| 492 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY |
| 493 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY |
| 494 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY |
| 495 | |
| 496 | PORT_START("IN.1") // port B |
| 497 | PORT_CONFNAME( 0x00, 0x00, DEF_STR( Difficulty ) ) |
| 498 | PORT_CONFSETTING( 0x00, "Amateur" ) |
| 499 | PORT_CONFSETTING( 0x01, "Professional" ) |
| 500 | PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) |
460 | 501 | INPUT_PORTS_END |
461 | 502 | |
462 | 503 | |
r244660 | r244661 | |
464 | 505 | |
465 | 506 | /* basic machine hardware */ |
466 | 507 | MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_430kHz) |
| 508 | MCFG_UCOM4_READ_A_CB(IOPORT("IN.0")) |
| 509 | MCFG_UCOM4_READ_B_CB(IOPORT("IN.1")) |
| 510 | MCFG_UCOM4_WRITE_C_CB(WRITE8(hh_ucom4_state, tmpacman_grid_w)) |
| 511 | MCFG_UCOM4_WRITE_D_CB(WRITE8(hh_ucom4_state, tmpacman_grid_w)) |
| 512 | MCFG_UCOM4_WRITE_E_CB(WRITE8(hh_ucom4_state, tmpacman_port_e_w)) |
| 513 | MCFG_UCOM4_WRITE_F_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w)) |
| 514 | MCFG_UCOM4_WRITE_G_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w)) |
| 515 | MCFG_UCOM4_WRITE_H_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w)) |
| 516 | MCFG_UCOM4_WRITE_I_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w)) |
467 | 517 | |
| 518 | MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1)) |
468 | 519 | MCFG_DEFAULT_LAYOUT(layout_tmpacman) |
469 | 520 | |
470 | 521 | /* no video! */ |
r244660 | r244661 | |
495 | 546 | |
496 | 547 | ***************************************************************************/ |
497 | 548 | |
498 | | |
499 | | |
500 | 549 | READ8_MEMBER(hh_ucom4_state::alnchase_input_r) |
501 | 550 | { |
502 | 551 | // port A: buttons |
r244660 | r244661 | |
507 | 556 | { |
508 | 557 | if (offset <= NEC_UCOM4_PORTE) |
509 | 558 | { |
510 | | // C/D/E0: vfd matrix grid |
| 559 | // ports C,D,E0: vfd matrix grid |
511 | 560 | int shift = (offset - NEC_UCOM4_PORTC) * 4; |
512 | 561 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
513 | 562 | |
r244660 | r244661 | |
518 | 567 | |
519 | 568 | if (offset >= NEC_UCOM4_PORTE) |
520 | 569 | { |
521 | | // E23/F/G/H/I: vfd matrix plate |
| 570 | // ports F-I,E23: vfd matrix plate |
522 | 571 | int shift = (offset - NEC_UCOM4_PORTE) * 4; |
523 | 572 | m_plate = ((m_plate << 2 & ~(0xf << shift)) | (data << shift)) >> 2; |
524 | 573 | } |
r244660 | r244661 | |
528 | 577 | |
529 | 578 | WRITE8_MEMBER(hh_ucom4_state::alnchase_port_e_w) |
530 | 579 | { |
531 | | alnchase_display_w(space, offset, data); |
532 | | |
533 | 580 | // E1: speaker out |
534 | 581 | m_speaker->level_w(data >> 1 & 1); |
| 582 | |
| 583 | alnchase_display_w(space, offset, data); |
535 | 584 | } |
536 | 585 | |
537 | 586 | /* physical button layout and labels is like this: |