Previous 199869 Revisions Next

r26553 Sunday 8th December, 2013 at 21:54:29 UTC by hap
improved mw18w layout a bit
[src/mame/drivers]mw18w.c mwsub.c
[src/mame/layout]18w.lay

trunk/src/mame/layout/18w.lay
r26552r26553
11<?xml version="1.0"?>
22<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
317   <element name="digit" defstate="0">
418      <led7seg>
5         <color red="1.0" green="0.3" blue="0.0" />
19         <color red="1.0" green="0.3" blue="0.2" />
620      </led7seg>
721   </element>
822
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>
1138
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 -->
1349      <!-- TIME -->
1450      <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" />
1652      </bezel>
1753      <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" />
1955      </bezel>
2056
2157      <!-- not connected -->
2258      <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" />
2460      </bezel>
2561      <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" />
2763      </bezel>
2864
2965      <!-- M.P.H. -->
3066      <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" />
3268      </bezel>
3369      <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" />
3571      </bezel>
3672
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 -->
3882      <!-- SCORE -->
3983      <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" />
4185      </bezel>
4286      <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" />
4488      </bezel>
4589      <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" />
4791      </bezel>
4892      <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" />
5094      </bezel>
5195      <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" />
5397      </bezel>
5498      <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" />
56100      </bezel>
101
102      <bezel element="text_score">
103         <bounds x="100" y="30" width="60" height="7" />
104      </bezel>
105
57106   </view>
58107</mamelayout>
trunk/src/mame/drivers/mw18w.c
r26552r26553
7070WRITE8_MEMBER(mw18w_state::mw18w_lamps_w)
7171{
7272   // d0-3, d7: selected rows
73   int rows = (data & 0xf) | ( data >> 3 & 0x10);
73   int rows = (data & 0xf) | (data >> 3 & 0x10);
7474   
7575   // d4-d6: column
7676   int col = data >> 4 & 7;
r26552r26553
8383WRITE8_MEMBER(mw18w_state::mw18w_led_display_w)
8484{
8585   // d0-3: 7448 (BCD to LED segment)
86   const UINT8 ls48_map[16] =
86   const UINT8 _7448_map[16] =
8787      { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 };
8888
8989   // 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]);
9292}
9393
9494WRITE8_MEMBER(mw18w_state::mw18w_irq0_clear_w)
trunk/src/mame/drivers/mwsub.c
r26552r26553
107107WRITE8_MEMBER(submar_state::submar_led_w)
108108{
109109   // 7447 (BCD to LED segment)
110   const UINT8 ls47_map[16] =
110   const UINT8 _7447_map[16] =
111111      { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 };
112112
113113   // 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]);
116116}
117117
118118WRITE8_MEMBER(submar_state::submar_irq_clear_w)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team