Previous 199869 Revisions Next

r32348 Wednesday 24th September, 2014 at 11:48:15 UTC by Robbbert
micropin.c : placeholder
[src/mame]mame.mak
[src/mame/drivers]micropin.c
[src/mame/layout]micropin.lay*

trunk/src/mame/drivers/micropin.c
r32347r32348
88
99**************************************************************************************/
1010
11#include "emu.h"
11#include "machine/genpin.h"
1212#include "cpu/m6800/m6800.h"
1313#include "cpu/i8085/i8085.h"
14#include "machine/6821pia.h"
15#include "micropin.lh"
1416
15class micropin_state : public driver_device
17class micropin_state : public genpin_class
1618{
1719public:
1820   micropin_state(const machine_config &mconfig, device_type type, const char *tag)
19      : driver_device(mconfig, type, tag),
20         m_maincpu(*this, "maincpu")
21      : genpin_class(mconfig, type, tag)
22      , m_v1cpu(*this, "v1cpu")
23      , m_v2cpu(*this, "v2cpu")
24      , m_pia51(*this, "pia51")
2125   { }
2226
23protected:
24
25   // devices
26   required_device<cpu_device> m_maincpu;
27
28   // driver_device overrides
27   DECLARE_READ8_MEMBER(pia51_r);
28   DECLARE_WRITE8_MEMBER(pia51_w);
29   DECLARE_WRITE8_MEMBER(sol_w);
30   DECLARE_READ8_MEMBER(sw_r);
31   DECLARE_WRITE8_MEMBER(sw_w);
32   DECLARE_WRITE8_MEMBER(lamp_w);
33   DECLARE_WRITE8_MEMBER(p50a_w);
34   DECLARE_WRITE8_MEMBER(p50b_w);
35   DECLARE_DRIVER_INIT(micropin);
36private:
37   UINT8 m_row;
2938   virtual void machine_reset();
30public:
31   DECLARE_DRIVER_INIT(micropin);
39   optional_device<m6800_cpu_device> m_v1cpu;
40   optional_device<i8085a_cpu_device> m_v2cpu;
41   optional_device<pia6821_device> m_pia51;
3242};
3343
3444
3545static ADDRESS_MAP_START( micropin_map, AS_PROGRAM, 8, micropin_state )
36   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
37   AM_RANGE(0x0000, 0x01ff) AM_RAM
38   //AM_RANGE(0x4000, 0x4005)
39   //AM_RANGE(0x5000, 0x5003) AM_READWRITE("pia", pia6821_device, read, write)
40   //AM_RANGE(0x5100, 0x5103)
41   //AM_RANGE(0x5200, 0x5203)
42   AM_RANGE(0x6400, 0x7fff) AM_ROM
46   ADDRESS_MAP_GLOBAL_MASK(0x7fff) // A10,11,15 not used
47   AM_RANGE(0x0000, 0x01ff) AM_RAM AM_SHARE("nvram") // 4x 6561 RAM
48   AM_RANGE(0x4000, 0x4005) AM_READWRITE(sw_r,sw_w)
49   AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("pia50", pia6821_device, read, write)
50   AM_RANGE(0x5100, 0x5103) AM_READWRITE(pia51_r,pia51_w)
51   AM_RANGE(0x5200, 0x5200) AM_WRITE(sol_w);
52   AM_RANGE(0x5202, 0x5202) AM_WRITE(lamp_w);
53   AM_RANGE(0x5203, 0x5203) AM_WRITENOP
54   AM_RANGE(0x6400, 0x7fff) AM_ROM AM_REGION("v1cpu", 0)
4355ADDRESS_MAP_END
4456
4557static ADDRESS_MAP_START( pentacup2_map, AS_PROGRAM, 8, micropin_state )
r32347r32348
5769static INPUT_PORTS_START( micropin )
5870INPUT_PORTS_END
5971
72READ8_MEMBER( micropin_state::pia51_r )
73{
74   return m_pia51->read(space, offset) ^ 0xff;
75}
76
77WRITE8_MEMBER( micropin_state::pia51_w )
78{
79   m_pia51->write(space, offset, data ^ 0xff);
80}
81
82WRITE8_MEMBER( micropin_state::lamp_w )
83{
84   m_row = data & 15;
85   // lamps
86}
87
88WRITE8_MEMBER( micropin_state::sol_w )
89{
90}
91
92READ8_MEMBER( micropin_state::sw_r )
93{
94   return 0xff;
95}
96
97WRITE8_MEMBER( micropin_state::sw_w )
98{
99}
100
101WRITE8_MEMBER( micropin_state::p50a_w )
102{
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]);
106}
107
108WRITE8_MEMBER( micropin_state::p50b_w )
109{
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]);
113}
114
60115void micropin_state::machine_reset()
61116{
117   m_row = 0;
62118}
63119
64DRIVER_INIT_MEMBER(micropin_state,micropin)
120DRIVER_INIT_MEMBER( micropin_state, micropin )
65121{
66122}
67123
68124static MACHINE_CONFIG_START( micropin, micropin_state )
69125   /* basic machine hardware */
70   MCFG_CPU_ADD("maincpu", M6800, 1000000)
126   MCFG_CPU_ADD("v1cpu", M6800, XTAL_2MHz / 2)
71127   MCFG_CPU_PROGRAM_MAP(micropin_map)
128   MCFG_CPU_PERIODIC_INT_DRIVER(micropin_state, irq0_line_hold,  500)
129
130   MCFG_NVRAM_ADD_0FILL("nvram")
131
132   /* Sound */
133   MCFG_FRAGMENT_ADD( genpin_audio )
134
135   /* Video */
136   MCFG_DEFAULT_LAYOUT(layout_micropin)
137
138   /* Devices */
139   MCFG_DEVICE_ADD("pia50", PIA6821, 0)
140   //MCFG_PIA_READPA_HANDLER(READ8(micropin_state, p50a_r))
141   MCFG_PIA_WRITEPA_HANDLER(WRITE8(micropin_state, p50a_w))
142   //MCFG_PIA_READPB_HANDLER(READ8(micropin_state, p50b_r))
143   MCFG_PIA_WRITEPB_HANDLER(WRITE8(micropin_state, p50b_w))
144   //MCFG_PIA_CA2_HANDLER(WRITELINE(micropin_state, p50ca2_w))
145   //MCFG_PIA_CB2_HANDLER(WRITELINE(micropin_state, p50cb2_w))
146
147   MCFG_DEVICE_ADD("pia51", PIA6821, 0)
148   //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))
151   //MCFG_PIA_WRITEPB_HANDLER(WRITE8(micropin_state, p51b_w))
152   //MCFG_PIA_CA2_HANDLER(WRITELINE(micropin_state, p51ca2_w))
153   //MCFG_PIA_CB2_HANDLER(WRITELINE(micropin_state, p51cb2_w))
72154MACHINE_CONFIG_END
73155
74156static MACHINE_CONFIG_START( pentacup2, micropin_state )
75157   /* basic machine hardware */
76   MCFG_CPU_ADD("maincpu", I8085A, 2000000)
158   MCFG_CPU_ADD("v2cpu", I8085A, 2000000)
77159   MCFG_CPU_PROGRAM_MAP(pentacup2_map)
78160   MCFG_CPU_IO_MAP(pentacup2_io)
161
162   //MCFG_NVRAM_ADD_0FILL("nvram")
163
164   /* Sound */
165   MCFG_FRAGMENT_ADD( genpin_audio )
79166MACHINE_CONFIG_END
80167
81168/*-------------------------------------------------------------------
82169/ Pentacup
83170/-------------------------------------------------------------------*/
84171ROM_START(pentacup)
85   ROM_REGION(0x10000, "maincpu", 0)
86   ROM_LOAD("ic2.bin", 0x6400, 0x0400, CRC(fa468a0f) SHA1(e9c8028bcd5b87d24f4588516536767a869c38ff))
87   ROM_LOAD("ic3.bin", 0x6800, 0x0400, CRC(7bfdaec8) SHA1(f2037c0e2d4acf0477351ecafc9f0826e9d64d76))
88   ROM_LOAD("ic4.bin", 0x6c00, 0x0400, CRC(5e0fcb1f) SHA1(e529539c6eb1e174a799ad6abfce9e31870ff8af))
89   ROM_LOAD("ic5.bin", 0x7000, 0x0400, CRC(a26c6e0b) SHA1(21c4c306fbc2da52887e309b1c83a1ea69501c1f))
90   ROM_LOAD("ic6.bin", 0x7400, 0x0400, CRC(4715ac34) SHA1(b6d8c20c487db8d7275e36f5793666cc591a6691))
91   ROM_LOAD("ic7.bin", 0x7800, 0x0400, CRC(c58d13c0) SHA1(014958bc69ff326392a5a7782703af0980e6e170))
92   ROM_LOAD("ic8.bin", 0x7c00, 0x0400, CRC(9f67bc65) SHA1(504008d4c7c23a14fdf247c9e6fc00e95d907d7b))
172   ROM_REGION(0x1c00, "v1cpu", 0)
173   ROM_LOAD("ic2.bin", 0x0000, 0x0400, CRC(fa468a0f) SHA1(e9c8028bcd5b87d24f4588516536767a869c38ff))
174   ROM_LOAD("ic3.bin", 0x0400, 0x0400, CRC(7bfdaec8) SHA1(f2037c0e2d4acf0477351ecafc9f0826e9d64d76))
175   ROM_LOAD("ic4.bin", 0x0800, 0x0400, CRC(5e0fcb1f) SHA1(e529539c6eb1e174a799ad6abfce9e31870ff8af))
176   ROM_LOAD("ic5.bin", 0x0c00, 0x0400, CRC(a26c6e0b) SHA1(21c4c306fbc2da52887e309b1c83a1ea69501c1f))
177   ROM_LOAD("ic6.bin", 0x1000, 0x0400, CRC(4715ac34) SHA1(b6d8c20c487db8d7275e36f5793666cc591a6691))
178   ROM_LOAD("ic7.bin", 0x1400, 0x0400, CRC(c58d13c0) SHA1(014958bc69ff326392a5a7782703af0980e6e170))
179   ROM_LOAD("ic8.bin", 0x1800, 0x0400, CRC(9f67bc65) SHA1(504008d4c7c23a14fdf247c9e6fc00e95d907d7b))
93180ROM_END
94181
95182ROM_START(pentacup2)
96   ROM_REGION(0x10000, "maincpu", 0)
183   ROM_REGION(0x2000, "v2cpu", 0)
97184   ROM_LOAD("micro_1.bin", 0x0000, 0x0800, CRC(4d6dc218) SHA1(745c553f3a42124f925ca8f2e52fd08d05999594))
98185   ROM_LOAD("micro_2.bin", 0x0800, 0x0800, CRC(33cd226d) SHA1(d1dff8445a0f35da09d560a16038c969845ff21f))
99186   ROM_LOAD("micro_3.bin", 0x1000, 0x0800, CRC(997bde74) SHA1(c3ea33f7afbdc7f2a22798a13ec323d7c6628dd4))
100187   ROM_LOAD("micro_4.bin", 0x1800, 0x0800, CRC(a804e7d6) SHA1(f414d6a5308266744645849940c00cd422e920d2))
188   // 2 undumped proms DMA-01, DMA-02
101189ROM_END
102190
103191
104GAME(1978,  pentacup,  0,         micropin,  micropin, micropin_state,  micropin,  ROT0,  "Micropin",    "Pentacup (rev. 1)",     GAME_IS_SKELETON_MECHANICAL)
105GAME(1980,  pentacup2, pentacup,  pentacup2,  micropin, micropin_state,  micropin,  ROT0,  "Micropin",    "Pentacup (rev. 2)",     GAME_IS_SKELETON_MECHANICAL)
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)
trunk/src/mame/mame.mak
r32347r32348
26902690
26912691$(DRIVERS)/maygay1b.o:  $(LAYOUT)/maygay1b.lh
26922692
2693$(DRIVERS)/micropin.o:  $(LAYOUT)/micropin.lh
2694
26932695$(DRIVERS)/mcr.o:       $(LAYOUT)/dpoker.lh
26942696
26952697$(DRIVERS)/mcr3.o:      $(LAYOUT)/spyhunt.lh \
trunk/src/mame/layout/micropin.lay
r0r32348
1<!-- micropin.lay -->
2
3<!-- 2014-09-24: 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="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>
26
27   <view name="Default Layout">
28
29      <!-- Background -->
30      <backdrop element="background">
31         <bounds left="0" top="20" right="626" bottom="394" />
32      </backdrop>
33
34      <!-- LEDs -->
35
36      <!-- Player 1 Score -->
37      <bezel name="digit0" element="digit">
38         <bounds x="10" y="45" width="35" height="40" />
39      </bezel>
40      <bezel name="digit1" element="digit">
41         <bounds x="54" y="45" width="35" height="40" />
42      </bezel>
43      <bezel name="digit2" element="digit">
44         <bounds x="98" y="45" width="35" height="40" />
45      </bezel>
46      <bezel name="digit3" element="digit">
47         <bounds x="142" y="45" width="35" height="40" />
48      </bezel>
49      <bezel name="digit4" element="digit">
50         <bounds x="186" y="45" width="35" height="40" />
51      </bezel>
52      <bezel name="digit5" element="digit">
53         <bounds x="230" y="45" width="35" height="40" />
54      </bezel>
55      <bezel name="digit6" element="digit">
56         <bounds x="274" y="45" width="35" height="40" />
57      </bezel>
58      <bezel name="digit7" element="digit">
59         <bounds x="318" y="45" width="35" height="40" />
60      </bezel>
61      <bezel name="digit8" element="digit">
62         <bounds x="352" y="45" width="35" height="40" />
63      </bezel>
64      <bezel name="digit9" element="digit">
65         <bounds x="396" y="45" width="35" height="40" />
66      </bezel>
67      <bezel name="digit10" element="digit">
68         <bounds x="440" y="45" width="35" height="40" />
69      </bezel>
70      <bezel name="digit11" element="digit">
71         <bounds x="484" y="45" width="35" height="40" />
72      </bezel>
73      <bezel name="digit12" element="digit">
74         <bounds x="528" y="45" width="35" height="40" />
75      </bezel>
76      <bezel name="digit13" element="digit">
77         <bounds x="572" y="45" width="35" height="40" />
78      </bezel>
79      <bezel name="digit14" element="digit">
80         <bounds x="616" y="45" width="35" height="40" />
81      </bezel>
82
83      <!-- Player 2 Score -->
84      <bezel name="digit20" element="digit">
85         <bounds x="10" y="105" width="35" height="40" />
86      </bezel>
87      <bezel name="digit21" element="digit">
88         <bounds x="54" y="105" width="35" height="40" />
89      </bezel>
90      <bezel name="digit22" element="digit">
91         <bounds x="98" y="105" width="35" height="40" />
92      </bezel>
93      <bezel name="digit23" element="digit">
94         <bounds x="142" y="105" width="35" height="40" />
95      </bezel>
96      <bezel name="digit24" element="digit">
97         <bounds x="186" y="105" width="35" height="40" />
98      </bezel>
99      <bezel name="digit25" element="digit">
100         <bounds x="230" y="105" width="35" height="40" />
101      </bezel>
102      <bezel name="digit26" element="digit">
103         <bounds x="274" y="105" width="35" height="40" />
104      </bezel>
105      <bezel name="digit27" element="digit">
106         <bounds x="318" y="105" width="35" height="40" />
107      </bezel>
108      <bezel name="digit28" element="digit">
109         <bounds x="352" y="105" width="35" height="40" />
110      </bezel>
111      <bezel name="digit29" element="digit">
112         <bounds x="396" y="105" width="35" height="40" />
113      </bezel>
114      <bezel name="digit30" element="digit">
115         <bounds x="440" y="105" width="35" height="40" />
116      </bezel>
117      <bezel name="digit31" element="digit">
118         <bounds x="484" y="105" width="35" height="40" />
119      </bezel>
120      <bezel name="digit32" element="digit">
121         <bounds x="528" y="105" width="35" height="40" />
122      </bezel>
123      <bezel name="digit33" element="digit">
124         <bounds x="572" y="105" width="35" height="40" />
125      </bezel>
126      <bezel name="digit34" element="digit">
127         <bounds x="616" y="105" width="35" height="40" />
128      </bezel>
129
130      <!-- Player 3 Score -->
131      <bezel name="digit40" element="digit">
132         <bounds x="10" y="165" width="35" height="40" />
133      </bezel>
134      <bezel name="digit41" element="digit">
135         <bounds x="54" y="165" width="35" height="40" />
136      </bezel>
137      <bezel name="digit42" element="digit">
138         <bounds x="98" y="165" width="35" height="40" />
139      </bezel>
140      <bezel name="digit43" element="digit">
141         <bounds x="142" y="165" width="35" height="40" />
142      </bezel>
143      <bezel name="digit44" element="digit">
144         <bounds x="186" y="165" width="35" height="40" />
145      </bezel>
146      <bezel name="digit45" element="digit">
147         <bounds x="230" y="165" width="35" height="40" />
148      </bezel>
149      <bezel name="digit46" element="digit">
150         <bounds x="274" y="165" width="35" height="40" />
151      </bezel>
152      <bezel name="digit47" element="digit">
153         <bounds x="318" y="165" width="35" height="40" />
154      </bezel>
155      <bezel name="digit48" element="digit">
156         <bounds x="352" y="165" width="35" height="40" />
157      </bezel>
158      <bezel name="digit49" element="digit">
159         <bounds x="396" y="165" width="35" height="40" />
160      </bezel>
161      <bezel name="digit50" element="digit">
162         <bounds x="440" y="165" width="35" height="40" />
163      </bezel>
164      <bezel name="digit51" element="digit">
165         <bounds x="484" y="165" width="35" height="40" />
166      </bezel>
167      <bezel name="digit52" element="digit">
168         <bounds x="528" y="165" width="35" height="40" />
169      </bezel>
170      <bezel name="digit53" element="digit">
171         <bounds x="572" y="165" width="35" height="40" />
172      </bezel>
173      <bezel name="digit54" element="digit">
174         <bounds x="616" y="165" width="35" height="40" />
175      </bezel>
176
177      <!-- Player 4 Score -->
178      <bezel name="digit60" element="digit">
179         <bounds x="10" y="225" width="35" height="40" />
180      </bezel>
181      <bezel name="digit61" element="digit">
182         <bounds x="54" y="225" width="35" height="40" />
183      </bezel>
184      <bezel name="digit62" element="digit">
185         <bounds x="98" y="225" width="35" height="40" />
186      </bezel>
187      <bezel name="digit63" element="digit">
188         <bounds x="142" y="225" width="35" height="40" />
189      </bezel>
190      <bezel name="digit64" element="digit">
191         <bounds x="186" y="225" width="35" height="40" />
192      </bezel>
193      <bezel name="digit65" element="digit">
194         <bounds x="230" y="225" width="35" height="40" />
195      </bezel>
196      <bezel name="digit66" element="digit">
197         <bounds x="274" y="225" width="35" height="40" />
198      </bezel>
199      <bezel name="digit67" element="digit">
200         <bounds x="318" y="225" width="35" height="40" />
201      </bezel>
202      <bezel name="digit68" element="digit">
203         <bounds x="352" y="225" width="35" height="40" />
204      </bezel>
205      <bezel name="digit69" element="digit">
206         <bounds x="396" y="225" width="35" height="40" />
207      </bezel>
208      <bezel name="digit70" element="digit">
209         <bounds x="440" y="225" width="35" height="40" />
210      </bezel>
211      <bezel name="digit71" element="digit">
212         <bounds x="484" y="225" width="35" height="40" />
213      </bezel>
214      <bezel name="digit72" element="digit">
215         <bounds x="528" y="225" width="35" height="40" />
216      </bezel>
217      <bezel name="digit73" element="digit">
218         <bounds x="572" y="225" width="35" height="40" />
219      </bezel>
220      <bezel name="digit74" element="digit">
221         <bounds x="616" y="225" width="35" height="40" />
222      </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>
237   </view>
238</mamelayout>
Property changes on: trunk/src/mame/layout/micropin.lay
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Previous 199869 Revisions Next


© 1997-2024 The MAME Team