summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/layout/v4dbltak.lay
blob: 7e71796f13e84d0fa2f4300bded4d6f0e80ecbe2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<?xml version="1.0"?>
<!--
license:CC0
-->
<mamelayout version="2">
<!-- luascript (demo for plugin -layout) -->
<!-- this adds support for combining outputs to make an aggregated output--><script>
	local layout = {}

	local ledlamps = { 	{ 88, 89, 90, 91, 92, 93, 94, -1 },
						{ 80, 81, 82, 83, 84, 85, 86, 87 },
						{ 72, 73, 74, 75, 76, 77, 78, -1 },
						{ 64, 65, 66, 67, 68, 69, 70, -1 } }

	function layout.reset()
		for led=0,3 do
			machine:outputs():set_indexed_value("compoundled", led, 0)
			return
		end
	end

	function layout.frame()
		for num, led in pairs(ledlamps) do
			local temp_state = 0
			for lamp=0,7 do
				local lampval = led[lamp+1]
				local lampstate = machine:outputs():get_indexed_value("lamp", lampval)
				if (lampstate > 0) then
					temp_state = temp_state | (1 &lt;&lt; lamp)
				end
			end
			machine:outputs():set_indexed_value("compoundled", num-1, temp_state)
		end
	end
return layout, "v4dbltak"
</script>

	<element name="£">
		<text string="£">
			<color red="1.0" green="1.0" blue="1.0" />
			<bounds x="0" y="0.1" width="1" height="0.8" />
		</text>
	</element>

	<element name="digit">
	<led7seg>
			<color red="1.0" green="0.0" blue="0.0" />
	</led7seg>
	</element>

	<element name="LOSE">
		<rect state="1">
			<color red="1.0" green="0.0" blue="0.0" />
		</rect>
		<rect state="0">
			<color red="0.3" green="0.0" blue="0.0" />
		</rect>
		<text string="LOSE">
			<color red="0.0" green="0.0" blue="0.0" />
			<bounds x="0" y="0.1" width="1" height="0.8" />
		</text>
	</element>

	<element name="HOLD">
		<rect state="1">
			<color red="1.0" green="0.0" blue="0.0" />
		</rect>
		<rect state="0">
			<color red="0.3" green="0.0" blue="0.0" />
		</rect>
		<text string="HOLD">
			<color red="0.0" green="0.0" blue="0.0" />
			<bounds x="0" y="0.1" width="1" height="0.8" />
		</text>
	</element>

	<element name="STICK">
		<rect state="1">
			<color red="1.0" green="0.5" blue="0.0" />
		</rect>
		<rect state="0">
			<color red="0.3" green="0.1" blue="0.0" />
		</rect>
		<text string="LO/STICK">
			<color red="0.0" green="0.0" blue="0.0" />
			<bounds x="0" y="0.1" width="1" height="0.8" />
		</text>
	</element>

	<element name="TWIST">
		<rect state="1">
			<color red="1.0" green="0.5" blue="0.0" />
		</rect>
		<rect state="0">
			<color red="0.3" green="0.1" blue="0.0" />
		</rect>
		<text string="HI/TWIST">
			<color red="0.0" green="0.0" blue="0.0" />
			<bounds x="0" y="0.1" width="1" height="0.8" />
		</text>
	</element>

	<element name="SWOP">
		<rect state="1">
			<color red="1.0" green="0.5" blue="0.0" />
		</rect>
		<rect state="0">
			<color red="0.3" green="0.1" blue="0.0" />
		</rect>
		<text string="SWOP">
			<color red="0.0" green="0.0" blue="0.0" />
			<bounds x="0" y="0.1" width="1" height="0.8" />
		</text>
	</element>

	<element name="COLLECT">
		<rect state="1">
			<color red="1.0" green="0.5" blue="0.0" />
		</rect>
		<rect state="0">
			<color red="0.3" green="0.1" blue="0.0" />
		</rect>
		<text string="COLLECT">
			<color red="0.0" green="0.0" blue="0.0" />
			<bounds x="0" y="0.1" width="1" height="0.8" />
		</text>
	</element>
	
	<element name="SELECT">
		<rect state="1">
			<color red="1.0" green="0.5" blue="0.0" />
		</rect>
		<rect state="0">
			<color red="0.3" green="0.1" blue="0.0" />
		</rect>
		<text string="SELECT">
			<color red="0.0" green="0.0" blue="0.0" />
			<bounds x="0" y="0.1" width="1" height="0.8" />
		</text>
	</element>
	
	<element name="DEAL">
		<rect state="1">
			<color red="1.0" green="0.5" blue="0.0" />
		</rect>
		<rect state="0">
			<color red="0.3" green="0.1" blue="0.0" />
		</rect>
		<text string="START/DEAL">
			<color red="0.0" green="0.0" blue="0.0" />
			<bounds x="0" y="0.1" width="1" height="0.8" />
		</text>
	</element>

	<element name="BANK">
		<text string="BANK">
			<color red="1.0" green="1.0" blue="1.0" />
			<bounds x="0" y="0.1" width="1" height="0.8" />
		</text>
	</element>
	
	<view name="Monitor and Lamps">
		<screen index="0">
			<bounds x="0" y="0" width="504" height="296" />
		</screen>
		<element name="BANK" ref="BANK" state="0">
			<bounds x="505" y="180" width="40" height="15"/>
		</element>
		<element name="£" ref="£" state="0">
			<bounds x="505" y="200" width="8" height="15"/>
		</element>
		<element name="compoundled0" ref="digit" state="0">
			<bounds x="515" y="200" width="8" height="15"/>
		</element>
		<element name="compoundled1" ref="digit" state="0">
			<bounds x="525" y="200" width="8" height="15"/>
		</element>
		<element name="compoundled2" ref="digit" state="0">
			<bounds x="535" y="200" width="8" height="15"/>
		</element>
		<element name="compoundled3" ref="digit" state="0">
			<bounds x="545" y="200" width="8" height="15"/>
		</element>
		<element name="lamp24" ref="COLLECT" state="0">
			<bounds x="0" y="300" width="40" height="15"/>
		</element>
		<element name="lamp25" ref="HOLD" state="0">
			<bounds x="50" y="300" width="40" height="15"/>
		</element>
		<element name="lamp26" ref="HOLD" state="0">
			<bounds x="100" y="300" width="40" height="15"/>
		</element>
		<element name="lamp32" ref="HOLD" state="0">
			<bounds x="150" y="300" width="40" height="15"/>
		</element>
		<element name="lamp33" ref="HOLD" state="0">
			<bounds x="200" y="300" width="40" height="15"/>
		</element>
		<element name="lamp34" ref="HOLD" state="0">
			<bounds x="250" y="300" width="40" height="15"/>
		</element>
		<element name="lamp40" ref="TWIST" state="0">
			<bounds x="300" y="300" width="40" height="15"/>
		</element>
		<element name="lamp41" ref="STICK" state="0">
			<bounds x="350" y="300" width="40" height="15"/>
		</element>
		<element name="lamp42" ref="SWOP" state="0">
			<bounds x="400" y="300" width="40" height="15"/>
		</element>
		<element name="lamp48" ref="DEAL" state="0">
			<bounds x="450" y="300" width="40" height="15"/>
		</element>
		<element name="lamp50" ref="SELECT" state="0">
			<bounds x="500" y="300" width="40" height="15"/>
		</element>
		<element name="lamp63" ref="LOSE" state="0">
			<bounds x="505" y="250" width="40" height="15"/>
		</element>
	</view>
</mamelayout>