Previous 199869 Revisions Next

r31399 Wednesday 23rd July, 2014 at 13:17:01 UTC by Robbbert
GamePlan 1: Machines are working, with a few bugs.
[src/mame/drivers]gp_1.c
[src/mame/layout]gp_1.lay

trunk/src/mame/layout/gp_1.lay
r31398r31399
2020   </element>
2121   <element name="P0"><text string="Ball / Match"><color red="1.0" green="1.0" blue="1.0" /></text></element>
2222   <element name="P1"><text string="Credits"><color red="1.0" green="1.0" blue="1.0" /></text></element>
23   <element name="P2"><text string="Players"><color red="1.0" green="1.0" blue="1.0" /></text></element>
2324   <element name="P3"><text string="Player 1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
2425   <element name="P4"><text string="Player 2"><color red="1.0" green="1.0" blue="1.0" /></text></element>
2526   <element name="P5"><text string="Player 3"><color red="1.0" green="1.0" blue="1.0" /></text></element>
r31398r31399
3637
3738      <!-- Player 1 Score -->
3839
39      <bezel name="digit0" element="digit">
40      <bezel name="digit5" element="digit">
4041         <bounds left="10" top="45" right="44" bottom="84" />
4142      </bezel>
42      <bezel name="digit1" element="digit">
43      <bezel name="digit4" element="digit">
4344         <bounds left="54" top="45" right="88" bottom="84" />
4445      </bezel>
45      <bezel name="digit2" element="digit">
46      <bezel name="digit3" element="digit">
4647         <bounds left="98" top="45" right="132" bottom="84" />
4748      </bezel>
48      <bezel name="digit3" element="digit">
49      <bezel name="digit2" element="digit">
4950         <bounds left="142" top="45" right="176" bottom="84" />
5051      </bezel>
51      <bezel name="digit4" element="digit">
52      <bezel name="digit1" element="digit">
5253         <bounds left="186" top="45" right="220" bottom="84" />
5354      </bezel>
54      <bezel name="digit5" element="digit">
55      <bezel name="digit0" element="digit">
5556         <bounds left="230" top="45" right="264" bottom="84" />
5657      </bezel>
5758
5859      <!-- Player 2 Score -->
59      <bezel name="digit8" element="digit">
60      <bezel name="digit13" element="digit">
6061         <bounds left="10" top="105" right="44" bottom="144" />
6162      </bezel>
62      <bezel name="digit9" element="digit">
63      <bezel name="digit12" element="digit">
6364         <bounds left="54" top="105" right="88" bottom="144" />
6465      </bezel>
65      <bezel name="digit10" element="digit">
66      <bezel name="digit11" element="digit">
6667         <bounds left="98" top="105" right="132" bottom="144" />
6768      </bezel>
68      <bezel name="digit11" element="digit">
69      <bezel name="digit10" element="digit">
6970         <bounds left="142" top="105" right="176" bottom="144" />
7071      </bezel>
71      <bezel name="digit12" element="digit">
72      <bezel name="digit9" element="digit">
7273         <bounds left="186" top="105" right="220" bottom="144" />
7374      </bezel>
74      <bezel name="digit13" element="digit">
75      <bezel name="digit8" element="digit">
7576         <bounds left="230" top="105" right="264" bottom="144" />
7677      </bezel>
7778
7879      <!-- Player 3 Score -->
79      <bezel name="digit16" element="digit">
80      <bezel name="digit21" element="digit">
8081         <bounds left="10" top="165" right="44" bottom="204" />
8182      </bezel>
82      <bezel name="digit17" element="digit">
83      <bezel name="digit20" element="digit">
8384         <bounds left="54" top="165" right="88" bottom="204" />
8485      </bezel>
85      <bezel name="digit18" element="digit">
86      <bezel name="digit19" element="digit">
8687         <bounds left="98" top="165" right="132" bottom="204" />
8788      </bezel>
88      <bezel name="digit19" element="digit">
89      <bezel name="digit18" element="digit">
8990         <bounds left="142" top="165" right="176" bottom="204" />
9091      </bezel>
91      <bezel name="digit20" element="digit">
92      <bezel name="digit17" element="digit">
9293         <bounds left="186" top="165" right="220" bottom="204" />
9394      </bezel>
94      <bezel name="digit21" element="digit">
95      <bezel name="digit16" element="digit">
9596         <bounds left="230" top="165" right="264" bottom="204" />
9697      </bezel>
9798
9899      <!-- Player 4 Score -->
99      <bezel name="digit24" element="digit">
100      <bezel name="digit29" element="digit">
100101         <bounds left="10" top="225" right="44" bottom="264" />
101102      </bezel>
102      <bezel name="digit25" element="digit">
103      <bezel name="digit28" element="digit">
103104         <bounds left="54" top="225" right="88" bottom="264" />
104105      </bezel>
105      <bezel name="digit26" element="digit">
106      <bezel name="digit27" element="digit">
106107         <bounds left="98" top="225" right="132" bottom="264" />
107108      </bezel>
108      <bezel name="digit27" element="digit">
109      <bezel name="digit26" element="digit">
109110         <bounds left="142" top="225" right="176" bottom="264" />
110111      </bezel>
111      <bezel name="digit28" element="digit">
112      <bezel name="digit25" element="digit">
112113         <bounds left="186" top="225" right="220" bottom="264" />
113114      </bezel>
114      <bezel name="digit29" element="digit">
115      <bezel name="digit24" element="digit">
115116         <bounds left="230" top="225" right="264" bottom="264" />
116117      </bezel>
117118
118119      <!-- Credits and Balls -->
119120      <bezel name="digit14" element="digit">
120         <bounds left="10" top="345" right="44" bottom="384" />
121         <bounds left="39" top="345" right="73" bottom="384" />
121122      </bezel>
122      <bezel name="digit15" element="digit">
123         <bounds left="54" top="345" right="88" bottom="384" />
124      </bezel>
125123      <bezel name="digit6" element="digit">
126         <bounds left="186" top="345" right="220" bottom="384" />
124         <bounds left="110" top="345" right="144" bottom="384" />
127125      </bezel>
128      <bezel name="digit7" element="digit">
129         <bounds left="230" top="345" right="264" bottom="384" />
126      <bezel name="digit30" element="digit">
127         <bounds left="171" top="345" right="205" bottom="384" />
130128      </bezel>
131      <bezel element="P0"><bounds left="200" right="258" top="330" bottom="342" /></bezel>
132      <bezel element="P1"><bounds left="30" right="88" top="330" bottom="342" /></bezel>
129      <bezel name="digit22" element="digit">
130         <bounds left="210" top="345" right="244" bottom="384" />
131      </bezel>
132      <bezel element="P2"><bounds left="100" right="158" top="330" bottom="342" /></bezel>
133      <bezel element="P1"><bounds left="200" right="258" top="330" bottom="342" /></bezel>
134      <bezel element="P0"><bounds left="30" right="88" top="330" bottom="342" /></bezel>
133135      <bezel name="text3" element="P3"><bounds left="100" right="180" top="30" bottom="42" /></bezel>
134136      <bezel name="text2" element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel>
135137      <bezel name="text1" element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel>
136138      <bezel name="text0" element="P6"><bounds left="100" right="180" top="210" bottom="222" /></bezel>
137139      <bezel name="led0" element="red_led">
138         <bounds left="110" right="125" top="360" bottom="375" /></bezel>
140         <bounds left="10" right="25" top="360" bottom="375" /></bezel>
139141   </view>
140142</mamelayout>
trunk/src/mame/drivers/gp_1.c
r31398r31399
44    Game Plan MPU-1
55    These are "cocktail" cabinets, although there is only one seating position.
66
7ToDo:
8- Player 4 score doesn't show
9- Tens digit of credits doesn't show
10- The machine awards 3 free credits per player at the start of ball 1.
11- Nothing specific done with Family Fun / Star Trip, although they seem to work
12  just as well as the others.
13
714********************************************************************************/
815
916#include "machine/genpin.h"
r31398r31399
1118#include "cpu/z80/z80daisy.h"
1219#include "machine/i8255.h"
1320#include "machine/z80ctc.h"
21#include "machine/nvram.h"
1422#include "gp_1.lh"
1523
1624class gp_1_state : public genpin_class
r31398r31399
2028      : genpin_class(mconfig, type, tag)
2129      , m_maincpu(*this, "maincpu")
2230      , m_ctc(*this, "ctc")
31      , m_io_dsw0(*this, "DSW0")
32      , m_io_dsw1(*this, "DSW1")
33      , m_io_dsw2(*this, "DSW2")
34      , m_io_dsw3(*this, "DSW3")
35      , m_io_x7(*this, "X7")
36      , m_io_x8(*this, "X8")
37      , m_io_x9(*this, "X9")
38      , m_io_xa(*this, "XA")
39      , m_io_xb(*this, "XB")
2340   { }
2441
2542   DECLARE_DRIVER_INIT(gp_1);
r31398r31399
3047private:
3148   UINT8 m_u14;
3249   UINT8 m_digit;
33   UINT8 m_segment;
50   UINT8 m_segment[16];
3451   virtual void machine_reset();
3552   required_device<cpu_device> m_maincpu;
3653   required_device<z80ctc_device> m_ctc;
54   required_ioport m_io_dsw0;
55   required_ioport m_io_dsw1;
56   required_ioport m_io_dsw2;
57   required_ioport m_io_dsw3;
58   required_ioport m_io_x7;
59   required_ioport m_io_x8;
60   required_ioport m_io_x9;
61   required_ioport m_io_xa;
62   required_ioport m_io_xb;
3763};
3864
3965
4066static ADDRESS_MAP_START( gp_1_map, AS_PROGRAM, 8, gp_1_state )
4167   AM_RANGE(0x0000, 0x0fff) AM_ROM
42   AM_RANGE(0x8c00, 0x8cff) AM_RAM
68   AM_RANGE(0x8c00, 0x8cff) AM_RAM AM_SHARE("nvram")
4369ADDRESS_MAP_END
4470
4571static ADDRESS_MAP_START( gp_1_io, AS_IO, 8, gp_1_state )
r31398r31399
5076
5177static INPUT_PORTS_START( gp_1 )
5278   PORT_START("DSW0")
53   PORT_DIPNAME( 0x01, 0x00, "S01") // S1-5: 32 combinations of coins/credits of coin slot 1.
54   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
55   PORT_DIPSETTING(    0x01, DEF_STR( On ))
56   PORT_DIPNAME( 0x02, 0x02, "S02")
57   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
58   PORT_DIPSETTING(    0x02, DEF_STR( On ))
59   PORT_DIPNAME( 0x04, 0x00, "S03")
60   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
61   PORT_DIPSETTING(    0x04, DEF_STR( On ))
62   PORT_DIPNAME( 0x08, 0x00, "S04")
63   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
64   PORT_DIPSETTING(    0x08, DEF_STR( On ))
65   PORT_DIPNAME( 0x10, 0x00, "S05")
66   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
67   PORT_DIPSETTING(    0x10, DEF_STR( On ))
79   PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1")
80   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C )) // same as 01
81   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ))
82   PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ))
83   PORT_DIPSETTING(    0x04, DEF_STR( 1C_2C ))
84   PORT_DIPSETTING(    0x05, DEF_STR( 2C_2C ))
85   PORT_DIPSETTING(    0x06, DEF_STR( 1C_3C ))
86   PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ))
87   PORT_DIPSETTING(    0x08, DEF_STR( 1C_4C ))
88   PORT_DIPSETTING(    0x09, DEF_STR( 2C_4C ))
89   PORT_DIPSETTING(    0x0a, DEF_STR( 1C_5C ))
90   PORT_DIPSETTING(    0x0b, DEF_STR( 2C_5C ))
91   PORT_DIPSETTING(    0x0c, DEF_STR( 1C_6C ))
92   PORT_DIPSETTING(    0x0d, DEF_STR( 2C_6C ))
93   PORT_DIPSETTING(    0x0e, DEF_STR( 1C_7C ))
94   PORT_DIPSETTING(    0x0f, DEF_STR( 2C_7C ))
95   PORT_DIPSETTING(    0x10, DEF_STR( 1C_8C ))
96   PORT_DIPSETTING(    0x11, DEF_STR( 2C_8C ))
97   PORT_DIPSETTING(    0x12, DEF_STR( 1C_9C ))
98   PORT_DIPSETTING(    0x13, "2 coins 9 credits")
99   PORT_DIPSETTING(    0x14, "1 coin 10 credits")
100   PORT_DIPSETTING(    0x15, "2 coins 10 credits")
101   PORT_DIPSETTING(    0x16, "1 coin 11 credits")
102   PORT_DIPSETTING(    0x17, "2 coins 11 credits")
103   PORT_DIPSETTING(    0x18, "1 coin 12 credits")
104   PORT_DIPSETTING(    0x19, "2 coins 12 credits")
105   PORT_DIPSETTING(    0x1a, "1 coin 13 credits")
106   PORT_DIPSETTING(    0x1b, "2 coins 13 credits")
107   PORT_DIPSETTING(    0x1c, "1 coin 14 credits")
108   PORT_DIPSETTING(    0x1d, "2 coins 14 credits")
109   PORT_DIPSETTING(    0x1e, "1 coin 15 credits")
110   PORT_DIPSETTING(    0x1f, "2 coins 15 credits")
68111   PORT_DIPNAME( 0x20, 0x00, "S06")
69112   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
70113   PORT_DIPSETTING(    0x20, DEF_STR( On ))
r31398r31399
76119   PORT_DIPSETTING(    0x80, DEF_STR( On ))
77120
78121   PORT_START("DSW1")
79   PORT_DIPNAME( 0x01, 0x00, "S09") // S09-12 determine coinage for slot 2
80   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
81   PORT_DIPSETTING(    0x01, DEF_STR( On ))
82   PORT_DIPNAME( 0x02, 0x00, "S10")
83   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
84   PORT_DIPSETTING(    0x02, DEF_STR( On ))
85   PORT_DIPNAME( 0x04, 0x00, "S11")
86   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
87   PORT_DIPSETTING(    0x04, DEF_STR( On ))
88   PORT_DIPNAME( 0x08, 0x00, "S12")
89   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
90   PORT_DIPSETTING(    0x08, DEF_STR( On ))
122   PORT_DIPNAME( 0x0f, 0x00, "Coin Slot 2") // S09-12 determine coinage for slot 2
123   PORT_DIPSETTING(    0x00, "Same as Slot 1")
124   PORT_DIPSETTING(    0x01, DEF_STR( 1C_1C ))
125   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ))
126   PORT_DIPSETTING(    0x03, DEF_STR( 1C_3C ))
127   PORT_DIPSETTING(    0x04, DEF_STR( 1C_4C ))
128   PORT_DIPSETTING(    0x05, DEF_STR( 1C_5C ))
129   PORT_DIPSETTING(    0x06, DEF_STR( 1C_6C ))
130   PORT_DIPSETTING(    0x07, DEF_STR( 1C_7C ))
131   PORT_DIPSETTING(    0x08, DEF_STR( 1C_8C ))
132   PORT_DIPSETTING(    0x09, DEF_STR( 1C_9C ))
133   PORT_DIPSETTING(    0x0a, "1 coin 10 credits")
134   PORT_DIPSETTING(    0x0b, "1 coin 11 credits")
135   PORT_DIPSETTING(    0x0c, "1 coin 12 credits")
136   PORT_DIPSETTING(    0x0d, "1 coin 13 credits")
137   PORT_DIPSETTING(    0x0e, "1 coin 14 credits")
138   PORT_DIPSETTING(    0x0f, "1 coin 15 credits")
91139   PORT_DIPNAME( 0x10, 0x00, "S13")
92140   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
93141   PORT_DIPSETTING(    0x10, DEF_STR( On ))
r31398r31399
102150   PORT_DIPSETTING(    0x80, DEF_STR( On ))
103151
104152   PORT_START("DSW2")
105   PORT_DIPNAME( 0x01, 0x00, "S17") // S17-21 coins for slot 3
106   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
107   PORT_DIPSETTING(    0x01, DEF_STR( On ))
108   PORT_DIPNAME( 0x02, 0x02, "S18")
109   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
110   PORT_DIPSETTING(    0x02, DEF_STR( On ))
111   PORT_DIPNAME( 0x04, 0x00, "S19")
112   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
113   PORT_DIPSETTING(    0x04, DEF_STR( On ))
114   PORT_DIPNAME( 0x08, 0x00, "S20")
115   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
116   PORT_DIPSETTING(    0x08, DEF_STR( On ))
117   PORT_DIPNAME( 0x10, 0x00, "S21")
118   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
119   PORT_DIPSETTING(    0x10, DEF_STR( On ))
153   PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 3")
154   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C )) // same as 01
155   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ))
156   PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ))
157   PORT_DIPSETTING(    0x04, DEF_STR( 1C_2C ))
158   PORT_DIPSETTING(    0x05, DEF_STR( 2C_2C ))
159   PORT_DIPSETTING(    0x06, DEF_STR( 1C_3C ))
160   PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ))
161   PORT_DIPSETTING(    0x08, DEF_STR( 1C_4C ))
162   PORT_DIPSETTING(    0x09, DEF_STR( 2C_4C ))
163   PORT_DIPSETTING(    0x0a, DEF_STR( 1C_5C ))
164   PORT_DIPSETTING(    0x0b, DEF_STR( 2C_5C ))
165   PORT_DIPSETTING(    0x0c, DEF_STR( 1C_6C ))
166   PORT_DIPSETTING(    0x0d, DEF_STR( 2C_6C ))
167   PORT_DIPSETTING(    0x0e, DEF_STR( 1C_7C ))
168   PORT_DIPSETTING(    0x0f, DEF_STR( 2C_7C ))
169   PORT_DIPSETTING(    0x10, DEF_STR( 1C_8C ))
170   PORT_DIPSETTING(    0x11, DEF_STR( 2C_8C ))
171   PORT_DIPSETTING(    0x12, DEF_STR( 1C_9C ))
172   PORT_DIPSETTING(    0x13, "2 coins 9 credits")
173   PORT_DIPSETTING(    0x14, "1 coin 10 credits")
174   PORT_DIPSETTING(    0x15, "2 coins 10 credits")
175   PORT_DIPSETTING(    0x16, "1 coin 11 credits")
176   PORT_DIPSETTING(    0x17, "2 coins 11 credits")
177   PORT_DIPSETTING(    0x18, "1 coin 12 credits")
178   PORT_DIPSETTING(    0x19, "2 coins 12 credits")
179   PORT_DIPSETTING(    0x1a, "1 coin 13 credits")
180   PORT_DIPSETTING(    0x1b, "2 coins 13 credits")
181   PORT_DIPSETTING(    0x1c, "1 coin 14 credits")
182   PORT_DIPSETTING(    0x1d, "2 coins 14 credits")
183   PORT_DIPSETTING(    0x1e, "1 coin 15 credits")
184   PORT_DIPSETTING(    0x1f, "2 coins 15 credits")
120185   PORT_DIPNAME( 0x20, 0x00, "S22")
121186   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
122187   PORT_DIPSETTING(    0x20, DEF_STR( On ))
r31398r31399
153218   PORT_DIPSETTING(    0xC0, "3")
154219
155220   PORT_START("X7")
156   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("Accounting Reset")
221   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("Accounting Reset") // This pushbutton on the MPU board is called "S33"
157222   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 )
158223   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT1 ) PORT_NAME("Slam Tilt")
159224   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
r31398r31399
196261   switch (m_u14)
197262   {
198263      case 7:
199         return ioport("X7")->read();
264         return m_io_x7->read();
200265      case 8:
201         return ioport("X8")->read();
266         return m_io_x8->read();
202267      case 9:
203         return ioport("X9")->read();
268         return m_io_x9->read();
204269      case 10:
205         return ioport("XA")->read();
270         return m_io_xa->read();
206271      case 11:
207         return ioport("XB")->read();
272         return m_io_xb->read();
208273      case 12:
209         return ioport("DSW0")->read();
274         return m_io_dsw0->read();
210275      case 13:
211         return ioport("DSW1")->read();
276         return m_io_dsw1->read();
212277      case 14:
213         return ioport("DSW2")->read();
278         return m_io_dsw2->read();
214279      case 15:
215         return ioport("DSW3")->read();
280         return m_io_dsw3->read();
216281   }
217   return 0xff;
282   return 0;
218283}
219284
220285WRITE8_MEMBER( gp_1_state::porta_w )
221286{
222287   m_u14 = data >> 4;
223   /*if (m_u14 >= 8)*/ m_segment = data & 15;
224288   if ((data > 0x0f) && (data < 0x30))
225289   {
226290      switch (data)
227291      {
228         case 0x10:
292         case 0x10: // chime c
293            m_samples->start(0, 3);
229294            break;
230         case 0x11:
231            m_samples->start(0, 5);
295         case 0x11: // chime b
296            m_samples->start(0, 2);
232297            break;
233         case 0x12:
298         case 0x12: // knocker
234299            m_samples->start(0, 6);
235300            break;
236         case 0x13:
301         case 0x13: // not used
302         case 0x14: // not used
303            break;
304         case 0x15: // chime a
237305            m_samples->start(0, 1);
238306            break;
239         case 0x14:
240            m_samples->start(0, 2);
307         case 0x16: // chime d
308            m_samples->start(0, 4);
241309            break;
242         case 0x15:
243            m_samples->start(0, 3);
310         case 0x17: // outhole
311         case 0x18: // r sling
312         case 0x19: // l sling
313            m_samples->start(0, 5);
244314            break;
245         case 0x16:
246            m_samples->start(0, 4);
315         case 0x1a: // c kickout
316            m_samples->start(0, 5);
247317            break;
248         case 0x17:
249         case 0x18:
250         case 0x19:
318         case 0x1b: // r bumper
319            m_samples->start(0, 0);
320            break;
321         case 0x1c: // a kickout
251322            m_samples->start(0, 5);
252323            break;
253         case 0x1a:
254         case 0x1b:
324         case 0x1d: // l bumper
255325            m_samples->start(0, 0);
256326            break;
257         case 0x1c:
258         case 0x1d:
327         case 0x1e: // a kickout
259328            m_samples->start(0, 5);
260329            break;
261         case 0x1e:
262         case 0x1f:
330         case 0x1f: // not used
263331            break;
264332      }
265333   }
266   static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 }; // 7448
267   if ((m_u14 >= 8) && (m_u14 <= 11))
334
335   static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0 }; // 7448
336   if (m_u14 >= 8)
268337   {
269      output_set_digit_value(m_digit+(m_u14-8)*8, patterns[m_segment]);
338      if (m_digit == 7)
339         m_segment[m_u14] = data & 15;
340      else
341         output_set_digit_value(m_digit+(m_u14-8)*8, patterns[m_segment[m_u14]]);
270342   }
271343}
272344
273345WRITE8_MEMBER( gp_1_state::portc_w )
274346{
275347   output_set_value("led0", BIT(data, 3));
276
277348   m_digit = data & 7;
278   static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 }; // 7448
279   if ((m_digit) && (m_u14 >= 8) && (m_u14 <= 11))
280   {
281      output_set_digit_value(m_digit+(m_u14-8)*8, patterns[m_segment]);
282   }
283349}
284350
285351void gp_1_state::machine_reset()
r31398r31399
308374   MCFG_CPU_IO_MAP(gp_1_io)
309375   MCFG_CPU_CONFIG(daisy_chain)
310376
377   MCFG_NVRAM_ADD_0FILL("nvram")
378
311379   /* Video */
312380   MCFG_DEFAULT_LAYOUT(layout_gp_1)
313381

Previous 199869 Revisions Next


© 1997-2024 The MAME Team