trunk/src/mame/drivers/marywu.cpp
| r252978 | r252979 | |
| 31 | 31 | |
| 32 | 32 | DECLARE_WRITE8_MEMBER(display_7seg_data_w); |
| 33 | 33 | DECLARE_WRITE8_MEMBER(multiplex_7seg_w); |
| 34 | DECLARE_WRITE8_MEMBER(ay1_port_a_w); |
| 35 | DECLARE_WRITE8_MEMBER(ay1_port_b_w); |
| 36 | DECLARE_WRITE8_MEMBER(ay2_port_a_w); |
| 37 | DECLARE_WRITE8_MEMBER(ay2_port_b_w); |
| 34 | 38 | DECLARE_READ8_MEMBER(keyboard_r); |
| 35 | 39 | private: |
| 36 | 40 | uint8_t m_selected_7seg_module; |
| r252978 | r252979 | |
| 94 | 98 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) |
| 95 | 99 | INPUT_PORTS_END |
| 96 | 100 | |
| 101 | WRITE8_MEMBER( marywu_state::ay1_port_a_w ) |
| 102 | { |
| 103 | for (uint8_t i=0; i<8; i++){ |
| 104 | output_set_led_value(i, (data & (1 << i)) ? 1 : 0); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | WRITE8_MEMBER( marywu_state::ay1_port_b_w ) |
| 109 | { |
| 110 | for (uint8_t i=0; i<8; i++){ |
| 111 | output_set_led_value(i+8, (data & (1 << i)) ? 1 : 0); |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | WRITE8_MEMBER( marywu_state::ay2_port_a_w ) |
| 116 | { |
| 117 | for (uint8_t i=0; i<8; i++){ |
| 118 | output_set_led_value(i+16, (data & (1 << i)) ? 1 : 0); |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | WRITE8_MEMBER( marywu_state::ay2_port_b_w ) |
| 123 | { |
| 124 | for (uint8_t i=0; i<6; i++){ |
| 125 | /* we only have 30 LEDs. The last 2 bits in this port are unused. */ |
| 126 | output_set_led_value(i+24, (data & (1 << i)) ? 1 : 0); |
| 127 | } |
| 128 | } |
| 129 | |
| 97 | 130 | WRITE8_MEMBER( marywu_state::multiplex_7seg_w ) |
| 98 | 131 | { |
| 99 | 132 | m_selected_7seg_module = data; |
| r252978 | r252979 | |
| 154 | 187 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 155 | 188 | MCFG_SOUND_ADD("ay1", AY8910, XTAL_10_738635MHz) /* should it be perhaps a fraction of the XTAL clock ? */ |
| 156 | 189 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 190 | MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(marywu_state, ay1_port_a_w)) |
| 191 | MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(marywu_state, ay1_port_b_w)) |
| 157 | 192 | |
| 158 | 193 | MCFG_SOUND_ADD("ay2", AY8910, XTAL_10_738635MHz) /* should it be perhaps a fraction of the XTAL clock ? */ |
| 159 | 194 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 195 | MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(marywu_state, ay2_port_a_w)) |
| 196 | MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(marywu_state, ay2_port_b_w)) |
| 160 | 197 | MACHINE_CONFIG_END |
| 161 | 198 | |
| 162 | 199 | ROM_START( marywu ) |
trunk/src/mame/layout/marywu.lay
| r252978 | r252979 | |
| 1 | <?xml version="1.0"?> |
| 1 | 2 | <!-- marywu.lay --> |
| 2 | 3 | |
| 3 | 4 | <mamelayout version="2"> |
| r252978 | r252979 | |
| 8 | 9 | </led7seg> |
| 9 | 10 | </element> |
| 10 | 11 | |
| 12 | <element name="led" defstate="0"> |
| 13 | <text string=""></text> |
| 14 | <disk state="0"> |
| 15 | <color red="0.1" green="0.025" blue="0.028" /> |
| 16 | <bounds x="0.25" y="0.25" width="0.5" height="0.5" /> |
| 17 | </disk> |
| 18 | <disk state="1"> |
| 19 | <color red="1.0" green="0.25" blue="0.28" /> |
| 20 | <bounds x="0.25" y="0.25" width="0.5" height="0.5" /> |
| 21 | </disk> |
| 22 | </element> |
| 23 | |
| 11 | 24 | <element name="background"> |
| 12 | 25 | <rect> |
| 13 | 26 | <bounds left="0" top="0" right="1" bottom="1" /> |
| r252978 | r252979 | |
| 19 | 32 | |
| 20 | 33 | <!-- Background --> |
| 21 | 34 | <backdrop element="background"> |
| 22 | | <bounds left="0" top="20" right="798" bottom="394" /> |
| 35 | <bounds left="0" top="20" right="798" bottom="770" /> |
| 23 | 36 | </backdrop> |
| 24 | 37 | |
| 38 | <!-- LEDs --> |
| 25 | 39 | |
| 40 | <bezel name="led4" element="led"><bounds x="199" y="160" width="40" height="40" /></bezel> |
| 41 | <bezel name="led5" element="led"><bounds x="249" y="160" width="40" height="40" /></bezel> |
| 42 | <bezel name="led6" element="led"><bounds x="324" y="160" width="40" height="40" /></bezel> |
| 43 | <bezel name="led7" element="led"><bounds x="399" y="160" width="40" height="40" /></bezel> |
| 44 | <bezel name="led8" element="led"><bounds x="474" y="160" width="40" height="40" /></bezel> |
| 45 | <bezel name="led9" element="led"><bounds x="549" y="160" width="40" height="40" /></bezel> |
| 46 | <bezel name="led10" element="led"><bounds x="599" y="160" width="40" height="40" /></bezel> |
| 26 | 47 | |
| 48 | <bezel name="led3" element="led"><bounds x="199" y="210" width="40" height="40" /></bezel> |
| 49 | <bezel name="led11" element="led"><bounds x="599" y="210" width="40" height="40" /></bezel> |
| 50 | |
| 51 | <bezel name="led2" element="led"><bounds x="199" y="285" width="40" height="40" /></bezel> |
| 52 | <bezel name="led12" element="led"><bounds x="599" y="285" width="40" height="40" /></bezel> |
| 53 | |
| 54 | <bezel name="led1" element="led"><bounds x="199" y="360" width="40" height="40" /></bezel> |
| 55 | <bezel name="led30" element="led"><bounds x="399" y="360" width="40" height="40" /></bezel> |
| 56 | <bezel name="led13" element="led"><bounds x="599" y="360" width="40" height="40" /></bezel> |
| 57 | |
| 58 | <bezel name="led0" element="led"><bounds x="199" y="435" width="40" height="40" /></bezel> |
| 59 | <bezel name="led14" element="led"><bounds x="599" y="435" width="40" height="40" /></bezel> |
| 60 | |
| 61 | <bezel name="led23" element="led"><bounds x="199" y="510" width="40" height="40" /></bezel> |
| 62 | <bezel name="led15" element="led"><bounds x="599" y="510" width="40" height="40" /></bezel> |
| 63 | |
| 64 | <bezel name="led22" element="led"><bounds x="199" y="560" width="40" height="40" /></bezel> |
| 65 | <bezel name="led21" element="led"><bounds x="249" y="560" width="40" height="40" /></bezel> |
| 66 | <bezel name="led20" element="led"><bounds x="324" y="560" width="40" height="40" /></bezel> |
| 67 | <bezel name="led19" element="led"><bounds x="399" y="560" width="40" height="40" /></bezel> |
| 68 | <bezel name="led18" element="led"><bounds x="474" y="560" width="40" height="40" /></bezel> |
| 69 | <bezel name="led17" element="led"><bounds x="549" y="560" width="40" height="40" /></bezel> |
| 70 | <bezel name="led16" element="led"><bounds x="599" y="560" width="40" height="40" /></bezel> |
| 71 | |
| 72 | <bezel name="led29" element="led"><bounds x="199" y="660" width="40" height="40" /></bezel> |
| 73 | <bezel name="led28" element="led"><bounds x="279" y="660" width="40" height="40" /></bezel> |
| 74 | <bezel name="led27" element="led"><bounds x="359" y="660" width="40" height="40" /></bezel> |
| 75 | <bezel name="led26" element="led"><bounds x="439" y="660" width="40" height="40" /></bezel> |
| 76 | <bezel name="led25" element="led"><bounds x="519" y="660" width="40" height="40" /></bezel> |
| 77 | <bezel name="led24" element="led"><bounds x="599" y="660" width="40" height="40" /></bezel> |
| 78 | |
| 27 | 79 | <!-- Top 7seg display modules --> |
| 28 | 80 | |
| 29 | 81 | <bezel name="digit23" element="digit"> |
| r252978 | r252979 | |
| 58 | 110 | <!-- Middle 7seg display module --> |
| 59 | 111 | |
| 60 | 112 | <bezel name="digit25" element="digit"> |
| 61 | | <bounds left="355" top="105" right="389" bottom="144" /> |
| 113 | <bounds left="355" top="421" right="389" bottom="460" /> |
| 62 | 114 | </bezel> |
| 63 | 115 | <bezel name="digit24" element="digit"> |
| 64 | | <bounds left="399" top="105" right="433" bottom="144" /> |
| 116 | <bounds left="399" top="421" right="433" bottom="460" /> |
| 65 | 117 | </bezel> |
| 66 | 118 | |
| 67 | 119 | |
| r252978 | r252979 | |
| 69 | 121 | <!-- Bottom 7seg display modules --> |
| 70 | 122 | |
| 71 | 123 | <bezel name="digit15" element="digit"> |
| 72 | | <bounds left="10" top="165" right="44" bottom="204" /> |
| 124 | <bounds left="10" top="721" right="44" bottom="760" /> |
| 73 | 125 | </bezel> |
| 74 | 126 | <bezel name="digit14" element="digit"> |
| 75 | | <bounds left="54" top="165" right="88" bottom="204" /> |
| 127 | <bounds left="54" top="721" right="88" bottom="760" /> |
| 76 | 128 | </bezel> |
| 77 | 129 | <bezel name="digit13" element="digit"> |
| 78 | | <bounds left="110" top="165" right="144" bottom="204" /> |
| 130 | <bounds left="110" top="721" right="144" bottom="760" /> |
| 79 | 131 | </bezel> |
| 80 | 132 | <bezel name="digit12" element="digit"> |
| 81 | | <bounds left="154" top="165" right="188" bottom="204" /> |
| 133 | <bounds left="154" top="721" right="188" bottom="760" /> |
| 82 | 134 | </bezel> |
| 83 | 135 | <bezel name="digit11" element="digit"> |
| 84 | | <bounds left="210" top="165" right="244" bottom="204" /> |
| 136 | <bounds left="210" top="721" right="244" bottom="760" /> |
| 85 | 137 | </bezel> |
| 86 | 138 | <bezel name="digit10" element="digit"> |
| 87 | | <bounds left="254" top="165" right="288" bottom="204" /> |
| 139 | <bounds left="254" top="721" right="288" bottom="760" /> |
| 88 | 140 | </bezel> |
| 89 | 141 | <bezel name="digit9" element="digit"> |
| 90 | | <bounds left="310" top="165" right="344" bottom="204" /> <!-- 144 --> |
| 142 | <bounds left="310" top="721" right="344" bottom="760" /> |
| 91 | 143 | </bezel> |
| 92 | 144 | <bezel name="digit8" element="digit"> |
| 93 | | <bounds left="354" top="165" right="388" bottom="204" /> |
| 145 | <bounds left="354" top="721" right="388" bottom="760" /> |
| 94 | 146 | </bezel> |
| 95 | 147 | <bezel name="digit7" element="digit"> |
| 96 | | <bounds left="410" top="165" right="444" bottom="204" /> |
| 148 | <bounds left="410" top="721" right="444" bottom="760" /> |
| 97 | 149 | </bezel> |
| 98 | 150 | <bezel name="digit6" element="digit"> |
| 99 | | <bounds left="454" top="165" right="488" bottom="204" /> |
| 151 | <bounds left="454" top="721" right="488" bottom="760" /> |
| 100 | 152 | </bezel> |
| 101 | 153 | <bezel name="digit5" element="digit"> |
| 102 | | <bounds left="510" top="165" right="544" bottom="204" /> |
| 154 | <bounds left="510" top="721" right="544" bottom="760" /> |
| 103 | 155 | </bezel> |
| 104 | 156 | <bezel name="digit4" element="digit"> |
| 105 | | <bounds left="554" top="165" right="588" bottom="204" /> |
| 157 | <bounds left="554" top="721" right="588" bottom="760" /> |
| 106 | 158 | </bezel> |
| 107 | 159 | <bezel name="digit3" element="digit"> |
| 108 | | <bounds left="610" top="165" right="644" bottom="204" /> |
| 160 | <bounds left="610" top="721" right="644" bottom="760" /> |
| 109 | 161 | </bezel> |
| 110 | 162 | <bezel name="digit2" element="digit"> |
| 111 | | <bounds left="654" top="165" right="688" bottom="204" /> |
| 163 | <bounds left="654" top="721" right="688" bottom="760" /> |
| 112 | 164 | </bezel> |
| 113 | 165 | <bezel name="digit1" element="digit"> |
| 114 | | <bounds left="710" top="165" right="744" bottom="204" /> |
| 166 | <bounds left="710" top="721" right="744" bottom="760" /> |
| 115 | 167 | </bezel> |
| 116 | 168 | <bezel name="digit0" element="digit"> |
| 117 | | <bounds left="754" top="165" right="788" bottom="204" /> |
| 169 | <bounds left="754" top="721" right="788" bottom="760" /> |
| 118 | 170 | </bezel> |
| 119 | 171 | </view> |
| 120 | 172 | </mamelayout> |