trunk/src/mame/layout/zac_proto.lay
r0 | r17462 | |
| 1 | <!-- flicker.lay --> |
| 2 | |
| 3 | <!-- 2012-08-22: Initial version. [Robbbert] --> |
| 4 | |
| 5 | <mamelayout version="2"> |
| 6 | |
| 7 | <element name="digit" defstate="0"> |
| 8 | <led7seg> |
| 9 | <color red="1.0" green="0.0" blue="0.0" /> |
| 10 | </led7seg> |
| 11 | </element> |
| 12 | |
| 13 | <element name="background"> |
| 14 | <rect> |
| 15 | <bounds left="0" top="0" right="1" bottom="1" /> |
| 16 | <color red="0.0" green="0.0" blue="0.0" /> |
| 17 | </rect> |
| 18 | </element> |
| 19 | <element name="P0"><text string="Ball"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 20 | <element name="P1"><text string="Credits"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 21 | <element name="P3"><text string="Score"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 22 | |
| 23 | <view name="Default Layout"> |
| 24 | |
| 25 | <!-- Background --> |
| 26 | <backdrop element="background"> |
| 27 | <bounds left="0" top="0" right="318" bottom="180" /> |
| 28 | </backdrop> |
| 29 | |
| 30 | <!-- LEDs --> |
| 31 | <bezel name="digit5" element="digit"> |
| 32 | <bounds left="10" top="45" right="44" bottom="84" /> |
| 33 | </bezel> |
| 34 | <bezel name="digit4" element="digit"> |
| 35 | <bounds left="54" top="45" right="88" bottom="84" /> |
| 36 | </bezel> |
| 37 | <bezel name="digit3" element="digit"> |
| 38 | <bounds left="98" top="45" right="132" bottom="84" /> |
| 39 | </bezel> |
| 40 | <bezel name="digit2" element="digit"> |
| 41 | <bounds left="142" top="45" right="176" bottom="84" /> |
| 42 | </bezel> |
| 43 | <bezel name="digit1" element="digit"> |
| 44 | <bounds left="186" top="45" right="220" bottom="84" /> |
| 45 | </bezel> |
| 46 | <bezel name="digit0" element="digit"> |
| 47 | <bounds left="230" top="45" right="264" bottom="84" /> |
| 48 | </bezel> |
| 49 | <bezel name="digit10" element="digit"> |
| 50 | <bounds left="274" top="45" right="308" bottom="84" /> |
| 51 | </bezel> |
| 52 | <bezel name="digit7" element="digit"> |
| 53 | <bounds left="30" top="145" right="54" bottom="170" /> |
| 54 | </bezel> |
| 55 | <bezel name="digit6" element="digit"> |
| 56 | <bounds left="64" top="145" right="88" bottom="170" /> |
| 57 | </bezel> |
| 58 | <bezel name="digit9" element="digit"> |
| 59 | <bounds left="230" top="145" right="254" bottom="170" /> |
| 60 | </bezel> |
| 61 | <bezel name="digit8" element="digit"> |
| 62 | <bounds left="264" top="145" right="288" bottom="170" /> |
| 63 | </bezel> |
| 64 | <bezel element="P0"><bounds left="230" right="288" top="110" bottom="135" /></bezel> |
| 65 | <bezel element="P1"><bounds left="30" right="88" top="110" bottom="135" /></bezel> |
| 66 | <bezel element="P3"><bounds left="100" right="200" top="10" bottom="35" /></bezel> |
| 67 | </view> |
| 68 | </mamelayout> |
trunk/src/mame/drivers/zac_proto.c
r17461 | r17462 | |
4 | 4 | |
5 | 5 | #include "emu.h" |
6 | 6 | #include "cpu/scmp/scmp.h" |
7 | | //#include "zac-proto.lh" |
| 7 | #include "zac_proto.lh" |
8 | 8 | |
9 | 9 | class zac_proto_state : public driver_device |
10 | 10 | { |
r17461 | r17462 | |
73 | 73 | WRITE8_MEMBER( zac_proto_state::digit_w ) |
74 | 74 | { |
75 | 75 | static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0, 0, 0, 0, 0, 0 }; |
| 76 | static const UINT8 decimals[10] = { 0, 0, 0x80, 0, 0, 0x80, 0, 0, 0, 0 }; |
76 | 77 | offset<<=1; |
77 | | output_set_digit_value(offset++, patterns[data&15]); |
78 | | output_set_digit_value(offset, patterns[data>>4]); |
| 78 | output_set_digit_value(offset, patterns[data&15] | decimals[offset]); |
| 79 | offset++; |
| 80 | output_set_digit_value(offset, patterns[data>>4] | decimals[offset]); |
79 | 81 | } |
80 | 82 | |
81 | 83 | WRITE8_MEMBER( zac_proto_state::sound_w ) |
r17461 | r17462 | |
97 | 99 | MCFG_CPU_PROGRAM_MAP(zac_proto_map) |
98 | 100 | |
99 | 101 | /* Video */ |
100 | | //MCFG_DEFAULT_LAYOUT(layout_zac_proto) |
| 102 | MCFG_DEFAULT_LAYOUT(layout_zac_proto) |
101 | 103 | MACHINE_CONFIG_END |
102 | 104 | |
103 | 105 | /*-------------------------------- |