trunk/src/mess/drivers/hh_ucom4.c
| r244676 | r244677 | |
| 87 | 87 | DECLARE_INPUT_CHANGED_MEMBER(tmtennis_difficulty_switch); |
| 88 | 88 | DECLARE_MACHINE_RESET(tmtennis); |
| 89 | 89 | |
| 90 | void tmpacman_display(); |
| 90 | 91 | DECLARE_WRITE8_MEMBER(tmpacman_grid_w); |
| 91 | 92 | DECLARE_WRITE8_MEMBER(tmpacman_plate_w); |
| 92 | 93 | DECLARE_WRITE8_MEMBER(tmpacman_port_e_w); |
| r244676 | r244677 | |
| 236 | 237 | |
| 237 | 238 | WRITE8_MEMBER(hh_ucom4_state::edracula_grid_w) |
| 238 | 239 | { |
| 239 | | // ports C,D: vfd matrix grid |
| 240 | // C,D: vfd matrix grid |
| 240 | 241 | int shift = (offset - NEC_UCOM4_PORTC) * 4; |
| 241 | 242 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
| 242 | 243 | |
| r244676 | r244677 | |
| 245 | 246 | |
| 246 | 247 | WRITE8_MEMBER(hh_ucom4_state::edracula_plate_w) |
| 247 | 248 | { |
| 248 | | // ports E-H,I01: vfd matrix plate |
| 249 | // E-H,I01: vfd matrix plate |
| 249 | 250 | int shift = (offset - NEC_UCOM4_PORTE) * 4; |
| 250 | 251 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 251 | 252 | |
| r244676 | r244677 | |
| 325 | 326 | |
| 326 | 327 | READ8_MEMBER(hh_ucom4_state::tmtennis_input_r) |
| 327 | 328 | { |
| 328 | | // ports A,B: buttons |
| 329 | // A,B: buttons |
| 329 | 330 | return ~read_inputs(2) >> (offset*4); |
| 330 | 331 | } |
| 331 | 332 | |
| 332 | 333 | WRITE8_MEMBER(hh_ucom4_state::tmtennis_grid_w) |
| 333 | 334 | { |
| 334 | | // ports G-I: vfd matrix grid |
| 335 | // G-I: vfd matrix grid |
| 335 | 336 | int shift = (offset - NEC_UCOM4_PORTG) * 4; |
| 336 | 337 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
| 337 | 338 | |
| r244676 | r244677 | |
| 340 | 341 | |
| 341 | 342 | WRITE8_MEMBER(hh_ucom4_state::tmtennis_plate_w) |
| 342 | 343 | { |
| 343 | | // ports C-F: vfd matrix plate |
| 344 | // C-F: vfd matrix plate |
| 344 | 345 | if (offset == NEC_UCOM4_PORTF) offset--; |
| 345 | 346 | int shift = (offset - NEC_UCOM4_PORTC) * 4; |
| 346 | 347 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| r244676 | r244677 | |
| 452 | 453 | known releases: |
| 453 | 454 | - Japan: Puck Man |
| 454 | 455 | - USA: Pac Man |
| 455 | | - UK: Puckman (Tomy), and also as Munchman, published by Grandstand |
| 456 | - UK: Puckman (Tomy), and also published by Grandstand as Munchman |
| 456 | 457 | - Australia: Pac Man-1, published by Futuretronics |
| 457 | 458 | |
| 458 | 459 | NOTE!: MESS external artwork is recommended |
| 459 | 460 | |
| 460 | 461 | ***************************************************************************/ |
| 461 | 462 | |
| 463 | void hh_ucom4_state::tmpacman_display() |
| 464 | { |
| 465 | UINT8 grid = BITSWAP8((UINT8)m_grid,0,1,2,3,4,5,6,7); |
| 466 | UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,16,17,18,11,10,9,8,0,2,3,1,4,5,6,7,12,13,14,15); |
| 467 | |
| 468 | display_matrix(19, 8, plate | 0x100, grid); |
| 469 | } |
| 470 | |
| 462 | 471 | WRITE8_MEMBER(hh_ucom4_state::tmpacman_grid_w) |
| 463 | 472 | { |
| 464 | | // ports C,D: vfd matrix grid |
| 473 | // C,D: vfd matrix grid |
| 465 | 474 | int shift = (offset - NEC_UCOM4_PORTC) * 4; |
| 466 | 475 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
| 467 | 476 | |
| 468 | | display_matrix(19, 8, m_plate, m_grid); |
| 477 | tmpacman_display(); |
| 469 | 478 | } |
| 470 | 479 | |
| 471 | 480 | WRITE8_MEMBER(hh_ucom4_state::tmpacman_plate_w) |
| 472 | 481 | { |
| 473 | | // ports E-I: vfd matrix plate |
| 482 | // E023,F-I: vfd matrix plate |
| 474 | 483 | int shift = (offset - NEC_UCOM4_PORTE) * 4; |
| 475 | 484 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 476 | 485 | |
| 477 | | display_matrix(19, 8, m_plate, m_grid); |
| 486 | tmpacman_display(); |
| 478 | 487 | } |
| 479 | 488 | |
| 480 | 489 | WRITE8_MEMBER(hh_ucom4_state::tmpacman_port_e_w) |
| r244676 | r244677 | |
| 494 | 503 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY |
| 495 | 504 | |
| 496 | 505 | PORT_START("IN.1") // port B |
| 497 | | PORT_CONFNAME( 0x00, 0x00, DEF_STR( Difficulty ) ) |
| 506 | PORT_CONFNAME( 0x01, 0x00, DEF_STR( Difficulty ) ) |
| 498 | 507 | PORT_CONFSETTING( 0x00, "Amateur" ) |
| 499 | 508 | PORT_CONFSETTING( 0x01, "Professional" ) |
| 500 | 509 | PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| r244676 | r244677 | |
| 548 | 557 | |
| 549 | 558 | READ8_MEMBER(hh_ucom4_state::alnchase_input_r) |
| 550 | 559 | { |
| 551 | | // port A: buttons |
| 560 | // A: buttons |
| 552 | 561 | return read_inputs(2); |
| 553 | 562 | } |
| 554 | 563 | |
| r244676 | r244677 | |
| 556 | 565 | { |
| 557 | 566 | if (offset <= NEC_UCOM4_PORTE) |
| 558 | 567 | { |
| 559 | | // ports C,D,E0: vfd matrix grid |
| 568 | // C,D,E0: vfd matrix grid |
| 560 | 569 | int shift = (offset - NEC_UCOM4_PORTC) * 4; |
| 561 | 570 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
| 562 | 571 | |
| r244676 | r244677 | |
| 567 | 576 | |
| 568 | 577 | if (offset >= NEC_UCOM4_PORTE) |
| 569 | 578 | { |
| 570 | | // ports F-I,E23: vfd matrix plate |
| 579 | // E23,F-I: vfd matrix plate |
| 571 | 580 | int shift = (offset - NEC_UCOM4_PORTE) * 4; |
| 572 | 581 | m_plate = ((m_plate << 2 & ~(0xf << shift)) | (data << shift)) >> 2; |
| 573 | 582 | } |
| r244676 | r244677 | |
| 684 | 693 | CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula (Epoch)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) |
| 685 | 694 | |
| 686 | 695 | CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tennis (Tomy)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) |
| 687 | | CONS( 1982, tmpacman, 0, 0, tmpacman, tmpacman, driver_device, 0, "Tomy", "Pac Man (Tomy)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING ) |
| 696 | CONS( 1982, tmpacman, 0, 0, tmpacman, tmpacman, driver_device, 0, "Tomy", "Pac Man (Tomy)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) |
| 688 | 697 | CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) |