Previous 15994 Revisions Next

r3989 Saturday 27th December, 2008 at 17:04:46 UTC by Firewave
Removed obsolete files and include
[src/emu/cpu/i386]i386intf.h
[src/emu/cpu/i86]i186intf.h i188intf.h i286intf.h i86intf.h i88intf.h
[src/emu/cpu/nec]necintrf.h
[src/emu/cpu/v30mz]necintrf.h
[src/mame/drivers]cherrym.c lucky8.c
[src/mess/machine]compis.c

src/mame/drivers/lucky8.c
r3988r3989
1/*
2
3        Lucky 8 Line
4        Falcon 1989
5
6        G14           6116  9
7        G13   D13           8
8              D12
9        6116                 Z80
10        6116                 8255
11        7                    8255
12        6            SW1     8255
13 12MHz  5            SW2     8910
14        4  6116      SW4
15        3  6116      SW3
16        2  6116
17        1  6116
18
19    ---
20
21    Driver by Curt Coder
22
23*/
24
25#include "driver.h"
26#include "sound/ay8910.h"
27
28/* video */
29
30static tilemap *bg_tilemap;
31
32static PALETTE_INIT( lucky8 )
33{
34   int i;
35
36   for (i = 0; i < machine->config->total_colors; i++)
37   {
38      int bit0, bit1, bit2, r, g, b;
39
40      UINT8 pen = color_prom[0x20 + i] & 0x0f;
41
42      /* red component */
43      bit0 = (color_prom[pen] >> 0) & 0x01;
44      bit1 = (color_prom[pen] >> 1) & 0x01;
45      bit2 = (color_prom[pen] >> 2) & 0x01;
46      r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
47
48      /* green component */
49      bit0 = (color_prom[pen] >> 3) & 0x01;
50      bit1 = (color_prom[pen] >> 4) & 0x01;
51      bit2 = (color_prom[pen] >> 5) & 0x01;
52
53      g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
54
55      /* blue component */
56      bit0 = 0;
57      bit1 = (color_prom[pen] >> 6) & 0x01;
58      bit2 = (color_prom[pen] >> 7) & 0x01;
59      b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
60
61      palette_set_color(machine, i, MAKE_RGB(r, g, b));
62   }
63}
64
65static WRITE8_HANDLER( lucky8_videoram_w )
66{
67   videoram[offset] = data;
68   tilemap_mark_tile_dirty(bg_tilemap, offset);
69}
70
71static WRITE8_HANDLER( lucky8_colorram_w )
72{
73   colorram[offset] = data;
74   tilemap_mark_tile_dirty(bg_tilemap, offset);
75}
76
77static TILE_GET_INFO( get_bg_tile_info )
78{
79   int attr = colorram[tile_index];
80   int code = videoram[tile_index] + ((attr & 0xf0) << 4);
81   int color = attr & 0x0f;
82
83   SET_TILE_INFO(0, code, color, 0);
84}
85
86static VIDEO_START(lucky8)
87{
88   bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows,
89      8, 8, 64, 32);
90}
91
92static VIDEO_UPDATE(lucky8)
93{
94   tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
95   return 0;
96}
97
98static ADDRESS_MAP_START( lucky8_map, ADDRESS_SPACE_PROGRAM, 8 )
99   AM_RANGE(0x0000, 0x7fff) AM_ROM
100   AM_RANGE(0x8000, 0x87ff) AM_RAM
101   AM_RANGE(0x8800, 0x8fff) AM_RAM_WRITE(lucky8_videoram_w) AM_BASE(&videoram)
102   AM_RANGE(0x9000, 0x97ff) AM_RAM_WRITE(lucky8_colorram_w) AM_BASE(&colorram)
103   AM_RANGE(0x9800, 0x99ff) AM_RAM
104   AM_RANGE(0xa000, 0xa1ff) AM_RAM
105   AM_RANGE(0xa800, 0xa9ff) AM_RAM
106   AM_RANGE(0xb000, 0xb1ff) AM_RAM
107   AM_RANGE(0xb800, 0xb800) AM_READ_PORT("B800")
108   AM_RANGE(0xb801, 0xb801) AM_READ_PORT("B801")
109   AM_RANGE(0xb802, 0xb802) AM_READ_PORT("B802")
110   AM_RANGE(0xb803, 0xb803) AM_WRITENOP
111   AM_RANGE(0xb810, 0xb810) AM_READ_PORT("B810")
112   AM_RANGE(0xb811, 0xb811) AM_READ_PORT("B801")
113   AM_RANGE(0xb812, 0xb812) AM_READ_PORT("DSW1")
114   AM_RANGE(0xb813, 0xb813) AM_WRITENOP
115   AM_RANGE(0xb820, 0xb820) AM_READ_PORT("DSW2")
116   AM_RANGE(0xb821, 0xb821) AM_WRITENOP
117   AM_RANGE(0xb822, 0xb822) AM_WRITENOP
118   AM_RANGE(0xb823, 0xb823) AM_WRITENOP
119   AM_RANGE(0xb830, 0xb830) AM_READWRITE(ay8910_read_port_0_r, ay8910_write_port_0_w)
120   AM_RANGE(0xb840, 0xb840) AM_WRITE(ay8910_control_port_0_w)
121   AM_RANGE(0xb850, 0xb850) AM_WRITENOP
122   AM_RANGE(0xb860, 0xb860) AM_WRITENOP
123   AM_RANGE(0xb870, 0xb870) AM_WRITENOP
124ADDRESS_MAP_END
125
126static INPUT_PORTS_START( lucky8 )
127   PORT_START("B800")
128   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 0") PORT_CODE(KEYCODE_Q)
129   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 1") PORT_CODE(KEYCODE_W)
130   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 2") PORT_CODE(KEYCODE_E)
131   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 3") PORT_CODE(KEYCODE_R)
132   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 4") PORT_CODE(KEYCODE_T)
133   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 5") PORT_CODE(KEYCODE_Y)
134   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 6") PORT_CODE(KEYCODE_U)
135   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 7") PORT_CODE(KEYCODE_I)
136
137   PORT_START("B801")
138   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 0") PORT_CODE(KEYCODE_A)
139   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 1") PORT_CODE(KEYCODE_S)
140   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 2") PORT_CODE(KEYCODE_D)
141   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 3") PORT_CODE(KEYCODE_F)
142   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 4") PORT_CODE(KEYCODE_G)
143   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 5") PORT_CODE(KEYCODE_H)
144   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 6") PORT_CODE(KEYCODE_J)
145   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 7") PORT_CODE(KEYCODE_K)
146
147   PORT_START("B802")
148   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 0") PORT_CODE(KEYCODE_Z)
149   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 1") PORT_CODE(KEYCODE_X)
150   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 2") PORT_CODE(KEYCODE_C)
151   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 3") PORT_CODE(KEYCODE_V)
152   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 4") PORT_CODE(KEYCODE_B)
153   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 5") PORT_CODE(KEYCODE_N)
154   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 6") PORT_CODE(KEYCODE_M)
155   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 7") PORT_CODE(KEYCODE_L)
156
157   PORT_START("B810")
158   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
159   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
160   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START3 )
161   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START4 )
162   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
163   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
164   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
165   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 )
166
167   PORT_START("B811")
168   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
169   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
170   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
171   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 )
172   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
173   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 )
174   PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
175   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE3 )
176
177   PORT_START("DSW1")
178   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
179   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
180   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
181   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
182   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
183   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
184   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
185   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
186   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
187   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
188   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
189   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
190   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
191   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
192   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
193   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
194   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
195   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
196   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
197   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
198   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
199   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
200   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
201   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
202
203   PORT_START("DSW2")
204   PORT_DIPNAME( 0x07, 0x07, "Main Game" )
205   PORT_DIPSETTING(    0x07, "80%" )
206   PORT_DIPSETTING(    0x06, "83%" )
207   PORT_DIPSETTING(    0x05, "86%" )
208   PORT_DIPSETTING(    0x04, "89%" )
209   PORT_DIPSETTING(    0x03, "92%" )
210   PORT_DIPSETTING(    0x02, "95%" )
211   PORT_DIPSETTING(    0x01, "98%" )
212   PORT_DIPSETTING(    0x00, "101%" )
213   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
214   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
215   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
216   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
217   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
218   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
219   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
220   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
221   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
222   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
223   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
224   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
225   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
226   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
227   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
228
229   PORT_START("DSW3")
230   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
231   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
232   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
233   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
234   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
235   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
236   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
237   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
238   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
239   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
240   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
241   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
242   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
243   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
244   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
245   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
246   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
247   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
248   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
249   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
250   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
251   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
252   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
253   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
254
255   PORT_START("DSW4")
256   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
257   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
258   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
259   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
260   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
261   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
262   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
263   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
264   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
265   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
266   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
267   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
268   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
269   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
270   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
271   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
272   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
273   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
274   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
275   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
276   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
277   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
278   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
279   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
280INPUT_PORTS_END
281
282static const gfx_layout charlayout =
283{
284   8, 8,
285   4096,
286   3,
287   { 0, 0x8000*8, 0x10000*8 },
288   { 0, 1, 2, 3, 4, 5, 6, 7 },
289   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
290   8*8
291};
292
293static const UINT32 spritelayout_xoffset[96] =
294{
295     0+0*32*8, 1+0*32*8, 2+0*32*8, 3+0*32*8, 4+0*32*8, 5+0*32*8, 6+0*32*8, 7+0*32*8,
296     0+1*32*8, 1+1*32*8, 2+1*32*8, 3+1*32*8, 4+1*32*8, 5+1*32*8, 6+1*32*8, 7+1*32*8,
297     0+2*32*8, 1+2*32*8, 2+2*32*8, 3+2*32*8, 4+2*32*8, 5+2*32*8, 6+2*32*8, 7+2*32*8,
298     0+3*32*8, 1+3*32*8, 2+3*32*8, 3+3*32*8, 4+3*32*8, 5+3*32*8, 6+3*32*8, 7+3*32*8,
299     0+4*32*8, 1+4*32*8, 2+4*32*8, 3+4*32*8, 4+4*32*8, 5+4*32*8, 6+4*32*8, 7+4*32*8,
300     0+5*32*8, 1+5*32*8, 2+5*32*8, 3+5*32*8, 4+5*32*8, 5+5*32*8, 6+5*32*8, 7+5*32*8,
301     0+6*32*8, 1+6*32*8, 2+6*32*8, 3+6*32*8, 4+6*32*8, 5+6*32*8, 6+6*32*8, 7+6*32*8,
302     0+7*32*8, 1+7*32*8, 2+7*32*8, 3+7*32*8, 4+7*32*8, 5+7*32*8, 6+7*32*8, 7+7*32*8,
303     0+8*32*8, 1+8*32*8, 2+8*32*8, 3+8*32*8, 4+8*32*8, 5+8*32*8, 6+8*32*8, 7+8*32*8,
304     0+9*32*8, 1+9*32*8, 2+9*32*8, 3+9*32*8, 4+9*32*8, 5+9*32*8, 6+9*32*8, 7+9*32*8,
305     0+10*32*8, 1+10*32*8, 2+10*32*8, 3+10*32*8, 4+10*32*8, 5+10*32*8, 6+10*32*8, 7+10*32*8,
306     0+11*32*8, 1+11*32*8, 2+11*32*8, 3+11*32*8, 4+11*32*8, 5+11*32*8, 6+11*32*8, 7+11*32*8
307};
308
309static const gfx_layout spritelayout =
310{
311   96, 32,
312   10,
313   4,
314   { 0, 0x2000*8, 0x4000*8, 0x6000*8 },
315   EXTENDED_XOFFS,
316   {
317         0*8,  1*8,  2*8,  3*8,  4*8,  5*8,  6*8,  7*8,  8*8,  9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8,
318        16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8, 24*8, 25*8, 26*8, 27*8, 28*8, 29*8, 30*8, 31*8
319   },
320   12*32*8,
321   spritelayout_xoffset,
322   NULL
323};
324
325static const gfx_layout spritelayout2 =
326{
327   64, 32,
328   5,
329   4,
330   { 0, 0x2000*8, 0x4000*8, 0x6000*8 },
331   EXTENDED_XOFFS,
332   {
333         0*8,  1*8,  2*8,  3*8,  4*8,  5*8,  6*8,  7*8,  8*8,  9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8,
334        16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8, 24*8, 25*8, 26*8, 27*8, 28*8, 29*8, 30*8, 31*8
335   },
336   8*32*8,
337   spritelayout_xoffset,
338   NULL
339};
340
341static GFXDECODE_START( lucky8 )
342   GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout,      0, 64 )
343   GFXDECODE_ENTRY( "gfx2", 0x0000, spritelayout,  0, 64 )
344   GFXDECODE_ENTRY( "gfx2", 0x1000, spritelayout2, 0, 64 )
345GFXDECODE_END
346
347static const ay8910_interface ay8910_config =
348{
349   AY8910_LEGACY_OUTPUT,
350   AY8910_DEFAULT_LOADS,
351   input_port_7_r,   // DSW3
352   input_port_8_r,   // DSW4
353   NULL,
354   NULL
355};
356
357static MACHINE_DRIVER_START( lucky8 )
358   // basic machine hardware
359   MDRV_CPU_ADD("main", Z80, 12000000/4)   // ??? Runs far too fast
360   MDRV_CPU_PROGRAM_MAP(lucky8_map, 0)
361   MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
362
363   // video hardware
364
365   MDRV_SCREEN_ADD("main", RASTER)
366   MDRV_SCREEN_REFRESH_RATE(60)
367   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
368   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
369   MDRV_SCREEN_SIZE(64*8, 32*8)
370   MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1)
371
372   MDRV_GFXDECODE(lucky8)
373   MDRV_PALETTE_LENGTH(256)
374
375   MDRV_PALETTE_INIT(lucky8)
376   MDRV_VIDEO_START(lucky8)
377   MDRV_VIDEO_UPDATE(lucky8)
378
379   // sound hardware
380   MDRV_SPEAKER_STANDARD_MONO("mono")
381
382   MDRV_SOUND_ADD("ay", AY8910, 12000000/12)
383   MDRV_SOUND_CONFIG(ay8910_config)
384   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
385MACHINE_DRIVER_END
386
387ROM_START( lucky8 )
388   ROM_REGION( 0x10000, "main", 0 )
389   ROM_LOAD( "8",    0x0000, 0x4000, CRC(a187573e) SHA1(864627502025dbc83a0049fc98505655cec7b181) )
390   ROM_LOAD( "9",   0x4000, 0x4000, CRC(6f62672e) SHA1(05662ef1a70f93b09e48de497b049a282f070735) )
391
392   ROM_REGION( 0x18000, "gfx1", ROMREGION_DISPOSE )
393   ROM_LOAD( "5",  0x00000, 0x8000, CRC(59026af3) SHA1(3d7f7e78968ca26275635aeaa0e994468a3da575) )
394   ROM_LOAD( "6",  0x08000, 0x8000, CRC(67a073c1) SHA1(36194d57d0dc0601fa1fdf2e6806f11b2ea6da36) )
395   ROM_LOAD( "7",  0x10000, 0x8000, CRC(c415b9d0) SHA1(fd558fe8a116c33bbd712a639224d041447a45c1) )
396
397   ROM_REGION( 0x8000, "gfx2", ROMREGION_DISPOSE )
398   ROM_LOAD( "1",   0x0000, 0x2000, CRC(29d6f197) SHA1(1542ca457594f6b7fe8f28f7d78023edd7021bc8) )
399   ROM_LOAD( "2",   0x2000, 0x2000, CRC(5f812e65) SHA1(70d9ea82f9337936bf21f82b6961768d436f3a6f) )
400   ROM_LOAD( "3",   0x4000, 0x2000, CRC(898b9ed5) SHA1(11b7d1cfcf425d00d086c74e0dbcb72068dda9fe) )
401   ROM_LOAD( "4",   0x6000, 0x2000, CRC(4f7cfb35) SHA1(0617cf4419be00d9bacc78724089cb8af4104d68) )
402
403   ROM_REGION( 0x240, "proms", 0 )
404   ROM_LOAD( "d13", 0x0000, 0x0020, CRC(c6b41352) SHA1(d7c3b5aa32e4e456c9432a13bede1db6d62eb270) )
405   ROM_LOAD( "d12", 0x0020, 0x0100, CRC(23e81049) SHA1(78071dae70fad870e972d944642fb3a2374be5e4) )
406   ROM_LOAD( "g13", 0x0120, 0x0020, CRC(6df3f972) SHA1(0096a7f7452b70cac6c0752cb62e24b643015b5c) )
407   ROM_LOAD( "g14", 0x0140, 0x0100, CRC(bd48de71) SHA1(e4fa1e774af1499bc568be5b2deabb859d8c8172) )
408ROM_END
409
410static DRIVER_INIT( lucky8 )
411{
412   // patch rst $10 timing routine that gets stuck in an endless loop
413   UINT8 *ROM = memory_region(machine, "main");
414   ROM[0x0010] = 0xc9;
415}
416
417GAME( 1989, lucky8, 0, lucky8, lucky8, lucky8, ROT0, "Falcon", "Lucky 8 Lines", GAME_NOT_WORKING )
src/mame/drivers/cherrym.c
r3988r3989
1/*
2
3Driver by Curt Coder
4
5*/
6
7#include "driver.h"
8#include "sound/ay8910.h"
9
10/*static UINT8 *nvram;
11static size_t nvram_size;*/
12
13/* video */
14
15static tilemap *bg_tilemap;
16
17static PALETTE_INIT( cm )
18{
19   int i;
20
21   for ( i = 0; i < machine->config->total_colors; i++ )
22   {
23      int bit0,bit1,bit2,bit3,r,g,b;
24
25      // red component
26      bit0 = (color_prom[0] >> 3) & 0x01;
27      bit1 = (color_prom[0] >> 2) & 0x01;
28      bit2 = (color_prom[0] >> 1) & 0x01;
29      bit3 = (color_prom[0] >> 0) & 0x01;
30      r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
31
32      // green component
33      bit0 = (color_prom[machine->config->total_colors] >> 3) & 0x01;
34      bit1 = (color_prom[machine->config->total_colors] >> 2) & 0x01;
35      bit2 = (color_prom[machine->config->total_colors] >> 1) & 0x01;
36      bit3 = (color_prom[machine->config->total_colors] >> 0) & 0x01;
37      g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
38
39      // blue component
40      bit0 = (color_prom[2*machine->config->total_colors] >> 3) & 0x01;
41      bit1 = (color_prom[2*machine->config->total_colors] >> 2) & 0x01;
42      bit2 = (color_prom[2*machine->config->total_colors] >> 1) & 0x01;
43      bit3 = (color_prom[2*machine->config->total_colors] >> 0) & 0x01;
44      b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
45
46      palette_set_color(machine,i,MAKE_RGB(r,g,b));
47
48      color_prom++;
49   }
50}
51
52static WRITE8_HANDLER( cm_videoram_w )
53{
54   videoram[offset] = data;
55   tilemap_mark_tile_dirty(bg_tilemap, offset);
56}
57
58static WRITE8_HANDLER( cm_colorram_w )
59{
60   colorram[offset] = data;
61   tilemap_mark_tile_dirty(bg_tilemap, offset);
62}
63
64static TILE_GET_INFO( get_bg_tile_info )
65{
66   int attr = colorram[tile_index];
67   int code = videoram[tile_index] + ((attr & 0x0f) << 8);
68   int color = (attr & 0xf0) >> 4;
69
70   SET_TILE_INFO(0, code, color, 0);
71}
72
73#if 0
74static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
75{
76   // THIS IS COMPLETELY WRONG AND ONLY A PLACEHOLDER, IT HAS BEEN DISABLED TO KEEP THE COMPILER HAPPY
77   int offs;
78
79   for (offs = 0; offs < spriteram_size; offs += 4)
80   {
81      if (spriteram[offs + 3])
82      {
83         int attr = spriteram[offs + 1];
84         int code = spriteram[offs+0] + ((attr & 0x40) << 2);
85         int color = attr & 0x0f;
86         int sx = spriteram[offs + 2] - 2 * (attr & 0x80);
87         int sy = spriteram[offs + 3];
88         int flipx = attr & 0x10;
89         int flipy = attr & 0x20;
90
91         drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy,
92            cliprect, TRANSPARENCY_PEN, 0);
93      }
94   }
95}
96#endif
97
98static VIDEO_START(cm)
99{
100   bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows,
101      8, 8, 64, 32);
102}
103
104static VIDEO_UPDATE(cm)
105{
106   tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
107//  draw_sprites(screen->machine, bitmap, cliprect);
108   return 0;
109}
110
111#if 0// For when NVRAM is hooked up
112static NVRAM_HANDLER( cm )
113{
114   if (read_or_write)
115   {
116      mame_fwrite(file, nvram, nvram_size);
117   }
118   else
119   {
120      if (file)
121      {
122         mame_fread(file, nvram, nvram_size);
123      }
124      else
125      {
126         memset(nvram, 0xff, nvram_size);
127      }
128   }
129}
130#endif
131
132static ADDRESS_MAP_START( cm_map, ADDRESS_SPACE_PROGRAM, 8 )
133   AM_RANGE(0x0000, 0xbfff) AM_ROM AM_WRITENOP
134   AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)// is it here?
135   AM_RANGE(0xd800, 0xdfff) AM_RAM
136   AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(cm_videoram_w) AM_BASE(&videoram)
137   AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(cm_colorram_w) AM_BASE(&colorram)
138   AM_RANGE(0xf000, 0xffff) AM_RAM
139ADDRESS_MAP_END
140
141static ADDRESS_MAP_START( cm_io_map, ADDRESS_SPACE_IO, 8 )
142   ADDRESS_MAP_GLOBAL_MASK(0xff)
143   AM_RANGE(0x01, 0x01) AM_READ(ay8910_read_port_0_r)
144   AM_RANGE(0x02, 0x02) AM_WRITE(ay8910_write_port_0_w)
145   AM_RANGE(0x03, 0x03) AM_WRITE(ay8910_control_port_0_w)
146   AM_RANGE(0x04, 0x04) AM_READ_PORT("PLAYER")
147   AM_RANGE(0x05, 0x05) AM_READ_PORT("COIN")
148   AM_RANGE(0x06, 0x06) AM_READ_PORT("TEST")
149   AM_RANGE(0x07, 0x07) AM_WRITENOP
150   AM_RANGE(0x08, 0x08) AM_READ_PORT("DSW1")
151   AM_RANGE(0x09, 0x09) AM_READ_PORT("DSW2")
152   AM_RANGE(0x0a, 0x0a) AM_READ_PORT("DSW3")
153   AM_RANGE(0x0b, 0x0b) AM_WRITENOP
154   AM_RANGE(0x10, 0x10) AM_WRITENOP
155   AM_RANGE(0x11, 0x11) AM_WRITENOP
156   AM_RANGE(0x12, 0x12) AM_WRITENOP
157   AM_RANGE(0x13, 0x13) AM_WRITENOP
158ADDRESS_MAP_END
159
160static INPUT_PORTS_START( cmv801 )
161   PORT_START("PLAYER")
162   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 0") PORT_CODE(KEYCODE_Q)
163   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 1") PORT_CODE(KEYCODE_W)
164   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Big")
165   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Double Up")
166   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Stop / Take Score")
167   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Bet")
168   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Small")
169   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
170
171   PORT_START("COIN")
172   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 0") PORT_CODE(KEYCODE_A)
173   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 1") PORT_CODE(KEYCODE_S)
174   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
175   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 3") PORT_CODE(KEYCODE_F)
176   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) // PORT_NAME("Bit 4") PORT_CODE(KEYCODE_G)
177   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN4 ) // PORT_NAME("Bit 5") PORT_CODE(KEYCODE_H)
178   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 )      // Key-In
179   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )      // 10 Credits
180
181   PORT_START("TEST")
182   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 0") PORT_CODE(KEYCODE_Z)
183   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 1") PORT_CODE(KEYCODE_X)
184   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 2") PORT_CODE(KEYCODE_C)
185   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bit 3") PORT_CODE(KEYCODE_V)
186   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4) PORT_NAME("Payout")
187   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Limit Over")
188   PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
189   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F2) PORT_NAME("Analyzer")
190
191   PORT_START("DSW1")
192   PORT_DIPUNUSED_DIPLOC( 0x01, 0x00, "SW1:!1" ) /* Listed as "Unused" */
193   PORT_DIPNAME( 0x02, 0x00, "Hopper Out Switch" ) PORT_DIPLOCATION("SW1:!2")
194   PORT_DIPSETTING(    0x02, "Active High" )
195   PORT_DIPSETTING(    0x00, "Active Low" )
196   PORT_DIPNAME( 0x04, 0x00, "Type Of Payout" ) PORT_DIPLOCATION("SW1:!3")
197   PORT_DIPSETTING(    0x04, "Automatic" )
198   PORT_DIPSETTING(    0x00, "Payout SH" )
199   PORT_DIPNAME( 0x08, 0x00, "@ IN DoubleUp" ) PORT_DIPLOCATION("SW1:!4")
200   PORT_DIPSETTING(    0x08, "Even" )
201   PORT_DIPSETTING(    0x00, "LOST" )
202   PORT_DIPNAME( 0x10, 0x00, "DoubleUp Pay-Rate" ) PORT_DIPLOCATION("SW1:!5")
203   PORT_DIPSETTING(    0x00, "80%" )
204   PORT_DIPSETTING(    0x10, "90%" )
205   PORT_DIPNAME( 0x20, 0x00, "DoubleUp" ) PORT_DIPLOCATION("SW1:!6")
206   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
207   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
208   PORT_DIPNAME( 0xc0, 0x00, "Bet Max" ) PORT_DIPLOCATION("SW1:!7,!8") /* Manual says 8/16/32/64 */
209   PORT_DIPSETTING(    0x00, "16 Bet" )
210   PORT_DIPSETTING(    0x40, "32 Bet" )
211   PORT_DIPSETTING(    0x80, "64 Bet" )
212   PORT_DIPSETTING(    0xc0, "96 Bet" )
213
214   PORT_START("DSW2")
215   PORT_DIPNAME( 0x07, 0x07, "Main Game Pay-Rate" ) PORT_DIPLOCATION("SW2:!1,!2,!3")
216   PORT_DIPSETTING(    0x07, "55 30% 45" ) /* Displays 35% */
217   PORT_DIPSETTING(    0x06, "60 38% 50" ) /* Displays 40% */
218   PORT_DIPSETTING(    0x05, "65 46% 55" ) /* Displays 45% */
219   PORT_DIPSETTING(    0x04, "70 54% 60" ) /* Displays 50% */
220   PORT_DIPSETTING(    0x03, "75 62% 65" ) /* Displays 55% */
221   PORT_DIPSETTING(    0x02, "80 70% 70" ) /* Displays 60% */
222   PORT_DIPSETTING(    0x01, "85 78% 75" ) /* Displays 65% */
223   PORT_DIPSETTING(    0x00, "90 86% 80" ) /* Displays 70% */
224   PORT_DIPNAME( 0x18, 0x18, "Hopper Limit" ) PORT_DIPLOCATION("SW2:!4,!5")
225   PORT_DIPSETTING(    0x00, "300" )
226   PORT_DIPSETTING(    0x08, "500" )
227   PORT_DIPSETTING(    0x10, "1000" )
228   PORT_DIPSETTING(    0x18, "Unlimited" )
229   PORT_DIPNAME( 0x20, 0x20, "Sound On/Off Odds Over 100" ) PORT_DIPLOCATION("SW2:!6")
230   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
231   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
232   PORT_DIPNAME( 0x40, 0x40, "Type Of Key In" ) PORT_DIPLOCATION("SW2:!7") /* Manual says C-Type/D-Type probably a typo */
233   PORT_DIPSETTING(    0x40, "A-Type" )
234   PORT_DIPSETTING(    0x00, "B-Type" )
235   PORT_DIPNAME( 0x80, 0x80, "Bet Limit For Center Super 7" ) PORT_DIPLOCATION("SW2:!8")
236   PORT_DIPSETTING(    0x00, "Unlimited" )
237   PORT_DIPSETTING(    0x80, "Limited" ) /* "Number is fixed by 4-6" */
238
239   PORT_START("DSW3")
240   PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("SW3:1,2")
241   PORT_DIPSETTING(    0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) // A-Type
242   PORT_DIPSETTING(    0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40)
243   PORT_DIPSETTING(    0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40)
244   PORT_DIPSETTING(    0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40)
245   PORT_DIPSETTING(    0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) // B-Type
246   PORT_DIPSETTING(    0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00)
247   PORT_DIPSETTING(    0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00)
248   PORT_DIPSETTING(    0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00)
249   PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("SW3:3,4")
250   PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
251   PORT_DIPSETTING(    0x04, DEF_STR( 1C_2C ) )
252   PORT_DIPSETTING(    0x08, DEF_STR( 1C_5C ) )
253   PORT_DIPSETTING(    0x0c, "1 Coin/10 Credits" )
254   PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("SW3:5,6")
255   PORT_DIPSETTING(    0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) // C-Type
256   PORT_DIPSETTING(    0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00)
257   PORT_DIPSETTING(    0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00)
258   PORT_DIPSETTING(    0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00)
259   PORT_DIPSETTING(    0x00, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) // D-Type
260   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10)
261   PORT_DIPSETTING(    0x20, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10)
262   PORT_DIPSETTING(    0x30, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10)
263   PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("SW3:7,8")
264   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) )
265   PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
266   PORT_DIPSETTING(    0x40, DEF_STR( 1C_5C ) )
267   PORT_DIPSETTING(    0x00, "1 Coin/10 Credits" )
268
269   PORT_START("DSW4")
270   PORT_DIPNAME( 0x07, 0x07, "Credit Limit" ) PORT_DIPLOCATION("SW4:1,2,3")
271   PORT_DIPSETTING(    0x07, "5,000" )
272   PORT_DIPSETTING(    0x06, "10,000" )
273   PORT_DIPSETTING(    0x05, "20,000" )
274   PORT_DIPSETTING(    0x04, "30,000" )
275   PORT_DIPSETTING(    0x03, "40,000" )
276   PORT_DIPSETTING(    0x02, "50,000" )
277   PORT_DIPSETTING(    0x01, "100,000" )
278   PORT_DIPSETTING(    0x00, "Unlimited" )
279   PORT_DIPNAME( 0x08, 0x08, "Display Of Payout Limit" ) PORT_DIPLOCATION("SW4:4")
280   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
281   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
282   PORT_DIPNAME( 0x10, 0x10, "Type Of Coin D" ) PORT_DIPLOCATION("SW4:5")
283   PORT_DIPSETTING(    0x10, "C-Type" )
284   PORT_DIPSETTING(    0x00, "D-Type" )
285   PORT_DIPNAME( 0x20, 0x20, "Min. Bet For Bonus Play" ) PORT_DIPLOCATION("SW4:6")
286   PORT_DIPSETTING(    0x20, "16 Bet" )
287   PORT_DIPSETTING(    0x00, "8 Bet" )
288   PORT_DIPNAME( 0x40, 0x40, "Reel Speed" ) PORT_DIPLOCATION("SW4:7")
289   PORT_DIPSETTING(    0x40, DEF_STR( High ) )
290   PORT_DIPSETTING(    0x00, DEF_STR( Low ) )
291   PORT_DIPNAME( 0x80, 0x80, "Hopper Out By Coin A" ) PORT_DIPLOCATION("SW4:8")
292   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
293   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
294
295   PORT_START("DSW5")
296   PORT_DIPNAME( 0x01, 0x01, "Display Of Doll On Demo" ) PORT_DIPLOCATION("SW5:1")
297   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
298   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
299   PORT_DIPNAME( 0x06, 0x06, "Coin In Limit" ) PORT_DIPLOCATION("SW5:2,3")
300   PORT_DIPSETTING(    0x06, "1,000" )
301   PORT_DIPSETTING(    0x04, "5,000" )
302   PORT_DIPSETTING(    0x02, "10,000" )
303   PORT_DIPSETTING(    0x00, "20,000" )
304   PORT_DIPNAME( 0x18, 0x18, "Condition For 3 Kind Of Bonus" ) PORT_DIPLOCATION("SW5:4,5")
305   PORT_DIPSETTING(    0x18, "12-7-1" )
306   PORT_DIPSETTING(    0x10, "9-5-1" )
307   PORT_DIPSETTING(    0x08, "6-3-1" )
308   PORT_DIPSETTING(    0x00, "3-2-1" )
309   PORT_DIPNAME( 0x20, 0x20, "Display Of Doll At All Fr. Bonus" ) PORT_DIPLOCATION("SW5:6")
310   PORT_DIPSETTING(    0x20, DEF_STR( Low ) )
311   PORT_DIPSETTING(    0x00, DEF_STR( High ) )
312   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW5:7" ) /* Listed as "Unused" */
313   PORT_DIPNAME( 0x80, 0x80, "Test Mode For Disp. Of Doll" ) PORT_DIPLOCATION("SW5:8")
314   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
315   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
316INPUT_PORTS_END
317
318static const gfx_layout charlayout =
319{
320   8, 8,
321   4096,
322   3,
323   { 0, 0x8000*8, 0x10000*8 },
324   { 0, 1, 2, 3, 4, 5, 6, 7 },
325   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
326   8*8
327};
328
329static const UINT32 spritelayout_xoffset[80] =
330{
331     0+0*32*8, 1+0*32*8, 2+0*32*8, 3+0*32*8, 4+0*32*8, 5+0*32*8, 6+0*32*8, 7+0*32*8,
332     0+1*32*8, 1+1*32*8, 2+1*32*8, 3+1*32*8, 4+1*32*8, 5+1*32*8, 6+1*32*8, 7+1*32*8,
333     0+2*32*8, 1+2*32*8, 2+2*32*8, 3+2*32*8, 4+2*32*8, 5+2*32*8, 6+2*32*8, 7+2*32*8,
334     0+3*32*8, 1+3*32*8, 2+3*32*8, 3+3*32*8, 4+3*32*8, 5+3*32*8, 6+3*32*8, 7+3*32*8,
335     0+4*32*8, 1+4*32*8, 2+4*32*8, 3+4*32*8, 4+4*32*8, 5+4*32*8, 6+4*32*8, 7+4*32*8,
336     0+5*32*8, 1+5*32*8, 2+5*32*8, 3+5*32*8, 4+5*32*8, 5+5*32*8, 6+5*32*8, 7+5*32*8,
337     0+6*32*8, 1+6*32*8, 2+6*32*8, 3+6*32*8, 4+6*32*8, 5+6*32*8, 6+6*32*8, 7+6*32*8,
338     0+7*32*8, 1+7*32*8, 2+7*32*8, 3+7*32*8, 4+7*32*8, 5+7*32*8, 6+7*32*8, 7+7*32*8,
339     0+8*32*8, 1+8*32*8, 2+8*32*8, 3+8*32*8, 4+8*32*8, 5+8*32*8, 6+8*32*8, 7+8*32*8,
340     0+9*32*8, 1+9*32*8, 2+9*32*8, 3+9*32*8, 4+9*32*8, 5+9*32*8, 6+9*32*8, 7+9*32*8
341};
342
343static const gfx_layout spritelayout =
344{
345   80, 32,
346   12,
347   4,
348   { 0, 0x2000*8, 0x4000*8, 0x6000*8 },
349   EXTENDED_XOFFS,
350   {
351         0*8,  1*8,  2*8,  3*8,  4*8,  5*8,  6*8,  7*8,  8*8,  9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8,
352        16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8, 24*8, 25*8, 26*8, 27*8, 28*8, 29*8, 30*8, 31*8
353   },
354   10*32*8,
355   spritelayout_xoffset,
356   NULL
357};
358
359static GFXDECODE_START( cherrym )
360   GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout,     0, 16 )
361   GFXDECODE_ENTRY( "gfx2", 0x0020, spritelayout, 0, 16 )
362GFXDECODE_END
363
364static const ay8910_interface ay8910_config =
365{
366   AY8910_LEGACY_OUTPUT,
367   AY8910_DEFAULT_LOADS,
368   input_port_6_r,   //
369   input_port_7_r,   //
370   NULL,
371   NULL
372};
373
374static MACHINE_DRIVER_START( cmv801 )
375   // basic machine hardware
376   MDRV_CPU_ADD("main", Z80, 8000000/2)   // ???
377   MDRV_CPU_PROGRAM_MAP(cm_map, 0)
378   MDRV_CPU_IO_MAP(cm_io_map, 0)
379   MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
380
381   //MDRV_NVRAM_HANDLER(cmv801)
382
383   // video hardware
384
385   MDRV_SCREEN_ADD("main", RASTER)
386   MDRV_SCREEN_REFRESH_RATE(60)
387   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
388   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
389   MDRV_SCREEN_SIZE(64*8, 32*8)
390   MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1)
391
392   MDRV_GFXDECODE(cherrym)
393   MDRV_PALETTE_LENGTH(256)
394
395   MDRV_PALETTE_INIT(cm)
396   MDRV_VIDEO_START(cm)
397   MDRV_VIDEO_UPDATE(cm)
398
399   // sound hardware
400   MDRV_SPEAKER_STANDARD_MONO("mono")
401   MDRV_SOUND_ADD("ay", AY8910,18432000/12)
402   MDRV_SOUND_CONFIG(ay8910_config)
403   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
404
405MACHINE_DRIVER_END
406
407ROM_START( cmv801 )
408   ROM_REGION( 0x10000, "main", 0 )
409   ROM_LOAD( "prg512",   0x0000, 0x10000, CRC(2f6e3fe9) SHA1(c5ffa51478a0dc2d8ff6a0f286cfb461011bb55d) )
410
411   ROM_REGION( 0x18000, "gfx1", ROMREGION_DISPOSE )
412   ROM_LOAD( "m5.256",   0x00000, 0x8000, CRC(19cc1d67) SHA1(47487f9362bfb36a32100ed772960628844462bf) )
413   ROM_LOAD( "m6.256",   0x08000, 0x8000, CRC(63b3df4e) SHA1(9bacd23da598805ec18ec5ad15cab95d71eb9262) )
414   ROM_LOAD( "m7.256",   0x10000, 0x8000, CRC(e39fff9c) SHA1(22fdc517fa478441622c6245cecb5728c5595757) )
415
416   ROM_REGION( 0x8000, "gfx2", ROMREGION_DISPOSE )
417   ROM_LOAD( "m1.64",     0x0000, 0x2000, CRC(6dfcb188) SHA1(22430429c798954d9d979e62699b58feae7fdbf4) )
418   ROM_LOAD( "m2.64",     0x2000, 0x2000, CRC(9678ead2) SHA1(e80aefa98b2363fe9e6b2415762695ace272e4d3) )
419   ROM_LOAD( "m3.64",     0x4000, 0x2000, CRC(8607ffd9) SHA1(9bc94715554aa2473ae2ed249a47f29c7886b3dc) )
420   ROM_LOAD( "m4.64",      0x6000, 0x2000, CRC(c32367be) SHA1(ff217021b9c58e23b2226f8b0a7f5da966225715) )
421
422   ROM_REGION( 0x300, "proms", 0 )
423   ROM_LOAD( "prom1.287", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) )
424   ROM_LOAD( "prom2.287", 0x0100, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) )
425   ROM_LOAD( "prom3.287", 0x0200, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) )
426ROM_END
427
428GAME( 198?, cmv801, 0, cmv801, cmv801, 0, ROT0, "Corsica", "Cherry Master (v8.01)", GAME_IMPERFECT_GRAPHICS | GAME_WRONG_COLORS | GAME_NOT_WORKING )
src/emu/cpu/v30mz/necintrf.h
r3988r3989
1/* ASG 971222 -- rewrote this interface */
2#ifndef __NECINTRF_H__
3#define __NECINTRF_H__
4
5#include "cpuintrf.h"
6
7enum
8{
9   NEC_PC=0,
10   NEC_IP, NEC_AW, NEC_CW, NEC_DW, NEC_BW, NEC_SP, NEC_BP, NEC_IX, NEC_IY,
11   NEC_FLAGS, NEC_ES, NEC_CS, NEC_SS, NEC_DS,
12   NEC_VECTOR, NEC_PENDING
13};
14
15/* Public functions */
16extern CPU_GET_INFO( v30mz );
17
18#endif /* __NECINTRF_H__ */
src/emu/cpu/i86/i88intf.h
r3988r3989
1#pragma once
2
3#ifndef __I88INTF_H__
4#define __I88INTF_H__
5
6#include "i86intf.h"
7
8/* Public functions */
9CPU_GET_INFO( i8088 );
10
11#endif /* __I88INTF_H__ */
src/emu/cpu/i86/i186intf.h
r3988r3989
1/* ASG 971222 -- rewrote this interface */
2#ifndef __I186INTF_H__
3#define __I186INTF_H__
4
5#include "i86intf.h"
6
7/* Public functions */
8CPU_GET_INFO( i80186 );
9
10#endif /* __I186INTF_H__ */
src/emu/cpu/i86/i286intf.h
r3988r3989
1/* ASG 971222 -- rewrote this interface */
2#pragma once
3
4#ifndef __I286INTF_H__
5#define __I286INTF_H__
6
7#include "i86intf.h"
8
9enum
10{
11   I80286_PC=0,
12   I80286_IP,
13   I80286_AX,
14   I80286_CX,
15   I80286_DX,
16   I80286_BX,
17   I80286_SP,
18   I80286_BP,
19   I80286_SI,
20   I80286_DI,
21   I80286_FLAGS,
22   I80286_ES,
23   I80286_CS,
24   I80286_SS,
25   I80286_DS,
26   I80286_ES_2,
27   I80286_CS_2,
28   I80286_SS_2,
29   I80286_DS_2,
30   I80286_MSW,
31   I80286_GDTR_BASE,
32   I80286_IDTR_BASE,
33   I80286_LDTR_BASE,
34   I80286_TR_BASE,
35   I80286_GDTR_LIMIT,
36   I80286_IDTR_LIMIT,
37   I80286_LDTR_LIMIT,
38   I80286_TR_LIMIT,
39   I80286_VECTOR,
40   I80286_PENDING,
41   I80286_NMI_STATE,
42   I80286_IRQ_STATE
43};
44
45/* Public functions */
46CPU_GET_INFO( i80286 );
47
48#endif /* __I286INTF_H__ */
src/emu/cpu/i86/i188intf.h
r3988r3989
1#pragma once
2
3#ifndef __I186INTF_H__
4#define __I186INTF_H__
5
6#include "i186intf.h"
7
8/* Public functions */
9CPU_GET_INFO( i80188 );
10
11#endif /* __I186INTF_H__ */
src/emu/cpu/i86/i86intf.h
r3988r3989
1/* ASG 971222 -- rewrote this interface */
2#pragma once
3
4#ifndef __I86INTF_H__
5#define __I86INTF_H__
6
7#include "cpuintrf.h"
8
9enum
10{
11   I8086_PC=0,
12   I8086_IP,
13   I8086_AX,
14   I8086_CX,
15   I8086_DX,
16   I8086_BX,
17   I8086_SP,
18   I8086_BP,
19   I8086_SI,
20   I8086_DI,
21   I8086_FLAGS,
22   I8086_ES,
23   I8086_CS,
24   I8086_SS,
25   I8086_DS,
26   I8086_VECTOR
27};
28
29/* Public functions */
30CPU_GET_INFO( i8086 );
31
32#endif /* __I86INTF_H__ */
src/emu/cpu/i386/i386intf.h
r3988r3989
1#pragma once
2
3#ifndef __I386INTF_H__
4#define __I386INTF_H__
5
6#include "cpuintrf.h"
7
8void i386_get_info(UINT32, cpuinfo*);
9void i486_get_info(UINT32, cpuinfo*);
10void pentium_get_info(UINT32, cpuinfo*);
11void mediagx_get_info(UINT32, cpuinfo*);
12
13#endif /* __I386INTF_H__ */
src/emu/cpu/nec/necintrf.h
r3988r3989
1/* ASG 971222 -- rewrote this interface */
2#ifndef __NEC_H_
3#define __NEC_H_
4
5#include "cpuintrf.h"
6
7enum
8{
9   NEC_PC=0,
10   NEC_IP, NEC_AW, NEC_CW, NEC_DW, NEC_BW, NEC_SP, NEC_BP, NEC_IX, NEC_IY,
11   NEC_FLAGS, NEC_ES, NEC_CS, NEC_SS, NEC_DS,
12   NEC_VECTOR, NEC_PENDING
13};
14
15/* Public functions */
16extern CPU_GET_INFO( v20 );
17extern CPU_GET_INFO( v30 );
18extern CPU_GET_INFO( v33 );
19
20#endif
src/mess/machine/compis.c
r3988r3989
1313/*-------------------------------------------------------------------------*/
1414
1515#include "driver.h"
16#include "cpu/i86/i186intf.h"
1716#include "video/i82720.h"
1817#include "machine/8255ppi.h"
1918#include "machine/mm58274c.h"

Previous 15994 Revisions Next


© 1998-2018 The MESS Team