improved mw18w layout a bit

This commit is contained in:
Michaël Banaan Ananas 2013-12-08 21:54:29 +00:00
parent 64ece919a7
commit 16ff3c8de0
3 changed files with 73 additions and 24 deletions

View File

@ -70,7 +70,7 @@ WRITE8_MEMBER(mw18w_state::mw18w_sound1_w)
WRITE8_MEMBER(mw18w_state::mw18w_lamps_w)
{
// d0-3, d7: selected rows
int rows = (data & 0xf) | ( data >> 3 & 0x10);
int rows = (data & 0xf) | (data >> 3 & 0x10);
// d4-d6: column
int col = data >> 4 & 7;
@ -83,12 +83,12 @@ WRITE8_MEMBER(mw18w_state::mw18w_lamps_w)
WRITE8_MEMBER(mw18w_state::mw18w_led_display_w)
{
// d0-3: 7448 (BCD to LED segment)
const UINT8 ls48_map[16] =
const UINT8 _7448_map[16] =
{ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 };
// d4-7: 7442 (BCD to decimal) -> pick digit panel
if ((data&0xf0)>0x90) return;
output_set_digit_value(data >> 4, ls48_map[data & 0xf]);
if ((data & 0xf0) > 0x90) return;
output_set_digit_value(data >> 4, _7448_map[data & 0xf]);
}
WRITE8_MEMBER(mw18w_state::mw18w_irq0_clear_w)

View File

@ -107,12 +107,12 @@ WRITE8_MEMBER(submar_state::submar_sound_w)
WRITE8_MEMBER(submar_state::submar_led_w)
{
// 7447 (BCD to LED segment)
const UINT8 ls47_map[16] =
const UINT8 _7447_map[16] =
{ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 };
// 2 digits per write. port 4: time, port 5: score
output_set_digit_value((offset << 1 & 2) | 0, ls47_map[data >> 4]);
output_set_digit_value((offset << 1 & 2) | 1, ls47_map[data & 0x0f]);
output_set_digit_value((offset << 1 & 2) | 0, _7447_map[data >> 4]);
output_set_digit_value((offset << 1 & 2) | 1, _7447_map[data & 0x0f]);
}
WRITE8_MEMBER(submar_state::submar_irq_clear_w)

View File

@ -1,58 +1,107 @@
<?xml version="1.0"?>
<mamelayout version="2">
<!-- NOTE: this only shows the info panel, -->
<!-- simple reflected lamps (lamp00-lamp47) is possible but not added yet, -->
<!-- movable parts are omitted -->
<!-- define elements -->
<element name="static_black">
<rect>
<color red="0.0" green="0.0" blue="0.0" />
</rect>
</element>
<element name="digit" defstate="0">
<led7seg>
<color red="1.0" green="0.3" blue="0.0" />
<color red="1.0" green="0.3" blue="0.2" />
</led7seg>
</element>
<view name="Simple LEDs">
<bounds left="0" right="256" top="0" bottom="256" />
<element name="text_time">
<text string="TIME">
<color red="1.0" green="0.3" blue="0.2" />
</text>
</element>
<element name="text_mph">
<text string="M.P.H.">
<color red="1.0" green="0.3" blue="0.2" />
</text>
</element>
<element name="text_score">
<text string="SCORE">
<color red="1.0" green="0.3" blue="0.2" />
</text>
</element>
<!-- left panel -->
<view name="Internal Layout">
<bounds left="0" right="170" top="0" bottom="47" />
<bezel element="static_black">
<bounds left="0" right="170" top="0" bottom="47" />
</bezel>
<!-- left panel -->
<!-- TIME -->
<bezel name="digit3" element="digit">
<bounds left="0" top="0" right="9" bottom="15" />
<bounds x="10" y="10" width="10" height="15" />
</bezel>
<bezel name="digit2" element="digit">
<bounds left="10" top="0" right="19" bottom="15" />
<bounds x="20" y="10" width="10" height="15" />
</bezel>
<!-- not connected -->
<bezel name="dummy_digita" element="digit">
<bounds left="20" top="0" right="29" bottom="15" />
<bounds x="30" y="10" width="10" height="15" />
</bezel>
<bezel name="dummy_digitb" element="digit">
<bounds left="30" top="0" right="39" bottom="15" />
<bounds x="40" y="10" width="10" height="15" />
</bezel>
<!-- M.P.H. -->
<bezel name="digit1" element="digit">
<bounds left="40" top="0" right="49" bottom="15" />
<bounds x="50" y="10" width="10" height="15" />
</bezel>
<bezel name="digit0" element="digit">
<bounds left="50" top="0" right="59" bottom="15" />
<bounds x="60" y="10" width="10" height="15" />
</bezel>
<!-- right panel -->
<bezel element="text_time">
<bounds x="10" y="30" width="30" height="7" />
</bezel>
<bezel element="text_mph">
<bounds x="40" y="30" width="30" height="7" />
</bezel>
<!-- right panel -->
<!-- SCORE -->
<bezel name="digit9" element="digit">
<bounds left="100" top="0" right="109" bottom="15" />
<bounds x="100" y="10" width="10" height="15" />
</bezel>
<bezel name="digit8" element="digit">
<bounds left="110" top="0" right="119" bottom="15" />
<bounds x="110" y="10" width="10" height="15" />
</bezel>
<bezel name="digit7" element="digit">
<bounds left="120" top="0" right="129" bottom="15" />
<bounds x="120" y="10" width="10" height="15" />
</bezel>
<bezel name="digit6" element="digit">
<bounds left="130" top="0" right="139" bottom="15" />
<bounds x="130" y="10" width="10" height="15" />
</bezel>
<bezel name="digit5" element="digit">
<bounds left="140" top="0" right="149" bottom="15" />
<bounds x="140" y="10" width="10" height="15" />
</bezel>
<bezel name="digit4" element="digit">
<bounds left="150" top="0" right="159" bottom="15" />
<bounds x="150" y="10" width="10" height="15" />
</bezel>
<bezel element="text_score">
<bounds x="100" y="30" width="60" height="7" />
</bezel>
</view>
</mamelayout>