trunk/src/mame/layout/by17.lay
| r31464 | r31465 | |
| 97 | 97 | </bezel> |
| 98 | 98 | |
| 99 | 99 | <!-- Player 4 Score --> |
| 100 | | <bezel name="digit29" element="digit"> |
| 100 | <bezel name="digit28" element="digit"> |
| 101 | 101 | <bounds left="10" top="225" right="44" bottom="264" /> |
| 102 | 102 | </bezel> |
| 103 | | <bezel name="digit28" element="digit"> |
| 103 | <bezel name="digit27" element="digit"> |
| 104 | 104 | <bounds left="54" top="225" right="88" bottom="264" /> |
| 105 | 105 | </bezel> |
| 106 | | <bezel name="digit27" element="digit"> |
| 106 | <bezel name="digit26" element="digit"> |
| 107 | 107 | <bounds left="98" top="225" right="132" bottom="264" /> |
| 108 | 108 | </bezel> |
| 109 | | <bezel name="digit26" element="digit"> |
| 109 | <bezel name="digit25" element="digit"> |
| 110 | 110 | <bounds left="142" top="225" right="176" bottom="264" /> |
| 111 | 111 | </bezel> |
| 112 | | <bezel name="digit25" element="digit"> |
| 112 | <bezel name="digit24" element="digit"> |
| 113 | 113 | <bounds left="186" top="225" right="220" bottom="264" /> |
| 114 | 114 | </bezel> |
| 115 | | <bezel name="digit24" element="digit"> |
| 115 | <bezel name="digit29" element="digit"> |
| 116 | 116 | <bounds left="230" top="225" right="264" bottom="264" /> |
| 117 | 117 | </bezel> |
| 118 | 118 | |
| 119 | 119 | <!-- Credits and Balls --> |
| 120 | | <bezel name="digit14" element="digit"> |
| 121 | | <bounds left="39" top="345" right="73" bottom="384" /> |
| 120 | <bezel name="digit35" element="digit"> |
| 121 | <bounds left="10" top="345" right="44" bottom="384" /> |
| 122 | 122 | </bezel> |
| 123 | | <bezel name="digit6" element="digit"> |
| 124 | | <bounds left="110" top="345" right="144" bottom="384" /> |
| 123 | <bezel name="digit34" element="digit"> |
| 124 | <bounds left="54" top="345" right="88" bottom="384" /> |
| 125 | 125 | </bezel> |
| 126 | | <bezel name="digit30" element="digit"> |
| 127 | | <bounds left="171" top="345" right="205" bottom="384" /> |
| 126 | <bezel name="digit32" element="digit"> |
| 127 | <bounds left="186" top="345" right="220" bottom="384" /> |
| 128 | 128 | </bezel> |
| 129 | | <bezel name="digit22" element="digit"> |
| 130 | | <bounds left="210" top="345" right="244" bottom="384" /> |
| 129 | <bezel name="digit37" element="digit"> |
| 130 | <bounds left="230" top="345" right="264" bottom="384" /> |
| 131 | 131 | </bezel> |
| 132 | | <bezel element="P2"><bounds left="100" right="158" top="330" bottom="342" /></bezel> |
| 133 | | <bezel element="P1"><bounds left="200" right="258" top="330" bottom="342" /></bezel> |
| 134 | | <bezel element="P0"><bounds left="30" right="88" top="330" bottom="342" /></bezel> |
| 132 | |
| 133 | <bezel element="P0"><bounds left="200" right="258" top="330" bottom="342" /></bezel> |
| 134 | <bezel element="P1"><bounds left="30" right="88" top="330" bottom="342" /></bezel> |
| 135 | 135 | <bezel name="text3" element="P3"><bounds left="100" right="180" top="30" bottom="42" /></bezel> |
| 136 | 136 | <bezel name="text2" element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel> |
| 137 | 137 | <bezel name="text1" element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel> |
| 138 | 138 | <bezel name="text0" element="P6"><bounds left="100" right="180" top="210" bottom="222" /></bezel> |
| 139 | 139 | <bezel name="led0" element="red_led"> |
| 140 | | <bounds left="10" right="25" top="360" bottom="375" /></bezel> |
| 140 | <bounds left="110" right="125" top="360" bottom="375" /></bezel> |
| 141 | 141 | </view> |
| 142 | 142 | </mamelayout> |
trunk/src/mame/drivers/by17.c
| r31464 | r31465 | |
| 71 | 71 | bool m_u11_timer; |
| 72 | 72 | UINT8 m_digit; |
| 73 | 73 | UINT8 m_segment; |
| 74 | | UINT8 m_disp_info[3]; |
| 75 | 74 | virtual void machine_reset(); |
| 76 | 75 | required_device<m6800_cpu_device> m_maincpu; |
| 77 | 76 | required_device<pia6821_device> m_pia_u10; |
| r31464 | r31465 | |
| 267 | 266 | |
| 268 | 267 | WRITE_LINE_MEMBER( by17_state::u10_ca2_w ) |
| 269 | 268 | { |
| 270 | | if (m_u10 == 15) |
| 271 | | { |
| 272 | | m_disp_info[0] = 1; |
| 273 | | m_disp_info[1] = m_digit; |
| 274 | | m_disp_info[2] = m_segment; |
| 275 | | } |
| 276 | | else |
| 277 | | m_disp_info[0] = 0; |
| 278 | 269 | } |
| 279 | 270 | |
| 280 | 271 | WRITE_LINE_MEMBER( by17_state::u10_cb2_w ) |
| r31464 | r31465 | |
| 297 | 288 | |
| 298 | 289 | WRITE8_MEMBER( by17_state::u10_a_w ) |
| 299 | 290 | { |
| 291 | static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0,0,0,0,0,0 }; // MC14543 |
| 300 | 292 | m_segment = data >> 4; |
| 301 | 293 | m_u10_a = data; |
| 302 | 294 | m_u10 = (data & 15) | (BIT(m_u11_a, 0) << 4); |
| 303 | | //if (m_disp_info[0]) if (m_disp_info[2] < 15) printf("%X:%X:%X:%X ",m_u10,m_disp_info[0],m_disp_info[1],m_disp_info[2]); |
| 304 | | |
| 305 | | if ((m_disp_info[0]) && (BIT(m_u10, 4))) |
| 295 | switch (m_u10) |
| 306 | 296 | { |
| 307 | | static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0,0,0,0,0,0 }; // MC14543 |
| 308 | | output_set_digit_value(m_disp_info[1]+(m_u10&15)*8, patterns[m_disp_info[2]]); |
| 297 | case 0x10: // wrong |
| 298 | output_set_digit_value(m_digit, patterns[m_segment]); |
| 299 | break; |
| 300 | case 0x1d: |
| 301 | output_set_digit_value(8+m_digit, patterns[m_segment]); |
| 302 | break; |
| 303 | case 0x1b: |
| 304 | output_set_digit_value(16+m_digit, patterns[m_segment]); |
| 305 | break; |
| 306 | case 0x07: |
| 307 | output_set_digit_value(24+m_digit, patterns[m_segment]); |
| 308 | break; |
| 309 | case 0x0f: |
| 310 | output_set_digit_value(32+m_digit, patterns[m_segment]); |
| 311 | break; |
| 312 | default: |
| 313 | break; |
| 309 | 314 | } |
| 310 | 315 | } |
| 311 | 316 | |
| r31464 | r31465 | |
| 359 | 364 | |
| 360 | 365 | m_digit = 0xff; |
| 361 | 366 | if BIT(data, 2) |
| 362 | | m_digit = 5; |
| 367 | m_digit = 4; |
| 363 | 368 | else |
| 364 | 369 | if BIT(data, 3) |
| 365 | | m_digit = 4; |
| 370 | m_digit = 3; |
| 366 | 371 | else |
| 367 | 372 | if BIT(data, 4) |
| 368 | | m_digit = 3; |
| 373 | m_digit = 2; |
| 369 | 374 | else |
| 370 | 375 | if BIT(data, 5) |
| 371 | | m_digit = 2; |
| 376 | m_digit = 1; |
| 372 | 377 | else |
| 373 | 378 | if BIT(data, 6) |
| 374 | | m_digit = 1; |
| 379 | m_digit = 0; |
| 375 | 380 | else |
| 376 | 381 | if BIT(data, 7) |
| 377 | | m_digit = 0; |
| 382 | m_digit = 5; |
| 378 | 383 | } |
| 379 | 384 | |
| 380 | 385 | WRITE8_MEMBER( by17_state::u11_b_w ) |