trunk/src/mess/drivers/hh_hmcs40.c
| r245297 | r245298 | |
| 68 | 68 | optional_device<speaker_sound_device> m_speaker; |
| 69 | 69 | |
| 70 | 70 | // misc common |
| 71 | UINT8 m_r[8]; // MCU R ports write data |
| 72 | UINT16 m_d; // MCU D port write data |
| 73 | UINT8 m_int[2]; // MCU INT0/1 pins state |
| 71 | 74 | UINT16 m_inp_mux; // multiplexed inputs mask |
| 72 | 75 | |
| 73 | 76 | UINT16 read_inputs(int columns); |
| 77 | void refresh_interrupts(void); |
| 78 | void set_interrupt(int line, int state); |
| 79 | DECLARE_INPUT_CHANGED_MEMBER(single_interrupt_line); |
| 74 | 80 | |
| 75 | | virtual void machine_start(); |
| 76 | | |
| 77 | 81 | // display common |
| 78 | 82 | int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) |
| 79 | 83 | int m_display_maxy; // display matrix number of rows |
| r245297 | r245298 | |
| 101 | 105 | DECLARE_WRITE16_MEMBER(alnattck_grid_w); |
| 102 | 106 | DECLARE_READ16_MEMBER(alnattck_input_r); |
| 103 | 107 | |
| 108 | void cdkong_display(); |
| 109 | DECLARE_WRITE8_MEMBER(cdkong_plate_w); |
| 110 | DECLARE_WRITE16_MEMBER(cdkong_grid_w); |
| 111 | |
| 112 | void cgalaxn_display(); |
| 113 | DECLARE_WRITE16_MEMBER(cgalaxn_plate_w); |
| 114 | DECLARE_WRITE8_MEMBER(cgalaxn_grid_w); |
| 115 | DECLARE_READ8_MEMBER(cgalaxn_input_r); |
| 116 | |
| 104 | 117 | DECLARE_WRITE8_MEMBER(cpacman_plate_w); |
| 105 | 118 | DECLARE_WRITE16_MEMBER(cpacman_grid_w); |
| 106 | 119 | DECLARE_READ8_MEMBER(cpacman_input_r); |
| r245297 | r245298 | |
| 113 | 126 | DECLARE_WRITE8_MEMBER(egalaxn2_plate_w); |
| 114 | 127 | DECLARE_WRITE16_MEMBER(egalaxn2_grid_w); |
| 115 | 128 | DECLARE_READ8_MEMBER(egalaxn2_input_r); |
| 129 | |
| 130 | DECLARE_WRITE8_MEMBER(pbqbert_plate_w); |
| 131 | DECLARE_WRITE16_MEMBER(pbqbert_grid_w); |
| 132 | |
| 133 | protected: |
| 134 | virtual void machine_start(); |
| 135 | virtual void machine_reset(); |
| 116 | 136 | }; |
| 117 | 137 | |
| 118 | 138 | |
| 139 | // machine start/reset |
| 140 | |
| 119 | 141 | void hh_hmcs40_state::machine_start() |
| 120 | 142 | { |
| 121 | 143 | // zerofill |
| r245297 | r245298 | |
| 124 | 146 | memset(m_display_decay, 0, sizeof(m_display_decay)); |
| 125 | 147 | memset(m_display_segmask, 0, sizeof(m_display_segmask)); |
| 126 | 148 | |
| 149 | memset(m_r, 0, sizeof(m_r)); |
| 150 | memset(m_int, 0, sizeof(m_int)); |
| 151 | m_d = 0; |
| 127 | 152 | m_inp_mux = 0; |
| 128 | 153 | m_grid = 0; |
| 129 | 154 | m_plate = 0; |
| r245297 | r245298 | |
| 138 | 163 | save_item(NAME(m_display_decay)); |
| 139 | 164 | save_item(NAME(m_display_segmask)); |
| 140 | 165 | |
| 166 | save_item(NAME(m_r)); |
| 167 | save_item(NAME(m_int)); |
| 168 | save_item(NAME(m_d)); |
| 141 | 169 | save_item(NAME(m_inp_mux)); |
| 142 | 170 | save_item(NAME(m_grid)); |
| 143 | 171 | save_item(NAME(m_plate)); |
| 144 | 172 | } |
| 145 | 173 | |
| 174 | void hh_hmcs40_state::machine_reset() |
| 175 | { |
| 176 | refresh_interrupts(); |
| 177 | } |
| 146 | 178 | |
| 147 | 179 | |
| 180 | |
| 148 | 181 | /*************************************************************************** |
| 149 | 182 | |
| 150 | 183 | Helper Functions |
| r245297 | r245298 | |
| 240 | 273 | } |
| 241 | 274 | |
| 242 | 275 | |
| 276 | // interrupt handling |
| 243 | 277 | |
| 278 | void hh_hmcs40_state::refresh_interrupts() |
| 279 | { |
| 280 | for (int i = 0; i < 2; i++) |
| 281 | m_maincpu->set_input_line(i, m_int[i] ? ASSERT_LINE : CLEAR_LINE); |
| 282 | } |
| 283 | |
| 284 | void hh_hmcs40_state::set_interrupt(int line, int state) |
| 285 | { |
| 286 | line = line ? 1 : 0; |
| 287 | state = state ? 1 : 0; |
| 288 | |
| 289 | if (state != m_int[line]) |
| 290 | { |
| 291 | if (machine().phase() >= MACHINE_PHASE_RESET) |
| 292 | m_maincpu->set_input_line(line, state ? ASSERT_LINE : CLEAR_LINE); |
| 293 | m_int[line] = state; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | INPUT_CHANGED_MEMBER(hh_hmcs40_state::single_interrupt_line) |
| 298 | { |
| 299 | set_interrupt((int)(FPTR)param, newval); |
| 300 | } |
| 301 | |
| 302 | |
| 303 | |
| 244 | 304 | /*************************************************************************** |
| 245 | 305 | |
| 246 | 306 | Minidrivers (I/O, Inputs, Machine Config) |
| r245297 | r245298 | |
| 453 | 513 | |
| 454 | 514 | READ16_MEMBER(hh_hmcs40_state::alnattck_input_r) |
| 455 | 515 | { |
| 456 | | // D5: inputs |
| 457 | | return (read_inputs(7) & 1) << 5; |
| 516 | // D5: multiplexed inputs |
| 517 | return read_inputs(7); |
| 458 | 518 | } |
| 459 | 519 | |
| 460 | 520 | |
| 461 | 521 | static INPUT_PORTS_START( alnattck ) |
| 462 | 522 | PORT_START("IN.0") // D5 D7 |
| 463 | | PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) |
| 523 | PORT_CONFNAME( 0x20, 0x00, "Skill Level" ) |
| 464 | 524 | PORT_CONFSETTING( 0x00, "1" ) |
| 465 | | PORT_CONFSETTING( 0x01, "2" ) |
| 525 | PORT_CONFSETTING( 0x20, "2" ) |
| 466 | 526 | |
| 467 | 527 | PORT_START("IN.1") // D5 D8 |
| 468 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) |
| 528 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) |
| 469 | 529 | |
| 470 | 530 | PORT_START("IN.2") // D5 D9 |
| 471 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) |
| 531 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) |
| 472 | 532 | |
| 473 | 533 | PORT_START("IN.3") // D5 D10 |
| 474 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) |
| 534 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) |
| 475 | 535 | |
| 476 | 536 | PORT_START("IN.4") // D5 D11 |
| 477 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) |
| 537 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) |
| 478 | 538 | |
| 479 | 539 | PORT_START("IN.5") // D5 D12 |
| 480 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Move") |
| 540 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Move") |
| 481 | 541 | |
| 482 | 542 | PORT_START("IN.6") // D5 D13 |
| 483 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Fire") |
| 543 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Fire") |
| 484 | 544 | INPUT_PORTS_END |
| 485 | 545 | |
| 486 | 546 | |
| r245297 | r245298 | |
| 521 | 581 | |
| 522 | 582 | ***************************************************************************/ |
| 523 | 583 | |
| 584 | void hh_hmcs40_state::cdkong_display() |
| 585 | { |
| 586 | UINT32 plate = BITSWAP32(m_plate,31,30,29,24,0,16,8,1,23,17,9,2,18,10,25,27,26,3,15,27,11,11,14,22,6,13,21,5,19,12,20,4); |
| 587 | plate |= 0x800800; // plates 11,23 are always on |
| 588 | |
| 589 | display_matrix(29, 11, plate, m_grid); |
| 590 | } |
| 591 | |
| 592 | WRITE8_MEMBER(hh_hmcs40_state::cdkong_plate_w) |
| 593 | { |
| 594 | // R13: speaker on? |
| 595 | if (offset == HMCS40_PORT_R1X) |
| 596 | { |
| 597 | //strobes at the start of a sound.. on+slow decay? |
| 598 | //printf("%d",data>>3&1); |
| 599 | data &= 7; |
| 600 | } |
| 601 | |
| 602 | // R0x-R6x: vfd matrix plate |
| 603 | int shift = offset * 4; |
| 604 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 605 | cdkong_display(); |
| 606 | |
| 607 | // 12 |
| 608 | // 16,15,17,28,nc, 8, 5, 1, 3,19,22,26,13, 9, 6, 2,10,18,21,25,sp, 7, 4, 0,14,20,24,27 |
| 609 | // 31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 |
| 610 | // , , ,24, 0,16, 8, 1, ,17, 9, 2,18,10,25,27,26, 3,15,27, ,11,14,22, 6,13,21, 5,19,12,20, 4 |
| 611 | |
| 612 | } |
| 613 | |
| 614 | WRITE16_MEMBER(hh_hmcs40_state::cdkong_grid_w) |
| 615 | { |
| 616 | // D3: speaker out |
| 617 | m_speaker->level_w(data >> 3 & 1); |
| 618 | |
| 619 | // D4-D14: vfd matrix grid |
| 620 | m_grid = data >> 4 & 0x7ff; |
| 621 | cdkong_display(); |
| 622 | } |
| 623 | |
| 624 | |
| 524 | 625 | static INPUT_PORTS_START( cdkong ) |
| 626 | PORT_START("IN.0") // port D |
| 627 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) |
| 628 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) |
| 629 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) |
| 630 | PORT_BIT( 0x7ff8, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 631 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) |
| 632 | |
| 633 | PORT_START("IN.1") // INT0 |
| 634 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0) |
| 525 | 635 | INPUT_PORTS_END |
| 526 | 636 | |
| 527 | 637 | |
| r245297 | r245298 | |
| 529 | 639 | |
| 530 | 640 | /* basic machine hardware */ |
| 531 | 641 | MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. |
| 642 | MCFG_HMCS40_WRITE_R_CB(0, WRITE8(hh_hmcs40_state, cdkong_plate_w)) |
| 643 | MCFG_HMCS40_WRITE_R_CB(1, WRITE8(hh_hmcs40_state, cdkong_plate_w)) |
| 644 | MCFG_HMCS40_WRITE_R_CB(2, WRITE8(hh_hmcs40_state, cdkong_plate_w)) |
| 645 | MCFG_HMCS40_WRITE_R_CB(3, WRITE8(hh_hmcs40_state, cdkong_plate_w)) |
| 646 | MCFG_HMCS40_WRITE_R_CB(4, WRITE8(hh_hmcs40_state, cdkong_plate_w)) |
| 647 | MCFG_HMCS40_WRITE_R_CB(5, WRITE8(hh_hmcs40_state, cdkong_plate_w)) |
| 648 | MCFG_HMCS40_WRITE_R_CB(6, WRITE8(hh_hmcs40_state, cdkong_plate_w)) |
| 649 | MCFG_HMCS40_WRITE_D_CB(WRITE16(hh_hmcs40_state, cdkong_grid_w)) |
| 650 | MCFG_HMCS40_READ_D_CB(IOPORT("IN.0")) |
| 532 | 651 | |
| 533 | | // MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) |
| 652 | MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) |
| 534 | 653 | MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) |
| 535 | 654 | |
| 536 | 655 | /* no video! */ |
| r245297 | r245298 | |
| 556 | 675 | |
| 557 | 676 | ***************************************************************************/ |
| 558 | 677 | |
| 678 | void hh_hmcs40_state::cgalaxn_display() |
| 679 | { |
| 680 | UINT16 grid = BITSWAP16(m_grid,15,14,13,12,1,2,0,11,10,9,8,7,6,5,4,3); |
| 681 | UINT16 plate = BITSWAP16(m_plate,15,14,5,4,3,2,1,0,7,11,12,9,8,10,6,13); |
| 682 | |
| 683 | //display_matrix(14, 12, plate, grid); |
| 684 | |
| 685 | grid<<=1; //todo -1 |
| 686 | display_matrix(14, 13, plate, grid); |
| 687 | } |
| 688 | |
| 689 | WRITE8_MEMBER(hh_hmcs40_state::cgalaxn_grid_w) |
| 690 | { |
| 691 | // D0: speaker out |
| 692 | m_speaker->level_w(data & 1); |
| 693 | |
| 694 | // D1: speaker on? |
| 695 | |
| 696 | // D2-D15: vfd matrix plate |
| 697 | m_plate = data >> 2 & 0x3fff; |
| 698 | cgalaxn_display(); |
| 699 | |
| 700 | // a, f, g, c, e, d, h, b, p, o, n, m, k, i |
| 701 | |
| 702 | // 0, 5, 6, 2, 4, 3, 7, 1,13,12,11,10, 9, 8 |
| 703 | // 15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 |
| 704 | // 15,14, 5, 4, 3, 2, 1, 0, 7,11,12, 9, 8,10, 6,13 |
| 705 | } |
| 706 | |
| 707 | WRITE16_MEMBER(hh_hmcs40_state::cgalaxn_plate_w) |
| 708 | { |
| 709 | // R10,R11: input mux |
| 710 | if (offset == HMCS40_PORT_R1X) |
| 711 | m_inp_mux = data & 3; |
| 712 | |
| 713 | // R1x-R3x: vfd matrix grid |
| 714 | int shift = (offset - HMCS40_PORT_R1X) * 4; |
| 715 | m_grid = (m_grid & ~(0xf << shift)) | (data << shift); |
| 716 | |
| 717 | cgalaxn_display(); |
| 718 | |
| 719 | // 9, 8, 7, 6, 5, 4, 3, 2, 1,11,12,10 |
| 720 | |
| 721 | // 8, 7, 6, 5, 4, 3, 2, 1, 0,10,11, 9 |
| 722 | // 15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 |
| 723 | // 15,14,13,12, 1, 2, 0,11,10, 9, 8, 7, 6, 5, 4, 3 |
| 724 | } |
| 725 | |
| 726 | READ8_MEMBER(hh_hmcs40_state::cgalaxn_input_r) |
| 727 | { |
| 728 | // R0x: multiplexed inputs |
| 729 | return read_inputs(2); |
| 730 | } |
| 731 | |
| 732 | |
| 559 | 733 | static INPUT_PORTS_START( cgalaxn ) |
| 734 | PORT_START("IN.0") // R10 port R0x |
| 735 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| 736 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 737 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) |
| 738 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) |
| 739 | |
| 740 | PORT_START("IN.1") // R11 port R0x |
| 741 | PORT_CONFNAME( 0x01, 0x01, "Players" ) |
| 742 | PORT_CONFSETTING( 0x01, "1" ) |
| 743 | PORT_CONFSETTING( 0x00, "2" ) |
| 744 | PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 745 | |
| 746 | PORT_START("IN.2") // INT0 |
| 747 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0) |
| 748 | |
| 749 | PORT_START("IN.3") // INT1 |
| 750 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1) |
| 560 | 751 | INPUT_PORTS_END |
| 561 | 752 | |
| 562 | 753 | |
| r245297 | r245298 | |
| 564 | 755 | |
| 565 | 756 | /* basic machine hardware */ |
| 566 | 757 | MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. |
| 758 | MCFG_HMCS40_READ_R_CB(0, READ8(hh_hmcs40_state, cgalaxn_input_r)) |
| 759 | MCFG_HMCS40_WRITE_R_CB(1, WRITE8(hh_hmcs40_state, cgalaxn_grid_w)) |
| 760 | MCFG_HMCS40_WRITE_R_CB(2, WRITE8(hh_hmcs40_state, cgalaxn_grid_w)) |
| 761 | MCFG_HMCS40_WRITE_R_CB(3, WRITE8(hh_hmcs40_state, cgalaxn_grid_w)) |
| 762 | MCFG_HMCS40_WRITE_D_CB(WRITE16(hh_hmcs40_state, cgalaxn_plate_w)) |
| 567 | 763 | |
| 568 | | // MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) |
| 764 | MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) |
| 569 | 765 | MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) |
| 570 | 766 | |
| 571 | 767 | /* no video! */ |
| r245297 | r245298 | |
| 796 | 992 | { |
| 797 | 993 | UINT16 grid = BITSWAP16(m_grid,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14); |
| 798 | 994 | UINT32 plate = BITSWAP24(m_plate,23,22,21,20,15,14,13,12,7,6,5,4,3,2,1,0,19,18,17,16,11,10,9,8); |
| 995 | plate |= 1 << 24; // for always-on plates |
| 799 | 996 | |
| 800 | | display_matrix(24, 15, plate, grid); |
| 997 | display_matrix(24+1, 15, plate, grid); |
| 801 | 998 | } |
| 802 | 999 | |
| 803 | 1000 | WRITE16_MEMBER(hh_hmcs40_state::egalaxn2_grid_w) |
| r245297 | r245298 | |
| 899 | 1096 | ***************************************************************************/ |
| 900 | 1097 | |
| 901 | 1098 | // i/o hookup is identical to Galaxian 2, so we can use those handlers |
| 902 | | // note: plate numbers are 0-23, not 1-24(with 0 always-on) |
| 1099 | // note: plate numbers are 0-23, not 1-24(with 24 always-on) |
| 903 | 1100 | |
| 904 | 1101 | static INPUT_PORTS_START( epacman2 ) |
| 905 | 1102 | PORT_START("IN.0") // D1 port R0x |
| r245297 | r245298 | |
| 970 | 1167 | |
| 971 | 1168 | ***************************************************************************/ |
| 972 | 1169 | |
| 1170 | WRITE8_MEMBER(hh_hmcs40_state::pbqbert_plate_w) |
| 1171 | { |
| 1172 | // R0x-R3x,D8: vfd matrix plate |
| 1173 | int shift = offset * 4; |
| 1174 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 1175 | |
| 1176 | // 31,30,29,25,26,27,28,29, 0, 1, 2, 3, 4, 5, 6, 7,24,23,21,20,19,18,17,16,15,14,13,12,11,10, 9, 8 |
| 1177 | // 31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 |
| 1178 | // 31,30,24,25,26,27,28,15,14,29,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,16,17,18,19,20,21,22,23 |
| 1179 | |
| 1180 | // update display |
| 1181 | UINT32 plate = BITSWAP32(m_plate,31,30,24,25,26,27,28,15,14,29,13,12,11,10,9,8,7,6,5,4,3,2,1,0,16,17,18,19,20,21,22,23); |
| 1182 | plate |= 0x400000; // plate 22 is always on |
| 1183 | |
| 1184 | display_matrix(30, 8, plate, m_grid); |
| 1185 | } |
| 1186 | |
| 1187 | WRITE16_MEMBER(hh_hmcs40_state::pbqbert_grid_w) |
| 1188 | { |
| 1189 | // D14: speaker out |
| 1190 | m_speaker->level_w(data >> 14 & 1); |
| 1191 | |
| 1192 | // D0-D7: vfd matrix grid |
| 1193 | m_grid = data & 0xff; |
| 1194 | |
| 1195 | // D8: plate 25 (update display there) |
| 1196 | pbqbert_plate_w(space, 7, data >> 8 & 1); |
| 1197 | } |
| 1198 | |
| 1199 | |
| 973 | 1200 | static INPUT_PORTS_START( pbqbert ) |
| 1201 | PORT_START("IN.0") // port D |
| 1202 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) // up-left |
| 1203 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) // up-right |
| 1204 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) // down-right |
| 1205 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) // down-left |
| 1206 | PORT_BIT( 0xe1ff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 974 | 1207 | INPUT_PORTS_END |
| 975 | 1208 | |
| 976 | 1209 | |
| r245297 | r245298 | |
| 978 | 1211 | |
| 979 | 1212 | /* basic machine hardware */ |
| 980 | 1213 | MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. |
| 1214 | MCFG_HMCS40_WRITE_R_CB(0, WRITE8(hh_hmcs40_state, pbqbert_plate_w)) |
| 1215 | MCFG_HMCS40_WRITE_R_CB(1, WRITE8(hh_hmcs40_state, pbqbert_plate_w)) |
| 1216 | MCFG_HMCS40_WRITE_R_CB(2, WRITE8(hh_hmcs40_state, pbqbert_plate_w)) |
| 1217 | MCFG_HMCS40_WRITE_R_CB(3, WRITE8(hh_hmcs40_state, pbqbert_plate_w)) |
| 1218 | MCFG_HMCS40_WRITE_R_CB(4, WRITE8(hh_hmcs40_state, pbqbert_plate_w)) |
| 1219 | MCFG_HMCS40_WRITE_R_CB(5, WRITE8(hh_hmcs40_state, pbqbert_plate_w)) |
| 1220 | MCFG_HMCS40_WRITE_R_CB(6, WRITE8(hh_hmcs40_state, pbqbert_plate_w)) |
| 1221 | MCFG_HMCS40_WRITE_D_CB(WRITE16(hh_hmcs40_state, pbqbert_grid_w)) |
| 1222 | MCFG_HMCS40_READ_D_CB(IOPORT("IN.0")) |
| 981 | 1223 | |
| 982 | | // MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) |
| 1224 | MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) |
| 983 | 1225 | MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) |
| 984 | 1226 | |
| 985 | 1227 | /* no video! */ |