Previous 199869 Revisions Next

r44462 Saturday 23rd January, 2016 at 23:53:25 UTC by Felipe CorrĂȘa da Silva Sanches
[marywu] adding layout with 7seg displays
[src/mame/drivers]marywu.cpp
[src/mame/layout]marywu.lay*

trunk/src/mame/drivers/marywu.cpp
r252973r252974
2020#include "cpu/mcs51/mcs51.h"
2121#include "sound/ay8910.h"
2222#include "machine/i8279.h"
23#include "marywu.lh"
2324
2425class marywu_state : public driver_device
2526{
r252973r252974
3334
3435WRITE8_MEMBER( marywu_state::display_7seg_data_w )
3536{
36    output_set_digit_value(0, data & 0x0F);
37    output_set_digit_value(1, data & 0xF0);
37    static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // HEF4511BP (7 seg display driver)
38
39    output_set_digit_value(0, patterns[data & 0x0F]);
40    output_set_digit_value(1, patterns[(data >> 4) & 0x0F]);
3841}
3942
4043static ADDRESS_MAP_START( program_map, AS_PROGRAM, 8, marywu_state )
r252973r252974
5558    MCFG_CPU_PROGRAM_MAP(program_map)
5659    MCFG_CPU_IO_MAP(io_map)
5760
58    /* Keyboard interface */
61    /* Keyboard & display interface */
5962    MCFG_DEVICE_ADD("i8279", I8279, XTAL_10_738635MHz) /* should it be perhaps a fraction of the XTAL clock ? */
6063//    MCFG_I8279_OUT_SL_CB(WRITE8(marywu_state, marywu_scanlines_w))          // scan SL lines
6164//    MCFG_I8279_IN_RL_CB(READ8(marywu_state, marywu_kbd_r))                  // kbd RL lines
6265    MCFG_I8279_OUT_DISP_CB(WRITE8(marywu_state, display_7seg_data_w))
6366
67    /* Video */
68    MCFG_DEFAULT_LAYOUT(layout_marywu)
69
6470    /* sound hardware */
6571    MCFG_SPEAKER_STANDARD_MONO("mono")
6672    MCFG_SOUND_ADD("ay1", AY8910, XTAL_10_738635MHz) /* should it be perhaps a fraction of the XTAL clock ? */
trunk/src/mame/layout/marywu.lay
r0r252974
1<!-- marywu.lay -->
2
3<mamelayout version="2">
4
5   <element name="digit" defstate="0">
6      <led7seg>
7         <color red="1.0" green="0.0" blue="0.0" />
8      </led7seg>
9   </element>
10
11   <element name="background">
12      <rect>
13         <bounds left="0" top="0" right="1" bottom="1" />
14         <color red="0.0" green="0.0" blue="0.0" />
15      </rect>
16   </element>
17
18   <view name="Default Layout">
19
20      <!-- Background -->
21      <backdrop element="background">
22         <bounds left="0" top="20" right="274" bottom="394" />
23      </backdrop>
24
25      <!-- LEDs -->
26
27      <bezel name="digit4" element="digit">
28         <bounds left="10" top="45" right="44" bottom="84" />
29      </bezel>
30      <bezel name="digit5" element="digit">
31         <bounds left="54" top="45" right="88" bottom="84" />
32      </bezel>
33      <bezel name="digit2" element="digit">
34         <bounds left="98" top="45" right="132" bottom="84" />
35      </bezel>
36      <bezel name="digit3" element="digit">
37         <bounds left="142" top="45" right="176" bottom="84" />
38      </bezel>
39      <bezel name="digit0" element="digit">
40         <bounds left="186" top="45" right="220" bottom="84" />
41      </bezel>
42      <bezel name="digit1" element="digit">
43         <bounds left="230" top="45" right="264" bottom="84" />
44      </bezel>
45
46      <bezel name="digit10" element="digit">
47         <bounds left="10" top="105" right="44" bottom="144" />
48      </bezel>
49      <bezel name="digit11" element="digit">
50         <bounds left="54" top="105" right="88" bottom="144" />
51      </bezel>
52      <bezel name="digit8" element="digit">
53         <bounds left="98" top="105" right="132" bottom="144" />
54      </bezel>
55      <bezel name="digit9" element="digit">
56         <bounds left="142" top="105" right="176" bottom="144" />
57      </bezel>
58      <bezel name="digit6" element="digit">
59         <bounds left="186" top="105" right="220" bottom="144" />
60      </bezel>
61      <bezel name="digit7" element="digit">
62         <bounds left="230" top="105" right="264" bottom="144" />
63      </bezel>
64
65      <bezel name="digit14" element="digit">
66         <bounds left="98" top="165" right="132" bottom="204" />
67      </bezel>
68      <bezel name="digit15" element="digit">
69         <bounds left="142" top="165" right="176" bottom="204" />
70      </bezel>
71      <bezel name="digit12" element="digit">
72         <bounds left="186" top="165" right="220" bottom="204" />
73      </bezel>
74      <bezel name="digit13" element="digit">
75         <bounds left="230" top="165" right="264" bottom="204" />
76      </bezel>
77   </view>
78</mamelayout>


Previous 199869 Revisions Next


© 1997-2024 The MAME Team