trunk/src/mame/layout/18w.lay
| r26552 | r26553 | |
| 1 | 1 | <?xml version="1.0"?> |
| 2 | 2 | <mamelayout version="2"> |
| 3 | |
| 4 | <!-- NOTE: this only shows the info panel, --> |
| 5 | <!-- simple reflected lamps (lamp00-lamp47) is possible but not added yet, --> |
| 6 | <!-- movable parts are omitted --> |
| 7 | |
| 8 | |
| 9 | <!-- define elements --> |
| 10 | |
| 11 | <element name="static_black"> |
| 12 | <rect> |
| 13 | <color red="0.0" green="0.0" blue="0.0" /> |
| 14 | </rect> |
| 15 | </element> |
| 16 | |
| 3 | 17 | <element name="digit" defstate="0"> |
| 4 | 18 | <led7seg> |
| 5 | | <color red="1.0" green="0.3" blue="0.0" /> |
| 19 | <color red="1.0" green="0.3" blue="0.2" /> |
| 6 | 20 | </led7seg> |
| 7 | 21 | </element> |
| 8 | 22 | |
| 9 | | <view name="Simple LEDs"> |
| 10 | | <bounds left="0" right="256" top="0" bottom="256" /> |
| 23 | <element name="text_time"> |
| 24 | <text string="TIME"> |
| 25 | <color red="1.0" green="0.3" blue="0.2" /> |
| 26 | </text> |
| 27 | </element> |
| 28 | <element name="text_mph"> |
| 29 | <text string="M.P.H."> |
| 30 | <color red="1.0" green="0.3" blue="0.2" /> |
| 31 | </text> |
| 32 | </element> |
| 33 | <element name="text_score"> |
| 34 | <text string="SCORE"> |
| 35 | <color red="1.0" green="0.3" blue="0.2" /> |
| 36 | </text> |
| 37 | </element> |
| 11 | 38 | |
| 12 | | <!-- left panel --> |
| 39 | |
| 40 | |
| 41 | |
| 42 | <view name="Internal Layout"> |
| 43 | <bounds left="0" right="170" top="0" bottom="47" /> |
| 44 | <bezel element="static_black"> |
| 45 | <bounds left="0" right="170" top="0" bottom="47" /> |
| 46 | </bezel> |
| 47 | |
| 48 | <!-- left panel --> |
| 13 | 49 | <!-- TIME --> |
| 14 | 50 | <bezel name="digit3" element="digit"> |
| 15 | | <bounds left="0" top="0" right="9" bottom="15" /> |
| 51 | <bounds x="10" y="10" width="10" height="15" /> |
| 16 | 52 | </bezel> |
| 17 | 53 | <bezel name="digit2" element="digit"> |
| 18 | | <bounds left="10" top="0" right="19" bottom="15" /> |
| 54 | <bounds x="20" y="10" width="10" height="15" /> |
| 19 | 55 | </bezel> |
| 20 | 56 | |
| 21 | 57 | <!-- not connected --> |
| 22 | 58 | <bezel name="dummy_digita" element="digit"> |
| 23 | | <bounds left="20" top="0" right="29" bottom="15" /> |
| 59 | <bounds x="30" y="10" width="10" height="15" /> |
| 24 | 60 | </bezel> |
| 25 | 61 | <bezel name="dummy_digitb" element="digit"> |
| 26 | | <bounds left="30" top="0" right="39" bottom="15" /> |
| 62 | <bounds x="40" y="10" width="10" height="15" /> |
| 27 | 63 | </bezel> |
| 28 | 64 | |
| 29 | 65 | <!-- M.P.H. --> |
| 30 | 66 | <bezel name="digit1" element="digit"> |
| 31 | | <bounds left="40" top="0" right="49" bottom="15" /> |
| 67 | <bounds x="50" y="10" width="10" height="15" /> |
| 32 | 68 | </bezel> |
| 33 | 69 | <bezel name="digit0" element="digit"> |
| 34 | | <bounds left="50" top="0" right="59" bottom="15" /> |
| 70 | <bounds x="60" y="10" width="10" height="15" /> |
| 35 | 71 | </bezel> |
| 36 | 72 | |
| 37 | | <!-- right panel --> |
| 73 | <bezel element="text_time"> |
| 74 | <bounds x="10" y="30" width="30" height="7" /> |
| 75 | </bezel> |
| 76 | <bezel element="text_mph"> |
| 77 | <bounds x="40" y="30" width="30" height="7" /> |
| 78 | </bezel> |
| 79 | |
| 80 | |
| 81 | <!-- right panel --> |
| 38 | 82 | <!-- SCORE --> |
| 39 | 83 | <bezel name="digit9" element="digit"> |
| 40 | | <bounds left="100" top="0" right="109" bottom="15" /> |
| 84 | <bounds x="100" y="10" width="10" height="15" /> |
| 41 | 85 | </bezel> |
| 42 | 86 | <bezel name="digit8" element="digit"> |
| 43 | | <bounds left="110" top="0" right="119" bottom="15" /> |
| 87 | <bounds x="110" y="10" width="10" height="15" /> |
| 44 | 88 | </bezel> |
| 45 | 89 | <bezel name="digit7" element="digit"> |
| 46 | | <bounds left="120" top="0" right="129" bottom="15" /> |
| 90 | <bounds x="120" y="10" width="10" height="15" /> |
| 47 | 91 | </bezel> |
| 48 | 92 | <bezel name="digit6" element="digit"> |
| 49 | | <bounds left="130" top="0" right="139" bottom="15" /> |
| 93 | <bounds x="130" y="10" width="10" height="15" /> |
| 50 | 94 | </bezel> |
| 51 | 95 | <bezel name="digit5" element="digit"> |
| 52 | | <bounds left="140" top="0" right="149" bottom="15" /> |
| 96 | <bounds x="140" y="10" width="10" height="15" /> |
| 53 | 97 | </bezel> |
| 54 | 98 | <bezel name="digit4" element="digit"> |
| 55 | | <bounds left="150" top="0" right="159" bottom="15" /> |
| 99 | <bounds x="150" y="10" width="10" height="15" /> |
| 56 | 100 | </bezel> |
| 101 | |
| 102 | <bezel element="text_score"> |
| 103 | <bounds x="100" y="30" width="60" height="7" /> |
| 104 | </bezel> |
| 105 | |
| 57 | 106 | </view> |
| 58 | 107 | </mamelayout> |
trunk/src/mame/drivers/mw18w.c
| r26552 | r26553 | |
| 70 | 70 | WRITE8_MEMBER(mw18w_state::mw18w_lamps_w) |
| 71 | 71 | { |
| 72 | 72 | // d0-3, d7: selected rows |
| 73 | | int rows = (data & 0xf) | ( data >> 3 & 0x10); |
| 73 | int rows = (data & 0xf) | (data >> 3 & 0x10); |
| 74 | 74 | |
| 75 | 75 | // d4-d6: column |
| 76 | 76 | int col = data >> 4 & 7; |
| r26552 | r26553 | |
| 83 | 83 | WRITE8_MEMBER(mw18w_state::mw18w_led_display_w) |
| 84 | 84 | { |
| 85 | 85 | // d0-3: 7448 (BCD to LED segment) |
| 86 | | const UINT8 ls48_map[16] = |
| 86 | const UINT8 _7448_map[16] = |
| 87 | 87 | { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 }; |
| 88 | 88 | |
| 89 | 89 | // d4-7: 7442 (BCD to decimal) -> pick digit panel |
| 90 | | if ((data&0xf0)>0x90) return; |
| 91 | | output_set_digit_value(data >> 4, ls48_map[data & 0xf]); |
| 90 | if ((data & 0xf0) > 0x90) return; |
| 91 | output_set_digit_value(data >> 4, _7448_map[data & 0xf]); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | WRITE8_MEMBER(mw18w_state::mw18w_irq0_clear_w) |
trunk/src/mame/drivers/mwsub.c
| r26552 | r26553 | |
| 107 | 107 | WRITE8_MEMBER(submar_state::submar_led_w) |
| 108 | 108 | { |
| 109 | 109 | // 7447 (BCD to LED segment) |
| 110 | | const UINT8 ls47_map[16] = |
| 110 | const UINT8 _7447_map[16] = |
| 111 | 111 | { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 }; |
| 112 | 112 | |
| 113 | 113 | // 2 digits per write. port 4: time, port 5: score |
| 114 | | output_set_digit_value((offset << 1 & 2) | 0, ls47_map[data >> 4]); |
| 115 | | output_set_digit_value((offset << 1 & 2) | 1, ls47_map[data & 0x0f]); |
| 114 | output_set_digit_value((offset << 1 & 2) | 0, _7447_map[data >> 4]); |
| 115 | output_set_digit_value((offset << 1 & 2) | 1, _7447_map[data & 0x0f]); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | WRITE8_MEMBER(submar_state::submar_irq_clear_w) |