trunk/src/mame/layout/nsm.lay
r0 | r18270 | |
| 1 | <!-- nsm.lay --> |
| 2 | |
| 3 | <!-- 2012-10-04: Initial version. [Robbbert] --> |
| 4 | |
| 5 | <mamelayout version="2"> |
| 6 | |
| 7 | <element name="digit" defstate="0"> |
| 8 | <led14seg> |
| 9 | <color red="0.0" green="0.75" blue="0.0" /> |
| 10 | </led14seg> |
| 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 / Match"><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="Player 1"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 22 | <element name="P4"><text string="Player 2"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 23 | <element name="P5"><text string="Player 3"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 24 | <element name="P6"><text string="Player 4"><color red="1.0" green="1.0" blue="1.0" /></text></element> |
| 25 | |
| 26 | <view name="Default Layout"> |
| 27 | |
| 28 | <!-- Background --> |
| 29 | <backdrop element="background"> |
| 30 | <bounds left="0" top="20" right="318" bottom="394" /> |
| 31 | </backdrop> |
| 32 | |
| 33 | <!-- Flourescent Displays --> |
| 34 | |
| 35 | <!-- Player 1 Score --> |
| 36 | |
| 37 | <bezel name="digit10" element="digit"> |
| 38 | <bounds left="10" top="45" right="44" bottom="84" /> |
| 39 | </bezel> |
| 40 | <bezel name="digit11" element="digit"> |
| 41 | <bounds left="54" top="45" right="88" bottom="84" /> |
| 42 | </bezel> |
| 43 | <bezel name="digit12" element="digit"> |
| 44 | <bounds left="98" top="45" right="132" bottom="84" /> |
| 45 | </bezel> |
| 46 | <bezel name="digit13" element="digit"> |
| 47 | <bounds left="142" top="45" right="176" bottom="84" /> |
| 48 | </bezel> |
| 49 | <bezel name="digit14" element="digit"> |
| 50 | <bounds left="186" top="45" right="220" bottom="84" /> |
| 51 | </bezel> |
| 52 | <bezel name="digit15" element="digit"> |
| 53 | <bounds left="230" top="45" right="264" bottom="84" /> |
| 54 | </bezel> |
| 55 | <bezel name="digit16" element="digit"> |
| 56 | <bounds left="274" top="45" right="308" bottom="84" /> |
| 57 | </bezel> |
| 58 | <bezel name="digit17" element="digit"> |
| 59 | <bounds left="318" top="45" right="352" bottom="84" /> |
| 60 | </bezel> |
| 61 | |
| 62 | <!-- Player 2 Score --> |
| 63 | <bezel name="digit30" element="digit"> |
| 64 | <bounds left="10" top="105" right="44" bottom="144" /> |
| 65 | </bezel> |
| 66 | <bezel name="digit31" element="digit"> |
| 67 | <bounds left="54" top="105" right="88" bottom="144" /> |
| 68 | </bezel> |
| 69 | <bezel name="digit32" element="digit"> |
| 70 | <bounds left="98" top="105" right="132" bottom="144" /> |
| 71 | </bezel> |
| 72 | <bezel name="digit33" element="digit"> |
| 73 | <bounds left="142" top="105" right="176" bottom="144" /> |
| 74 | </bezel> |
| 75 | <bezel name="digit34" element="digit"> |
| 76 | <bounds left="186" top="105" right="220" bottom="144" /> |
| 77 | </bezel> |
| 78 | <bezel name="digit35" element="digit"> |
| 79 | <bounds left="230" top="105" right="264" bottom="144" /> |
| 80 | </bezel> |
| 81 | <bezel name="digit36" element="digit"> |
| 82 | <bounds left="274" top="105" right="308" bottom="144" /> |
| 83 | </bezel> |
| 84 | <bezel name="digit37" element="digit"> |
| 85 | <bounds left="318" top="105" right="352" bottom="144" /> |
| 86 | </bezel> |
| 87 | |
| 88 | <!-- Player 3 Score --> |
| 89 | <bezel name="digit20" element="digit"> |
| 90 | <bounds left="10" top="165" right="44" bottom="204" /> |
| 91 | </bezel> |
| 92 | <bezel name="digit21" element="digit"> |
| 93 | <bounds left="54" top="165" right="88" bottom="204" /> |
| 94 | </bezel> |
| 95 | <bezel name="digit22" element="digit"> |
| 96 | <bounds left="98" top="165" right="132" bottom="204" /> |
| 97 | </bezel> |
| 98 | <bezel name="digit23" element="digit"> |
| 99 | <bounds left="142" top="165" right="176" bottom="204" /> |
| 100 | </bezel> |
| 101 | <bezel name="digit24" element="digit"> |
| 102 | <bounds left="186" top="165" right="220" bottom="204" /> |
| 103 | </bezel> |
| 104 | <bezel name="digit25" element="digit"> |
| 105 | <bounds left="230" top="165" right="264" bottom="204" /> |
| 106 | </bezel> |
| 107 | <bezel name="digit26" element="digit"> |
| 108 | <bounds left="274" top="165" right="308" bottom="204" /> |
| 109 | </bezel> |
| 110 | <bezel name="digit27" element="digit"> |
| 111 | <bounds left="318" top="165" right="352" bottom="204" /> |
| 112 | </bezel> |
| 113 | |
| 114 | <!-- Player 4 Score --> |
| 115 | <bezel name="digit40" element="digit"> |
| 116 | <bounds left="10" top="225" right="44" bottom="264" /> |
| 117 | </bezel> |
| 118 | <bezel name="digit41" element="digit"> |
| 119 | <bounds left="54" top="225" right="88" bottom="264" /> |
| 120 | </bezel> |
| 121 | <bezel name="digit42" element="digit"> |
| 122 | <bounds left="98" top="225" right="132" bottom="264" /> |
| 123 | </bezel> |
| 124 | <bezel name="digit43" element="digit"> |
| 125 | <bounds left="142" top="225" right="176" bottom="264" /> |
| 126 | </bezel> |
| 127 | <bezel name="digit44" element="digit"> |
| 128 | <bounds left="186" top="225" right="220" bottom="264" /> |
| 129 | </bezel> |
| 130 | <bezel name="digit45" element="digit"> |
| 131 | <bounds left="230" top="225" right="264" bottom="264" /> |
| 132 | </bezel> |
| 133 | <bezel name="digit46" element="digit"> |
| 134 | <bounds left="274" top="225" right="308" bottom="264" /> |
| 135 | </bezel> |
| 136 | <bezel name="digit47" element="digit"> |
| 137 | <bounds left="318" top="225" right="352" bottom="264" /> |
| 138 | </bezel> |
| 139 | |
| 140 | <!-- Credits and Balls --> |
| 141 | <bezel name="digit0" element="digit"> |
| 142 | <bounds left="10" top="345" right="44" bottom="384" /> |
| 143 | </bezel> |
| 144 | <bezel name="digit1" element="digit"> |
| 145 | <bounds left="54" top="345" right="88" bottom="384" /> |
| 146 | </bezel> |
| 147 | <bezel name="digit2" element="digit"> |
| 148 | <bounds left="98" top="345" right="132" bottom="384" /> |
| 149 | </bezel> |
| 150 | <bezel name="digit3" element="digit"> |
| 151 | <bounds left="142" top="345" right="176" bottom="384" /> |
| 152 | </bezel> |
| 153 | <bezel name="digit4" element="digit"> |
| 154 | <bounds left="186" top="345" right="220" bottom="384" /> |
| 155 | </bezel> |
| 156 | <bezel name="digit5" element="digit"> |
| 157 | <bounds left="230" top="345" right="264" bottom="384" /> |
| 158 | </bezel> |
| 159 | <bezel name="digit6" element="digit"> |
| 160 | <bounds left="274" top="345" right="308" bottom="384" /> |
| 161 | </bezel> |
| 162 | <bezel name="digit7" element="digit"> |
| 163 | <bounds left="318" top="345" right="352" bottom="384" /> |
| 164 | </bezel> |
| 165 | |
| 166 | <bezel element="P0"><bounds left="100" right="180" top="330" bottom="342" /></bezel> |
| 167 | <bezel element="P1"><bounds left="30" right="88" top="330" bottom="342" /></bezel> |
| 168 | <bezel element="P3"><bounds left="120" right="200" top="30" bottom="42" /></bezel> |
| 169 | <bezel element="P4"><bounds left="120" right="200" top="90" bottom="102" /></bezel> |
| 170 | <bezel element="P5"><bounds left="120" right="200" top="150" bottom="162" /></bezel> |
| 171 | <bezel element="P6"><bounds left="120" right="200" top="210" bottom="222" /></bezel> |
| 172 | </view> |
| 173 | </mamelayout> |
trunk/src/mame/drivers/nsm.c
r18269 | r18270 | |
3 | 3 | Pinball |
4 | 4 | NSM (Lowen) : Hot Fire Birds |
5 | 5 | |
| 6 | Schematic and PinMAME used as references |
| 7 | |
| 8 | Everything in this machine is controlled by a serial bus based on the |
| 9 | processor's CRU pins (serial i/o). It needs a T.I. specialist to get this |
| 10 | working. |
| 11 | |
6 | 12 | *********************************************************************************/ |
7 | 13 | |
8 | 14 | #include "emu.h" |
9 | 15 | #include "cpu/tms9900/tms9900l.h" |
10 | 16 | #include "sound/ay8910.h" |
11 | 17 | #include "machine/nvram.h" |
| 18 | #include "nsm.lh" |
12 | 19 | |
| 20 | |
13 | 21 | class nsm_state : public driver_device |
14 | 22 | { |
15 | 23 | public: |
r18269 | r18270 | |
19 | 27 | { } |
20 | 28 | |
21 | 29 | DECLARE_READ8_MEMBER(ff_r); |
| 30 | DECLARE_WRITE8_MEMBER(cru_w); |
| 31 | DECLARE_WRITE8_MEMBER(oe_w); |
22 | 32 | protected: |
23 | 33 | |
24 | 34 | // devices |
r18269 | r18270 | |
26 | 36 | |
27 | 37 | // driver_device overrides |
28 | 38 | virtual void machine_reset(); |
| 39 | private: |
| 40 | UINT8 m_cru_data[9]; |
| 41 | UINT8 m_cru_count; |
29 | 42 | public: |
30 | 43 | DECLARE_DRIVER_INIT(nsm); |
31 | 44 | }; |
r18269 | r18270 | |
41 | 54 | ADDRESS_MAP_END |
42 | 55 | |
43 | 56 | static ADDRESS_MAP_START( nsm_io_map, AS_IO, 8, nsm_state ) |
44 | | AM_RANGE(0x0000, 0x0001) AM_READ(ff_r) |
45 | | AM_RANGE(0x0010, 0x0011) AM_READNOP |
46 | | AM_RANGE(0x0060, 0x0061) AM_READNOP |
| 57 | // 00-71 selected by IC600 (74LS151) |
| 58 | AM_RANGE(0x0000, 0x0001) AM_READ(ff_r) // 5v supply |
| 59 | AM_RANGE(0x0010, 0x0011) AM_READNOP // antenna |
| 60 | AM_RANGE(0x0020, 0x0021) AM_READNOP // reset circuit |
| 61 | AM_RANGE(0x0030, 0x0031) AM_READ(ff_r) // service plug |
| 62 | AM_RANGE(0x0040, 0x0041) AM_READ(ff_r) // service plug |
| 63 | AM_RANGE(0x0050, 0x0051) AM_READ(ff_r) // test of internal battery |
| 64 | AM_RANGE(0x0060, 0x0061) AM_READ(ff_r) // sum of analog outputs of ay2 |
| 65 | AM_RANGE(0x0070, 0x0071) AM_READNOP // serial data in |
47 | 66 | AM_RANGE(0x0f70, 0x0f7d) AM_WRITENOP |
48 | 67 | AM_RANGE(0x0fe4, 0x0fff) AM_READNOP |
49 | | AM_RANGE(0x7f80, 0x7fd1) AM_WRITENOP |
| 68 | AM_RANGE(0x7fb0, 0x7fbf) AM_WRITE(cru_w) |
| 69 | AM_RANGE(0x7fd0, 0x7fd1) AM_WRITE(oe_w) |
50 | 70 | ADDRESS_MAP_END |
51 | 71 | |
52 | 72 | static INPUT_PORTS_START( nsm ) |
53 | 73 | INPUT_PORTS_END |
54 | 74 | |
55 | | READ8_MEMBER( nsm_state::ff_r ) { return 0xff; } |
| 75 | READ8_MEMBER( nsm_state::ff_r ) { return 1; } |
56 | 76 | |
| 77 | WRITE8_MEMBER( nsm_state::oe_w ) |
| 78 | { |
| 79 | m_cru_count = 0; |
| 80 | } |
| 81 | |
| 82 | WRITE8_MEMBER( nsm_state::cru_w ) |
| 83 | { |
| 84 | UINT8 i,j; |
| 85 | int segments; |
| 86 | for (i = 1; i < 9;i++) |
| 87 | m_cru_data[i] = (m_cru_data[i] >> 1) | (BIT(m_cru_data[i-1], 0) ? 0x80 : 0); |
| 88 | |
| 89 | m_cru_data[0] = (m_cru_data[0] >> 1) | (BIT(data, 0) ? 0x80 : 0); |
| 90 | |
| 91 | m_cru_count++; |
| 92 | |
| 93 | if (m_cru_count == 72) |
| 94 | { |
| 95 | m_cru_count = 0; |
| 96 | //for (i = 0; i < 8; i++) printf("%02X ",m_cru_data[i]);printf("\n"); |
| 97 | for (i = 0; i < 8; i++) |
| 98 | { |
| 99 | if (BIT(m_cru_data[0], i)) |
| 100 | { |
| 101 | for (j = 0; j < 5; j++) |
| 102 | { |
| 103 | segments = m_cru_data[8-j]^0xff; |
| 104 | output_set_digit_value(j * 10 + i, BITSWAP16(segments, 8, 8, 8, 8, 8, 8, 7, 7, 6, 6, 5, 4, 3, 2, 1, 0)); |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
57 | 114 | void nsm_state::machine_reset() |
58 | 115 | { |
59 | 116 | } |
r18269 | r18270 | |
68 | 125 | MCFG_CPU_PROGRAM_MAP(nsm_map) |
69 | 126 | MCFG_CPU_IO_MAP(nsm_io_map) |
70 | 127 | |
| 128 | /* Video */ |
| 129 | MCFG_DEFAULT_LAYOUT(layout_nsm) |
| 130 | |
71 | 131 | /* Sound */ |
72 | 132 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
73 | 133 | MCFG_SOUND_ADD("ay1", AY8912, 11052000/8) |
r18269 | r18270 | |
98 | 158 | / The Games (1985) |
99 | 159 | /-------------------------------------------------------------------*/ |
100 | 160 | |
101 | | GAME(1985, firebird, 0, nsm, nsm, nsm_state, nsm, ROT0, "NSM", "Hot Fire Birds", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_MECHANICAL) |
| 161 | GAME(1985, firebird, 0, nsm, nsm, nsm_state, nsm, ROT0, "NSM", "Hot Fire Birds", GAME_NOT_WORKING | GAME_MECHANICAL) |