Previous 199869 Revisions Next

r19658 Tuesday 18th December, 2012 at 12:38:40 UTC by David Haywood
some fruit machine notes (nw)
[src/mame]mame.mak
[src/mame/drivers]ecoinfr.c
[src/mame/layout]ecoinfr.lay*

trunk/src/mame/mame.mak
r19657r19658
20792079
20802080$(DRIVERS)/dragrace.o:   $(LAYOUT)/dragrace.lh
20812081
2082$(DRIVERS)/ecoinfr.o:   $(LAYOUT)/ecoinfr.lh
2083
20822084$(DRIVERS)/ecoinf3.o:   $(LAYOUT)/ecoinf3.lh
20832085
20842086$(DRIVERS)/firebeat.o:   $(LAYOUT)/firebeat.lh
trunk/src/mame/layout/ecoinfr.lay
r0r19658
1<?xml version="1.0"?>
2<mamelayout version="2">
3
4  <element name="Steppers" defstate="0">
5    <simplecounter maxstate="999" digits="3">
6      <color red="1.0" green="1.0" blue="1.0" />
7      <bounds x="0" y="0" width="1" height="1" />
8    </simplecounter>
9  </element>
10
11  <element name="digit" defstate="0">
12    <led7seg>
13      <color red="1.0" green="0.3" blue="0.0" />
14    </led7seg>
15  </element>
16 
17 
18  <!-- a stateoffset of 682 will shift us by 1 step on a 96 step reel (0x10000/96) which seems a good default alignment for 96 step / 16 symbol reels -->
19  <element name="SteppersReel1" defstate="0">
20    <reel stateoffset="682" symbollist="Fruit1:image11.png,Fruit2:image12.png,Fruit3:image13.png,Fruit4:image14.png,Fruit5:image15.png,Fruit6:image16.png,Fruit7:image17.png,Fruit8:image18.png,Fruit9:image19.png,Fruit10:image110.png,Fruit11:image111.png,Fruit12:image112.png,Fruit13:image113.png,Fruit14:image114.png,Fruit15:image115.png,Fruit16:image116.png">
21      <color red="1.0" green="1.0" blue="1.0" />
22      <bounds x="0" y="0" width="1" height="1" />
23    </reel>
24  </element>
25
26  <element name="SteppersReel2" defstate="0">
27    <reel stateoffset="682" symbollist="Fruit1,Fruit2,Fruit3,Fruit4,Fruit5,Fruit6,Fruit7,Fruit8,Fruit9,Fruit10,Fruit11,Fruit12,Fruit13,Fruit14,Fruit15,Fruit16">
28      "<color red="1.0" green="1.0" blue="1.0" />
29      <bounds x="0" y="0" width="1" height="1" />
30    </reel>
31  </element>
32
33  <element name="SteppersReel3" defstate="0">
34    <reel stateoffset="682" symbollist="Fruit1,Fruit2,Fruit3,Fruit4,Fruit5,Fruit6,Fruit7,Fruit8,Fruit9,Fruit10,Fruit11,Fruit12,Fruit13,Fruit14,Fruit15,Fruit16">
35      <color red="1.0" green="1.0" blue="1.0" />
36      <bounds x="0" y="0" width="1" height="1" />
37    </reel>
38  </element>
39
40 
41
42  <view name="AWP Simulated Video (No Artwork)">
43
44    <!-- 'BANK' Digits -->
45    <backdrop name="digit0" element="digit" state="0">
46      <bounds x="180" y="64" width="9" height="19"/>
47    </backdrop>
48    <backdrop name="digit1" element="digit" state="0">
49      <bounds x="190" y="64" width="9" height="19"/>
50    </backdrop>
51    <backdrop name="digit2" element="digit" state="0">
52      <bounds x="200" y="64" width="9" height="19"/>
53    </backdrop>
54    <backdrop name="digit3" element="digit" state="0">
55      <bounds x="210" y="64" width="9" height="19"/>
56    </backdrop>
57    <backdrop name="digit4" element="digit" state="0">
58      <bounds x="220" y="64" width="9" height="19"/>
59    </backdrop>
60    <backdrop name="digit5" element="digit" state="0">
61      <bounds x="230" y="64" width="9" height="19"/>
62    </backdrop>
63    <backdrop name="digit6" element="digit" state="0">
64      <bounds x="240" y="64" width="9" height="19"/>
65    </backdrop>
66    <backdrop name="digit7" element="digit" state="0">
67      <bounds x="250" y="64" width="9" height="19"/>
68    </backdrop>
69     
70    <!-- Credit Digits -->   
71    <backdrop name="digit8" element="digit" state="0">
72      <bounds x="180" y="90" width="9" height="19"/>
73    </backdrop>
74    <backdrop name="digit9" element="digit" state="0">
75      <bounds x="190" y="90" width="9" height="19"/>
76    </backdrop>
77    <backdrop name="digit10" element="digit" state="0">
78      <bounds x="200" y="90" width="9" height="19"/>
79    </backdrop>
80    <backdrop name="digit11" element="digit" state="0">
81      <bounds x="210" y="90" width="9" height="19"/>
82    </backdrop>
83    <backdrop name="digit12" element="digit" state="0">
84      <bounds x="220" y="90" width="9" height="19"/>
85    </backdrop>
86    <backdrop name="digit13" element="digit" state="0">
87      <bounds x="230" y="90" width="9" height="19"/>
88    </backdrop>
89    <backdrop name="digit14" element="digit" state="0">
90      <bounds x="240" y="90" width="9" height="19"/>
91    </backdrop>
92    <backdrop name="digit15" element="digit" state="0">
93      <bounds x="250" y="90" width="9" height="19"/>
94    </backdrop>     
95     
96       
97    <backdrop name="sreel1" element="SteppersReel1" state="0">
98      <bounds x="17" y="300" width="32" height="32"/>
99    </backdrop>
100    <backdrop name="sreel2" element="SteppersReel2" state="0">
101      <bounds x="50" y="300" width="32" height="32"/>
102    </backdrop>
103    <backdrop name="sreel3" element="SteppersReel3" state="0">
104      <bounds x="83" y="300" width="32" height="32"/>
105    </backdrop>
106 
107    <backdrop name="reel1" element="Steppers" state="0">
108      <bounds x="20" y="330" width="5" height="2"/>
109    </backdrop>
110    <backdrop name="reel2" element="Steppers" state="0">
111      <bounds x="52" y="330" width="5" height="2"/>
112    </backdrop>
113    <backdrop name="reel3" element="Steppers" state="0">
114      <bounds x="85" y="330" width="5" height="2"/>
115    </backdrop>
116 
117  </view>
118</mamelayout>
119
trunk/src/mame/drivers/ecoinfr.c
r19657r19658
3333#include "emu.h"
3434#include "cpu/z80/z80.h"
3535#include "machine/i8251.h"
36#include "ecoinfr.lh"
37#include "machine/steppers.h" // stepper motor
38#include "video/awpvid.h" // drawing reels
3639
40
3741#define UPD8251_TAG      "upd8251"
3842
3943#define GAME_FLAGS GAME_NO_SOUND|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING|GAME_MECHANICAL
r19657r19658
4246{
4347public:
4448   ecoinfr_state(const machine_config &mconfig, device_type type, const char *tag)
45      : driver_device(mconfig, type, tag) { }
49      : driver_device(mconfig, type, tag)
50   {
51   }
4652
4753   int irq_toggle;
54   int m_optic_pattern;
4855
4956   UINT8 port09_value;
5057   UINT8 port10_value;
r19657r19658
6471   DECLARE_WRITE8_MEMBER(ec_port05_out_w);
6572   DECLARE_WRITE8_MEMBER(ec_port06_out_w);
6673   DECLARE_WRITE8_MEMBER(ec_port07_out_w);
67   DECLARE_WRITE8_MEMBER(ec_port08_out_w);
68   DECLARE_WRITE8_MEMBER(ec_port09_out_w);
74   DECLARE_WRITE8_MEMBER(ec_port08_out_bank_strobe_w);
75   DECLARE_WRITE8_MEMBER(ec_port09_out_reelen_w);
6976   DECLARE_WRITE8_MEMBER(ec_port0a_out_w);
7077   DECLARE_WRITE8_MEMBER(ec_port0b_out_w);
71   DECLARE_WRITE8_MEMBER(ec_port0c_out_w);
72   DECLARE_WRITE8_MEMBER(ec_port0d_out_w);
78   DECLARE_WRITE8_MEMBER(ec_port0c_out_cred_strobe_w);
79   DECLARE_WRITE8_MEMBER(ec_port0d_out_cred_data_w);
7380   DECLARE_WRITE8_MEMBER(ec_port0e_out_w);
74   DECLARE_WRITE8_MEMBER(ec_port0f_out_w);
81   DECLARE_WRITE8_MEMBER(ec_port0f_out_bank_segdata_w);
7582   DECLARE_WRITE8_MEMBER(ec_port10_out_w);
7683   DECLARE_WRITE8_MEMBER(ec_port11_out_w);
7784   DECLARE_WRITE8_MEMBER(ec_port12_out_w);
r19657r19658
8895   DECLARE_DRIVER_INIT(ecoinfrmab);
8996   virtual void machine_reset();
9097   TIMER_DEVICE_CALLBACK_MEMBER(ecoinfr_irq_timer);
98
99   UINT8 m_banksel;
100   UINT8 m_credsel;
101
102   DECLARE_MACHINE_START(ecoinfr);
103
91104};
92105
93106
r19657r19658
104117     0xe0 / 0xe4 seem to be the valid interrupts
105118     0xf0 / 0xf4 mirror those
106119
120    there seem to be plenty of valid looking vectors between
121    these too.. really not sure what all the sources are, nor
122    the frequency
123
107124     NMI is also valid
108125
109126    */
r19657r19658
123140
124141WRITE8_MEMBER(ecoinfr_state::ec_port00_out_w)
125142{
126   // Reel 1 Control
143   if (data&0x70) // lots of games set 0x80
144   {
145      printf("ec_port0a_out_w (reel 1 port) unk bits used %02x\n", data);
146   }
147
148   stepper_update(0, data&0x0f);
149
150   if ( stepper_optic_state(0) ) m_optic_pattern |=  0x01;
151   else                          m_optic_pattern &= ~0x01;
152
153   awp_draw_reel(0);
127154}
128155
129156WRITE8_MEMBER(ecoinfr_state::ec_port01_out_w)
130157{
131   // Reel 2 Control
158   if (data&0xf0)
159   {
160      printf("ec_port01_out_w (reel 2 port) unk bits used %02x\n", data);
161   }
162
163   stepper_update(1, data&0x0f);
164
165   if ( stepper_optic_state(1) ) m_optic_pattern |=  0x02;
166   else                          m_optic_pattern &= ~0x02;
167
168   awp_draw_reel(1);
132169}
133170
134171WRITE8_MEMBER(ecoinfr_state::ec_port02_out_w)
135172{
136   // Reel 3 Control
173   if (data&0xf0)
174   {
175      printf("ec_port02_out_w (reel 3 port) unk bits used %02x\n", data);
176   }
177
178   stepper_update(2, data&0x0f);
179
180   if ( stepper_optic_state(2) ) m_optic_pattern |=  0x04;
181   else                          m_optic_pattern &= ~0x04;
182
183   awp_draw_reel(2);
137184}
138185
186
187
139188WRITE8_MEMBER(ecoinfr_state::ec_port03_out_w)
140189{
141190
r19657r19658
161210
162211}
163212
164WRITE8_MEMBER(ecoinfr_state::ec_port08_out_w)
213WRITE8_MEMBER(ecoinfr_state::ec_port08_out_bank_strobe_w)
165214{
215   switch (data)
216   {
217      case 0x00:
218         // ?? written after select values
219         break;
166220
221      case 0x01:
222         m_banksel = 0;
223         break;
224      case 0x02:
225         m_banksel = 1;
226         break;
227      case 0x04:
228         m_banksel = 2;
229         break;
230      case 0x08:
231         m_banksel = 3;
232         break;
233      case 0x10:
234         m_banksel = 4;
235         break;
236      case 0x20:
237         m_banksel = 5;
238         break;
239      case 0x40:
240         m_banksel = 6;
241         break;
242      case 0x80:
243         m_banksel = 7;
244         break;
245
246      default:
247         printf("ec_port08_out_bank_strobe_w unk data %02x\n", data);
248         break;
249
250   }
167251}
168252
169253// we could do the same thing here with input ports configured to outputs, however
170254// I've done it with handlers for now as it allows greater flexibility while the driver
171255// is developed
172WRITE8_MEMBER(ecoinfr_state::ec_port09_out_w)
256WRITE8_MEMBER(ecoinfr_state::ec_port09_out_reelen_w)
173257{
174258
175259   int old_port09_value = port09_value;
r19657r19658
196280
197281}
198282
199WRITE8_MEMBER(ecoinfr_state::ec_port0c_out_w)
283WRITE8_MEMBER(ecoinfr_state::ec_port0c_out_cred_strobe_w)
200284{
201
285   switch (data)
286   {
287   case 0x00:
288      break;
289   case 0x01:
290      m_credsel = 0;
291      break;
292   case 0x02:
293      m_credsel = 1;
294      break;
295   case 0x04:
296      m_credsel = 2;
297      break;
298   case 0x08:
299      m_credsel = 3;
300      break;
301   case 0x10:
302      m_credsel = 4;
303      break;
304   case 0x20:
305      m_credsel = 5;
306      break;
307   case 0x40:
308      m_credsel = 6;
309      break;
310   case 0x80:
311      m_credsel = 7;
312      break;
313   default:
314      printf("ec_port0c_out_cred_strobe_w unk %02x\n", data);
315   }
202316}
203317
204WRITE8_MEMBER(ecoinfr_state::ec_port0d_out_w)
318WRITE8_MEMBER(ecoinfr_state::ec_port0d_out_cred_data_w)
205319{
206
320   if (m_credsel!=0xff)
321   {
322   //   UINT8 bf7segdata = BITSWAP8(data,7,6,5,4,3,2,1,0);
323      output_set_digit_value(m_credsel+8, data);
324   }
207325}
208326
209327WRITE8_MEMBER(ecoinfr_state::ec_port0e_out_w)
r19657r19658
211329
212330}
213331
214WRITE8_MEMBER(ecoinfr_state::ec_port0f_out_w)
332WRITE8_MEMBER(ecoinfr_state::ec_port0f_out_bank_segdata_w)
215333{
216
334   if (m_banksel!=0xff)
335   {
336   //   UINT8 bf7segdata = BITSWAP8(data,7,6,5,4,3,2,1,0);
337      output_set_digit_value(m_banksel, data);
338   }
217339}
218340
219341WRITE8_MEMBER(ecoinfr_state::ec_port10_out_w)
r19657r19658
377499   AM_RANGE(0x05, 0x05) AM_WRITE(ec_port05_out_w) AM_READ_PORT("IN5")
378500   AM_RANGE(0x06, 0x06) AM_WRITE(ec_port06_out_w) AM_READ_PORT("IN6")
379501   AM_RANGE(0x07, 0x07) AM_WRITE(ec_port07_out_w) AM_READ_PORT("IN7")
380   AM_RANGE(0x08, 0x08) AM_WRITE(ec_port08_out_w)
381   AM_RANGE(0x09, 0x09) AM_WRITE(ec_port09_out_w) // 09 Reel Enables
502   AM_RANGE(0x08, 0x08) AM_WRITE(ec_port08_out_bank_strobe_w)
503   AM_RANGE(0x09, 0x09) AM_WRITE(ec_port09_out_reelen_w) // 09 Reel Enables
382504   AM_RANGE(0x0a, 0x0a) AM_WRITE(ec_port0a_out_w) // 10 (Sound 1)
383505   AM_RANGE(0x0b, 0x0b) AM_WRITE(ec_port0b_out_w) // 11 (Sound 2)
384   AM_RANGE(0x0c, 0x0c) AM_WRITE(ec_port0c_out_w)
385   AM_RANGE(0x0d, 0x0d) AM_WRITE(ec_port0d_out_w)
386   AM_RANGE(0x0e, 0x0e) AM_WRITE(ec_port0e_out_w)
387   AM_RANGE(0x0f, 0x0f) AM_WRITE(ec_port0f_out_w)
506   AM_RANGE(0x0c, 0x0c) AM_WRITE(ec_port0c_out_cred_strobe_w)
507   AM_RANGE(0x0d, 0x0d) AM_WRITE(ec_port0d_out_cred_data_w)
508//   AM_RANGE(0x0e, 0x0e) AM_WRITE(ec_port0e_out_w)
509   AM_RANGE(0x0f, 0x0f) AM_WRITE(ec_port0f_out_bank_segdata_w)
388510   AM_RANGE(0x10, 0x10) AM_WRITE(ec_port10_out_w) // 16 (Meter)
389511   AM_RANGE(0x11, 0x11) AM_WRITE(ec_port11_out_w) // SEC
390512   AM_RANGE(0x12, 0x12) AM_WRITE(ec_port12_out_w) // SEC
r19657r19658
398520
399521CUSTOM_INPUT_MEMBER(ecoinfr_state::ecoinfr_reel1_opto_r)
400522{
523   if (m_optic_pattern & 0x1) return 1;
401524   return 0;
402525}
403526
404527CUSTOM_INPUT_MEMBER(ecoinfr_state::ecoinfr_reel2_opto_r)
405528{
529   if (m_optic_pattern & 0x2) return 1;
406530   return 0;
407531}
408532
409533CUSTOM_INPUT_MEMBER(ecoinfr_state::ecoinfr_reel3_opto_r)
410534{
535   if (m_optic_pattern & 0x4) return 1;
411536   return 0;
412537}
413538
r19657r19658
644769   port17_value = 0x00;
645770
646771   irq_toggle = 0;
772
773   m_banksel = 0xff;
774   m_credsel = 0xff;
775
647776}
648777
778
779MACHINE_START_MEMBER(ecoinfr_state,ecoinfr)
780{
781   for ( int n = 0; n < 4; n++ )
782   {
783      stepper_config(machine(), n, &ecoin_interface_200step_reel);
784   }
785}
786
649787static MACHINE_CONFIG_START( ecoinfr, ecoinfr_state )
650788   /* basic machine hardware */
651789   MCFG_CPU_ADD("maincpu", Z80,4000000)
r19657r19658
653791   MCFG_CPU_IO_MAP(portmap)
654792   MCFG_TIMER_DRIVER_ADD_PERIODIC("ectimer", ecoinfr_state, ecoinfr_irq_timer, attotime::from_hz(250))
655793
794   MCFG_DEFAULT_LAYOUT(layout_ecoinfr)
795
796   MCFG_MACHINE_START_OVERRIDE(ecoinfr_state, ecoinfr )
797
656798   MCFG_I8251_ADD(UPD8251_TAG, default_i8251_interface)
657799MACHINE_CONFIG_END
658800
r19657r19658
9711113EC_SBARX_SET( 199?, ec_sbarx__a2,   ec_sbarx,   "iss2012.rom",                     0x0000, 0x008000, CRC(455cfdcb) SHA1(53fb0748a544b432b88455fa597b7017e06b3059), "Electrocoin","Super Bar X (Electrocoin) (set 66)" )
9721114EC_SBARX_SET( 199?, ec_sbarx__a3,   ec_sbarx,   "sbx5red",                        0x0000, 0x008000, CRC(7991231a) SHA1(cd1978c48a3c214666d51ca930d3d480540448ec), "Electrocoin","Super Bar X (Electrocoin) (set 67)" )
9731115EC_SBARX_SET( 199?, ec_sbarx__a4,   ec_sbarx,   "sbx8elac",                        0x0000, 0x008000, CRC(102a3f38) SHA1(5f4f55904b00dde47e9841de313ed76a56e711df), "Electrocoin","Super Bar X (Electrocoin) (set 68)" )
974/* No Header, type 2 - closer to the BRUNEL sets but these make writes to the reel ports */
1116/* No Header, type 2 - closer to the BRUNEL sets but these make writes to the reel ports */ // spin the reels a lot more than anything else
9751117EC_SBARX_SET( 199?, ec_sbarx__a5,   ec_sbarx,   "sbx5nc.10",                     0x0000, 0x008000, CRC(beb7254a) SHA1(137e91e0b92d970d09d165a42b890a5d31d795d9), "Electrocoin","Super Bar X (Electrocoin) (set 69)" )
9761118EC_SBARX_SET( 199?, ec_sbarx__a6,   ec_sbarx,   "sbx5nc.20",                     0x0000, 0x008000, CRC(0ceb3e29) SHA1(e96e1470292208825407ba64750121dd3c7bf857), "Electrocoin","Super Bar X (Electrocoin) (set 70)" )
9771119EC_SBARX_SET( 199?, ec_sbarx__a7,   ec_sbarx,   "sbxup",                        0x0000, 0x008000, CRC(f8d7e9db) SHA1(7dea1f7215070a8a413af63d0e379b2e228e63d7), "Electrocoin","Super Bar X (Electrocoin) (set 71)" )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team