Skip to content

Commit b0e8291

Browse files
committed
heathzenith/h8.cpp: Fixed up H8 layout.
* Don't use collections that hide everything in a view. * Allow views to resize automatically when collections are hidden * Use even spacing around keypad. * Use sensible coordinates and repeating blocks inside groups.
1 parent 4cf4af0 commit b0e8291

File tree

2 files changed

+52
-78
lines changed

2 files changed

+52
-78
lines changed

src/mame/heathzenith/h8.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,5 +454,5 @@ ROM_END
454454

455455
/* Driver */
456456

457-
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS, INIT COMPANY FULLNAME FLAGS */
457+
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS, INIT COMPANY FULLNAME FLAGS
458458
COMP( 1977, h8, 0, 0, h8, h8, h8_state, empty_init, "Heath Company", "Heathkit H8 Digital Computer", MACHINE_SUPPORTS_SAVE )

src/mame/layout/h8.lay

Lines changed: 51 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -179,124 +179,98 @@ license:CC0-1.0
179179
</element>
180180

181181
<group name="keypad">
182-
<bounds x="0" y="0" width="4.35" height="4.275" />
182+
<element ref="background">
183+
<bounds x="0" y="0" width="4.4" height="4.4" />
184+
</element>
183185

184-
<element ref="btn_7" inputtag="X0" inputmask="0x80"><bounds x="0.20" y="0.125" width="1.0" height="1.0" /></element>
185-
<element ref="btn_8" inputtag="X1" inputmask="0x01"><bounds x="1.25" y="0.125" width="1.0" height="1.0" /></element>
186-
<element ref="btn_9" inputtag="X1" inputmask="0x02"><bounds x="2.30" y="0.125" width="1.0" height="1.0" /></element>
187-
<element ref="btn_a" inputtag="X1" inputmask="0x04"><bounds x="3.35" y="0.125" width="1.0" height="1.0" /></element>
186+
<element ref="btn_7" inputtag="X0" inputmask="0x80"><bounds x="0.125" y="0.125" width="1.0" height="1.0" /></element>
187+
<element ref="btn_8" inputtag="X1" inputmask="0x01"><bounds x="1.175" y="0.125" width="1.0" height="1.0" /></element>
188+
<element ref="btn_9" inputtag="X1" inputmask="0x02"><bounds x="2.225" y="0.125" width="1.0" height="1.0" /></element>
189+
<element ref="btn_a" inputtag="X1" inputmask="0x04"><bounds x="3.275" y="0.125" width="1.0" height="1.0" /></element>
188190

189-
<element ref="btn_4" inputtag="X0" inputmask="0x10"><bounds x="0.20" y="1.175" width="1.0" height="1.0" /></element>
190-
<element ref="btn_5" inputtag="X0" inputmask="0x20"><bounds x="1.25" y="1.175" width="1.0" height="1.0" /></element>
191-
<element ref="btn_6" inputtag="X0" inputmask="0x40"><bounds x="2.30" y="1.175" width="1.0" height="1.0" /></element>
192-
<element ref="btn_b" inputtag="X1" inputmask="0x08"><bounds x="3.35" y="1.175" width="1.0" height="1.0" /></element>
191+
<element ref="btn_4" inputtag="X0" inputmask="0x10"><bounds x="0.125" y="1.175" width="1.0" height="1.0" /></element>
192+
<element ref="btn_5" inputtag="X0" inputmask="0x20"><bounds x="1.175" y="1.175" width="1.0" height="1.0" /></element>
193+
<element ref="btn_6" inputtag="X0" inputmask="0x40"><bounds x="2.225" y="1.175" width="1.0" height="1.0" /></element>
194+
<element ref="btn_b" inputtag="X1" inputmask="0x08"><bounds x="3.275" y="1.175" width="1.0" height="1.0" /></element>
193195

194-
<element ref="btn_1" inputtag="X0" inputmask="0x02"><bounds x="0.20" y="2.225" width="1.0" height="1.0" /></element>
195-
<element ref="btn_2" inputtag="X0" inputmask="0x04"><bounds x="1.25" y="2.225" width="1.0" height="1.0" /></element>
196-
<element ref="btn_3" inputtag="X0" inputmask="0x08"><bounds x="2.30" y="2.225" width="1.0" height="1.0" /></element>
197-
<element ref="btn_c" inputtag="X1" inputmask="0x10"><bounds x="3.35" y="2.225" width="1.0" height="1.0" /></element>
196+
<element ref="btn_1" inputtag="X0" inputmask="0x02"><bounds x="0.125" y="2.225" width="1.0" height="1.0" /></element>
197+
<element ref="btn_2" inputtag="X0" inputmask="0x04"><bounds x="1.175" y="2.225" width="1.0" height="1.0" /></element>
198+
<element ref="btn_3" inputtag="X0" inputmask="0x08"><bounds x="2.225" y="2.225" width="1.0" height="1.0" /></element>
199+
<element ref="btn_c" inputtag="X1" inputmask="0x10"><bounds x="3.275" y="2.225" width="1.0" height="1.0" /></element>
198200

199-
<element ref="btn_0" inputtag="X0" inputmask="0x01"><bounds x="0.20" y="3.275" width="1.0" height="1.0" /></element>
200-
<element ref="btn_f" inputtag="X1" inputmask="0x80"><bounds x="1.25" y="3.275" width="1.0" height="1.0" /></element>
201-
<element ref="btn_e" inputtag="X1" inputmask="0x40"><bounds x="2.30" y="3.275" width="1.0" height="1.0" /></element>
202-
<element ref="btn_d" inputtag="X1" inputmask="0x20"><bounds x="3.35" y="3.275" width="1.0" height="1.0" /></element>
201+
<element ref="btn_0" inputtag="X0" inputmask="0x01"><bounds x="0.125" y="3.275" width="1.0" height="1.0" /></element>
202+
<element ref="btn_f" inputtag="X1" inputmask="0x80"><bounds x="1.175" y="3.275" width="1.0" height="1.0" /></element>
203+
<element ref="btn_e" inputtag="X1" inputmask="0x40"><bounds x="2.225" y="3.275" width="1.0" height="1.0" /></element>
204+
<element ref="btn_d" inputtag="X1" inputmask="0x20"><bounds x="3.275" y="3.275" width="1.0" height="1.0" /></element>
203205
</group>
204206

205207
<group name="leds">
206-
<!-- Black background -->
207208
<element ref="background">
208-
<bounds left="1" top="65" right="900" bottom="200" />
209-
</element>
210-
<element name="digit1" ref="digit">
211-
<bounds left="107" top="075" right="154" bottom="146" />
212-
</element>
213-
<element name="digit2" ref="digit">
214-
<bounds left="155" top="075" right="202" bottom="146" />
215-
</element>
216-
<element name="digit3" ref="digit">
217-
<bounds left="203" top="075" right="250" bottom="146" />
218-
</element>
219-
<element name="digit4" ref="digit">
220-
<bounds left="275" top="075" right="322" bottom="146" />
221-
</element>
222-
<element name="digit5" ref="digit">
223-
<bounds left="323" top="075" right="370" bottom="146" />
209+
<bounds x="0" y="0" width="600" height="135" />
224210
</element>
225-
<element name="digit6" ref="digit">
226-
<bounds left="371" top="075" right="418" bottom="146" />
227-
</element>
228-
<element name="digit7" ref="digit">
229-
<bounds left="443" top="075" right="490" bottom="146" />
230-
</element>
231-
<element name="digit8" ref="digit">
232-
<bounds left="491" top="075" right="538" bottom="146" />
211+
212+
<repeat count="9">
213+
<param name="digitno" start="1" increment="1" />
214+
<param name="x" start="107" increment="48" />
215+
<element name="digit~digitno~" ref="digit">
216+
<bounds x="~x~" y="10" width="47" height="71" />
217+
</element>
218+
</repeat>
219+
<element name="adr_txt" ref="ADR">
220+
<bounds x="100" width="355" y="110" height="15" />
233221
</element>
234-
<element name="digit9" ref="digit">
235-
<bounds left="539" top="075" right="586" bottom="146" />
222+
<element name="pwr_txt" ref="DAT">
223+
<bounds x="437" width="156" y="110" height="15" />
236224
</element>
225+
237226
<element name="ion_led" ref="red_led">
238-
<bounds left="5" right="20" top="100" bottom="115" />
227+
<bounds x="5" width="15" y="35" height="15" />
239228
</element>
240229
<element name="mon_led" ref="red_led">
241-
<bounds left="5" right="20" top="125" bottom="140" />
230+
<bounds x="5" width="15" y="60" height="15" />
242231
</element>
243232
<element name="run_led" ref="red_led">
244-
<bounds left="5" right="20" top="150" bottom="165" />
233+
<bounds x="5" width="15" y="85" height="15" />
245234
</element>
246235
<element name="pwr_led" ref="red_led">
247-
<bounds left="5" right="20" top="175" bottom="190" />
236+
<bounds x="5" width="15" y="110" height="15" />
248237
</element>
249238
<element name="ion_txt" ref="ION">
250-
<bounds left="25" right="50" top="100" bottom="115" />
239+
<bounds x="25" width="25" y="35" height="15" />
251240
</element>
252241
<element name="mon_txt" ref="MON">
253-
<bounds left="25" right="50" top="125" bottom="140" />
242+
<bounds x="25" width="25" y="60" height="15" />
254243
</element>
255244
<element name="run_txt" ref="RUN">
256-
<bounds left="25" right="50" top="150" bottom="165" />
245+
<bounds x="25" width="25" y="85" height="15" />
257246
</element>
258247
<element name="pwr_txt" ref="PWR">
259-
<bounds left="25" right="50" top="175" bottom="190" />
260-
</element>
261-
<element name="adr_txt" ref="ADR">
262-
<bounds left="100" right="455" top="175" bottom="190" />
263-
</element>
264-
<element name="pwr_txt" ref="DAT">
265-
<bounds left="437" right="593" top="175" bottom="190" />
248+
<bounds x="25" width="25" y="110" height="15"/>
266249
</element>
267250
</group>
268251

269252
<view name="LEDs and Keypad">
270-
<bounds x="0" y="0" width="1000" height="400" />
271-
<collection name="LEDs and Keypad">
272-
<group ref="leds">
273-
<bounds x="5" y="15" width="1000" height="150" />
274-
</group>
253+
<group ref="leds">
254+
<bounds x="0" y="0" width="600" height="135" />
255+
</group>
256+
<collection name="Keypad">
275257
<group ref="keypad">
276-
<bounds x="720" y="15" width="220" height="220" />
258+
<bounds x="600" y="0" width="200" height="200" />
277259
</group>
278260
</collection>
279261
</view>
280262

281-
<view name="LEDs">
282-
<bounds x="0" y="0" width="600" height="150" />
263+
<view name="LEDs, Keypad, and Terminal">
283264
<collection name="LEDs">
284265
<group ref="leds">
285-
<bounds x="0" y="8" width="900" height="130" />
266+
<bounds x="0" y="0" width="600" height="135" />
286267
</group>
287268
</collection>
288-
</view>
289-
290-
<view name="LEDs, Keypad, and Terminal">
291-
<bounds x="0" y="0" width="1000" height="400" />
292-
<collection name="LEDs and Keypad">
293-
<group ref="leds">
294-
<bounds x="5" y="15" width="1000" height="150" />
295-
</group>
269+
<collection name="Keypad">
296270
<group ref="keypad">
297-
<bounds x="720" y="15" width="220" height="220" />
271+
<bounds x="400" y="135" width="200" height="200" />
298272
</group>
299273
</collection>
300-
<screen index="0"><bounds x="120" y="160" width="400" height="300" /></screen>
274+
<screen index="0"><bounds x="0" y="135" width="400" height="300" /></screen>
301275
</view>
302276
</mamelayout>

0 commit comments

Comments
 (0)