Previous 15994 Revisions Next

r11546 Saturday 14th May, 2011 at 15:07:35 UTC by Sandro Ronco
fidelz80: Remapped keys and done some cleanup. (no whatsnew)
[src/mess/drivers]fidelz80.c

src/mess/drivers/fidelz80.c
r11545r11546
88*  TODO:
99*  * Figure out why it says the first speech line twice; it shouldn't. (It sometimes does this on the sensory chess challenger real hardware)
1010*  * Get rom locations from pcb (done for UVC, VCC is probably similar)
11*  * Add sensory chess challenger roms/memmap to driver, similar hardware.
1211*  * correctly hook up VBC/ABC speech so that the z80 is halted while words are being spoken
1312*  * VSC doesn't accept input from row 9 (the buttons beside the display)
1413*
r11545r11546
427426
428427
429428***********************************************************************
430Sensory Chess Challenger (needs adding to driver)
429Sensory Chess Challenger
431430------------------------
432431
433432The display/button/LED/speech technology is identical to the above product.
r11545r11546
593592/* Devices */
594593
595594/******************************************************************************
596    I8255 Device
595    I8255 Device, for VCC/UVC
597596******************************************************************************/
598597
599598void fidelz80_state::update_display(running_machine &machine)
r11545r11546
605604   {
606605      output_set_digit_value(0, out_digit);
607606
608      output_set_led_value(1, m_led_selected & 0x01);
607      output_set_led_value(1, m_led_data & 0x01);
609608   }
610609   if (m_led_selected&0x08)
611610   {
612611      output_set_digit_value(1, out_digit);
613612
614      output_set_led_value(0, m_led_selected & 0x01);
613      output_set_led_value(0, m_led_data & 0x01);
615614   }
616615   if (m_led_selected&0x10)
617616   {
r11545r11546
627626{
628627   UINT8 data = 0xff;
629628
630   switch (m_kp_matrix & 0xf0)
629   if (!(m_kp_matrix&0x10))
631630   {
632      case 0xe0:
633         data = input_port_read(machine(), "LINE1");
634         break;
635      case 0xd0:
636         data = input_port_read(machine(), "LINE2");
637         break;
638      case 0xb0:
639         data = input_port_read(machine(), "LINE3");
640         break;
641      case 0x70:
642         data = input_port_read(machine(), "LINE4");
643         break;
631      data &= input_port_read(machine(), "LINE1");
644632   }
633   if (!(m_kp_matrix&0x20))
634   {
635      data &= input_port_read(machine(), "LINE2");
636   }
637   if (!(m_kp_matrix&0x40))
638   {
639      data &= input_port_read(machine(), "LINE3");
640   }
641   if (!(m_kp_matrix&0x80))
642   {
643      data &= input_port_read(machine(), "LINE4");
644   }
645645
646646   return data;
647647}
r11545r11546
650650{
651651   if (!(data & 0x80))
652652   {
653      if (data&0x1) // common for two leds
654         m_led_data = (data&0xc);
653      m_led_data = (data&0x01);   // common for two leds
655654
656655      m_led_selected = data;
657656
r11545r11546
677676
678677READ8_MEMBER( fidelz80_state::vcc_portb_r )
679678{
680   if (s14001a_bsy_r(m_speech) != 0)
681      return 0x80;
682   else
683      return 0x00;
679   return (s14001a_bsy_r(m_speech) != 0) ? 0x80 : 0x00;
684680}
685681
686682WRITE8_MEMBER( fidelz80_state::vcc_porta_w )
687683{
688684   s14001a_set_volume(m_speech, 15); // hack, s14001a core should assume a volume of 15 unless otherwise stated...
689685   s14001a_reg_w(m_speech, data & 0x3f);
690   s14001a_rst_w(m_speech, (data & 0x80)>>7);
686   s14001a_rst_w(m_speech, BIT(data, 7));
691687
692   if (!(data & 0x80))
693   {
694      m_digit_data = data;
688   m_digit_data = data;
695689
696      update_display(machine());
697   }
690   update_display(machine());
698691}
699692
700WRITE8_MEMBER( fidelz80_state::abc_speech_w )
701{
702   // todo: HALT THE z80 here, and set up a callback to poll the s14001a DONE line to resume z80
703   s14001a_set_volume(m_speech, 15); // hack, s14001a core should assume a volume of 15 unless otherwise stated...
704   s14001a_reg_w(m_speech, data & 0x3f);
705   s14001a_rst_w(m_speech, (data & 0x80)>>7);
706}
707
708693static I8255_INTERFACE( cc10_ppi8255_intf )
709694{
710695   DEVCB_NULL,
r11545r11546
781766
782767WRITE8_MEMBER( fidelz80_state::vsc_portc_w )
783768{
784   m_kp_matrix = data;
769   m_kp_matrix = (m_kp_matrix & 0x100) | data;
785770}
786771
787772static I8255_INTERFACE( vsc_ppi8255_intf )
r11545r11546
10241009   return upi41_master_r(m_i8041, 1);
10251010}
10261011
1012WRITE8_MEMBER( fidelz80_state::abc_speech_w )
1013{
1014   // todo: HALT THE z80 here, and set up a callback to poll the s14001a DONE line to resume z80
1015   s14001a_set_volume(m_speech, 15); // hack, s14001a core should assume a volume of 15 unless otherwise stated...
1016   s14001a_reg_w(m_speech, data & 0x3f);
1017   s14001a_rst_w(m_speech, BIT(data, 7));
1018}
1019
10271020void fidelz80_state::machine_reset()
10281021{
10291022   m_led_selected = 0;
10301023   m_kp_matrix = 0;
10311024   m_digit_data = 0;
1025   m_led_data = 0;
10321026   memset(m_digit_line_status, 0, ARRAY_LENGTH(m_digit_line_status));
10331027}
10341028
r11545r11546
11311125   PORT_START("LINE1")
11321126      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) PORT_CHANGED(fidelz80_trigger_reset, 0)
11331127      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_V)
1134      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("A1") PORT_CODE(KEYCODE_1)
1135      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("E5") PORT_CODE(KEYCODE_5)
1128      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("A1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_A)
1129      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("E5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_E)
11361130
11371131   PORT_START("LINE2")
1138      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CB") PORT_CODE(KEYCODE_C)
1139      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_D)
1140      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("B2") PORT_CODE(KEYCODE_2)
1141      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("F6") PORT_CODE(KEYCODE_6)
1132      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CB") PORT_CODE(KEYCODE_Z)
1133      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_M)
1134      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("B2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_B)
1135      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("F6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F)
11421136
11431137   PORT_START("LINE3")
1144      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_L)
1145      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("PB") PORT_CODE(KEYCODE_B)
1146      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("C3") PORT_CODE(KEYCODE_3)
1147      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("G7") PORT_CODE(KEYCODE_7)
1138      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL)
1139      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("PB") PORT_CODE(KEYCODE_P)
1140      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("C3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_C)
1141      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("G7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_G)
11481142
11491143   PORT_START("LINE4")
1150      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("EN") PORT_CODE(KEYCODE_E)
1144      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("EN") PORT_CODE(KEYCODE_ENTER)
11511145      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("PV") PORT_CODE(KEYCODE_O)
1152      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("D4") PORT_CODE(KEYCODE_4)
1153      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("H8") PORT_CODE(KEYCODE_8)
1146      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("D4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_D)
1147      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("H8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_H)
11541148INPUT_PORTS_END
11551149
11561150static INPUT_PORTS_START( vsc )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team