ml20: Add a simple layout

This commit is contained in:
Dirk Best 2019-08-08 17:21:21 +02:00
parent 490709a6c1
commit 02bf593635
2 changed files with 259 additions and 1 deletions

View File

@ -41,7 +41,7 @@
CN6 = Magnetic stripe reader
CN2 = Display (dot-matrix, 2 lines x 16 characters, 5x7 each character)
CN7 = Keypad
Display = Hyundai HC16203-A (Hitachi HD44780A00 based).
Status:
@ -58,6 +58,8 @@
#include "screen.h"
#include "speaker.h"
#include "ml20.lh"
class ml20_state : public driver_device
{
public:
@ -273,6 +275,8 @@ void ml20_state::ml20(machine_config &config)
m_lcdc->set_lcd_size(2, 16);
m_lcdc->set_pixel_update_cb(FUNC(ml20_state::lcd_pixel_update), this);
config.set_default_layout(layout_ml20);
// sound
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);

254
src/mame/layout/ml20.lay Normal file
View File

@ -0,0 +1,254 @@
<?xml version="1.0"?>
<!--
license: CC0
copyright-holders: Dirk Best
Digitek Micrologic 20 layout
-->
<mamelayout version="2">
<element name="darkgrey">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.58" green="0.58" blue="0.57" />
</rect>
</element>
<element name="lightgrey_rect">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.79" green="0.78" blue="0.76" />
</rect>
</element>
<element name="lightgrey_disk">
<disk>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="0.79" green="0.78" blue="0.76" />
</disk>
</element>
<element name="white">
<rect>
<bounds left="0" top="0" right="1" bottom="1" />
<color red="1.00" green="1.00" blue="1.00" />
</rect>
</element>
<element name="button_teal">
<disk><color red="0.63" green="0.89" blue="0.90" /></disk>
</element>
<element name="button_blue">
<disk><color red="0.54" green="0.68" blue="0.89" /></disk>
</element>
<element name="button_white">
<disk><color red="1.00" green="1.00" blue="1.00" /></disk>
</element>
<element name="text_A"><text string="A"><color red="0.31" green="0.38" blue="0.46" /></text></element>
<element name="text_B"><text string="B"><color red="0.31" green="0.38" blue="0.46" /></text></element>
<element name="text_C"><text string="C"><color red="0.31" green="0.38" blue="0.46" /></text></element>
<element name="text_D"><text string="D"><color red="0.31" green="0.38" blue="0.46" /></text></element>
<element name="text_ANULAR"><text string="ANULAR"><color red="0.52" green="0.48" blue="0.51" /></text></element>
<element name="text_SALDOS"><text string="SALDOS"><color red="0.52" green="0.48" blue="0.51" /></text></element>
<element name="text_MENSAJ"><text string="MENSAJ."><color red="0.52" green="0.48" blue="0.51" /></text></element>
<element name="text_MARC"><text string="ler. MARC"><color red="0.52" green="0.48" blue="0.51" /></text></element>
<element name="text_CLEAR"><text string="CLEAR"><color red="0.52" green="0.48" blue="0.51" /></text></element>
<element name="text_ENTER"><text string="ENTER"><color red="0.52" green="0.48" blue="0.51" /></text></element>
<element name="text_0"><text string="0"><color red="0.98" green="0.98" blue="0.99" /></text></element>
<element name="text_1"><text string="1"><color red="0.98" green="0.98" blue="0.99" /></text></element>
<element name="text_2"><text string="2"><color red="0.98" green="0.98" blue="0.99" /></text></element>
<element name="text_3"><text string="3"><color red="0.98" green="0.98" blue="0.99" /></text></element>
<element name="text_4"><text string="4"><color red="0.98" green="0.98" blue="0.99" /></text></element>
<element name="text_5"><text string="5"><color red="0.98" green="0.98" blue="0.99" /></text></element>
<element name="text_6"><text string="6"><color red="0.98" green="0.98" blue="0.99" /></text></element>
<element name="text_7"><text string="7"><color red="0.98" green="0.98" blue="0.99" /></text></element>
<element name="text_8"><text string="8"><color red="0.98" green="0.98" blue="0.99" /></text></element>
<element name="text_9"><text string="9"><color red="0.98" green="0.98" blue="0.99" /></text></element>
<view name="Default">
<element ref="darkgrey">
<bounds left="0" top="0" right="1307" bottom="1067" />
</element>
<!-- Top (with screen) -->
<element ref="lightgrey_rect">
<bounds left="107" top="68" right="1190" bottom="356" />
</element>
<screen tag="screen">
<bounds left="177" top="91" right="1125" bottom="336" />
</screen>
<!-- Left controls -->
<element ref="lightgrey_rect">
<bounds left="107" top="423" right="475" bottom="984" />
</element>
<element ref="darkgrey">
<bounds left="107" top="423" right="202" bottom="472" />
</element>
<element ref="darkgrey">
<bounds left="107" top="935" right="202" bottom="984" />
</element>
<element ref="lightgrey_disk">
<bounds left="107" top="390" right="297" bottom="584" />
</element>
<element ref="lightgrey_disk">
<bounds left="107" top="823" right="297" bottom="1017" />
</element>
<!-- Buttons A, B, C, D -->
<element ref="button_teal" inputtag="COL.3" inputmask="0x08">
<bounds left="147" top="429" right="263" bottom="548" />
</element>
<element ref="text_A">
<bounds left="147" top="429" right="263" bottom="548" />
</element>
<element ref="button_teal" inputtag="COL.2" inputmask="0x08">
<bounds left="147" top="574" right="263" bottom="693" />
</element>
<element ref="text_B">
<bounds left="147" top="574" right="263" bottom="693" />
</element>
<element ref="button_teal" inputtag="COL.1" inputmask="0x08">
<bounds left="147" top="719" right="263" bottom="838" />
</element>
<element ref="text_C">
<bounds left="147" top="719" right="263" bottom="838" />
</element>
<element ref="button_teal" inputtag="COL.0" inputmask="0x08">
<bounds left="147" top="864" right="263" bottom="983" />
</element>
<element ref="text_D">
<bounds left="147" top="864" right="263" bottom="983" />
</element>
<!-- Labels ANULAR, SALDOS, MENSAJ., ler. MARC -->
<element ref="white">
<bounds left="284" top="450" right="440" bottom="528" />
</element>
<element ref="text_ANULAR">
<bounds left="294" top="460" right="430" bottom="518" />
</element>
<element ref="white">
<bounds left="284" top="595" right="440" bottom="673" />
</element>
<element ref="text_SALDOS">
<bounds left="294" top="605" right="430" bottom="663" />
</element>
<element ref="white">
<bounds left="284" top="740" right="440" bottom="818" />
</element>
<element ref="text_MENSAJ">
<bounds left="294" top="750" right="430" bottom="808" />
</element>
<element ref="white">
<bounds left="284" top="885" right="440" bottom="963" />
</element>
<element ref="text_MARC">
<bounds left="294" top="895" right="430" bottom="953" />
</element>
<!-- Right controls -->
<element ref="lightgrey_rect">
<bounds left="552" top="394" right="1190" bottom="1015" />
</element>
<!-- Buttons 1, 2, 3 -->
<element ref="button_blue" inputtag="COL.3" inputmask="0x04">
<bounds left="589" top="426" right="762" bottom="552" />
</element>
<element ref="text_1">
<bounds left="589" top="426" right="762" bottom="552" />
</element>
<element ref="button_blue" inputtag="COL.3" inputmask="0x02">
<bounds left="784" top="426" right="958" bottom="552" />
</element>
<element ref="text_2">
<bounds left="784" top="426" right="958" bottom="552" />
</element>
<element ref="button_blue" inputtag="COL.3" inputmask="0x01">
<bounds left="982" top="426" right="1155" bottom="552" />
</element>
<element ref="text_3">
<bounds left="982" top="426" right="1155" bottom="552" />
</element>
<!-- Buttons 4, 5, 6 -->
<element ref="button_blue" inputtag="COL.2" inputmask="0x04">
<bounds left="589" top="570" right="762" bottom="696" />
</element>
<element ref="text_4">
<bounds left="589" top="570" right="762" bottom="696" />
</element>
<element ref="button_blue" inputtag="COL.2" inputmask="0x02">
<bounds left="784" top="570" right="958" bottom="696" />
</element>
<element ref="text_5">
<bounds left="784" top="570" right="958" bottom="696" />
</element>
<element ref="button_blue" inputtag="COL.2" inputmask="0x01">
<bounds left="982" top="570" right="1155" bottom="696" />
</element>
<element ref="text_6">
<bounds left="982" top="570" right="1155" bottom="696" />
</element>
<!-- Buttons 7, 8, 9 -->
<element ref="button_blue" inputtag="COL.1" inputmask="0x04">
<bounds left="589" top="715" right="762" bottom="838" />
</element>
<element ref="text_7">
<bounds left="589" top="715" right="762" bottom="838" />
</element>
<element ref="button_blue" inputtag="COL.1" inputmask="0x02">
<bounds left="784" top="715" right="958" bottom="838" />
</element>
<element ref="text_8">
<bounds left="784" top="715" right="958" bottom="838" />
</element>
<element ref="button_blue" inputtag="COL.1" inputmask="0x01">
<bounds left="982" top="715" right="1155" bottom="838" />
</element>
<element ref="text_9">
<bounds left="982" top="715" right="1155" bottom="838" />
</element>
<!-- Buttons CLEAR, 0, ENTER -->
<element ref="button_white" inputtag="COL.0" inputmask="0x04">
<bounds left="616" top="859" right="739" bottom="981" />
</element>
<element ref="text_CLEAR">
<bounds left="636" top="879" right="719" bottom="961" />
</element>
<element ref="button_blue" inputtag="COL.0" inputmask="0x02">
<bounds left="784" top="859" right="958" bottom="981" />
</element>
<element ref="text_0">
<bounds left="784" top="859" right="958" bottom="981" />
</element>
<element ref="button_white" inputtag="COL.0" inputmask="0x01">
<bounds left="1009" top="859" right="1132" bottom="981" />
</element>
<element ref="text_ENTER">
<bounds left="1029" top="879" right="1112" bottom="961" />
</element>
</view>
</mamelayout>