Previous 199869 Revisions Next

r32373 Thursday 25th September, 2014 at 14:26:14 UTC by Robbbert
micropin.c : pentacup can coin up & start, but no inputs.
[src/mame/drivers]micropin.c
[src/mame/layout]micropin.lay

trunk/src/mame/layout/micropin.lay
r32372r32373
1010      </led7seg>
1111   </element>
1212
13   <element name="red_led">
14      <disk><color red="1.0" green="0.0" blue="0.0" /></disk>
15   </element>
16
1317   <element name="background">
1418      <rect>
1519         <bounds left="0" top="0" right="1" bottom="1" />
1620         <color red="0.0" green="0.0" blue="0.0" />
1721      </rect>
1822   </element>
19   <element name="P0"><text string="Balls"><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   <element name="P7"><text string="High Score"><color red="1.0" green="1.0" blue="1.0" /></text></element>
2623
24   <element name="P0"><text string="BALL"><color red="1.0" green="1.0" blue="1.0" /></text></element>
25   <element name="P1"><text string="CREDIT"><color red="1.0" green="1.0" blue="1.0" /></text></element>
26   <element name="P2"><text string="BONUS"><color red="1.0" green="1.0" blue="1.0" /></text></element>
27   <element name="P3"><text string="PLAYER 1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
28   <element name="P4"><text string="PLAYER 2"><color red="1.0" green="1.0" blue="1.0" /></text></element>
29   <element name="P5"><text string="PLAYER 3"><color red="1.0" green="1.0" blue="1.0" /></text></element>
30   <element name="P6"><text string="PLAYER 4"><color red="1.0" green="1.0" blue="1.0" /></text></element>
31   <element name="P7"><text string="HIGH PLAYER TODAY"><color red="1.0" green="1.0" blue="1.0" /></text></element>
32   <element name="P8"><text string="HIGH TEAM TODAY"><color red="1.0" green="1.0" blue="1.0" /></text></element>
33   <element name="P9"><text string="TEAM 1&amp;3"><color red="1.0" green="1.0" blue="1.0" /></text></element>
34   <element name="P10"><text string="TEAM 2&amp;4"><color red="1.0" green="1.0" blue="1.0" /></text></element>
35   <element name="P11"><text string="SAME PLAYER"><color red="1.0" green="1.0" blue="1.0" /></text></element>
36   <element name="P12"><text string="TILT"><color red="1.0" green="1.0" blue="1.0" /></text></element>
37   <element name="P13"><text string="PAY ATTENDANT"><color red="1.0" green="1.0" blue="1.0" /></text></element>
38   <element name="P14"><text string="GAME OVER"><color red="1.0" green="1.0" blue="1.0" /></text></element>
39
2740   <view name="Default Layout">
2841
2942      <!-- Background -->
3043      <backdrop element="background">
31         <bounds left="0" top="20" right="626" bottom="394" />
44         <bounds left="0" top="20" right="1200" bottom="305" />
3245      </backdrop>
3346
47      <!-- Text -->
48      <bezel element="P0"><bounds left="128" right="198" top="86" bottom="120" /></bezel>
49      <bezel element="P1"><bounds left="5" right="100" top="86" bottom="120" /></bezel>
50      <bezel element="P2"><bounds left="368" right="500" top="86" bottom="120" /></bezel>
51      <bezel element="P3"><bounds left="620" right="790" top="86" bottom="120" /></bezel>
52      <bezel element="P4"><bounds left="940" right="1110" top="86" bottom="120" /></bezel>
53      <bezel element="P5"><bounds left="620" right="790" top="171" bottom="205" /></bezel>
54      <bezel element="P6"><bounds left="940" right="1110" top="171" bottom="205" /></bezel>
55      <bezel element="P7"><bounds left="256" right="560" top="171" bottom="205" /></bezel>
56      <bezel element="P8"><bounds left="256" right="560" top="256" bottom="290" /></bezel>
57      <bezel element="P9"><bounds left="620" right="790" top="256" bottom="290" /></bezel>
58      <bezel element="P10"><bounds left="940" right="1110" top="256" bottom="290" /></bezel>
59      <bezel element="P11"><bounds left="50" right="180" top="132" bottom="158" /></bezel>
60      <bezel element="P12"><bounds left="50" right="100" top="173" bottom="199" /></bezel>
61      <bezel element="P13"><bounds left="50" right="200" top="214" bottom="240" /></bezel>
62      <bezel element="P14"><bounds left="50" right="170" top="255" bottom="281" /></bezel>
63
3464      <!-- LEDs -->
65      <bezel name="led0" element="red_led">
66         <bounds left="600" right="620" top="93" bottom="113" /></bezel>
67      <bezel name="led1" element="red_led">
68         <bounds left="920" right="940" top="93" bottom="113" /></bezel>
69      <bezel name="led2" element="red_led">
70         <bounds left="600" right="620" top="178" bottom="198" /></bezel>
71      <bezel name="led3" element="red_led">
72         <bounds left="920" right="940" top="178" bottom="198" /></bezel>
73      <bezel name="led4" element="red_led">
74         <bounds left="15" right="35" top="176" bottom="196" /></bezel>
75      <bezel name="led5" element="red_led">
76         <bounds left="15" right="35" top="217" bottom="237" /></bezel>
77      <bezel name="led6" element="red_led">
78         <bounds left="15" right="35" top="258" bottom="278" /></bezel>
79      <bezel name="led7" element="red_led">
80         <bounds left="15" right="35" top="135" bottom="155" /></bezel>
3581
36      <!-- Player 1 Score -->
37      <bezel name="digit0" element="digit">
38         <bounds x="10" y="45" width="35" height="40" />
82      <!-- Credits -->
83      <bezel name="digit54" element="digit">
84         <bounds x="14" y="45" width="35" height="40" />
3985      </bezel>
40      <bezel name="digit1" element="digit">
41         <bounds x="54" y="45" width="35" height="40" />
86      <bezel name="digit53" element="digit">
87         <bounds x="58" y="45" width="35" height="40" />
4288      </bezel>
43      <bezel name="digit2" element="digit">
44         <bounds x="98" y="45" width="35" height="40" />
89
90      <!-- Match / Balls Left -->
91      <bezel name="digit52" element="digit">
92         <bounds x="148" y="45" width="35" height="40" />
4593      </bezel>
46      <bezel name="digit3" element="digit">
47         <bounds x="142" y="45" width="35" height="40" />
94
95      <!-- Bonus -->
96      <bezel name="digit34" element="digit">
97         <bounds x="300" y="45" width="35" height="40" />
4898      </bezel>
49      <bezel name="digit4" element="digit">
50         <bounds x="186" y="45" width="35" height="40" />
99      <bezel name="digit33" element="digit">
100         <bounds x="344" y="45" width="35" height="40" />
51101      </bezel>
52      <bezel name="digit5" element="digit">
53         <bounds x="230" y="45" width="35" height="40" />
102      <bezel name="digit32" element="digit">
103         <bounds x="388" y="45" width="35" height="40" />
54104      </bezel>
55      <bezel name="digit6" element="digit">
56         <bounds x="274" y="45" width="35" height="40" />
105      <bezel name="digit14" element="digit">
106         <bounds x="432" y="45" width="35" height="40" />
57107      </bezel>
58      <bezel name="digit7" element="digit">
59         <bounds x="318" y="45" width="35" height="40" />
108      <bezel name="digit13" element="digit">
109         <bounds x="476" y="45" width="35" height="40" />
60110      </bezel>
61      <bezel name="digit8" element="digit">
62         <bounds x="352" y="45" width="35" height="40" />
111      <bezel name="digit12" element="digit">
112         <bounds x="520" y="45" width="35" height="40" />
63113      </bezel>
64      <bezel name="digit9" element="digit">
65         <bounds x="396" y="45" width="35" height="40" />
114
115      <!-- Player 1 Score -->
116      <bezel name="digit5" element="digit">
117         <bounds x="620" y="45" width="35" height="40" />
66118      </bezel>
67      <bezel name="digit10" element="digit">
68         <bounds x="440" y="45" width="35" height="40" />
119      <bezel name="digit4" element="digit">
120         <bounds x="664" y="45" width="35" height="40" />
69121      </bezel>
70      <bezel name="digit11" element="digit">
71         <bounds x="484" y="45" width="35" height="40" />
122      <bezel name="digit3" element="digit">
123         <bounds x="708" y="45" width="35" height="40" />
72124      </bezel>
73      <bezel name="digit12" element="digit">
74         <bounds x="528" y="45" width="35" height="40" />
125      <bezel name="digit2" element="digit">
126         <bounds x="752" y="45" width="35" height="40" />
75127      </bezel>
76      <bezel name="digit13" element="digit">
77         <bounds x="572" y="45" width="35" height="40" />
128      <bezel name="digit1" element="digit">
129         <bounds x="796" y="45" width="35" height="40" />
78130      </bezel>
79      <bezel name="digit14" element="digit">
80         <bounds x="616" y="45" width="35" height="40" />
131      <bezel name="digit0" element="digit">
132         <bounds x="840" y="45" width="35" height="40" />
81133      </bezel>
82134
83135      <!-- Player 2 Score -->
84      <bezel name="digit20" element="digit">
85         <bounds x="10" y="105" width="35" height="40" />
136      <bezel name="digit25" element="digit">
137         <bounds x="940" y="45" width="35" height="40" />
86138      </bezel>
87      <bezel name="digit21" element="digit">
88         <bounds x="54" y="105" width="35" height="40" />
139      <bezel name="digit24" element="digit">
140         <bounds x="984" y="45" width="35" height="40" />
89141      </bezel>
90      <bezel name="digit22" element="digit">
91         <bounds x="98" y="105" width="35" height="40" />
92      </bezel>
93142      <bezel name="digit23" element="digit">
94         <bounds x="142" y="105" width="35" height="40" />
143         <bounds x="1028" y="45" width="35" height="40" />
95144      </bezel>
96      <bezel name="digit24" element="digit">
97         <bounds x="186" y="105" width="35" height="40" />
145      <bezel name="digit22" element="digit">
146         <bounds x="1072" y="45" width="35" height="40" />
98147      </bezel>
99      <bezel name="digit25" element="digit">
100         <bounds x="230" y="105" width="35" height="40" />
148      <bezel name="digit21" element="digit">
149         <bounds x="1116" y="45" width="35" height="40" />
101150      </bezel>
102      <bezel name="digit26" element="digit">
103         <bounds x="274" y="105" width="35" height="40" />
151      <bezel name="digit20" element="digit">
152         <bounds x="1160" y="45" width="35" height="40" />
104153      </bezel>
105      <bezel name="digit27" element="digit">
106         <bounds x="318" y="105" width="35" height="40" />
154
155      <!-- High Player Today -->
156      <bezel name="digit66" element="digit">
157         <bounds x="256" y="130" width="35" height="40" />
107158      </bezel>
108      <bezel name="digit28" element="digit">
109         <bounds x="352" y="105" width="35" height="40" />
159      <bezel name="digit65" element="digit">
160         <bounds x="300" y="130" width="35" height="40" />
110161      </bezel>
111      <bezel name="digit29" element="digit">
112         <bounds x="396" y="105" width="35" height="40" />
162      <bezel name="digit64" element="digit">
163         <bounds x="344" y="130" width="35" height="40" />
113164      </bezel>
114      <bezel name="digit30" element="digit">
115         <bounds x="440" y="105" width="35" height="40" />
165      <bezel name="digit63" element="digit">
166         <bounds x="388" y="130" width="35" height="40" />
116167      </bezel>
117      <bezel name="digit31" element="digit">
118         <bounds x="484" y="105" width="35" height="40" />
168      <bezel name="digit62" element="digit">
169         <bounds x="432" y="130" width="35" height="40" />
119170      </bezel>
120      <bezel name="digit32" element="digit">
121         <bounds x="528" y="105" width="35" height="40" />
171      <bezel name="digit61" element="digit">
172         <bounds x="476" y="130" width="35" height="40" />
122173      </bezel>
123      <bezel name="digit33" element="digit">
124         <bounds x="572" y="105" width="35" height="40" />
174      <bezel name="digit60" element="digit">
175         <bounds x="520" y="130" width="35" height="40" />
125176      </bezel>
126      <bezel name="digit34" element="digit">
127         <bounds x="616" y="105" width="35" height="40" />
128      </bezel>
129177
130178      <!-- Player 3 Score -->
131      <bezel name="digit40" element="digit">
132         <bounds x="10" y="165" width="35" height="40" />
179      <bezel name="digit11" element="digit">
180         <bounds x="620" y="130" width="35" height="40" />
133181      </bezel>
134      <bezel name="digit41" element="digit">
135         <bounds x="54" y="165" width="35" height="40" />
182      <bezel name="digit10" element="digit">
183         <bounds x="664" y="130" width="35" height="40" />
136184      </bezel>
137      <bezel name="digit42" element="digit">
138         <bounds x="98" y="165" width="35" height="40" />
185      <bezel name="digit9" element="digit">
186         <bounds x="708" y="130" width="35" height="40" />
139187      </bezel>
140      <bezel name="digit43" element="digit">
141         <bounds x="142" y="165" width="35" height="40" />
188      <bezel name="digit8" element="digit">
189         <bounds x="752" y="130" width="35" height="40" />
142190      </bezel>
143      <bezel name="digit44" element="digit">
144         <bounds x="186" y="165" width="35" height="40" />
191      <bezel name="digit7" element="digit">
192         <bounds x="796" y="130" width="35" height="40" />
145193      </bezel>
146      <bezel name="digit45" element="digit">
147         <bounds x="230" y="165" width="35" height="40" />
194      <bezel name="digit6" element="digit">
195         <bounds x="840" y="130" width="35" height="40" />
148196      </bezel>
149      <bezel name="digit46" element="digit">
150         <bounds x="274" y="165" width="35" height="40" />
197
198      <!-- Player 4 Score -->
199      <bezel name="digit31" element="digit">
200         <bounds x="940" y="130" width="35" height="40" />
151201      </bezel>
152      <bezel name="digit47" element="digit">
153         <bounds x="318" y="165" width="35" height="40" />
202      <bezel name="digit30" element="digit">
203         <bounds x="984" y="130" width="35" height="40" />
154204      </bezel>
155      <bezel name="digit48" element="digit">
156         <bounds x="352" y="165" width="35" height="40" />
205      <bezel name="digit29" element="digit">
206         <bounds x="1028" y="130" width="35" height="40" />
157207      </bezel>
158      <bezel name="digit49" element="digit">
159         <bounds x="396" y="165" width="35" height="40" />
208      <bezel name="digit28" element="digit">
209         <bounds x="1072" y="130" width="35" height="40" />
160210      </bezel>
161      <bezel name="digit50" element="digit">
162         <bounds x="440" y="165" width="35" height="40" />
211      <bezel name="digit27" element="digit">
212         <bounds x="1116" y="130" width="35" height="40" />
163213      </bezel>
164      <bezel name="digit51" element="digit">
165         <bounds x="484" y="165" width="35" height="40" />
214      <bezel name="digit26" element="digit">
215         <bounds x="1160" y="130" width="35" height="40" />
166216      </bezel>
167      <bezel name="digit52" element="digit">
168         <bounds x="528" y="165" width="35" height="40" />
217
218      <!-- High Team Today -->
219      <bezel name="digit73" element="digit">
220         <bounds x="256" y="215" width="35" height="40" />
169221      </bezel>
170      <bezel name="digit53" element="digit">
171         <bounds x="572" y="165" width="35" height="40" />
222      <bezel name="digit72" element="digit">
223         <bounds x="300" y="215" width="35" height="40" />
172224      </bezel>
173      <bezel name="digit54" element="digit">
174         <bounds x="616" y="165" width="35" height="40" />
225      <bezel name="digit71" element="digit">
226         <bounds x="344" y="215" width="35" height="40" />
175227      </bezel>
176
177      <!-- Player 4 Score -->
178      <bezel name="digit60" element="digit">
179         <bounds x="10" y="225" width="35" height="40" />
228      <bezel name="digit70" element="digit">
229         <bounds x="388" y="215" width="35" height="40" />
180230      </bezel>
181      <bezel name="digit61" element="digit">
182         <bounds x="54" y="225" width="35" height="40" />
231      <bezel name="digit69" element="digit">
232         <bounds x="432" y="215" width="35" height="40" />
183233      </bezel>
184      <bezel name="digit62" element="digit">
185         <bounds x="98" y="225" width="35" height="40" />
234      <bezel name="digit68" element="digit">
235         <bounds x="476" y="215" width="35" height="40" />
186236      </bezel>
187      <bezel name="digit63" element="digit">
188         <bounds x="142" y="225" width="35" height="40" />
237      <bezel name="digit67" element="digit">
238         <bounds x="520" y="215" width="35" height="40" />
189239      </bezel>
190      <bezel name="digit64" element="digit">
191         <bounds x="186" y="225" width="35" height="40" />
240
241      <!-- Team 1&3 -->
242      <bezel name="digit45" element="digit">
243         <bounds x="620" y="215" width="35" height="40" />
192244      </bezel>
193      <bezel name="digit65" element="digit">
194         <bounds x="230" y="225" width="35" height="40" />
245      <bezel name="digit44" element="digit">
246         <bounds x="664" y="215" width="35" height="40" />
195247      </bezel>
196      <bezel name="digit66" element="digit">
197         <bounds x="274" y="225" width="35" height="40" />
248      <bezel name="digit43" element="digit">
249         <bounds x="708" y="215" width="35" height="40" />
198250      </bezel>
199      <bezel name="digit67" element="digit">
200         <bounds x="318" y="225" width="35" height="40" />
251      <bezel name="digit42" element="digit">
252         <bounds x="752" y="215" width="35" height="40" />
201253      </bezel>
202      <bezel name="digit68" element="digit">
203         <bounds x="352" y="225" width="35" height="40" />
254      <bezel name="digit41" element="digit">
255         <bounds x="796" y="215" width="35" height="40" />
204256      </bezel>
205      <bezel name="digit69" element="digit">
206         <bounds x="396" y="225" width="35" height="40" />
257      <bezel name="digit40" element="digit">
258         <bounds x="840" y="215" width="35" height="40" />
207259      </bezel>
208      <bezel name="digit70" element="digit">
209         <bounds x="440" y="225" width="35" height="40" />
260
261      <!-- Team 2&4 -->
262      <bezel name="digit51" element="digit">
263         <bounds x="940" y="215" width="35" height="40" />
210264      </bezel>
211      <bezel name="digit71" element="digit">
212         <bounds x="484" y="225" width="35" height="40" />
265      <bezel name="digit50" element="digit">
266         <bounds x="984" y="215" width="35" height="40" />
213267      </bezel>
214      <bezel name="digit72" element="digit">
215         <bounds x="528" y="225" width="35" height="40" />
268      <bezel name="digit49" element="digit">
269         <bounds x="1028" y="215" width="35" height="40" />
216270      </bezel>
217      <bezel name="digit73" element="digit">
218         <bounds x="572" y="225" width="35" height="40" />
271      <bezel name="digit48" element="digit">
272         <bounds x="1072" y="215" width="35" height="40" />
219273      </bezel>
220      <bezel name="digit74" element="digit">
221         <bounds x="616" y="225" width="35" height="40" />
274      <bezel name="digit47" element="digit">
275         <bounds x="1116" y="215" width="35" height="40" />
222276      </bezel>
223
224      <!-- High Score -->
225
226      <!-- Credits -->
227
228      <!-- Match / Balls Left -->
229
230      <bezel element="P0"><bounds left="200" right="258" top="330" bottom="342" /></bezel>
231      <bezel element="P1"><bounds left="30" right="88" top="330" bottom="342" /></bezel>
232      <bezel element="P3"><bounds left="100" right="180" top="30" bottom="42" /></bezel>
233      <bezel element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel>
234      <bezel element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel>
235      <bezel element="P6"><bounds left="100" right="180" top="210" bottom="222" /></bezel>
236      <bezel element="P7"><bounds left="100" right="180" top="270" bottom="282" /></bezel>
277      <bezel name="digit46" element="digit">
278         <bounds x="1160" y="215" width="35" height="40" />
279      </bezel>
237280   </view>
238281</mamelayout>
trunk/src/mame/drivers/micropin.c
r32372r32373
66  Micropin : Pentacup
77  First version used a 6800, but a later revision used a 8085A.
88
9ToDo:
10- Rev.2 no work done as yet; no manuals or schematics available
11- Rev.1 can insert coin and start a game, but no inputs
12- Rev.1 check sound; pinmame sound is higher pitched
13- Mechanical sounds
14
915**************************************************************************************/
1016
1117#include "machine/genpin.h"
1218#include "cpu/m6800/m6800.h"
1319#include "cpu/i8085/i8085.h"
1420#include "machine/6821pia.h"
21#include "sound/beep.h"
1522#include "micropin.lh"
1623
1724class micropin_state : public genpin_class
r32372r32373
2229      , m_v1cpu(*this, "v1cpu")
2330      , m_v2cpu(*this, "v2cpu")
2431      , m_pia51(*this, "pia51")
32      , m_beep(*this, "beeper")
2533   { }
2634
2735   DECLARE_READ8_MEMBER(pia51_r);
2836   DECLARE_WRITE8_MEMBER(pia51_w);
37   DECLARE_READ8_MEMBER(p51b_r);
2938   DECLARE_WRITE8_MEMBER(sol_w);
30   DECLARE_READ8_MEMBER(sw_r);
39   DECLARE_WRITE_LINE_MEMBER(p50ca2_w);
3140   DECLARE_WRITE8_MEMBER(sw_w);
3241   DECLARE_WRITE8_MEMBER(lamp_w);
3342   DECLARE_WRITE8_MEMBER(p50a_w);
3443   DECLARE_WRITE8_MEMBER(p50b_w);
44   DECLARE_WRITE8_MEMBER(p51a_w);
3545   DECLARE_DRIVER_INIT(micropin);
46   TIMER_DEVICE_CALLBACK_MEMBER(timer_a);
3647private:
3748   UINT8 m_row;
49   UINT8 m_counter;
50   UINT8 m_beep_time;
51   UINT8 m_led_time[8];
3852   virtual void machine_reset();
3953   optional_device<m6800_cpu_device> m_v1cpu;
4054   optional_device<i8085a_cpu_device> m_v2cpu;
4155   optional_device<pia6821_device> m_pia51;
56   optional_device<beep_device> m_beep;
4257};
4358
4459
4560static ADDRESS_MAP_START( micropin_map, AS_PROGRAM, 8, micropin_state )
46   ADDRESS_MAP_GLOBAL_MASK(0x7fff) // A10,11,15 not used
61   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
4762   AM_RANGE(0x0000, 0x01ff) AM_RAM AM_SHARE("nvram") // 4x 6561 RAM
48   AM_RANGE(0x4000, 0x4005) AM_READWRITE(sw_r,sw_w)
63   AM_RANGE(0x4000, 0x4005) AM_WRITE(sw_w)
64   AM_RANGE(0x4000, 0x4000) AM_READ_PORT("X1")
65   AM_RANGE(0x4001, 0x4001) AM_READ_PORT("X2")
66   AM_RANGE(0x4002, 0x4002) AM_READ_PORT("X3")
67   AM_RANGE(0x4003, 0x4003) AM_READ_PORT("X4")
68   AM_RANGE(0x4004, 0x4004) AM_READ_PORT("X5")
4969   AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("pia50", pia6821_device, read, write)
5070   AM_RANGE(0x5100, 0x5103) AM_READWRITE(pia51_r,pia51_w)
5171   AM_RANGE(0x5200, 0x5200) AM_WRITE(sol_w);
r32372r32373
6787ADDRESS_MAP_END
6888
6989static INPUT_PORTS_START( micropin )
90   PORT_START("X0")
91   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
92   PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNUSED ) // 20=volume-up; 40=volume-down button
93   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT ) PORT_NAME("Tilt Alarm")
94
95   PORT_START("X1")
96   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Tilt 1")
97   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS)
98   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS)
99   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Tilt 2")
100   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START )
101   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE)
102   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Tilt 3")
103   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Tilt 4")
104
105   PORT_START("X2")
106   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_A)
107   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_S)
108   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_D)
109   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_F)
110   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_G)
111   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_H)
112   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_J)
113   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_K)
114
115   PORT_START("X3")
116   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Q)
117   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_W)
118   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_E)
119   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_R)
120   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Y)
121   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_U)
122   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_I)
123   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_O)
124
125   PORT_START("X4")
126   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Z)
127   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_C)
128   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_V)
129   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_B)
130   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_N)
131   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_M)
132   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA)
133   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_STOP)
134
135   PORT_START("X5")
136   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_1_PAD)
137   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_2_PAD)
138   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_3_PAD)
139   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_4_PAD)
140   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_5_PAD)
141   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_6_PAD)
142   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_7_PAD)
143   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_8_PAD)
70144INPUT_PORTS_END
71145
72146READ8_MEMBER( micropin_state::pia51_r )
r32372r32373
79153   m_pia51->write(space, offset, data ^ 0xff);
80154}
81155
156// lamps and disp strobes
82157WRITE8_MEMBER( micropin_state::lamp_w )
83158{
84159   m_row = data & 15;
160   m_counter = 0;
85161   // lamps
86162}
87163
164// solenoids
88165WRITE8_MEMBER( micropin_state::sol_w )
89166{
90167}
91168
92READ8_MEMBER( micropin_state::sw_r )
93{
94   return 0xff;
95}
96
169// offs 0,5 = solenoids; else lamps
97170WRITE8_MEMBER( micropin_state::sw_w )
98171{
99172}
100173
101174WRITE8_MEMBER( micropin_state::p50a_w )
102175{
103   static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x69, 0x78, 0 }; // 7448
104   output_set_digit_value(m_row, patterns[data&15]);
105   output_set_digit_value(m_row+20, patterns[data>>4]);
176   m_counter++;
177   if (m_counter == 1)
178   {
179      static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x69, 0x78, 0 }; // 7448
180      output_set_digit_value(m_row, patterns[data&15]);
181      output_set_digit_value(m_row+20, patterns[data>>4]);
182   }
106183}
107184
108185WRITE8_MEMBER( micropin_state::p50b_w )
109186{
110   static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x69, 0x78, 0 }; // 7448
111   output_set_digit_value(m_row+40, patterns[data&15]);
112   output_set_digit_value(m_row+60, patterns[data>>4]);
187   m_counter++;
188   if (m_counter == 2)
189   {
190      static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x69, 0x78, 0 }; // 7448
191      output_set_digit_value(m_row+40, patterns[data&15]);
192      output_set_digit_value(m_row+60, patterns[data>>4]);
193   }
113194}
114195
196// round LEDs on score panel
197WRITE_LINE_MEMBER( micropin_state::p50ca2_w )
198{
199   if ((!state) && (m_row < 8))
200   {
201      char wordnum[8];
202      sprintf(wordnum,"led%d", m_row);
203      m_led_time[m_row] = 48; // 12 gives blinking leds; they blink in pinmame but is it correct?
204      output_set_value(wordnum, 0); // turn on
205   }
206}
207
208// sound & volume
209// Sound consists of a 16-resistor chain controlling the frequency of a NE555.
210// The sound never gets muted, but is turned down with an electronic volume control,
211//   which must be the most complex circuit in this machine. We use a beeper to
212//   make the tones, and turn it off if no new commands arrive within .1 second.
213WRITE8_MEMBER( micropin_state::p51a_w )
214{
215   static UINT16 frequency[16] = { 387, 435, 488, 517, 581, 652, 691, 775, 870, 977, 1035, 1161, 1304, 1381, 1550, 1740 };
216   m_beep->set_frequency(frequency[data & 15]);
217   m_beep_time = 10; // number of 10ms intervals before it is silenced
218   m_beep->set_state(1);
219}
220
221READ8_MEMBER( micropin_state::p51b_r )
222{
223   return ioport("X0")->read();
224}
225
226TIMER_DEVICE_CALLBACK_MEMBER( micropin_state::timer_a )
227{
228   // turn off beeper if it has timed out
229
230   if (m_beep_time)
231   {
232      m_beep_time--;
233      if (m_beep_time == 0)
234         m_beep->set_state(0);
235   }
236
237   // turn off round leds that aren't being refreshed
238
239   UINT8 i;
240   char wordnum[8];
241
242   for (i = 0; i < 8; i++)
243   {
244      if (m_led_time[i])
245      {
246         m_led_time[i]--;
247         if (m_led_time[i] == 0)
248         {
249            sprintf(wordnum,"led%d", i);
250            output_set_value(wordnum, 1); // turn off
251         }
252      }
253   }
254}
255
115256void micropin_state::machine_reset()
116257{
258   UINT8 i;
117259   m_row = 0;
260   m_beep_time = 5;
261   for (i = 0; i < 8; i++)
262      m_led_time[i] = 5;
118263}
119264
120265DRIVER_INIT_MEMBER( micropin_state, micropin )
r32372r32373
125270   /* basic machine hardware */
126271   MCFG_CPU_ADD("v1cpu", M6800, XTAL_2MHz / 2)
127272   MCFG_CPU_PROGRAM_MAP(micropin_map)
128   MCFG_CPU_PERIODIC_INT_DRIVER(micropin_state, irq0_line_hold, 500)
273   MCFG_CPU_PERIODIC_INT_DRIVER(micropin_state, irq0_line_hold, 500)
129274
130275   MCFG_NVRAM_ADD_0FILL("nvram")
131276
277   /* Video */
278   MCFG_DEFAULT_LAYOUT(layout_micropin)
279
132280   /* Sound */
133281   MCFG_FRAGMENT_ADD( genpin_audio )
282   MCFG_SPEAKER_STANDARD_MONO("mono")
283   MCFG_SOUND_ADD("beeper", BEEP, 0)
284   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
134285
135   /* Video */
136   MCFG_DEFAULT_LAYOUT(layout_micropin)
137
138286   /* Devices */
139287   MCFG_DEVICE_ADD("pia50", PIA6821, 0)
140288   //MCFG_PIA_READPA_HANDLER(READ8(micropin_state, p50a_r))
141289   MCFG_PIA_WRITEPA_HANDLER(WRITE8(micropin_state, p50a_w))
142290   //MCFG_PIA_READPB_HANDLER(READ8(micropin_state, p50b_r))
143291   MCFG_PIA_WRITEPB_HANDLER(WRITE8(micropin_state, p50b_w))
144   //MCFG_PIA_CA2_HANDLER(WRITELINE(micropin_state, p50ca2_w))
292   MCFG_PIA_CA2_HANDLER(WRITELINE(micropin_state, p50ca2_w))
145293   //MCFG_PIA_CB2_HANDLER(WRITELINE(micropin_state, p50cb2_w))
146294
147295   MCFG_DEVICE_ADD("pia51", PIA6821, 0)
148296   //MCFG_PIA_READPA_HANDLER(READ8(micropin_state, p51a_r))
149   //MCFG_PIA_WRITEPA_HANDLER(WRITE8(micropin_state, p51a_w))
150   //MCFG_PIA_READPB_HANDLER(READ8(micropin_state, p51b_r))
297   MCFG_PIA_WRITEPA_HANDLER(WRITE8(micropin_state, p51a_w))
298   MCFG_PIA_READPB_HANDLER(READ8(micropin_state, p51b_r))
151299   //MCFG_PIA_WRITEPB_HANDLER(WRITE8(micropin_state, p51b_w))
152300   //MCFG_PIA_CA2_HANDLER(WRITELINE(micropin_state, p51ca2_w))
153301   //MCFG_PIA_CB2_HANDLER(WRITELINE(micropin_state, p51cb2_w))
302
303   MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_a", micropin_state, timer_a, attotime::from_hz(100))
154304MACHINE_CONFIG_END
155305
156306static MACHINE_CONFIG_START( pentacup2, micropin_state )
r32372r32373
189339ROM_END
190340
191341
192GAME(1978,  pentacup,  0,         micropin,   micropin, micropin_state,  micropin,  ROT0, "Micropin", "Pentacup (rev. 1)",     GAME_IS_SKELETON_MECHANICAL)
193GAME(1980,  pentacup2, pentacup,  pentacup2,  micropin, micropin_state,  micropin,  ROT0, "Micropin", "Pentacup (rev. 2)",     GAME_IS_SKELETON_MECHANICAL)
342GAME(1978,  pentacup,  0,         micropin,   micropin, micropin_state,  micropin,  ROT0, "Micropin", "Pentacup (rev. 1)", GAME_MECHANICAL | GAME_NOT_WORKING )
343GAME(1980,  pentacup2, pentacup,  pentacup2,  micropin, micropin_state,  micropin,  ROT0, "Micropin", "Pentacup (rev. 2)", GAME_IS_SKELETON_MECHANICAL)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team