Previous 15994 Revisions Next

r842 Friday 17th August, 2007 at 20:17:14 UTC by Nathan Woods
Updated to MAME 0.118u2 core
[ROOT]makefile
[docs]messnew.txt
[src/emu]clifront.c emuopts.c emuopts.h mame.c rendersw.c sound.c video.c video.h
[src/emu/cpu/i386]i386dasm.c
[src/emu/cpu/mips]dismips.c dismips.mak
[src/emu/cpu/saturn]saturn.c saturnds.c
[src/emu/sound]tms5220.c tms5220.h
[src/lib/util]huffman.c
[src/mame]mame.mak mamedriv.c
[src/mame/drivers]amspdwy.c astrocde.c asuka.c bombjack.c exzisus.c firetrk.c gdrawpkr.c mcr.c merit.c mitchell.c namcos21.c naughtyb.c ninjaw.c polepos.c raiden.c raiden2.c thayers.c*
[src/mame/includes]taitoipt.h*
[src/mame/layout]bfm_sc2.lay gldncrwn.lay paradice.lay pokio.lay pyramid.lay quintoon.lay slots.lay sltblgpo.lay sltblgtk.lay
[src/mame/video]deco16ic.c nemesis.c
[src/osd/windows]winmain.c
[src/tools]chdcd.c

src/mame/mamedriv.c
r841r842
12241224   /* MCR1 */
12251225   DRIVER( solarfox )   /* (c) 1981 */
12261226   DRIVER( kick )      /* (c) 1981 */
1227   DRIVER( kicka )      /* bootleg? */
1227   DRIVER( kickman )   /* (c) 1981 */
1228   DRIVER( kickc )      /* (c) 1981 */
12281229   /* MCR2 */
12291230   DRIVER( shollow )   /* (c) 1981 */
12301231   DRIVER( shollow2 )   /* (c) 1981 */
r841r842
75307531   DRIVER( bmcbowl )   /* (c) 1994 BMC */
75317532   DRIVER( pitboss )   /* (c) 1983 Merit */
75327533   DRIVER( casino5 )   /* (c) 1983 Merit */
7533   DRIVER( trvwhzho )   /* (c) 1985 Merit */
7534   DRIVER( trvwhzha )   /* (c) 1985 Merit */
7535   DRIVER( trvwhzve )   /* (c) 1985 Merit */
7536   DRIVER( trvwhzva )   /* (c) 1985 Merit */
7537   DRIVER( trvwhzii )   /* (c) 1985 Merit */
7538   DRIVER( trvwziii )   /* (c) 1985 Merit */
7539   DRIVER( trvwhziv )   /* (c) 1985 Merit */
7534   DRIVER( trvwzh )   /* (c) 1985 Merit */
7535   DRIVER( trvwzha )   /* (c) 1985 Merit */
7536   DRIVER( trvwzv )   /* (c) 1985 Merit */
7537   DRIVER( trvwzva )   /* (c) 1985 Merit */
7538   DRIVER( trvwz2 )   /* (c) 1985 Merit */
7539   DRIVER( trvwz3h )   /* (c) 1985 Merit */
7540   DRIVER( trvwz3v )   /* (c) 1985 Merit */
7541   DRIVER( trvwz4 )   /* (c) 1985 Merit */
75407542   DRIVER( tictac )   /* (c) 1985 Merit */
75417543   DRIVER( phrcraze )   /* (c) 1986 Merit */
75427544   DRIVER( phrcrazs )   /* (c) 1986 Merit */
7545   DRIVER( bigappg )   /* (c) 1986 Merit */
75437546   DRIVER( couple )   /* (c) 1988 Merit */
75447547   DRIVER( couplep )   /* (c) 1988 Merit */
75457548   DRIVER( couplei )   /* (c) 1988 Merit */
r841r842
76607663   DRIVER( pottnpkr )   /* Bootleg */
76617664   DRIVER( pottnpkb )   /* Bootleg */
76627665   DRIVER( gdrawpkr )   /* (c) 1981 Cal Omega / Casino Electronics Inc. */
7666   DRIVER( elgrande )   /* (c) 1982 Tuni Electro Service / E.T. Marketing */
76637667   DRIVER( altair )   /* (c) 1981 Cidelsa */
76647668   DRIVER( destryer )   /* (c) 1981 Cidelsa */
76657669   DRIVER( destryea )   /* (c) 1981 Cidelsa */
r841r842
76827686   DRIVER( gstream )   /* (c) 2002, Oriental Soft Japan */
76837687   DRIVER( miniboy7 )   /* (c) 1983, Bonanza Enterprises */
76847688   DRIVER( 39in1 )      /* MAME based bootleg */
7685   DRIVER( kingpin )   /* (c) 1983, American Communications Laboratories Inc. */
7686   DRIVER( kingpinm )   /* (c) 1983, American Communications Laboratories Inc. */
7689   DRIVER( kingpin )   /* (c) 1983 American Communications Laboratories Inc. */
7690   DRIVER( kingpinm )   /* (c) 1983 American Communications Laboratories Inc. */
7691   DRIVER( thayers )   /* (c) 1983 RDI Video Systems */
76877692
76887693#endif   /* DRIVER_RECURSIVE */
src/mame/includes/taitoipt.h
r0r842
1/*******************************************************************************
2
3    Input port macros used by many games in mutiple Taito drivers
4
5*******************************************************************************/
6
7
8/**************************** Machine Dip Swicthes ****************************/
9
10/* with location */
11#define TAITO_DSWA_BITS_2_TO_3_LOC(DIPBANK) \
12   PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, #DIPBANK":3" ) \
13   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION(#DIPBANK":4") \
14   PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) \
15   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
16
17#define TAITO_DSWA_BITS_1_TO_3_LOC(DIPBANK) \
18   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION(#DIPBANK":2") \
19   PORT_DIPSETTING(    0x02, DEF_STR( Off ) ) \
20   PORT_DIPSETTING(    0x00, DEF_STR( On ) ) \
21   TAITO_DSWA_BITS_2_TO_3_LOC(DIPBANK)
22
23#define TAITO_MACHINE_COCKTAIL_LOC(DIPBANK) \
24   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION(#DIPBANK":1") \
25   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) ) \
26   PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) ) \
27   TAITO_DSWA_BITS_1_TO_3_LOC(DIPBANK)
28
29#define TAITO_MACHINE_NO_COCKTAIL_LOC(DIPBANK) \
30   PORT_DIPUNUSED_DIPLOC( 0x01, IP_ACTIVE_LOW, #DIPBANK":1" ) \
31   TAITO_DSWA_BITS_1_TO_3_LOC(DIPBANK)
32
33
34/* without location */
35#define TAITO_DSWA_BITS_2_TO_3 \
36   PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) \
37   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) \
38   PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) \
39   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
40
41#define TAITO_DSWA_BITS_1_TO_3 \
42   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) \
43   PORT_DIPSETTING(    0x02, DEF_STR( Off ) ) \
44   PORT_DIPSETTING(    0x00, DEF_STR( On ) ) \
45   TAITO_DSWA_BITS_2_TO_3
46
47#define TAITO_MACHINE_COCKTAIL \
48   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) \
49   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) ) \
50   PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) ) \
51   TAITO_DSWA_BITS_1_TO_3
52
53#define TAITO_MACHINE_NO_COCKTAIL \
54   PORT_DIPUNUSED( 0x01, IP_ACTIVE_LOW ) \
55   TAITO_DSWA_BITS_1_TO_3
56
57
58/**************************** Coinage Dip Swicthes ****************************/
59
60/* with location */
61#define TAITO_COINAGE_JAPAN_OLD_COIN_A_LOC(DIPBANK) \
62   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION(#DIPBANK":5,6") \
63   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) ) \
64   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
65   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
66   PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
67
68#define TAITO_COINAGE_JAPAN_OLD_COIN_B_LOC(DIPBANK) \
69   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION(#DIPBANK":7,8") \
70   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
71   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) ) \
72   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
73   PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
74
75#define TAITO_COINAGE_JAPAN_NEW_COIN_A_LOC(DIPBANK) \
76   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION(#DIPBANK":5,6") \
77   PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) ) \
78   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) ) \
79   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
80   PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
81
82#define TAITO_COINAGE_JAPAN_NEW_COIN_B_LOC(DIPBANK) \
83   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION(#DIPBANK":7,8") \
84   PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) ) \
85   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
86   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) ) \
87   PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
88
89#define TAITO_COINAGE_WORLD_COIN_A_LOC(DIPBANK) \
90   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION(#DIPBANK":5,6") \
91   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) ) \
92   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) ) \
93   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) ) \
94   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
95
96#define TAITO_COINAGE_WORLD_COIN_B_LOC(DIPBANK) \
97   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION(#DIPBANK":7,8") \
98   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) ) \
99   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) ) \
100   PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) ) \
101   PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
102
103#define TAITO_COINAGE_US_COIN_START_LOC(DIPBANK) \
104   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) PORT_DIPLOCATION(#DIPBANK":5,6") \
105   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) ) \
106   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) ) \
107   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) ) \
108   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
109
110#define TAITO_COINAGE_US_COIN_CONT_LOC(DIPBANK) \
111   PORT_DIPNAME( 0xc0, 0xc0, "Price to Continue" ) PORT_DIPLOCATION(#DIPBANK":7,8") \
112   PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) ) \
113   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
114   PORT_DIPSETTING(    0x80, DEF_STR( 1C_1C ) ) \
115   PORT_DIPSETTING(    0xc0, "Same as Start" )
116
117#define TAITO_COINAGE_JAPAN_OLD_LOC(DIPBANK) \
118   TAITO_COINAGE_JAPAN_OLD_COIN_A_LOC(DIPBANK) \
119   TAITO_COINAGE_JAPAN_OLD_COIN_B_LOC(DIPBANK)
120
121#define TAITO_COINAGE_JAPAN_NEW_LOC(DIPBANK) \
122   TAITO_COINAGE_JAPAN_NEW_COIN_A_LOC(DIPBANK) \
123   TAITO_COINAGE_JAPAN_NEW_COIN_B_LOC(DIPBANK)
124
125#define TAITO_COINAGE_WORLD_LOC(DIPBANK) \
126   TAITO_COINAGE_WORLD_COIN_A_LOC(DIPBANK) \
127   TAITO_COINAGE_WORLD_COIN_B_LOC(DIPBANK)
128
129#define TAITO_COINAGE_US_LOC(DIPBANK) \
130   TAITO_COINAGE_US_COIN_START_LOC(DIPBANK) \
131   TAITO_COINAGE_US_COIN_CONT_LOC(DIPBANK)
132
133
134/* without location */
135#define TAITO_COINAGE_JAPAN_OLD_COIN_A \
136   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \
137   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) ) \
138   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
139   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
140   PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
141
142#define TAITO_COINAGE_JAPAN_OLD_COIN_B \
143   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \
144   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
145   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) ) \
146   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
147   PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
148
149#define TAITO_COINAGE_JAPAN_NEW_COIN_A \
150   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \
151   PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) ) \
152   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) ) \
153   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
154   PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
155
156#define TAITO_COINAGE_JAPAN_NEW_COIN_B \
157   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \
158   PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) ) \
159   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
160   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) ) \
161   PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
162
163#define TAITO_COINAGE_WORLD_COIN_A \
164   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \
165   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) ) \
166   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) ) \
167   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) ) \
168   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
169
170#define TAITO_COINAGE_WORLD_COIN_B \
171   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \
172   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) ) \
173   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) ) \
174   PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) ) \
175   PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
176
177#define TAITO_COINAGE_US_COIN_START \
178   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) \
179   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) ) \
180   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) ) \
181   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) ) \
182   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
183
184#define TAITO_COINAGE_US_COIN_CONT \
185   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Continue_Price ) ) \
186   PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) ) \
187   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
188   PORT_DIPSETTING(    0x80, DEF_STR( 1C_1C ) ) \
189   PORT_DIPSETTING(    0xc0, "Same as Start" )
190
191#define TAITO_COINAGE_JAPAN_OLD \
192   TAITO_COINAGE_JAPAN_OLD_COIN_A \
193   TAITO_COINAGE_JAPAN_OLD_COIN_B
194
195#define TAITO_COINAGE_JAPAN_NEW \
196   TAITO_COINAGE_JAPAN_NEW_COIN_A \
197   TAITO_COINAGE_JAPAN_NEW_COIN_B
198
199#define TAITO_COINAGE_WORLD \
200   TAITO_COINAGE_WORLD_COIN_A \
201   TAITO_COINAGE_WORLD_COIN_B
202
203#define TAITO_COINAGE_US \
204   TAITO_COINAGE_US_COIN_START \
205   TAITO_COINAGE_US_COIN_CONT
206
207
208/************************** Difficulty Dip Swicthes ***************************/
209
210/* with location */
211#define TAITO_DIFFICULTY_LOC(DIPBANK) \
212   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION(#DIPBANK":1,2") \
213   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) ) \
214   PORT_DIPSETTING(    0x03, DEF_STR( Medium ) ) \
215   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) ) \
216   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
217
218/* without location */
219#define TAITO_DIFFICULTY \
220   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) \
221   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) ) \
222   PORT_DIPSETTING(    0x03, DEF_STR( Medium ) ) \
223   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) ) \
224   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
225
226
227/************************** Joysticks and buttons *****************************/
228
229/* generic (might be moved elsewhere) */
230#define INPUT_GENERIC_JOY_LOW_NIBBLE(PL, STATE, WAY, B01, B02, B04, B08) \
231   PORT_BIT( 0x01, STATE, IPT_JOYSTICK_##B01 ) WAY PORT_PLAYER(PL) \
232   PORT_BIT( 0x02, STATE, IPT_JOYSTICK_##B02 ) WAY PORT_PLAYER(PL) \
233   PORT_BIT( 0x04, STATE, IPT_JOYSTICK_##B04 ) WAY PORT_PLAYER(PL) \
234   PORT_BIT( 0x08, STATE, IPT_JOYSTICK_##B08 ) WAY PORT_PLAYER(PL)
235
236#define INPUT_GENERIC_JOY_HIGH_NIBBLE(PL, STATE, WAY, B10, B20, B40, B80) \
237   PORT_BIT( 0x10, STATE, IPT_JOYSTICK_##B10 ) WAY PORT_PLAYER(PL) \
238   PORT_BIT( 0x20, STATE, IPT_JOYSTICK_##B20 ) WAY PORT_PLAYER(PL) \
239   PORT_BIT( 0x40, STATE, IPT_JOYSTICK_##B40 ) WAY PORT_PLAYER(PL) \
240   PORT_BIT( 0x80, STATE, IPT_JOYSTICK_##B80 ) WAY PORT_PLAYER(PL)
241
242
243/* Taito generic (more might be needed) */
244#define TAITO_GENERIC_JOY_MONO_UDLR(PL) \
245   INPUT_GENERIC_JOY_LOW_NIBBLE(PL, IP_ACTIVE_LOW, PORT_8WAY, UP, DOWN, LEFT, RIGHT)
246
247#define TAITO_GENERIC_JOY_MONO_UDRL(PL) \
248   INPUT_GENERIC_JOY_LOW_NIBBLE(PL, IP_ACTIVE_LOW, PORT_8WAY, UP, DOWN, RIGHT, LEFT)
249
250#define TAITO_GENERIC_JOY_MONO_LRUD(PL) \
251   INPUT_GENERIC_JOY_LOW_NIBBLE(PL, IP_ACTIVE_LOW, PORT_8WAY, LEFT, RIGHT, UP, DOWN)
252
253#define TAITO_GENERIC_JOY_DUAL_UDLR(PL_L, PL_H) \
254   INPUT_GENERIC_JOY_LOW_NIBBLE(PL_L, IP_ACTIVE_LOW, PORT_8WAY, UP, DOWN, LEFT, RIGHT) \
255   INPUT_GENERIC_JOY_HIGH_NIBBLE(PL_H, IP_ACTIVE_LOW, PORT_8WAY, UP, DOWN, LEFT, RIGHT)
256
257#define TAITO_GENERIC_JOY_DUAL_UDRL(PL_L, PL_H) \
258   INPUT_GENERIC_JOY_LOW_NIBBLE(PL_L, IP_ACTIVE_LOW, PORT_8WAY, UP, DOWN, RIGHT, LEFT) \
259   INPUT_GENERIC_JOY_HIGH_NIBBLE(PL_H, IP_ACTIVE_LOW, PORT_8WAY, UP, DOWN, RIGHT, LEFT)
260
261
262#define TAITO_GENERIC_BUTTONS_LOW_NIBBLE(PL, STATE, BUTTON_A, BUTTON_B, BUTTON_C) \
263   PORT_BIT( 0x01, STATE, IPT_##BUTTON_A ) PORT_PLAYER(PL) \
264   PORT_BIT( 0x02, STATE, IPT_##BUTTON_B ) PORT_PLAYER(PL) \
265   PORT_BIT( 0x04, STATE, IPT_##BUTTON_C ) PORT_PLAYER(PL)
266   /* DO NOT fill bit 3 as it may be defined as START button ! */
267
268#define TAITO_GENERIC_BUTTONS_HIGH_NIBBLE(PL, STATE, BUTTON_A, BUTTON_B, BUTTON_C) \
269   PORT_BIT( 0x10, STATE, IPT_##BUTTON_A ) PORT_PLAYER(PL) \
270   PORT_BIT( 0x20, STATE, IPT_##BUTTON_B ) PORT_PLAYER(PL) \
271   PORT_BIT( 0x40, STATE, IPT_##BUTTON_C ) PORT_PLAYER(PL)
272   /* DO NOT fill bit 7 as it may be defined as START button ! */
273
274#define TAITO_GENERIC_2_BUTTONS(PL) \
275   TAITO_GENERIC_BUTTONS_HIGH_NIBBLE(PL, IP_ACTIVE_LOW, BUTTON1, BUTTON2, UNKNOWN) \
276   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
277
278#define TAITO_GENERIC_3_BUTTONS(PL) \
279   TAITO_GENERIC_BUTTONS_HIGH_NIBBLE(PL, IP_ACTIVE_LOW, BUTTON1, BUTTON2, BUTTON3) \
280   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
281
282#define TAITO_GENERIC_2_BUTTONS_START(PL) \
283   TAITO_GENERIC_BUTTONS_HIGH_NIBBLE(PL, IP_ACTIVE_LOW, BUTTON1, BUTTON2, UNKNOWN) \
284   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##PL )
285
286#define TAITO_GENERIC_3_BUTTONS_START(PL) \
287   TAITO_GENERIC_BUTTONS_HIGH_NIBBLE(PL, IP_ACTIVE_LOW, BUTTON1, BUTTON2, BUTTON3) \
288   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##PL )
289
290
291/* Taito games (more might be needed) */
292#define TAITO_JOY_UDLR_2_BUTTONS(PL) \
293   TAITO_GENERIC_JOY_MONO_UDLR(PL) \
294   TAITO_GENERIC_2_BUTTONS(PL)
295
296#define TAITO_JOY_UDLR_3_BUTTONS(PL) \
297   TAITO_GENERIC_JOY_MONO_UDLR(PL) \
298   TAITO_GENERIC_3_BUTTONS(PL)
299
300#define TAITO_JOY_UDRL_2_BUTTONS(PL) \
301   TAITO_GENERIC_JOY_MONO_UDRL(PL) \
302   TAITO_GENERIC_2_BUTTONS(PL)
303
304#define TAITO_JOY_UDRL_3_BUTTONS(PL) \
305   TAITO_GENERIC_JOY_MONO_UDRL(PL) \
306   TAITO_GENERIC_3_BUTTONS(PL)
307
308#define TAITO_JOY_LRUD_2_BUTTONS(PL) \
309   TAITO_GENERIC_JOY_MONO_LRUD(PL) \
310   TAITO_GENERIC_2_BUTTONS(PL)
311
312#define TAITO_JOY_LRUD_3_BUTTONS(PL) \
313   TAITO_GENERIC_JOY_MONO_LRUD(PL) \
314   TAITO_GENERIC_3_BUTTONS(PL)
315
316
317#define TAITO_JOY_UDLR_2_BUTTONS_START(PL) \
318   TAITO_GENERIC_JOY_MONO_UDLR(PL) \
319   TAITO_GENERIC_2_BUTTONS_START(PL)
320
321#define TAITO_JOY_UDLR_3_BUTTONS_START(PL) \
322   TAITO_GENERIC_JOY_MONO_UDLR(PL) \
323   TAITO_GENERIC_3_BUTTONS_START(PL)
324
325#define TAITO_JOY_UDRL_2_BUTTONS_START(PL) \
326   TAITO_GENERIC_JOY_MONO_UDRL(PL) \
327   TAITO_GENERIC_2_BUTTONS_START(PL)
328
329#define TAITO_JOY_UDRL_3_BUTTONS_START(PL) \
330   TAITO_GENERIC_JOY_MONO_UDRL(PL) \
331   TAITO_GENERIC_3_BUTTONS_START(PL)
332
333#define TAITO_JOY_LRUD_2_BUTTONS_START(PL) \
334   TAITO_GENERIC_JOY_MONO_LRUD(PL) \
335   TAITO_GENERIC_2_BUTTONS_START(PL)
336
337#define TAITO_JOY_LRUD_3_BUTTONS_START(PL) \
338   TAITO_GENERIC_JOY_MONO_LRUD(PL) \
339   TAITO_GENERIC_3_BUTTONS_START(PL)
340
341
342#define TAITO_JOY_DUAL_UDLR(PL_L, PL_H) \
343   TAITO_GENERIC_JOY_DUAL_UDLR(PL_L, PL_H)
344
345#define TAITO_JOY_DUAL_UDRL(PL_L, PL_H) \
346   TAITO_GENERIC_JOY_DUAL_UDRL(PL_L, PL_H)
347
src/mame/mame.mak
r841r842
16231623   $(DRIVERS)/taxidrvr.o $(VIDEO)/taxidrvr.o \
16241624   $(DRIVERS)/tcl.o \
16251625   $(DRIVERS)/tetriunk.o \
1626   $(DRIVERS)/thayers.o \
16261627   $(DRIVERS)/thedeep.o $(VIDEO)/thedeep.o \
16271628   $(DRIVERS)/tiamc1.o $(VIDEO)/tiamc1.o $(AUDIO)/tiamc1.o \
16281629   $(DRIVERS)/tickee.o $(VIDEO)/tickee.o \
src/mame/video/nemesis.c
r841r842
3939}
4040sprite_data[8] =
4141{
42   { 32, 32, 4 }, { 16, 32, 5 }, { 32, 16, 2 }, { 64, 64, 3 },
42   { 32, 32, 4 }, { 16, 32, 5 }, { 32, 16, 2 }, { 64, 64, 7 },
4343   {  8,  8, 0 }, { 16,  8, 6 }, {  8, 16, 3 }, { 16, 16, 1 }
4444};
4545
src/mame/video/deco16ic.c
r841r842
993993
994994      src_x &= width_mask;
995995
996      for (x=0; x<320; x++) {
997         if (rowscroll_ptr && (control1&0x20))
998            column_offset=rowscroll_ptr[0x200 + ((src_x&0x1ff) / col_type)];
999         else
1000            column_offset=0;
996      if (bitmap->bpp == 16)
997      {
998         for (x=0; x<320; x++) {
999            if (rowscroll_ptr && (control1&0x20))
1000               column_offset=rowscroll_ptr[0x200 + ((src_x&0x1ff) / col_type)];
1001            else
1002               column_offset=0;
10011003
1002         p=*BITMAP_ADDR16(src_bitmap0, (src_y + column_offset)&height_mask, src_x);
1003         if (src_bitmap1)
1004            p|=(*BITMAP_ADDR16(src_bitmap1, (src_y + column_offset)&height_mask, src_x)&combine_mask)<<combine_shift;
1004            p=*BITMAP_ADDR16(src_bitmap0, (src_y + column_offset)&height_mask, src_x);
1005            if (src_bitmap1)
1006               p|=(*BITMAP_ADDR16(src_bitmap1, (src_y + column_offset)&height_mask, src_x)&combine_mask)<<combine_shift;
10051007
1006         src_x=(src_x+1)&width_mask;
1007         if ((flags&TILEMAP_DRAW_OPAQUE) || (p&trans_mask))
1008         {
1009            *BITMAP_ADDR16(bitmap, y, x) = Machine->pens[p];
1010            if (priority_bitmap)
1008            src_x=(src_x+1)&width_mask;
1009            if ((flags&TILEMAP_DRAW_OPAQUE) || (p&trans_mask))
10111010            {
1012               UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
1013               pri[x]|=priority;
1011               *BITMAP_ADDR16(bitmap, y, x) = Machine->pens[p];
1012               if (priority_bitmap)
1013               {
1014                  UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
1015                  pri[x]|=priority;
1016               }
10141017            }
10151018         }
10161019      }
1020      else
1021      {
1022         /* boogwing */
1023         for (x=0; x<320; x++) {
1024            if (rowscroll_ptr && (control1&0x20))
1025               column_offset=rowscroll_ptr[0x200 + ((src_x&0x1ff) / col_type)];
1026            else
1027               column_offset=0;
1028
1029            p=*BITMAP_ADDR16(src_bitmap0, (src_y + column_offset)&height_mask, src_x);
1030            if (src_bitmap1)
1031               p|=(*BITMAP_ADDR16(src_bitmap1, (src_y + column_offset)&height_mask, src_x)&combine_mask)<<combine_shift;
1032
1033            src_x=(src_x+1)&width_mask;
1034            if ((flags&TILEMAP_DRAW_OPAQUE) || (p&trans_mask))
1035            {
1036               *BITMAP_ADDR32(bitmap, y, x) = Machine->pens[p];
1037               if (priority_bitmap)
1038               {
1039                  UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
1040                  pri[x]|=priority;
1041               }
1042            }
1043         }
1044      }
10171045      src_y=(src_y+1)&height_mask;
10181046   }
10191047}
src/mame/layout/slots.lay
r841r842
6363         <bounds x="0" y="0.1" width="1" height="0.8" />
6464      </text>
6565   </element>
66
67   <element name="matrixlamp">
68      <rect state ="0">
69         <bounds x="0" y="0" width="7" height="7" />
70         <color red="0.7" green="0.7" blue="0.7" />
71      </rect>
72      <rect state ="1">
73         <bounds x="0" y="0" width="7" height="7" />
74         <color red="0.0" green="0.0" blue="1.0" />
75      </rect>
76      <rect state ="2">
77         <bounds x="0" y="0" width="7" height="7" />
78         <color red="0.0" green="1.0" blue="0.0" />
79      </rect>
80   </element>
8166   <element name="door0" defstate="1">
8267      <rect state="0">
8368         <color red="1.0" green="1.0" blue="1.0" />
r841r842
9378   </led14segsc>
9479   </element>
9580
81   <view name="Adder and Lamps">
82      <bezel name="lamp1" element="slot1">
83         <bounds x="145" y="280" width="26" height="14" />
84      </bezel>
85      <bezel name="lamp3" element="slot2">
86         <bounds x="175" y="280" width="26" height="14" />
87      </bezel>
88      <bezel name="lamp5" element="slot3">
89         <bounds x="205" y="280" width="26" height="14" />
90      </bezel>
91      <bezel name="lamp6" element="slot4">
92         <bounds x="235" y="280" width="26" height="14" />
93      </bezel>
94      <bezel name="lamp7" element="enter">
95         <bounds x="265" y="280" width="26" height="14" />
96      </bezel>
97      <bezel name="lamp18" element="p1start">
98         <bounds x="295" y="280" width="26" height="14" />
99      </bezel>
100      <bezel name="lamp17" element="p2start">
101         <bounds x="325" y="280" width="26" height="14" />
102      </bezel>
103      <bezel name="door" element="door0">
104         <bounds x="370" y="280" width="26" height="14" />
105      </bezel>
106      <screen index="0">
107         <bounds x="0" y="0" width="400" height="280" />
108      </screen>
109   </view>
96110   <view name="Adder,VFD and Lamps">
97111      <bezel name="lamp1" element="slot1">
98112         <bounds x="145" y="280" width="26" height="14" />
r841r842
171185      </screen>
172186   </view>
173187</mamelayout>
174
src/mame/layout/gldncrwn.lay
r841r842
5454         <bounds x="0" y="0.1" width="1" height="0.8" />
5555      </text>
5656   </element>
57
5857   <element name="start" defstate="0">
5958      <rect>
6059         <color red="1.0" green="1.0" blue="1.0" />
r841r842
7372         <bounds x="0" y="0.1" width="1" height="0.8" />
7473      </text>
7574   </element>
76   <element name="matrixlamp">
77      <rect state ="0">
78         <bounds x="0" y="0" width="7" height="7" />
79         <color red="0.7" green="0.7" blue="0.7" />
80      </rect>
81      <rect state ="1">
82         <bounds x="0" y="0" width="7" height="7" />
83         <color red="0.0" green="0.0" blue="1.0" />
84      </rect>
85      <rect state ="2">
86         <bounds x="0" y="0" width="7" height="7" />
87         <color red="0.0" green="1.0" blue="0.0" />
88      </rect>
89   </element>
9075   <element name="vfd0">
9176   <led14segsc>
9277         <color red="0" green="0.6" blue="1.0" />
9378   </led14segsc>
9479   </element>
80
81   <view name="Adder and Lamps">
82      <bezel name="lamp1" element="reel1">
83         <bounds x="145" y="280" width="26" height="14" />
84      </bezel>
85      <bezel name="lamp2" element="reel2">
86         <bounds x="175" y="280" width="26" height="14" />
87      </bezel>
88      <bezel name="lamp3" element="reel3">
89         <bounds x="205" y="280" width="26" height="14" />
90      </bezel>
91      <bezel name="lamp5" element="reel4">
92         <bounds x="235" y="280" width="26" height="14" />
93      </bezel>
94      <bezel name="lamp6" element="reel5">
95         <bounds x="265" y="280" width="26" height="14" />
96      </bezel>
97      <bezel name="lamp7" element="reel6">
98         <bounds x="295" y="280" width="26" height="14" />
99      </bezel>
100      <bezel name="lamp0" element="collect">
101         <bounds x="325" y="280" width="26" height="14" />
102      </bezel>
103      <bezel name="lamp16" element="start">
104         <bounds x="355" y="280" width="26" height="14" />
105      </bezel>
106      <screen index="0">
107         <bounds x="0" y="0" width="400" height="280" />
108      </screen>
109   </view>
95110   <view name="Adder,VFD and Lamps">
96111      <bezel name="lamp1" element="reel1">
97112         <bounds x="145" y="280" width="26" height="14" />
r841r842
170185      </screen>
171186   </view>
172187</mamelayout>
173
174
src/mame/layout/sltblgpo.lay
r841r842
4545         <bounds x="0" y="0.1" width="1" height="0.8" />
4646      </text>
4747   </element>
48   <element name="matrixlamp">
49      <rect state ="0">
50         <bounds x="0" y="0" width="7" height="7" />
51         <color red="0.7" green="0.7" blue="0.7" />
52      </rect>
53      <rect state ="1">
54         <bounds x="0" y="0" width="7" height="7" />
55         <color red="0.0" green="0.0" blue="1.0" />
56      </rect>
57      <rect state ="2">
58         <bounds x="0" y="0" width="7" height="7" />
59         <color red="0.0" green="1.0" blue="0.0" />
60      </rect>
61   </element>
6248   <element name="door0" defstate="1">
6349      <rect state="0">
6450         <color red="1.0" green="1.0" blue="1.0" />
r841r842
7460   </led14segsc>
7561   </element>
7662
63   <view name="Adder and Lamps">
64      <bezel name="lamp1" element="slot1">
65         <bounds x="145" y="280" width="26" height="14" />
66      </bezel>
67      <bezel name="lamp3" element="slot2">
68         <bounds x="175" y="280" width="26" height="14" />
69      </bezel>
70      <bezel name="lamp5" element="slot3">
71         <bounds x="205" y="280" width="26" height="14" />
72      </bezel>
73      <bezel name="lamp6" element="slot4">
74         <bounds x="235" y="280" width="26" height="14" />
75      </bezel>
76      <bezel name="lamp7" element="start">
77         <bounds x="265" y="280" width="26" height="14" />
78      </bezel>
79      <bezel name="door" element="door0">
80         <bounds x="370" y="280" width="26" height="14" />
81      </bezel>
82      <screen index="0">
83         <bounds x="0" y="0" width="400" height="280" />
84      </screen>
85   </view>
7786   <view name="Adder,VFD and Lamps">
7887      <bezel name="lamp1" element="slot1">
7988         <bounds x="145" y="280" width="26" height="14" />
r841r842
146155      </screen>
147156   </view>
148157</mamelayout>
149
src/mame/layout/sltblgtk.lay
r841r842
6363         <bounds x="0" y="0.1" width="1" height="0.8" />
6464      </text>
6565   </element>
66   <element name="matrixlamp">
67      <rect state ="0">
68         <bounds x="0" y="0" width="7" height="7" />
69         <color red="0.7" green="0.7" blue="0.7" />
70      </rect>
71      <rect state ="1">
72         <bounds x="0" y="0" width="7" height="7" />
73         <color red="0.0" green="0.0" blue="1.0" />
74      </rect>
75      <rect state ="2">
76         <bounds x="0" y="0" width="7" height="7" />
77         <color red="0.0" green="1.0" blue="0.0" />
78      </rect>
79   </element>
8066   <element name="door0" defstate="1">
8167      <rect state="0">
8268         <color red="1.0" green="1.0" blue="1.0" />
r841r842
9278   </led14segsc>
9379   </element>
9480
81   <view name="Adder and Lamps">
82      <bezel name="lamp1" element="slot1">
83         <bounds x="145" y="280" width="26" height="14" />
84      </bezel>
85      <bezel name="lamp3" element="slot2">
86         <bounds x="175" y="280" width="26" height="14" />
87      </bezel>
88      <bezel name="lamp5" element="slot3">
89         <bounds x="205" y="280" width="26" height="14" />
90      </bezel>
91      <bezel name="lamp6" element="slot4">
92         <bounds x="235" y="280" width="26" height="14" />
93      </bezel>
94      <bezel name="lamp7" element="enter">
95         <bounds x="265" y="280" width="26" height="14" />
96      </bezel>
97      <bezel name="lamp18" element="p1start">
98         <bounds x="295" y="280" width="26" height="14" />
99      </bezel>
100      <bezel name="lamp17" element="p2start">
101         <bounds x="325" y="280" width="26" height="14" />
102      </bezel>
103      <bezel name="door" element="door0">
104         <bounds x="370" y="280" width="26" height="14" />
105      </bezel>
106      <screen index="0">
107         <bounds x="0" y="0" width="400" height="280" />
108      </screen>
109   </view>
95110   <view name="Adder,VFD and Lamps">
96111      <bezel name="lamp1" element="slot1">
97112         <bounds x="145" y="280" width="26" height="14" />
r841r842
165180      <bezel name="vfd15" element="vfd0" state="0">
166181         <bounds x="135" y="280" width="9" height="14"/>
167182      </bezel>
168     
169183      <screen index="0">
170184         <bounds x="0" y="0" width="400" height="280" />
171185      </screen>
172186   </view>
173187</mamelayout>
174
src/mame/layout/pyramid.lay
r841r842
4545         <bounds x="0" y="0.1" width="1" height="0.8" />
4646      </text>
4747   </element>
48   <element name="matrixlamp">
49      <rect state ="0">
50         <bounds x="0" y="0" width="7" height="7" />
51         <color red="0.7" green="0.7" blue="0.7" />
52      </rect>
53      <rect state ="1">
54         <bounds x="0" y="0" width="7" height="7" />
55         <color red="0.0" green="0.0" blue="1.0" />
56      </rect>
57      <rect state ="2">
58         <bounds x="0" y="0" width="7" height="7" />
59         <color red="0.0" green="1.0" blue="0.0" />
60      </rect>
61   </element>
6248   <element name="door0" defstate="1">
6349      <rect state="0">
6450         <color red="1.0" green="1.0" blue="1.0" />
r841r842
7460   </led14segsc>
7561   </element>
7662
63   <view name="Adder and Lamps">
64      <bezel name="lamp3" element="left">
65         <bounds x="145" y="280" width="28" height="14" />
66      </bezel>
67      <bezel name="lamp4" element="up">
68         <bounds x="180" y="280" width="28" height="14" />
69      </bezel>
70      <bezel name="lamp5" element="right">
71         <bounds x="215" y="280" width="28" height="14" />
72      </bezel>
73      <bezel name="lamp7" element="enter">
74         <bounds x="250" y="280" width="28" height="14" />
75      </bezel>
76      <bezel name="lamp0" element="start">
77         <bounds x="285" y="280" width="28" height="14" />
78      </bezel>
79      <bezel name="door" element="door0">
80         <bounds x="370" y="280" width="28" height="14" />
81      </bezel>
82      <screen index="0">
83         <bounds x="0" y="0" width="400" height="280" />
84      </screen>
85   </view>
7786   <view name="Adder,VFD and Lamps">
7887      <bezel name="lamp3" element="left">
7988         <bounds x="145" y="280" width="28" height="14" />
r841r842
146155      </screen>
147156   </view>
148157</mamelayout>
149
src/mame/layout/paradice.lay
r841r842
5454         <bounds x="0" y="0.1" width="1" height="0.8" />
5555      </text>
5656   </element>
57   <element name="matrixlamp">
58      <rect state ="0">
59         <bounds x="0" y="0" width="7" height="7" />
60         <color red="0.7" green="0.7" blue="0.7" />
61      </rect>
62      <rect state ="1">
63         <bounds x="0" y="0" width="7" height="7" />
64         <color red="0.0" green="0.0" blue="1.0" />
65      </rect>
66      <rect state ="2">
67         <bounds x="0" y="0" width="7" height="7" />
68         <color red="0.0" green="1.0" blue="0.0" />
69      </rect>
70   </element>
7157   <element name="door0" defstate="1">
7258      <rect state="0">
7359         <color red="1.0" green="1.0" blue="1.0" />
r841r842
8268         <color red="0" green="0.6" blue="1.0" />
8369   </led14segsc>
8470   </element>
71
72   <view name="Adder and Lamps">
73      <bezel name="lamp0" element="p1start">
74         <bounds x="145" y="280" width="28" height="14" />
75      </bezel>
76      <bezel name="lamp1" element="p2start">
77         <bounds x="180" y="280" width="28" height="14" />
78      </bezel>
79      <bezel name="lamp3" element="a">
80         <bounds x="215" y="280" width="28" height="14" />
81      </bezel>
82      <bezel name="lamp4" element="b">
83         <bounds x="250" y="280" width="28" height="14" />
84      </bezel>
85      <bezel name="lamp5" element="c">
86         <bounds x="285" y="280" width="28" height="14" />
87      </bezel>
88      <bezel name="lamp7" element="enter">
89         <bounds x="320" y="280" width="28" height="14" />
90      </bezel>
91      <bezel name="door" element="door0">
92         <bounds x="370" y="280" width="28" height="14" />
93      </bezel>
94      <screen index="0">
95         <bounds x="0" y="0" width="400" height="280" />
96      </screen>
97   </view>
8598   <view name="Adder,VFD and Lamps">
8699      <bezel name="lamp0" element="p1start">
87100         <bounds x="145" y="280" width="28" height="14" />
r841r842
157170      </screen>
158171   </view>
159172</mamelayout>
160
src/mame/layout/bfm_sc2.lay
r841r842
2828         <color red="0" green="0.6" blue="1.0" />
2929   </led14segsc>
3030   </element>
31
3132   <view name="Adder,VFD and Lamp Matrix">
3233      <backdrop name="lamp0" element="matrixlamp" state="0">
3334         <bounds x="0" y="0" width="7" height="7"/>
r841r842
6869      <backdrop name="lamp12" element="matrixlamp" state="0">
6970         <bounds x="96" y="0" width="7" height="7"/>
7071      </backdrop>
71
7272      <backdrop name="lamp13" element="matrixlamp" state="0">
7373         <bounds x="104" y="0" width="7" height="7"/>
7474      </backdrop>
src/mame/layout/quintoon.lay
r841r842
5454         <bounds x="0" y="0.1" width="1" height="0.8" />
5555      </text>
5656   </element>
57
58   <element name="matrixlamp">
59      <rect state ="0">
60         <bounds x="0" y="0" width="7" height="7" />
61         <color red="0.7" green="0.7" blue="0.7" />
62      </rect>
63      <rect state ="1">
64         <bounds x="0" y="0" width="7" height="7" />
65         <color red="0.0" green="0.0" blue="1.0" />
66      </rect>
67      <rect state ="2">
68         <bounds x="0" y="0" width="7" height="7" />
69         <color red="0.0" green="1.0" blue="0.0" />
70      </rect>
71   </element>
7257   <element name="door0" defstate="1">
7358      <rect state="0">
7459         <color red="1.0" green="1.0" blue="1.0" />
r841r842
8469   </led14segsc>
8570   </element>
8671
72   <view name="Adder and Lamps">
73      <bezel name="lamp1" element="hand1">
74         <bounds x="145" y="280" width="28" height="14" />
75      </bezel>
76      <bezel name="lamp2" element="hand2">
77         <bounds x="180" y="280" width="28" height="14" />
78      </bezel>
79      <bezel name="lamp3" element="hand3">
80         <bounds x="215" y="280" width="28" height="14" />
81      </bezel>
82      <bezel name="lamp4" element="hand4">
83         <bounds x="250" y="280" width="28" height="14" />
84      </bezel>
85      <bezel name="lamp5" element="hand5">
86         <bounds x="285" y="280" width="28" height="14" />
87      </bezel>
88      <bezel name="lamp7" element="start">
89         <bounds x="320" y="280" width="28" height="14" />
90      </bezel>
91      <bezel name="door" element="door0">
92         <bounds x="370" y="280" width="28" height="14" />
93      </bezel>
94      <screen index="0">
95         <bounds x="0" y="0" width="400" height="280" />
96      </screen>
97   </view>
8798   <view name="Adder,VFD and Lamps">
8899      <bezel name="lamp1" element="hand1">
89100         <bounds x="145" y="280" width="28" height="14" />
r841r842
159170      </screen>
160171   </view>
161172</mamelayout>
162
src/mame/layout/pokio.lay
r841r842
4545         <bounds x="0" y="0.1" width="1" height="0.8" />
4646      </text>
4747   </element>
48
4948   <element name="p2start" defstate="0">
5049      <rect>
5150         <color red="1.0" green="1.0" blue="1.0" />
r841r842
5554         <bounds x="0" y="0.1" width="1" height="0.8" />
5655      </text>
5756   </element>
58
59   <element name="matrixlamp">
60      <rect state ="0">
61         <bounds x="0" y="0" width="7" height="7" />
62         <color red="0.7" green="0.7" blue="0.7" />
63      </rect>
64      <rect state ="1">
65         <bounds x="0" y="0" width="7" height="7" />
66         <color red="0.0" green="0.0" blue="1.0" />
67      </rect>
68      <rect state ="2">
69         <bounds x="0" y="0" width="7" height="7" />
70         <color red="0.0" green="1.0" blue="0.0" />
71      </rect>
72   </element>
7357   <element name="door0" defstate="1">
7458      <rect state="0">
7559         <color red="1.0" green="1.0" blue="1.0" />
r841r842
8569   </led14segsc>
8670   </element>
8771
72   <view name="Adder and Lamps">
73      <bezel name="lamp0" element="hand1">
74         <bounds x="145" y="280" width="26" height="14" />
75      </bezel>
76      <bezel name="lamp1" element="hand2">
77         <bounds x="173" y="280" width="26" height="14" />
78      </bezel>
79      <bezel name="lamp2" element="hand3">
80         <bounds x="201" y="280" width="26" height="14" />
81      </bezel>
82      <bezel name="lamp3" element="p1start">
83         <bounds x="229" y="280" width="26" height="14" />
84      </bezel>
85      <bezel name="lamp4" element="enter">
86         <bounds x="257" y="280" width="26" height="14" />
87      </bezel>
88      <bezel name="lamp5" element="p2start">
89         <bounds x="285" y="280" width="26" height="14" />
90      </bezel>
91      <bezel name="lamp16" element="hand1">
92         <bounds x="313" y="280" width="26" height="14" />
93      </bezel>
94      <bezel name="lamp7" element="hand2">
95         <bounds x="341" y="280" width="26" height="14" />
96      </bezel>
97      <bezel name="lamp6" element="hand3">
98         <bounds x="369" y="280" width="26" height="14" />
99      </bezel>
100      <bezel name="door" element="door0">
101         <bounds x="369" y="260" width="26" height="14" />
102      </bezel>
103      <screen index="0">
104         <bounds x="0" y="0" width="400" height="280" />
105      </screen>
106   </view>
88107   <view name="Adder,VFD and Lamps">
89108      <bezel name="lamp0" element="hand1">
90109         <bounds x="145" y="280" width="26" height="14" />
r841r842
169188      </screen>
170189   </view>
171190</mamelayout>
172
src/mame/drivers/mitchell.c
r841r842
120120extern UINT8 *pang_colorram;
121121
122122extern size_t pang_videoram_size;
123static UINT8 pang_port5_kludge = 0;
123124
124125
125126
r841r842
187188   if (cpu_getiloops() & 1) bit |= 0x01;
188189   else bit |= 0x08;
189190
190   {
191      static const game_driver *mitchell_driver = NULL;
192      static int pang_port5_kludge = 0;
193
194      /* Only compute pang_port5_kludge when confronted with a new gamedrv */
195      if (mitchell_driver != Machine->gamedrv)
196      {
197         mitchell_driver = Machine->gamedrv;
198         if (strcmp(mitchell_driver->name, "mgakuen2") == 0)
199            pang_port5_kludge = 0;
200         else
201            pang_port5_kludge = 1;
202      }
203191      if (pang_port5_kludge)   /* hack... music doesn't work otherwise */
204192         bit ^= 0x08;
205   }
206193
207194   return (input_port_0_r(0) & 0x76) | bit;
208195}
r841r842
19581945static void configure_banks(void)
19591946{
19601947   memory_configure_bank(1, 0, 16, memory_region(REGION_CPU1) + 0x10000, 0x4000);
1948   pang_port5_kludge = 0;
19611949}
19621950
19631951
r841r842
20532041   nvram_size = 0;
20542042   mgakuen2_decode();
20552043   configure_banks();
2044   pang_port5_kludge = 1;
20562045}
2046static DRIVER_INIT( pkladies )
2047{
2048   input_type = 1;
2049   nvram_size = 0;
2050   mgakuen2_decode();
2051   configure_banks();
2052}
20572053static DRIVER_INIT( marukin )
20582054{
20592055   input_type = 1;
r841r842
21282124GAME( 1988, mgakuen,  0,        mgakuen, mgakuen,  mgakuen,  ROT0,   "Yuga", "Mahjong Gakuen", 0 )
21292125GAME( 1988, 7toitsu,  mgakuen,  mgakuen, mgakuen,  mgakuen,  ROT0,   "Yuga", "Chi-Toitsu", 0 )
21302126GAME( 1989, mgakuen2, 0,        marukin, marukin,  mgakuen2, ROT0,   "Face", "Mahjong Gakuen 2 Gakuen-chou no Fukushuu", 0 )
2131GAME( 1989, pkladies, 0,        marukin, pkladies, mgakuen2, ROT0,   "Mitchell", "Poker Ladies", 0 )
2132GAME( 1989, pkladiel, pkladies, marukin, pkladies, mgakuen2, ROT0,   "Leprechaun", "Poker Ladies (Leprechaun ver. 510)", 0 )
2133GAME( 1989, pkladila, pkladies, marukin, pkladies, mgakuen2, ROT0,   "Leprechaun", "Poker Ladies (Leprechaun ver. 401)", 0 )
2127GAME( 1989, pkladies, 0,        marukin, pkladies, pkladies, ROT0,   "Mitchell", "Poker Ladies", 0 )
2128GAME( 1989, pkladiel, pkladies, marukin, pkladies, pkladies, ROT0,   "Leprechaun", "Poker Ladies (Leprechaun ver. 510)", 0 )
2129GAME( 1989, pkladila, pkladies, marukin, pkladies, pkladies, ROT0,   "Leprechaun", "Poker Ladies (Leprechaun ver. 401)", 0 )
21342130GAME( 1989, dokaben,  0,        pang,    pang,     dokaben,  ROT0,   "Capcom", "Dokaben (Japan)", 0 )
21352131GAME( 1989, pang,     0,        pang,    pang,     pang,     ROT0,   "Mitchell", "Pang (World)", 0 )
21362132GAME( 1989, pangb,    pang,     pang,    pang,     pangb,    ROT0,   "bootleg", "Pang (bootleg)", 0 )
src/mame/drivers/polepos.c
r841r842
542542   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
543543
544544   PORT_START /* IN1 - Brake */
545   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_CODE_INC(KEYCODE_LALT) PORT_NAME("Brake Pedal")
545   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
546546
547547   PORT_START /* IN2 - Accel */
548   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_CODE_INC(KEYCODE_LCONTROL) PORT_NAME("Gas Pedal")
548   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
549549
550550   PORT_START /* IN3 - Steering */
551   PORT_BIT ( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(4) PORT_NAME("Steering")
551   PORT_BIT ( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(4)
552552INPUT_PORTS_END
553553
554554
r841r842
614614   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
615615
616616   PORT_START /* IN1 - Brake */
617   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_CODE_INC(KEYCODE_LALT)
617   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
618618
619619   PORT_START /* IN2 - Accel */
620   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_CODE_INC(KEYCODE_LCONTROL)
620   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
621621
622622   PORT_START /* IN3 - Steering */
623623   PORT_BIT ( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(4)
r841r842
686686   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
687687
688688   PORT_START /* IN1 - Brake */
689   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_CODE_INC(KEYCODE_LALT)
689   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
690690
691691   PORT_START /* IN2 - Accel */
692   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_CODE_INC(KEYCODE_LCONTROL)
692   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
693693
694694   PORT_START /* IN3 - Steering */
695695   PORT_BIT ( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(4)
r841r842
756756   PORT_DIPSETTING(   0x00, DEF_STR( High ) )
757757
758758   PORT_START /* IN1 - Brake */
759   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_CODE_INC(KEYCODE_LALT)
759   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
760760
761761   PORT_START /* IN2 - Accel */
762   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_CODE_INC(KEYCODE_LCONTROL)
762   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
763763
764764   PORT_START /* IN3 - Steering */
765765   PORT_BIT ( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(4)
src/mame/drivers/gdrawpkr.c
r841r842
3030    --- General Notes ---
3131
3232
33    Gaming Draw Poker:
34
3335    Gaming Draw Poker, formerly known as Jack Potten's poker, is an evolution of the
3436    mentioned game. It was created by Cal Omega in 1981 for Casino Electronics Inc.
3537    Cal Omega was bought out by CEI (Casino Electronics Inc.), and CEI was bought by UCMC.
r841r842
5052    For payout, press "Manual Collect" an then "Payout" for each credit (manual mode).
5153
5254
55    El Grande - 5 Card Draw:
5356
57    This game was created by Tuni Electro Service and was licenced to E.T. Marketing,Inc.
58    This is the new version. The old one is still undumped, but looks like Golden Poker D-Up.
59
60    Flyer: http://www.arcadeflyers.com/?page=thumbs&db=videodb&id=4542
61
62    The code never write to offsets 0x840/0x841, so I assume that the AY8912 is connected to PIAs output.
63    Inputs are multiplexed and selected through PIA1, portB.
64    There aren't meter and stats modes. Only for amusement, so... no payout.
65    To clear credits press F2.
66    To enter to TEST MODE press F2 twice. Press "Hold 1" + "Hold 2" + "Hold 3" to exit.
67
68
69
5470***********************************************************************************?
5571
5672
57    --- Dumper notes (old) ---
73    Dumper notes (old)
5874
5975
76    -- Gaming Draw Poker --------------------------------------------------------
77
6078    Program roms are roms 23*.*, on the board, there is a number near each roms
6179    looks to be the address of the rom :
6280
r841r842
85103    The sound rom is missing on the board :(
86104
87105
106    -- El Grande 5 Card Draw ----------------------------------------------------
107
108    ROM text showed poker stuff and "TUNI" "1982"
109
110    .u6    2716
111    .u7    2516
112    .u8    2516
113    .u9    2516
114    .u67   2516
115    .u68   2516
116    .u69   2716
117    .u70   2716
118    .u28   82s129
119
120    6502
121    HD46505
122    AY-3-8912
123    MC6821P x2
124    TC5501  x2
125    10MHz Crystal
126
127    empty socket at u5
128
129
88130***********************************************************************************
89131
90132
r841r842
115157
116158
117159
160    *** MC6545 conditional change for elgrande if 0x8c4 (PIA) has bit7 activated ***
161
162    ---------------------------------------------------------
163    register:  R00   R01   R02   R03   R04   R05   R06   R07
164    ---------------------------------------------------------
165    value:     0x27  0x20  0x23  0x03  0x26  0x00  0x20  0x22
166
167
168
118169***********************************************************************************
119170
120171
172    [2007-08-13]
173
174    - Added "El Grande - 5 Card Draw" (new).
175    - Constructed a new memory map for this game.
176    - Reworked a whole set of inputs for this game.
177    - Patched some bad bits in GFX rom d1.u68 till a good dump appear.
178    - Updated technical notes.
179
180
121181    [2007-07-23]
122182
123183    - Cleaned up the inputs.
r841r842
144204    - Added technical notes.
145205
146206
147    TODO (in progress):
207    TODO:
148208
209    - Add sound support to elgrande.
149210    - Fix lamps.
150211    - Clean up the driver.
151212
r841r842
193254   if (attr == 0x3a)   /* Is the palette wrong? */
194255      color = 0x3b;   /* 0x3b is the best match */
195256
196//  if (attr == 0x36)   /* Is the palette wrong? */
197//      color = 0x3e;   /* 0x3e is the best match */
198
199//  if (attr == 0x32)   /* Is the palette wrong? */
200//      color = 0x3a;   /* 0x3a is the best match */
201
202257   SET_TILE_INFO(bank, code, color, 0);
203258}
204259
r841r842
268323   AM_RANGE(0xd800, 0xffff) AM_ROM
269324ADDRESS_MAP_END
270325
326static ADDRESS_MAP_START( elgrande_map, ADDRESS_SPACE_PROGRAM, 8 )
327   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
328   AM_RANGE(0x0880, 0x0880) AM_WRITE(crtc6845_address_w)
329   AM_RANGE(0x0881, 0x0881) AM_READWRITE(crtc6845_register_r, crtc6845_register_w)
330   AM_RANGE(0x08c4, 0x08c7) AM_READWRITE(pia_0_r, pia_0_w)
331   AM_RANGE(0x08c8, 0x08cb) AM_READWRITE(pia_1_r, pia_1_w)
332   AM_RANGE(0x1000, 0x13ff) AM_RAM AM_WRITE(gdrawpkr_videoram_w) AM_BASE(&videoram)
333   AM_RANGE(0x1400, 0x17ff) AM_RAM AM_WRITE(gdrawpkr_colorram_w) AM_BASE(&colorram)
334   AM_RANGE(0x2000, 0x3fff) AM_ROM
335   AM_RANGE(0xf800, 0xffff) AM_ROM
336ADDRESS_MAP_END
271337
338
272339/*************************
273340*      Input ports       *
274341*************************/
r841r842
341408   PORT_DIPSETTING(    0x40, "10" )
342409   PORT_DIPSETTING(    0x80, "40" )
343410   PORT_DIPSETTING(    0xC0, "80" )
411INPUT_PORTS_END
344412
345   PORT_START_TAG("SW2")
346   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
347   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
348   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
349   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
350   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
351   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
352   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
353   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
354   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
355   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
356   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
357   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
358   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
359   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
360   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
361   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
362   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
363   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
364   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
365   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
366   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
367   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
368   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
369   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
413INPUT_PORTS_START( elgrande )
414   PORT_START_TAG("IN0-0")
415   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 )
416   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
417   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Double Up") PORT_CODE(KEYCODE_3)
418   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Deal/Draw") PORT_CODE(KEYCODE_2)
419   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Cancel Holds") PORT_CODE(KEYCODE_N)
420   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
421   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
422   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
370423
371   PORT_START_TAG("SW3")
424   PORT_START_TAG("IN0-1")
425   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
426   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
427   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service") PORT_CODE(KEYCODE_8)
428   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
429   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
430   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
431   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
432   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
433
434   PORT_START_TAG("IN0-2")
435   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Hold 1") PORT_CODE(KEYCODE_Z)
436   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Hold 2") PORT_CODE(KEYCODE_X)
437   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Hold 3") PORT_CODE(KEYCODE_C)
438   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("Hold 4") PORT_CODE(KEYCODE_V)
439   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_NAME("Hold 5") PORT_CODE(KEYCODE_B)
440   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
441   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
442   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
443
444   PORT_START_TAG("IN0-3")
445   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") PORT_CODE(KEYCODE_F2)
446   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Bet") PORT_CODE(KEYCODE_1)
447   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Take") PORT_CODE(KEYCODE_4)
448   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Odd") PORT_CODE(KEYCODE_A)
449   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Even") PORT_CODE(KEYCODE_S)
450   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
451   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
452   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
453
454   PORT_START_TAG("SW1")
372455   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
373456   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
374457   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
r841r842
381464   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
382465   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
383466   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
384   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
385   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
386   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
387   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
388   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
389   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
390   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
391   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
392   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
393   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
394   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
395   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
467   PORT_DIPNAME( 0x30, 0x20, "Minimum Winning Hand")
468   PORT_DIPSETTING(    0x20, "Jacks or Better" )
469   PORT_DIPSETTING(    0x30, "Queens or Better" )
470   PORT_DIPSETTING(    0x00, "Kings or Better" )
471   PORT_DIPSETTING(    0x10, "Aces or Better" )
472   PORT_DIPNAME( 0xC0, 0x40, "Maximum Bet")
473   PORT_DIPSETTING(    0x00, "5" )
474   PORT_DIPSETTING(    0x40, "10" )
475   PORT_DIPSETTING(    0x80, "20" )
476   PORT_DIPSETTING(    0xC0, "50" )
396477INPUT_PORTS_END
397478
398479
r841r842
523604static const pia6821_interface pia1_intf =
524605{
525606   /* PIA inputs: A, B, CA1, CB1, CA2, CB2 */
526   input_port_4_r, input_port_5_r, input_port_6_r, 0, 0, 0,   /* 5 & 6 not tested */
607   input_port_4_r, 0, 0, 0, 0, 0,   /* 5 & 6 not tested */
527608
528609   /* PIA outputs: A, B, CA2, CB2 */
529610
r841r842
540621
541622static MACHINE_DRIVER_START( gdrawpkr )
542623   // basic machine hardware
543   MDRV_CPU_ADD(M6502, 10000000/12)   /* guessing... */
624   MDRV_CPU_ADD_TAG("main", M6502, 10000000/12)   /* guessing... */
544625   MDRV_CPU_PROGRAM_MAP(gdrawpkr_map, 0)
545626   MDRV_CPU_VBLANK_INT(irq0_line_hold, 1)
546627
r841r842
570651
571652MACHINE_DRIVER_END
572653
654static MACHINE_DRIVER_START( elgrande )
655   MDRV_IMPORT_FROM(gdrawpkr)
656   MDRV_CPU_MODIFY("main")
657   MDRV_CPU_PROGRAM_MAP(elgrande_map, 0)
658MACHINE_DRIVER_END
573659
660
574661/*************************
575662*        Rom Load        *
576663*************************/
r841r842
595682   ROM_LOAD( "82s129n.u28", 0x0000, 0x0100, CRC(6db5a344) SHA1(5f1a81ac02a2a74252decd3bb95a5436cc943930) )
596683ROM_END
597684
685ROM_START( elgrande )
686   ROM_REGION( 0x10000, REGION_CPU1, 0 )
687   ROM_LOAD( "d1.u6",   0x2000, 0x0800, CRC(8b6b505c) SHA1(5f89bb1b50b9dfacf23c50e3016b9258b0e15084) )
688   ROM_LOAD( "d1.u7",   0x2800, 0x0800, CRC(d803a978) SHA1(682b73c968ef57007397d3e5eb0e78a97722da5e) )
689   ROM_LOAD( "d1.u8",   0x3000, 0x0800, CRC(291fa93b) SHA1(1d57f736b11ddc916effde78e2cd08c313a62901) )
690   ROM_LOAD( "d1.u9",   0x3800, 0x0800, CRC(ec3309a7) SHA1(b8ab7f3f2edf2658ea633b2b557ea37517615399) )
691   ROM_RELOAD(         0xf800, 0x0800 )    /* for vectors/pointers */
598692
693   ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE )
694   ROM_LOAD( "d1.u67",   0x0000, 0x0800, CRC(a8ac979d) SHA1(f7299d3f7c4aded028a65ae4365c174f0e953824) )
695
696   ROM_REGION( 0x1800, REGION_GFX2, ROMREGION_DISPOSE )
697   ROM_LOAD( "d1.u70",   0x0000, 0x0800, CRC(4f12d424) SHA1(c43f1df757ac7dd76875245e73d47451d1f7f6f2) )
698   ROM_LOAD( "d1.u69",   0x0800, 0x0800, CRC(ed3c83b7) SHA1(93e2134de3d9f79a6cff0391c1a32fccd3840c3f) )
699   ROM_LOAD( "d1.u68",   0x1000, 0x0800, BAD_DUMP CRC(3ab70570) SHA1(5ff84015a78d15a5207499f84ce637e49bca136f) ) /* bad bits */
700
701   ROM_REGION( 0x200, REGION_PROMS, 0 )
702   ROM_LOAD( "d1.u28", 0x0000, 0x0200, CRC(a6d43709) SHA1(cbff2cb60137462dc0b7c7719a64574218d96c62) )
703ROM_END
704
705
599706/*************************
600707*      Driver Init       *
601708*************************/
r841r842
604711{
605712   /* Palette transformed by PLDs? */
606713   int x;
607   UINT8 *srcp = memory_region( REGION_PROMS );
714   UINT8 *BPR = memory_region( REGION_PROMS );
608715
609716   for (x=0x0000;x<0x0100;x++)
610717   {
611      if (srcp[x] == 0x07)
612         srcp[x] = 0x04;   /* blue background */
613//          srcp[x] = 0x00; /* black background */
718      if (BPR[x] == 0x07)
719         BPR[x] = 0x04;   /* blue background */
614720   }
615721
616722   /* Initializing PIAs... */
r841r842
618724   pia_config(1, &pia1_intf);
619725}
620726
727static DRIVER_INIT( elgrande )
728{
729   int x;
730   UINT8 *BPR = memory_region( REGION_PROMS );
731   UINT8 *ROM = memory_region( REGION_GFX2 );
621732
733   /* Palette transformed by PLDs? */
734   for (x=0x0000;x<0x0100;x++)
735   {
736      if (BPR[x] == 0x07)
737         BPR[x] = 0x00; /* black background */
738   }
739
740   /* Temporary patch to fix some bad bits in ROM d1.u68 */
741   ROM[0x171c] = 0xff;
742   ROM[0x171d] = 0xff;
743   ROM[0x171e] = 0xff;
744   ROM[0x1737] = 0xff;
745   ROM[0x173d] = 0xff;
746
747   /* Initializing PIAs... */
748   pia_config(0, &pia0_intf);
749   pia_config(1, &pia1_intf);
750}
751
752
622753/*************************
623754*      Game Drivers      *
624755*************************/
625756
626/*    YEAR  NAME      PARENT  MACHINE   INPUT     INIT      ROT    COMPANY                                FULLNAME            FLAGS   */
627GAME( 1981, gdrawpkr, 0,      gdrawpkr, gdrawpkr, gdrawpkr, ROT0, "Cal Omega / Casino Electronics Inc.", "Gaming Draw Poker", 0 )
757/*    YEAR  NAME      PARENT  MACHINE   INPUT     INIT      ROT    COMPANY                                 FULLNAME                         FLAGS   */
758GAME( 1981, gdrawpkr, 0,      gdrawpkr, gdrawpkr, gdrawpkr, ROT0, "Cal Omega / Casino Electronics Inc.",   "Gaming Draw Poker",             0 )
759GAME( 1982, elgrande, 0,      elgrande, elgrande, elgrande, ROT0, "Tuni Electro Service / E.T. Marketing", "El Grande - 5 Card Draw (New)", GAME_NO_SOUND )
src/mame/drivers/raiden2.c
r841r842
228228
229229/* VIDEO START (move to video file) */
230230
231VIDEO_START(raiden2)
231VIDEO_START( raiden2 )
232232{
233   text_layer       = tilemap_create( get_text_tile_info,tilemap_scan_rows, TILEMAP_TYPE_PEN,  8, 8,64,32 );
234   background_layer = tilemap_create( get_back_tile_info,tilemap_scan_rows, TILEMAP_TYPE_PEN,      16,16,32,32 );
235   midground_layer  = tilemap_create( get_mid_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16,16,32,32 );
236   foreground_layer = tilemap_create( get_fore_tile_info,tilemap_scan_rows, TILEMAP_TYPE_PEN, 16,16,32,32 );
233   text_layer       = tilemap_create(get_text_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN,  8, 8, 64,32 );
234   background_layer = tilemap_create(get_back_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16,16, 32,32 );
235   midground_layer  = tilemap_create(get_mid_tile_info,  tilemap_scan_rows, TILEMAP_TYPE_PEN, 16,16, 32,32 );
236   foreground_layer = tilemap_create(get_fore_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16,16, 32,32 );
237237
238   tilemap_set_transparent_pen(midground_layer,15);
239   tilemap_set_transparent_pen(foreground_layer,15);
240   tilemap_set_transparent_pen(text_layer,15);
238   tilemap_set_transparent_pen(midground_layer, 15);
239   tilemap_set_transparent_pen(foreground_layer, 15);
240   tilemap_set_transparent_pen(text_layer, 15);
241241
242242   tick = 0;
243243}
r841r842
253253
254254/* VIDEO UPDATE (move to video file) */
255255
256VIDEO_UPDATE (raiden2)
256VIDEO_UPDATE ( raiden2 )
257257{
258258   int info_1, info_2, info_3;
259259
r841r842
441441
442442//  COPX functions, terribly incomplete
443443
444static UINT8 cop_buf[6];
445static UINT16 cop_adr, cop_fct;
446static UINT32 cop_reg[16];
447static UINT16 cop_data_fct[0x20], cop_data_val[0x20], cop_data_mask[0x20], cop_data_prg[0x100];
444typedef struct _cop_state cop_state;
445struct _cop_state
446{
447   UINT16      offset;                  /* last write offset */
448   UINT8      latch;                  /* latched LSB */
449   UINT16      ram[0x200/2];            /* RAM from 0x400-0x5ff */
448450
451   UINT32      reg[4];                  /* registers */
449452
450static UINT32 r32(int adr)
453   UINT16      func_trigger[0x100/8];      /* function trigger */
454   UINT16      func_value[0x100/8];      /* function value (?) */
455   UINT16      func_mask[0x100/8];         /* function mask (?) */
456   UINT16      program[0x100];            /* program "code" */
457};
458
459static cop_state cop_data;
460
461
462#define COP_LOG(x)      logerror x
463
464
465
466INLINE UINT16 cop_ram_r(cop_state *cop, UINT16 offset)
451467{
452   return program_read_byte(adr) |
453      (program_read_byte(adr+1)<<8) |
454      (program_read_byte(adr+2)<<16) |
455      (program_read_byte(adr+3)<<24);
468   return cop->ram[(offset - 0x400) / 2];
456469}
457470
458static void w32(int adr, UINT32 v)
471INLINE void cop_ram_w(cop_state *cop, UINT16 offset, UINT16 data)
459472{
460   program_write_byte(adr, v);
461   program_write_byte(adr+1, v>>8);
462   program_write_byte(adr+2, v>>16);
463   program_write_byte(adr+3, v>>24);
473   cop->ram[(offset - 0x400) / 2] = data;
464474}
465475
466static void cop_init(void)
476INLINE UINT32 r32(offs_t address)
467477{
468   memset(cop_buf, 0, sizeof(cop_buf));
469   memset(cop_reg, 0, sizeof(cop_reg));
470   memset(cop_data_fct, 0, sizeof(cop_data_fct));
471   memset(cop_data_val, 0, sizeof(cop_data_val));
472   memset(cop_data_mask, 0, sizeof(cop_data_mask));
473   memset(cop_data_prg, 0, sizeof(cop_data_prg));
474
475   cop_adr = 0;
476   cop_fct = 0;
478   return    (program_read_byte(address + 0) << 0) |
479         (program_read_byte(address + 1) << 8) |
480         (program_read_byte(address + 2) << 16) |
481         (program_read_byte(address + 3) << 24);
477482}
478483
479static void cop_run(void)
484INLINE void w32(offs_t address, UINT32 data)
480485{
481   int i;
486   program_write_byte(address + 0, data >> 0);
487   program_write_byte(address + 1, data >> 8);
488   program_write_byte(address + 2, data >> 16);
489   program_write_byte(address + 3, data >> 24);
490}
482491
483   if(cop_fct != 0x5a05 && cop_fct != 0xf205 && cop_fct != 0x5205)
484      logerror("XCOP %04x %08x %08x %08x %08x (%06x)\n", cop_fct, cop_reg[0], cop_reg[1], cop_reg[2], cop_reg[3], activecpu_get_pc());
485492
486   switch(cop_fct) {
487   case 0x0205: { // 0205 0006 ffeb 0000 - 0188 0282 0082 0b8e 098e 0000 0000 0000
488      UINT32 src = cop_reg[0];
489      int i;
490      logerror("COP %04x %08x (uns) (%06x)\n", cop_fct, src, activecpu_get_pc());
491      logerror(" COP -> %08x:", src);
492      for(i=0; i<32; i++)
493         logerror(" %02x", program_read_byte(src+i));
494      logerror("\n");
495      break;
496   }
497   case 0x138e: { // 130e 0005 bf7f 0010 - 0984 0aa4 0d82 0aa2 039b 0b9a 0b9a 0a9a
498      UINT32 src = cop_reg[0];
499      UINT32 dst = cop_reg[1];
500      logerror("COP %04x %08x %08x (uns) (%06x)\n", cop_fct, src, dst, activecpu_get_pc());
501      break;
502   }
503   case 0x3bb0: { // 3bb0 0004 007f 0038 - 0f9c 0b9c 0b9c 0b9c 0b9c 0b9c 0b9c 099c
504      UINT32 src = cop_reg[0];
505      UINT32 dst = cop_reg[1];
506      logerror("COP %04x %08x %08x (uns) (%06x)\n", cop_fct, src, dst, activecpu_get_pc());
507      break;
508   }
509   case 0x42c2: { // 42c2 0005 fcdd 0040 - 0f9a 0b9a 0b9c 0b9c 0b9c 029c 0000 0000
510      UINT32 src = cop_reg[0];
511      UINT32 dst = cop_reg[1];
512      logerror("COP %04x %08x %08x (uns) (%06x)\n", cop_fct, src, dst, activecpu_get_pc());
513      break;
514   }
515   case 0x5205:   // 5205 0006 fff7 0050 - 0180 02e0 03a0 00a0 03a0 0000 0000 0000
516   case 0x5a05: { // 5a05 0006 fff7 0058 - 0180 02e0 03a0 00a0 03a0 0000 0000 0000
517      UINT32 src = cop_reg[0];
518      UINT32 dst = cop_reg[1];
519      UINT32 val = r32(src);
520      w32(dst, val);
521      //      logerror("COP %04x %08x -> %08x - %08x (%06x)\n", cop_fct, src, dst, val, activecpu_get_pc());
522      break;
523   }
524   case 0x8100: { // 8100 0007 fdfb 0080 - 0b9a 0b88 0888 0000 0000 0000 0000 0000
525      UINT32 src = cop_reg[0];
526      logerror("COP %04x %08x (uns) (%06x)\n", cop_fct, src, activecpu_get_pc());
527      logerror(" COP -> %08x:", src);
528      for(i=0; i<32; i++)
529         logerror(" %02x", program_read_byte(src+i));
530      logerror("\n");
531      break;
532   }
533   case 0x8900: { // 8900 0007 fdfb 0088 - 0b9a 0b8a 088a 0000 0000 0000 0000 0000
534      UINT32 src = cop_reg[0];
535      logerror("COP %04x %08x (uns) (%06x)\n", cop_fct, src, activecpu_get_pc());
536      logerror(" COP -> %08x:", src);
537      for(i=0; i<32; i++)
538         logerror(" %02x", program_read_byte(src+i));
539      logerror("\n");
540      break;
541   }
542   case 0xf205: { // f205 0006 fff7 00f0 - 0182 02e0 03c0 00c0 03c0 0000 0000 0000
543      UINT32 src = cop_reg[0]+4;
544      UINT32 dst = cop_reg[2];
545      UINT32 val = r32(src);
546      w32(dst, val);
547      //      logerror("COP %04x %08x -> %08x - %08x (%06x)\n", cop_fct, src, dst, val, activecpu_get_pc());
548      break;
549   }
550   default:
551      logerror("Unknown COP routine %04x at %06x\n", cop_fct, activecpu_get_pc());
552      break;
553   }
554}
555
556static WRITE8_HANDLER(cop_up_fct_w)
493static void cop_init(void)
557494{
558   cop_buf[offset] = data;
559   if(offset == 3) {
560      int entry = cop_buf[5] >> 3;
561      cop_data_fct[entry]  = cop_buf[4] | (cop_buf[5] << 8);
562      cop_data_val[entry]  = cop_buf[0] | (cop_buf[1] << 8);
563      cop_data_mask[entry] = cop_buf[2] | (cop_buf[3] << 8);
564   }
495   memset(&cop_data, 0, sizeof(cop_data));
496   cop_data.offset = 0xffff;
565497}
566498
567static WRITE8_HANDLER(cop_up_adr_w)
499
500static WRITE8_HANDLER( cop_w )
568501{
569   if(offset)
570      cop_adr = (cop_adr & 0xff) | (data << 8);
571   else
572      cop_adr = (cop_adr & 0xff00) | data;
573}
502   cop_state *cop = &cop_data;
503   UINT32 temp32;
504   UINT16 cop_data;
505   UINT8 regnum;
506   int func;
574507
575static WRITE8_HANDLER(cop_up_data_w)
576{
577   if(offset)
578      cop_data_prg[cop_adr] = (cop_data_prg[cop_adr] & 0xff) | (data << 8);
508   /* all COP data writes are word-length (?) */
509   if ((offset & 1) == 0)
510   {
511      assert(cop->offset == 0xffff);
512      cop->latch = data;
513      cop->offset = offset;
514      return;
515   }
579516   else
580      cop_data_prg[cop_adr] = (cop_data_prg[cop_adr] & 0xff00) | data;
581}
517   {
518      assert(cop->offset != 0xffff);
519      assert(offset == cop->offset + 1);
520      cop_data = cop->latch | (data << 8);
521      cop->offset = 0xffff;
522      offset &= 0xfffe;
523   }
524   cop->ram[offset/2] = cop_data;
582525
583static WRITE8_HANDLER(cop_reg_w)
584{
585   int entry = (offset >> 1) & 15;
586   switch(offset & 0x21) {
587   case 0x00:
588      cop_reg[entry] = (cop_reg[entry] & 0xff00ffffU) | (data << 16);
589      break;
590   case 0x01:
591      cop_reg[entry] = (cop_reg[entry] & 0x00ffffffU) | (data << 24);
592      break;
593   case 0x20:
594      cop_reg[entry] = (cop_reg[entry] & 0xffffff00U) | data;
595      break;
596   case 0x21:
597      cop_reg[entry] = (cop_reg[entry] & 0xffff00ffU) | (data << 8);
598      break;
526   /* handle writes */
527   switch (offset + 0x400)
528   {
529      /* ----- BCD conversion ----- */
530
531      case 0x420:      /* LSW of number */
532      case 0x422:      /* MSW of number */
533         temp32 = cop_ram_r(cop, 0x420) | (cop_ram_r(cop, 0x422) << 16);
534         cop_ram_w(cop, 0x590, ((temp32 / 1) % 10) + (((temp32 / 10) % 10) << 8) + 0x3030);
535         cop_ram_w(cop, 0x592, ((temp32 / 100) % 10) + (((temp32 / 1000) % 10) << 8) + 0x3030);
536         cop_ram_w(cop, 0x594, ((temp32 / 10000) % 10) + (((temp32 / 100000) % 10) << 8) + 0x3030);
537         cop_ram_w(cop, 0x596, ((temp32 / 1000000) % 10) + (((temp32 / 10000000) % 10) << 8) + 0x3030);
538         cop_ram_w(cop, 0x598, ((temp32 / 100000000) % 10) + (((temp32 / 1000000000) % 10) << 8) + 0x3030);
539         break;
540
541      /* ----- program upload registers ----- */
542
543      case 0x432:      /* COP program data */
544         COP_LOG(("%05X:COP Prog Data = %04X\n", activecpu_get_pc(), cop_data));
545         cop->program[cop_ram_r(cop, 0x434)] = cop_data;
546         break;
547
548      case 0x434:      /* COP program address */
549         COP_LOG(("%05X:COP Prog Addr = %04X\n", activecpu_get_pc(), cop_data));
550         assert((cop_data & ~0xff) == 0);
551         temp32 = (cop_data & 0xff) / 8;
552         cop->func_value[temp32] = cop_ram_r(cop, 0x438);
553         cop->func_mask[temp32] = cop_ram_r(cop, 0x43a);
554         cop->func_trigger[temp32] = cop_ram_r(cop, 0x43c);
555         break;
556
557      case 0x438:      /* COP program entry value (0,4,5,6,7,8,9,F) */
558         COP_LOG(("%05X:COP Prog Val  = %04X\n", activecpu_get_pc(), cop_data));
559         break;
560
561      case 0x43a:      /* COP program entry mask */
562         COP_LOG(("%05X:COP Prog Mask = %04X\n", activecpu_get_pc(), cop_data));
563         break;
564
565      case 0x43c:      /* COP program trigger value */
566         COP_LOG(("%05X:COP Prog Trig = %04X\n", activecpu_get_pc(), cop_data));
567         break;
568
569      /* ----- ???? ----- */
570
571      case 0x47a:      /* clear RAM */
572         if (cop_ram_r(cop, 0x47e) == 0x118)
573         {
574            UINT32 addr = cop_ram_r(cop, 0x478) << 6;
575            int count = (cop_ram_r(cop, 0x47a) + 1) << 5;
576            COP_LOG(("%05X:COP RAM clear from %05X to %05X\n", activecpu_get_pc(), addr, addr + count));
577            while (count--)
578               program_write_byte(addr++, 0);
579         }
580         else
581         {
582            COP_LOG(("%05X:COP Unknown RAM clear(%04X) = %04X\n", activecpu_get_pc(), cop_ram_r(cop, 0x47e), cop_data));
583         }
584         break;
585
586      /* ----- program data registers ----- */
587
588      case 0x4a0:      /* COP register high word */
589      case 0x4a2:      /* COP register high word */
590      case 0x4a4:      /* COP register high word */
591      case 0x4a6:      /* COP register high word */
592         regnum = (offset / 2) % 4;
593         COP_LOG(("%05X:COP RegHi(%d) = %04X\n", activecpu_get_pc(), regnum, cop_data));
594         cop->reg[regnum] = (cop->reg[regnum] & 0x0000ffff) | (cop_data << 16);
595         break;
596
597      case 0x4c0:      /* COP register low word */
598      case 0x4c2:      /* COP register low word */
599      case 0x4c4:      /* COP register low word */
600      case 0x4c6:      /* COP register low word */
601         regnum = (offset / 2) % 4;
602         COP_LOG(("%05X:COP RegLo(%d) = %04X\n", activecpu_get_pc(), regnum, cop_data));
603         cop->reg[regnum] = (cop->reg[regnum] & 0xffff0000) | cop_data;
604         break;
605
606      /* ----- program trigger register ----- */
607
608      case 0x500:      /* COP trigger */
609         COP_LOG(("%05X:COP Trigger = %04X\n", activecpu_get_pc(), cop_data));
610         for (func = 0; func < ARRAY_LENGTH(cop->func_trigger); func++)
611            if (cop->func_trigger[func] == cop_data)
612            {
613               int offs;
614
615               COP_LOG(("  Execute:"));
616               for (offs = 0; offs < 8; offs++)
617               {
618                  if (cop->program[func * 8 + offs] == 0)
619                     break;
620                  COP_LOG((" %04X", cop->program[func * 8 + offs]));
621               }
622               COP_LOG(("\n"));
623
624               /* special cases for now */
625               if (cop_data == 0x5205 || cop_data == 0x5a05)
626               {
627                  COP_LOG(("  Copy 32 bits from %05X to %05X\n", cop->reg[0], cop->reg[1]));
628                  w32(cop->reg[1], r32(cop->reg[0]));
629               }
630               else if (cop_data == 0xf205)
631               {
632                  COP_LOG(("  Copy 32 bits from %05X to %05X\n", cop->reg[0] + 4, cop->reg[1]));
633                  w32(cop->reg[2], r32(cop->reg[0] + 4));
634               }
635               break;
636            }
637         assert(func != ARRAY_LENGTH(cop->func_trigger));
638         break;
639
640      /* ----- other stuff ----- */
641
642      default:      /* unknown */
643         COP_LOG(("%05X:COP Unknown(%04X) = %04X\n", activecpu_get_pc(), offset + 0x400, cop_data));
644         break;
599645   }
600   logerror("cop_reg_w %x, %08x\n", entry, cop_reg[entry]);
601646}
602647
603static WRITE8_HANDLER(cop_fct_w)
648
649static READ8_HANDLER( cop_r )
604650{
605   if(offset) {
606      cop_fct = (cop_fct & 0xff) | (data << 8);
607      cop_run();
608   } else
609      cop_fct = (cop_fct & 0xff00) | data;
651   cop_state *cop = &cop_data;
652   if ((offset & 1) == 0)
653      COP_LOG(("%05X:COP Read(%04X) = %04X\n", activecpu_get_pc(), offset + 0x400, cop->ram[offset/2]));
654   return cop->ram[offset/2] >> (8 * (offset & 1));
610655}
611656
612657
r841r842
872917/* MEMORY MAPS */
873918
874919static ADDRESS_MAP_START( raiden2_mem, ADDRESS_SPACE_PROGRAM, 8 )
875   AM_RANGE(0x00432, 0x00433) AM_WRITE(cop_up_data_w)
876   AM_RANGE(0x00434, 0x00435) AM_WRITE(cop_up_adr_w)
877   AM_RANGE(0x00438, 0x0043d) AM_WRITE(cop_up_fct_w)
878   AM_RANGE(0x004a0, 0x004df) AM_WRITE(cop_reg_w)
879   AM_RANGE(0x00500, 0x00501) AM_WRITE(cop_fct_w)
920   AM_RANGE(0x00400, 0x005ff) AM_READWRITE(cop_r, cop_w)
880921
881922   AM_RANGE(0x006a0, 0x006a3) AM_WRITE(sprcpt_val_1_w)
882923   AM_RANGE(0x006a4, 0x006a7) AM_WRITE(sprcpt_data_3_w)
r841r842
886927   AM_RANGE(0x006b4, 0x006b7) AM_WRITE(sprcpt_data_2_w)
887928   AM_RANGE(0x006b8, 0x006bb) AM_WRITE(sprcpt_val_2_w)
888929   AM_RANGE(0x006bc, 0x006bf) AM_WRITE(sprcpt_adr_w)
889
890930   AM_RANGE(0x006ce, 0x006cf) AM_WRITE(sprcpt_flags_2_w)
891931
892932   AM_RANGE(0x00000, 0x0bfff) AM_READWRITE(any_r, any_w) AM_BASE(&mainram)
src/mame/drivers/namcos21.c
r841r842
461461
462462/************************************************************************************/
463463
464static int
464static void
465465InitDSP( void )
466466{
467467   UINT16 *pMem;
468468   UINT16 pc, loop;
469469
470   mpDspState = auto_malloc( sizeof(*mpDspState) );
471
472470   memset( mpDspState, 0, sizeof(*mpDspState) );
473471
474472   pMem = master_dsp_rom;
r841r842
528526   pMem[pc++] = 0x8010;
529527   pMem[pc++] = 0xff80; /* b */
530528   pMem[pc++] = loop;
531
532   return 0;
533529}
534530
535531/***********************************************************/
r841r842
13541350   REGION_SOUND1
13551351};
13561352
1353static MACHINE_RESET( namcos21 )
1354{
1355   InitDSP();
1356   machine_reset_namcos2(machine);
1357}
1358
13571359static MACHINE_DRIVER_START( s21base )
13581360   MDRV_CPU_ADD(M68000,12288000) /* Master */
13591361   MDRV_CPU_PROGRAM_MAP(namcos21_68k_master, namcos21_68k_common)
r841r842
13861388   MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION)
13871389   MDRV_INTERLEAVE(10/*0*/)
13881390
1389   MDRV_MACHINE_RESET(namcos2)
1391   MDRV_MACHINE_RESET(namcos21)
13901392   MDRV_NVRAM_HANDLER(namcos2)
13911393
13921394   MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
r841r842
18771879   namcos2_gametype = game_type;
18781880   ptram = auto_malloc(PTRAM_SIZE);
18791881   mpDataROM = (UINT16 *)memory_region( REGION_USER1 );
1880   InitDSP();
1882   mpDspState = auto_malloc( sizeof(*mpDspState) );
18811883} /* namcos21_init */
18821884
18831885static DRIVER_INIT( winrun )
18841886{
18851887   /* don't use the generic namcos21_init; hardware is different */
18861888   namcos2_gametype = NAMCOS21_WINRUN91;
1889   ptram = auto_malloc(PTRAM_SIZE);
18871890   mpDataROM = (UINT16 *)memory_region( REGION_USER1 );
18881891}
18891892
src/mame/drivers/raiden.c
r841r842
5757static UINT8 *raiden_shared_ram;
5858extern UINT8 *raiden_back_data,*raiden_fore_data,*raiden_scroll_ram;
5959
60/***************************************************************************/
61
62static READ8_HANDLER( raiden_shared_r ) { return raiden_shared_ram[offset]; }
63static WRITE8_HANDLER( raiden_shared_w ) { raiden_shared_ram[offset]=data; }
64
6560/******************************************************************************/
6661
67static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
68   AM_RANGE(0x00000, 0x07fff) AM_READ(MRA8_RAM)
69   AM_RANGE(0x0a000, 0x0afff) AM_READ(raiden_shared_r)
62static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
63   AM_RANGE(0x00000, 0x06fff) AM_RAM
64   AM_RANGE(0x07000, 0x07fff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
65   AM_RANGE(0x0a000, 0x0afff) AM_RAM AM_SHARE(1) AM_BASE(&raiden_shared_ram)
7066   AM_RANGE(0x0b000, 0x0b000) AM_READ(input_port_1_r)
7167   AM_RANGE(0x0b001, 0x0b001) AM_READ(input_port_2_r)
7268   AM_RANGE(0x0b002, 0x0b002) AM_READ(input_port_3_r)
7369   AM_RANGE(0x0b003, 0x0b003) AM_READ(input_port_4_r)
74   AM_RANGE(0x0d000, 0x0d00d) AM_READ(seibu_main_v30_r)
75   AM_RANGE(0xa0000, 0xfffff) AM_READ(MRA8_ROM)
76ADDRESS_MAP_END
77
78static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
79   AM_RANGE(0x00000, 0x06fff) AM_WRITE(MWA8_RAM)
80   AM_RANGE(0x07000, 0x07fff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
81   AM_RANGE(0x0a000, 0x0afff) AM_WRITE(raiden_shared_w) AM_BASE(&raiden_shared_ram)
8270   AM_RANGE(0x0b000, 0x0b007) AM_WRITE(raiden_control_w)
8371   AM_RANGE(0x0c000, 0x0c7ff) AM_WRITE(raiden_text_w) AM_BASE(&videoram)
84   AM_RANGE(0x0d000, 0x0d00d) AM_WRITE(seibu_main_v30_w)
72   AM_RANGE(0x0d000, 0x0d00d) AM_READWRITE(seibu_main_v30_r, seibu_main_v30_w)
8573   AM_RANGE(0x0d060, 0x0d067) AM_WRITE(MWA8_RAM) AM_BASE(&raiden_scroll_ram)
86   AM_RANGE(0xa0000, 0xfffff) AM_WRITE(MWA8_ROM)
74   AM_RANGE(0xa0000, 0xfffff) AM_ROM
8775ADDRESS_MAP_END
8876
89static ADDRESS_MAP_START( sub_readmem, ADDRESS_SPACE_PROGRAM, 8 )
90   AM_RANGE(0x00000, 0x01fff) AM_READ(MRA8_RAM)
91   AM_RANGE(0x02000, 0x027ff) AM_READ(raiden_background_r)
92   AM_RANGE(0x02800, 0x02fff) AM_READ(raiden_foreground_r)
93   AM_RANGE(0x03000, 0x03fff) AM_READ(paletteram_r)
94   AM_RANGE(0x04000, 0x04fff) AM_READ(raiden_shared_r)
95   AM_RANGE(0xc0000, 0xfffff) AM_READ(MRA8_ROM)
96ADDRESS_MAP_END
97
98static ADDRESS_MAP_START( sub_writemem, ADDRESS_SPACE_PROGRAM, 8 )
99   AM_RANGE(0x00000, 0x01fff) AM_WRITE(MWA8_RAM)
100   AM_RANGE(0x02000, 0x027ff) AM_WRITE(raiden_background_w) AM_BASE(&raiden_back_data)
101   AM_RANGE(0x02800, 0x02fff) AM_WRITE(raiden_foreground_w) AM_BASE(&raiden_fore_data)
102   AM_RANGE(0x03000, 0x03fff) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_le_w) AM_BASE(&paletteram)
103   AM_RANGE(0x04000, 0x04fff) AM_WRITE(raiden_shared_w)
77static ADDRESS_MAP_START( sub_map, ADDRESS_SPACE_PROGRAM, 8 )
78   AM_RANGE(0x00000, 0x01fff) AM_RAM
79   AM_RANGE(0x02000, 0x027ff) AM_READWRITE(raiden_background_r, raiden_background_w) AM_BASE(&raiden_back_data)
80   AM_RANGE(0x02800, 0x02fff) AM_READWRITE(raiden_foreground_r, raiden_foreground_w) AM_BASE(&raiden_fore_data)
81   AM_RANGE(0x03000, 0x03fff) AM_READWRITE(paletteram_r, paletteram_xxxxBBBBGGGGRRRR_le_w) AM_BASE(&paletteram)
82   AM_RANGE(0x04000, 0x04fff) AM_RAM AM_SHARE(1)
10483   AM_RANGE(0x07ffe, 0x0afff) AM_WRITE(MWA8_NOP)
105   AM_RANGE(0xc0000, 0xfffff) AM_WRITE(MWA8_ROM)
84   AM_RANGE(0xc0000, 0xfffff) AM_ROM
10685ADDRESS_MAP_END
10786
10887/************************* Alternate board set ************************/
10988
110static ADDRESS_MAP_START( alt_readmem, ADDRESS_SPACE_PROGRAM, 8 )
111   AM_RANGE(0x00000, 0x07fff) AM_READ(MRA8_RAM)
112   AM_RANGE(0x08000, 0x08fff) AM_READ(raiden_shared_r)
113   AM_RANGE(0x0a000, 0x0a00d) AM_READ(seibu_main_v30_r)
89static ADDRESS_MAP_START( alt_map, ADDRESS_SPACE_PROGRAM, 8 )
90   AM_RANGE(0x00000, 0x06fff) AM_RAM
91   AM_RANGE(0x07000, 0x07fff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
92   AM_RANGE(0x08000, 0x08fff) AM_RAM AM_SHARE(1) AM_BASE(&raiden_shared_ram)
93   AM_RANGE(0x0a000, 0x0a00d) AM_READWRITE(seibu_main_v30_r, seibu_main_v30_w)
94   AM_RANGE(0x0b000, 0x0b007) AM_WRITE(raiden_control_w)
95   AM_RANGE(0x0c000, 0x0c7ff) AM_WRITE(raidena_text_w) AM_BASE(&videoram)
11496   AM_RANGE(0x0e000, 0x0e000) AM_READ(input_port_1_r)
11597   AM_RANGE(0x0e001, 0x0e001) AM_READ(input_port_2_r)
11698   AM_RANGE(0x0e002, 0x0e002) AM_READ(input_port_3_r)
11799   AM_RANGE(0x0e003, 0x0e003) AM_READ(input_port_4_r)
118   AM_RANGE(0xa0000, 0xfffff) AM_READ(MRA8_ROM)
119ADDRESS_MAP_END
120
121static ADDRESS_MAP_START( alt_writemem, ADDRESS_SPACE_PROGRAM, 8 )
122   AM_RANGE(0x00000, 0x06fff) AM_WRITE(MWA8_RAM)
123   AM_RANGE(0x07000, 0x07fff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
124   AM_RANGE(0x08000, 0x08fff) AM_WRITE(raiden_shared_w) AM_BASE(&raiden_shared_ram)
125   AM_RANGE(0x0a000, 0x0a00d) AM_WRITE(seibu_main_v30_w)
126   AM_RANGE(0x0b000, 0x0b007) AM_WRITE(raiden_control_w)
127   AM_RANGE(0x0c000, 0x0c7ff) AM_WRITE(raidena_text_w) AM_BASE(&videoram)
128100   AM_RANGE(0x0f000, 0x0f035) AM_WRITE(MWA8_RAM) AM_BASE(&raiden_scroll_ram)
129   AM_RANGE(0xa0000, 0xfffff) AM_WRITE(MWA8_ROM)
101   AM_RANGE(0xa0000, 0xfffff) AM_ROM
130102ADDRESS_MAP_END
131103
132104/******************************************************************************/
r841r842
282254
283255   /* basic machine hardware */
284256   MDRV_CPU_ADD(V30,20000000/2) /* NEC V30 CPU, 20MHz */
285   MDRV_CPU_PROGRAM_MAP(readmem,writemem)
257   MDRV_CPU_PROGRAM_MAP(main_map,0)
286258   MDRV_CPU_VBLANK_INT(raiden_interrupt,1)
287259
288260   MDRV_CPU_ADD(V30,20000000/2) /* NEC V30 CPU, 20MHz */
289   MDRV_CPU_PROGRAM_MAP(sub_readmem,sub_writemem)
261   MDRV_CPU_PROGRAM_MAP(sub_map,0)
290262   MDRV_CPU_VBLANK_INT(raiden_interrupt,1)
291263
292264   SEIBU_SOUND_SYSTEM_CPU(14318180/4)
r841r842
318290
319291   /* basic machine hardware */
320292   MDRV_CPU_ADD(V30,20000000/2) /* NEC V30 CPU, 20MHz */
321   MDRV_CPU_PROGRAM_MAP(alt_readmem,alt_writemem)
293   MDRV_CPU_PROGRAM_MAP(alt_map,0)
322294   MDRV_CPU_VBLANK_INT(raiden_interrupt,1)
323295
324296   MDRV_CPU_ADD(V30,20000000/2) /* NEC V30 CPU, 20MHz */
325   MDRV_CPU_PROGRAM_MAP(sub_readmem,sub_writemem)
297   MDRV_CPU_PROGRAM_MAP(sub_map,0)
326298   MDRV_CPU_VBLANK_INT(raiden_interrupt,1)
327299
328300   SEIBU_SOUND_SYSTEM_CPU(14318180/4)
src/mame/drivers/bombjack.c
r841r842
6464NMI triggered by the commands sent by MAIN BOARD (?)
6565NMI interrupts for music timing
6666
67
68Stephh's notes (based on the game Z80 code and some tests) :
69
70  - "Bonus Life" Dip Switches NEVER give extra lives because of patched code at 0x5a07 :
71    "push af" instruction (0xe5) has been replaced by "ret" instruction (0xc9).
72    However, they still affect hi-scores table due to code at 0x0945 :
73
74    value     bonus life       hi-scores
75
76     0x00   none                 10000
77     0x01   every 100k          100000
78     0x02   every 30k            30000
79     0x03   50k only             50000
80     0x04   100k only           100000
81     0x05   50k and 100k         50000
82     0x06   100k and 300k       100000
83     0x07   50k 100k and 300k    50000
84
85  - Ingame bug : if game is reset when screen is flipped, the screen remains
86    flipped for the start-up tests and we'll be OK when scores are displayed.
87
88  - The only difference between 'bombjack' and 'bombjac2' is that 'bombjack'
89    fixes the message when you get a 'S' for extra credit (text at 0xd24a) :
90      * 'bombjack' : "YOU ARE LUCKY"
91      * 'bombjac2' : "YOU ARE LUCY"
92
6793***************************************************************************/
6894
6995#include "driver.h"
r841r842
212238   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
213239
214240   PORT_START   /* DSW1 */
215   PORT_DIPNAME( 0x07, 0x00, "Initial High Score?" )
216   PORT_DIPSETTING(    0x00, "10000" )
217   PORT_DIPSETTING(    0x01, "100000" )
218   PORT_DIPSETTING(    0x02, "30000" )
219   PORT_DIPSETTING(    0x03, "50000" )
220   PORT_DIPSETTING(    0x04, "100000" )
221   PORT_DIPSETTING(    0x05, "50000" )
222   PORT_DIPSETTING(    0x06, "100000" )
223   PORT_DIPSETTING(    0x07, "50000" )
241   PORT_DIPNAME( 0x07, 0x00, DEF_STR( Bonus_Life ) )       /* see notes */
242   PORT_DIPSETTING(    0x02, "Every 30k" )
243   PORT_DIPSETTING(    0x01, "Every 100k" )
244   PORT_DIPSETTING(    0x07, "50k, 100k and 300k" )
245   PORT_DIPSETTING(    0x05, "50k and 100k" )
246   PORT_DIPSETTING(    0x03, "50k only" )
247   PORT_DIPSETTING(    0x06, "100k and 300k" )
248   PORT_DIPSETTING(    0x04, "100k only" )
249   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
224250   PORT_DIPNAME( 0x18, 0x00, "Bird Speed" )
225251   PORT_DIPSETTING(    0x00, DEF_STR( Easy ) )
226252   PORT_DIPSETTING(    0x08, DEF_STR( Medium ) )
src/mame/drivers/astrocde.c
r841r842
16861686static DRIVER_INIT( wow )
16871687{
16881688   astrocade_video_config = AC_SOUND_PRESENT | AC_LIGHTPEN_INTS | AC_STARS;
1689   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x15, 0x15, 0x0fff, 0xff00, wow_io_r);
1690   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x17, 0x17, 0xffff, 0xff00, wow_speech_r);
1689   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x15, 0x15, 0x0fff, 0xff00, wow_io_r);
1690   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x17, 0x17, 0xffff, 0xff00, wow_speech_r);
16911691}
16921692
16931693
16941694static DRIVER_INIT( gorf )
16951695{
16961696   astrocade_video_config = AC_SOUND_PRESENT | AC_LIGHTPEN_INTS | AC_STARS;
1697   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x15, 0x15, 0x0fff, 0xff00, gorf_io_1_r);
1698   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x16, 0x16, 0x0fff, 0xff00, gorf_io_2_r);
1699   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x17, 0x17, 0xffff, 0xff00, gorf_speech_r);
1697   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x15, 0x15, 0x0fff, 0xff00, gorf_io_1_r);
1698   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x16, 0x16, 0x0fff, 0xff00, gorf_io_2_r);
1699   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x17, 0x17, 0xffff, 0xff00, gorf_speech_r);
17001700}
17011701
17021702
17031703static DRIVER_INIT( robby )
17041704{
17051705   astrocade_video_config = AC_SOUND_PRESENT;
1706   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x15, 0x15, 0x0fff, 0xff00, robby_io_r);
1706   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x15, 0x15, 0x0fff, 0xff00, robby_io_r);
17071707}
17081708
17091709
17101710static DRIVER_INIT( profpac )
17111711{
17121712   astrocade_video_config = AC_SOUND_PRESENT;
1713   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x14, 0x14, 0x0fff, 0xff00, profpac_io_1_r);
1714   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x15, 0x15, 0x77ff, 0xff00, profpac_io_2_r);
1713   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x14, 0x14, 0x0fff, 0xff00, profpac_io_1_r);
1714   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x15, 0x15, 0x77ff, 0xff00, profpac_io_2_r);
17151715
17161716   /* reset banking */
17171717   profpac_banksw_w(0, 0);
r841r842
17221722static DRIVER_INIT( demndrgn )
17231723{
17241724   astrocade_video_config = 0x00;
1725   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x14, 0x14, 0x1fff, 0xff00, demndrgn_io_r);
1726   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x1c, 0x1c, 0x0000, 0xff00, port_tag_to_handler8("FIREX"));
1727   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x1d, 0x1d, 0x0000, 0xff00, port_tag_to_handler8("FIREY"));
1725   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x14, 0x14, 0x1fff, 0xff00, demndrgn_io_r);
1726   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x1c, 0x1c, 0x0000, 0xff00, port_tag_to_handler8("FIREX"));
1727   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x1d, 0x1d, 0x0000, 0xff00, port_tag_to_handler8("FIREY"));
17281728   memory_install_write8_handler(0, ADDRESS_SPACE_IO, 0x97, 0x97, 0x0000, 0xff00, demndrgn_sound_w);
17291729
17301730   /* reset banking */
r841r842
17361736static DRIVER_INIT( tenpindx )
17371737{
17381738   astrocade_video_config = 0x00;
1739   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x60, 0x60, 0x0000, 0xff00, port_tag_to_handler8("P60"));
1740   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x61, 0x61, 0x0000, 0xff00, port_tag_to_handler8("P61"));
1741   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x62, 0x62, 0x0000, 0xff00, port_tag_to_handler8("P62"));
1742   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x63, 0x63, 0x0000, 0xff00, port_tag_to_handler8("P63"));
1743   memory_install_read8_handler (0, ADDRESS_SPACE_IO, 0x64, 0x64, 0x0000, 0xff00, port_tag_to_handler8("P64"));
1739   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x60, 0x60, 0x0000, 0xff00, port_tag_to_handler8("P60"));
1740   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x61, 0x61, 0x0000, 0xff00, port_tag_to_handler8("P61"));
1741   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x62, 0x62, 0x0000, 0xff00, port_tag_to_handler8("P62"));
1742   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x63, 0x63, 0x0000, 0xff00, port_tag_to_handler8("P63"));
1743   memory_install_read8_handler(0, ADDRESS_SPACE_IO, 0x64, 0x64, 0x0000, 0xff00, port_tag_to_handler8("P64"));
17441744   memory_install_write8_handler(0, ADDRESS_SPACE_IO, 0x65, 0x66, 0x0000, 0xff00, tenpindx_lamp_w);
17451745   memory_install_write8_handler(0, ADDRESS_SPACE_IO, 0x67, 0x67, 0x0000, 0xff00, tenpindx_counter_w);
17461746   memory_install_write8_handler(0, ADDRESS_SPACE_IO, 0x68, 0x68, 0x0000, 0xff00, tenpindx_lights_w);
src/mame/drivers/exzisus.c
r841r842
2828****************************************************************************/
2929
3030#include "driver.h"
31#include "taitoipt.h"
3132#include "audio/taitosnd.h"
3233#include "sound/2151intf.h"
3334
r841r842
244245
245246***************************************************************************/
246247
247#define EXZISUS_PLAYERS_INPUT( player ) \
248   PORT_START \
249   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(player) PORT_8WAY \
250   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(player) PORT_8WAY \
251   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) PORT_8WAY \
252   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(player) PORT_8WAY \
253   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) \
254   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player)
255
256#define TAITO_COINAGE_JAPAN_8 \
257   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \
258   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) ) \
259   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
260   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
261   PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) ) \
262   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \
263   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
264   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) ) \
265   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
266   PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
267
268#define TAITO_DIFFICULTY_8 \
269   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) \
270   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) ) \
271   PORT_DIPSETTING(    0x03, DEF_STR( Medium ) ) \
272   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) ) \
273   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
274
275248INPUT_PORTS_START( exzisus )
276   /* IN0 */
277   EXZISUS_PLAYERS_INPUT( 1 )
278   PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
249   PORT_START_TAG("IN0")
250   TAITO_JOY_UDRL_2_BUTTONS( 1 )
279251
280   /* IN1 */
281   EXZISUS_PLAYERS_INPUT( 2 )
282   PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
252   PORT_START_TAG("IN1")
253   TAITO_JOY_UDRL_2_BUTTONS( 2 )
283254
284   /* IN2 */
285   PORT_START      /* System control (2) */
255   PORT_START_TAG("IN2")
286256   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_SERVICE1 )
287257   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_TILT )
288258   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_START1 )
r841r842
291261   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
292262   PORT_BIT( 0xc0, IP_ACTIVE_LOW,  IPT_UNKNOWN )
293263
294   PORT_START  /* DSW 1 (3) */
295   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
296   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
297   PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) )
298   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
299   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
300   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
301   PORT_SERVICE( 0x04,   IP_ACTIVE_LOW )      /* Service Mode */
302   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
303   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
304   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
305   TAITO_COINAGE_JAPAN_8
264   PORT_START_TAG("DSWA")
265   TAITO_MACHINE_COCKTAIL
266   TAITO_COINAGE_JAPAN_OLD
306267
307   PORT_START  /* DSW 2 (4) */
308   TAITO_DIFFICULTY_8
268   PORT_START_TAG("DSWB")
269   TAITO_DIFFICULTY
309270   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
310271   PORT_DIPSETTING(    0x08, "100k and every 150k" )
311   PORT_DIPSETTING(    0x04, "150k" )
312272   PORT_DIPSETTING(    0x0c, "150k and every 200k" )
273   PORT_DIPSETTING(    0x04, "150k" )
313274   PORT_DIPSETTING(    0x00, "200k" )
314275   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
315276   PORT_DIPSETTING(    0x00, "2" )
r841r842
319280   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
320281   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
321282   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
322   PORT_DIPNAME( 0x80, 0x80, "Service Mode (buggy)" )   // buggy: all other switches in DSW2 must be on
283   PORT_DIPNAME( 0x80, 0x80, "Service Mode (buggy)" )      // buggy: all other switches in DSW2 must be on
323284   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
324285   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
325286INPUT_PORTS_END
src/mame/drivers/thayers.c
r0r842
1/*
2RDI Video Systems Thayer's Quest laserdisc hardware
3Driver by Andrew Gardner from schematics with help from Daphne Source
4
5Notes:
6    How odd.  The schematics say there's a COP421L hooked up, but they also make mention of
7      a COP404L - A ROMless COP420 with 1k of RAM.  I wonder which one is correct?
8
9Todo:
10    Add the counter and SIO to the cop420 core.
11    Fix up my poor interpretation of the hard-to-read schematics.
12    Write a real SC-01 (SSI-263) emulator for MAME.
13*/
14
15#include "driver.h"
16#include "render.h"
17#include "machine/laserdsc.h"
18#include "cpu/cop400/cop400.h"
19
20#define SCHEMATIC_CLOCK (4000000)
21
22/*
23 * Z80 IRQ Status bit
24 * ------------------
25 *
26 * Bit      | Use
27 * 76543210-+----------------
28 * -------x | Unused
29 * ------x- | Unused
30 * -----x-- | SSI-263 Request Data.
31 * ----x--- | always high. (? but it's checked at 0x1bb ?)
32 * ---x---- | /TIMER INT.
33 * --x----- | /DATA RDY INT.
34 * -x------ | /CART PRES.
35 * x------- | Unused
36 */
37static UINT8 z80_irq_status;
38
39#define Z80_IRQ_STATUS_SET()   (z80_irq_status = 0x00)
40#define Z80_IRQ_STATUS_CLEAR() (z80_irq_status = 0xff)
41
42#define Z80_SSI_REQUEST()  ((z80_irq_status & 0x04) >> 2)
43#define Z80_TIMER_INT()    ((z80_irq_status & 0x10) >> 4)
44#define Z80_DATA_RDY_INT() ((z80_irq_status & 0x20) >> 5)
45#define Z80_CART_PRES()    ((z80_irq_status & 0x40) >> 6)
46
47#define SET_Z80_SSI_REQUEST()  (z80_irq_status &= ~0x04)
48#define SET_Z80_TIMER_INT()    (z80_irq_status &= ~0x10)
49#define SET_Z80_DATA_RDY_INT() (z80_irq_status &= ~0x20)
50#define SET_Z80_CART_PRES()    (z80_irq_status &= ~0x40)
51
52#define CLEAR_Z80_SSI_REQUEST()  (z80_irq_status |= 0x04)
53#define CLEAR_Z80_TIMER_INT()    (z80_irq_status |= 0x10)
54#define CLEAR_Z80_DATA_RDY_INT() (z80_irq_status |= 0x20)
55#define CLEAR_Z80_CART_PRES()    (z80_irq_status |= 0x40)
56
57
58/* Misc variables */
59static UINT8* ram_ic;
60static laserdisc_info *discinfo;
61
62static UINT8 m_ssi_control;
63static UINT8 cop_g_latch;
64static UINT8 cop_l_latch;
65
66
67
68/* VIDEO GOODS */
69VIDEO_UPDATE( thayers )
70{
71   /* display disc information */
72   if (discinfo != NULL)
73      popmessage("%s", laserdisc_describe_state(discinfo));
74
75   return 0;
76}
77
78
79
80/* MEMORY HANDLERS */
81/* Z80 R/W */
82READ8_HANDLER(z80_irq_status_r)
83{
84   return z80_irq_status;
85}
86
87READ8_HANDLER(ram_ic_read)
88{
89   /* Daphne patches.
90    if (offset == 0xbe07-0x8000)
91        return 0x02;
92
93    if (offset == 0xbe17-0x8000)
94        return 0x01;
95    */
96
97   return ram_ic[offset];
98}
99
100static UINT32 laserdisc_status_r(void *param)
101{
102   if (discinfo == NULL)
103      return 0;
104
105   /* Someday handle multiple LD players */
106   return (laserdisc_line_r(discinfo, LASERDISC_LINE_STATUS) == ASSERT_LINE) ? 0 : 1;
107}
108
109static UINT32 laserdisc_command_r(void *param)
110{
111   if (discinfo == NULL)
112      return 0;
113
114   /* Someday handle multiple LD players */
115   return (laserdisc_line_r(discinfo, LASERDISC_LINE_COMMAND) == ASSERT_LINE) ? 0 : 1;
116}
117
118WRITE8_HANDLER(ram_ic_write)
119{
120   ram_ic[offset] = data;
121}
122
123WRITE8_HANDLER(data_ready_int_w)
124{
125   CLEAR_Z80_DATA_RDY_INT();
126   /* Hackaroo? */
127   /* cop_l_latch = 0x00; */
128}
129
130WRITE8_HANDLER(timer_int_w)
131{
132   CLEAR_Z80_TIMER_INT();
133}
134
135WRITE8_HANDLER(write_cop)
136{
137   logerror("Writing 0x%x to COP port G\n", data);
138
139   /* Bits 5-7 write to COP421 ports G0-G2 */
140   cop_g_latch = (data >> 5) & 0x07;
141
142   /* Bit 2 goes to BANKSELT */
143   /* bankselect = (data & 0x04) >> 2; */
144
145   /* Bit 1 goes to CS128x? (illegible schems) */
146}
147
148WRITE8_HANDLER(data_write_cop)
149{
150   cop_l_latch = data;
151}
152
153WRITE8_HANDLER(intrq_w)
154{
155   cpunum_set_input_line(0, 0, ASSERT_LINE);
156}
157
158WRITE8_HANDLER(sc01_register_w)
159{
160   /* (Thank you Daphne) */
161   switch (offset)
162   {
163      case 0x00:
164         if (m_ssi_control)
165         {
166            logerror("SC-01 control mode : 0x%x\n", data);
167
168            switch(data)
169            {
170               /* Stop requesting phonemes */
171               case 0x00:
172                  CLEAR_Z80_SSI_REQUEST();
173                  break;
174
175               /* Start adding phonemes */
176               case 0xc0:
177                  SET_Z80_SSI_REQUEST();
178                    if (!(Z80_SSI_REQUEST()))
179                     logerror("SETTING IRQ LINE sc01\n");
180                        cpunum_set_input_line(0, 0, ASSERT_LINE);
181                  break;
182
183               default:
184                  logerror("SC-01 control mode invalid code 0x%x\n", data);
185                  break;
186            }
187         }
188         else
189         {
190            logerror("SC-01 receiving phonemes 0x%x\n", data & 0x3f);
191         }
192         break;
193
194      case 0x01:
195         logerror("SC-01 inflection changed to 0x%x\n", data);
196         break;
197
198      case 0x02:
199         logerror("SC-01 speech rate changed to 0x%x\n", data);
200         break;
201
202      case 0x03:
203         if (data & 0x80)
204         {
205            m_ssi_control = 1;
206            logerror("SC-01 now in control mode.\n");
207         }
208         else if (data & 0x70)
209         {
210            m_ssi_control = 0;
211            logerror("SC-01 control mode cleared.\n");
212         }
213         else
214         {
215            logerror("SC-01 amplitude manipulated 0x%x.\n", data);
216         }
217         break;
218
219      case 0x04:
220         logerror("SC-01 filter frequency changed to 0x%x.\n", data);
221         break;
222   }
223}
224
225
226/* COP R/W */
227/* All 8 l pins are hooked up here */
228READ8_HANDLER(cop_l_read)
229{
230   logerror("COP - Reading from L @ (0x%x)\n", activecpu_get_pc());
231   return cop_l_latch;
232}
233
234/* Pins g0, g1, g2, and g3 are all hooked up */
235READ8_HANDLER(cop_g_read)
236{
237   logerror("COP - Reading from G @ (0x%x)\n", activecpu_get_pc());
238   return cop_g_latch;
239}
240
241WRITE8_HANDLER(cop_l_write)
242{
243   logerror("COP - WRITING TO L 0x%x @ (0x%x)\n", data, activecpu_get_pc());
244   cop_l_latch = data;
245}
246
247WRITE8_HANDLER(cop_g_write)
248{
249   logerror("COP - WRITING TO G 0x%x @ (0x%x)\n", data, activecpu_get_pc());
250
251   /* Bit 3 goes to an enable pin on the data latch? */
252   /* Bits 0-2 seem to go into the wrong side of a logic IC? */
253}
254
255/* Schematics say pins d0 and d1 are the only two that are hooked up */
256WRITE8_HANDLER(cop_d_write)
257{
258   int irq_flag = 0;
259
260   logerror("COP - WRITING TO D 0x%x @ (0x%x)\n", data, activecpu_get_pc());
261
262   /* Pin d0 - TIMER INT */
263   if (!(data & 0x01))
264   {
265      SET_Z80_TIMER_INT();
266      irq_flag = 1;
267   }
268
269   /* Pin d1 - DATA READY INT */
270   if (!(data & 0x02))
271   {
272      SET_Z80_DATA_RDY_INT();
273      irq_flag = 1;
274   }
275
276   /* Assert the Z80's interrupt line if necessary */
277   if (irq_flag)
278   {
279      logerror("THE COP IS SETTING THE IRQ LINE\n");
280      cpunum_set_input_line(0, 0, ASSERT_LINE);
281   }
282}
283
284WRITE8_HANDLER(cop_sk_write)
285{
286   /* I think this data falls off into a black hole - the pins aren't hooked up.
287       The COP400 XAS instruction writes to both SK and SIO, that's why the CPU writes data here at all. */
288}
289
290WRITE8_HANDLER(cop_sio_write)
291{
292   /* This data is sent to the CLK pin of the keyboard handling logic.  We don't need to emulate it here. */
293}
294
295
296
297/* PROGRAM MAPS */
298static ADDRESS_MAP_START( mainmem, ADDRESS_SPACE_PROGRAM, 8 )
299   AM_RANGE(0x0000, 0x7fff) AM_ROM
300   AM_RANGE(0x8000, 0xbfff) AM_READWRITE(ram_ic_read,ram_ic_write) AM_BASE(&ram_ic)   /* Not quite sure how big the RAM IC is. */
301   AM_RANGE(0xc000, 0xdfff) AM_ROM                                          /* This is what Daphne says - we'll soon see. */
302ADDRESS_MAP_END
303
304static ADDRESS_MAP_START( copmem, ADDRESS_SPACE_PROGRAM, 8 )
305   AM_RANGE(0x000, 0x3ff) AM_ROM                  /* The schematics seem to claim this is a 2716 (0x800 bytes) - is the dump too small? */
306ADDRESS_MAP_END
307
308
309/* IO MAPS */
310static ADDRESS_MAP_START( mainio, ADDRESS_SPACE_IO, 8 )
311   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
312   AM_RANGE(0x00,0x04) AM_WRITE(sc01_register_w)
313   AM_RANGE(0x20,0x20) AM_WRITE(write_cop)
314   AM_RANGE(0x40,0x40) AM_READ(z80_irq_status_r)
315/*  AM_RANGE(0x80,0x80) AM_WRITE(data_write_cop) */
316   AM_RANGE(0xa0,0xa0) AM_WRITE(timer_int_w)
317   AM_RANGE(0xc0,0xc0) AM_WRITE(data_ready_int_w)
318
319/*  AM_RANGE(0xf0,0xf0) */                              /* Laserdisc data read */
320   AM_RANGE(0xf1,0xf1)   AM_READ(port_tag_to_handler8("DSWB"))   /* 4 dips, 2 coins, Laserdisc 'ready' and 'enter' pins */
321   AM_RANGE(0xf2,0xf2)   AM_READ(port_tag_to_handler8("DSWA"))   /* 8 dips */
322   AM_RANGE(0xf3,0xf3)   AM_WRITE(intrq_w)                  /* goes to !INTRQ */
323/*  AM_RANGE(0xf4,0xf4) */                              /* Laserdisc data write */
324/*  AM_RANGE(0xf5,0xf5) */                              /* Coin counter, 0xf4 write enable, DIP-controlled (SWB-6) LDV1000 'enter' line, and LDV1000 INT/!EXT line */
325/*  AM_RANGE(0xf6,0xf6) */                              /* Scoreboard DEN1 */
326/*  AM_RANGE(0xf7,0xf7) */                              /* Scoreboard DEN2 */
327ADDRESS_MAP_END
328
329static ADDRESS_MAP_START( copio, ADDRESS_SPACE_IO, 8 )
330   AM_RANGE(COP400_PORT_L,  COP400_PORT_L)   AM_READWRITE(cop_l_read,cop_l_write)
331   AM_RANGE(COP400_PORT_G,  COP400_PORT_G)   AM_READWRITE(cop_g_read,cop_g_write)
332   AM_RANGE(COP400_PORT_D,  COP400_PORT_D)   AM_WRITE(cop_d_write)
333   AM_RANGE(COP400_PORT_SK, COP400_PORT_SK)  AM_WRITE(cop_sk_write)
334   AM_RANGE(COP400_PORT_SIO,COP400_PORT_SIO) AM_READWRITE(port_tag_to_handler8("THAYERS_LETTERS"),cop_sio_write)   /* Unemulated in COP40x core, so nothing happens ATM */
335ADDRESS_MAP_END
336
337
338/* PORTS */
339INPUT_PORTS_START( thayers )
340   PORT_START_TAG("DSWA")
341   PORT_DIPNAME( 0x07, 0x07, "Time Per Coin" ) PORT_DIPLOCATION( "A:3,2,1" )
342   PORT_DIPSETTING(    0x07, "110 Seconds" )
343   PORT_DIPSETTING(    0x06, "95 Seconds" )
344   PORT_DIPSETTING(    0x05, "80 Seconds" )
345   PORT_DIPSETTING(    0x04, "70 Seconds" )
346   PORT_DIPSETTING(    0x03, "60 Seconds" )
347   PORT_DIPSETTING(    0x02, "45 Seconds" )
348   PORT_DIPSETTING(    0x01, "30 Seconds" )
349   PORT_DIPSETTING(    0x00, DEF_STR ( Free_Play ) )
350   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "A:4" )
351   PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
352   PORT_DIPSETTING(    0x08, DEF_STR( 1C_1C ) )
353   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Lives ) ) PORT_DIPLOCATION( "A:5" )
354   PORT_DIPSETTING(    0x10, "3" )
355   PORT_DIPSETTING(    0x00, "5" )
356   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "A:6" )
357   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
358   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
359   PORT_DIPNAME( 0x40, 0x40, "Attract Mode Audio" ) PORT_DIPLOCATION( "A:7" )
360   PORT_DIPSETTING(    0x40, "Always Playing" )
361   PORT_DIPSETTING(    0x00, "One Out of 8 Times" )
362   PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "A:8" )
363
364   PORT_START_TAG("DSWB")
365   PORT_DIPNAME( 0x01, 0x01, "Gameplay Mode" ) PORT_DIPLOCATION( "B:1" )
366   PORT_DIPSETTING(    0x01, "Normal Play" )
367   PORT_DIPSETTING(    0x00, "Self-Diagnostics Mode" )
368   PORT_DIPUNUSED_DIPLOC( 0x02, IP_ACTIVE_LOW, "B:2" )
369   PORT_DIPUNUSED_DIPLOC( 0x04, IP_ACTIVE_LOW, "B:3" )
370   PORT_DIPNAME( 0x08, 0x08, "LD Player" ) PORT_DIPLOCATION( "B:4" )
371   PORT_DIPSETTING(    0x08, "LDV-1000" )
372   PORT_DIPSETTING(    0x00, "PR-7820" )
373   /* DIP SWITCH 5 isn't read here, but it also controls LD player selection - I wonder how to add it properly? */
374   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
375   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
376   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(laserdisc_command_r, 0 )   /* Enter pin on LD player */
377   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(laserdisc_status_r, 0 )   /* Ready pin on LD player */
378
379   /* The following 3 port definitions can be combined into one (thus making this scheme work) if the port bit limit is raised from 32 to 64 */
380   /* But maybe there's a better way to do it than what I have here? */
381   /* Or maybe this doesn't even work at all :) */
382   /* "Scan codes" heisted from Daphne - need to be tested! */
383   PORT_START_TAG("THAYERS_ACTIONS")
384   PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( DEF_STR( No ) ) PORT_CODE( KEYCODE_DEL_PAD )
385   PORT_BIT( 0x31, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( DEF_STR( Yes ) ) PORT_CODE( KEYCODE_0_PAD )
386   PORT_BIT( 0x32, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "Items" ) PORT_CODE( KEYCODE_1_PAD )
387   PORT_BIT( 0x33, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "Drop Item" ) PORT_CODE( KEYCODE_2_PAD )
388   PORT_BIT( 0x34, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "Give Score" ) PORT_CODE( KEYCODE_3_PAD )
389   PORT_BIT( 0x35, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "Replay" ) PORT_CODE( KEYCODE_4_PAD )
390   PORT_BIT( 0x36, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "Combine Action" ) PORT_CODE( KEYCODE_6_PAD )
391   PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "Save Game" ) PORT_CODE( KEYCODE_7_PAD )
392   PORT_BIT( 0x38, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "Update" ) PORT_CODE( KEYCODE_8_PAD )
393   PORT_BIT( 0x39, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "Hint" ) PORT_CODE( KEYCODE_9_PAD )
394
395   PORT_START_TAG("THAYERS_LETTERS")
396   PORT_BIT( 0x41, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "A" ) PORT_CODE( KEYCODE_A )
397   PORT_BIT( 0x42, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "B - Silver Wheat" ) PORT_CODE( KEYCODE_B )
398   PORT_BIT( 0x43, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "C - Spell of Seeing" ) PORT_CODE( KEYCODE_C )
399   PORT_BIT( 0x44, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "D - Great Circlet" ) PORT_CODE( KEYCODE_D )
400   PORT_BIT( 0x45, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "E - Black Mace" ) PORT_CODE( KEYCODE_E )
401   PORT_BIT( 0x46, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "F - Hunting Horn" ) PORT_CODE( KEYCODE_F )
402   PORT_BIT( 0x47, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "G - Long Bow" ) PORT_CODE( KEYCODE_G )
403   PORT_BIT( 0x48, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "H - Medallion" ) PORT_CODE( KEYCODE_H )
404   PORT_BIT( 0x49, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "I - Crown" ) PORT_CODE( KEYCODE_I )
405   PORT_BIT( 0x4a, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "J - Onyx Seal" ) PORT_CODE( KEYCODE_J )
406   PORT_BIT( 0x4b, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "K - Orb of Quoid" ) PORT_CODE( KEYCODE_K )
407   PORT_BIT( 0x4c, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "L" ) PORT_CODE( KEYCODE_L )
408   PORT_BIT( 0x4d, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "M - Spell of Understanding" ) PORT_CODE( KEYCODE_M )
409   PORT_BIT( 0x4e, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "N - Staff" ) PORT_CODE( KEYCODE_N )
410   PORT_BIT( 0x4f, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "O - Crystal" ) PORT_CODE( KEYCODE_O )
411   PORT_BIT( 0x50, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "P" ) PORT_CODE( KEYCODE_P )
412   PORT_BIT( 0x51, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "Q" ) PORT_CODE( KEYCODE_Q )
413   PORT_BIT( 0x52, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "R - Blood Sword" ) PORT_CODE( KEYCODE_R )
414   PORT_BIT( 0x53, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "S - Dagger" ) PORT_CODE( KEYCODE_S )
415   PORT_BIT( 0x54, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "T - Chalice" ) PORT_CODE( KEYCODE_T )
416   PORT_BIT( 0x55, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "U - Cold Fire" ) PORT_CODE( KEYCODE_U )
417   PORT_BIT( 0x56, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "V - Shield" ) PORT_CODE( KEYCODE_V )
418   PORT_BIT( 0x57, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "W - Amulet" ) PORT_CODE( KEYCODE_W )
419   PORT_BIT( 0x58, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "X - Scepter" ) PORT_CODE( KEYCODE_X )
420   PORT_BIT( 0x59, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "Y - Coins" ) PORT_CODE( KEYCODE_Y )
421   PORT_BIT( 0x5a, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "Z - Spell of Release" ) PORT_CODE( KEYCODE_Z )
422
423   PORT_START_TAG("THAYERS_NUMBERS")
424   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "1 - Clear" ) PORT_CODE( KEYCODE_LCONTROL )
425   PORT_BIT( 0x81, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "2" ) PORT_CODE( KEYCODE_RCONTROL )
426   PORT_BIT( 0x82, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "3 - Enter" ) PORT_CODE( KEYCODE_ENTER )
427   PORT_BIT( 0x83, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "4 - Space" ) PORT_CODE( KEYCODE_SPACE )
428INPUT_PORTS_END
429
430
431static MACHINE_START( thayers )
432{
433   discinfo = laserdisc_init(LASERDISC_TYPE_LDV1000, get_disk_handle(0), 0);
434   return;
435}
436
437static INTERRUPT_GEN( vblank_callback_thayers )
438{
439   laserdisc_vsync(discinfo);
440}
441
442
443/* DRIVER */
444static MACHINE_DRIVER_START( thayers )
445/*  main cpu */
446   MDRV_CPU_ADD(Z80, SCHEMATIC_CLOCK)
447   MDRV_CPU_PROGRAM_MAP(mainmem,0)
448   MDRV_CPU_IO_MAP(mainio,0)
449   MDRV_CPU_VBLANK_INT(vblank_callback_thayers, 1)
450
451   MDRV_MACHINE_START(thayers)
452
453/*  io device cpu */
454   MDRV_CPU_ADD(COP420, SCHEMATIC_CLOCK/2/8);      /* Can't read the schematics, but this is what daphne says */
455   MDRV_CPU_PROGRAM_MAP(copmem,0)
456   MDRV_CPU_IO_MAP(copio,0)
457
458/*  video */
459   MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
460
461   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
462   MDRV_SCREEN_REFRESH_RATE(60)
463   MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
464   MDRV_SCREEN_SIZE(32*10, 32*8)
465   MDRV_SCREEN_VISIBLE_AREA(0*10, 32*10-1, 0*8, 32*8-1)
466
467   MDRV_PALETTE_LENGTH(256)
468   MDRV_VIDEO_UPDATE(thayers)
469
470/*  sound */
471MACHINE_DRIVER_END
472
473
474ROM_START( thayers )
475   ROM_REGION( 0xe000, REGION_CPU1, 0 )
476   ROM_LOAD( "tq_u33.bin", 0x0000, 0x8000, CRC(82df5d89) SHA1(58dfd62bf8c5a55d1eba397d2c284e99a4685a3f) )
477   ROM_LOAD( "tq_u1.bin",  0xc000, 0x2000, CRC(e8e7f566) SHA1(df7b83ef465c65446c8418bc6007447693b75021) )
478
479   ROM_REGION( 0x400, REGION_CPU2, 0 )
480   ROM_LOAD( "tq_cop.bin", 0x000, 0x400, CRC(6748e6b3) SHA1(5d7d1ecb57c1501ef6a2d9691eecc9970586606b) )
481ROM_END
482
483
484static DRIVER_INIT( thayers )
485{
486   Z80_IRQ_STATUS_CLEAR();
487   m_ssi_control = 0;
488
489   cop_g_latch = 0xff;
490}
491
492/*    YEAR  NAME     PARENT   MACHINE  INPUT    INIT     MONITOR  COMPANY               FULLNAME           FLAGS) */
493GAME( 1983, thayers, 0,       thayers, thayers, thayers, ROT0,    "RDI Video Systems",  "Thayer's Quest",  GAME_NOT_WORKING|GAME_NO_SOUND)
src/mame/drivers/merit.c
r841r842
187187   AM_RANGE(0xf800, 0xfbff) AM_WRITE(palette_w) AM_BASE(&paletteram)
188188ADDRESS_MAP_END
189189
190static ADDRESS_MAP_START( bigappg_map, ADDRESS_SPACE_PROGRAM, 8 )
191   AM_RANGE(0x0000, 0x5fff) AM_ROM
192   AM_RANGE(0xa000, 0xafff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
193   AM_RANGE(0xc004, 0xc007) AM_READWRITE(ppi8255_0_r, ppi8255_0_w)
194   AM_RANGE(0xc008, 0xc00b) AM_READWRITE(ppi8255_1_r, ppi8255_1_w)
195   AM_RANGE(0xe000, 0xe001) AM_WRITENOP // 6845 crt
196   AM_RANGE(0xe800, 0xefff) AM_READWRITE(MRA8_RAM, phrcraze_attr_w) AM_BASE(&phrcraze_attr)
197   AM_RANGE(0xf000, 0xf7ff) AM_READWRITE(MRA8_RAM, phrcraze_bg_w) AM_BASE(&videoram)
198   AM_RANGE(0xf800, 0xfbff) AM_WRITE(palette_w) AM_BASE(&paletteram)
199ADDRESS_MAP_END
190200
201
191202static ADDRESS_MAP_START( trvwhiz_map, ADDRESS_SPACE_PROGRAM, 8 )
192203   AM_RANGE(0x0000, 0x3fff) AM_ROM
193204   AM_RANGE(0x4c00, 0x4cff) AM_READWRITE(questions_r, high_offset_w)
r841r842
599610   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
600611INPUT_PORTS_END
601612
613INPUT_PORTS_START( bigappg )
614   PORT_START
615   PORT_DIPNAME( 0x01, 0x01, "1" )
616   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
617   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
618   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
619   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
620   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
621   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
622   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
623   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
624   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
625   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
626   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
627   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
628   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
629   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
630   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
631   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
632   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
633   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
634   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
635   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
636   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
637   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
638   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
602639
640   PORT_START
641   PORT_DIPNAME( 0x01, 0x01, "2" )
642   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
643   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
644   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
645   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
646   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
647   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
648   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
649   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
650   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
651   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
652   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
653   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
654   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
655   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
656   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
657   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
658   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
659   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
660   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
661   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
662   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
663   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
664   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
603665
666   PORT_START
667   PORT_DIPNAME( 0x01, 0x01, "3" )
668   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
669   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
670   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
671   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
672   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
673   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
674   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
675   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
676   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
677   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
678   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
679   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
680   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
681   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
682   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
683   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
684   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
685   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
686   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
687   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
688   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
689   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
690   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
691
692   PORT_START
693   PORT_DIPNAME( 0x01, 0x01, "4" )
694   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
695   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
696   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
697   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
698   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
699   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
700   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
701   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
702   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
703   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
704   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
705   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
706   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
707   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
708   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
709   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
710   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
711   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
712   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
713   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
714   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
715   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
716   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
717INPUT_PORTS_END
718
604719static TILE_GET_INFO( get_tile_info_bg )
605720{
606721   int attr = phrcraze_attr[tile_index];
r841r842
711826   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
712827MACHINE_DRIVER_END
713828
829static MACHINE_DRIVER_START( bigappg )
830   MDRV_IMPORT_FROM(pitboss)
831
832   MDRV_CPU_MODIFY("main")
833   MDRV_CPU_PROGRAM_MAP(bigappg_map,0)
834   MDRV_CPU_IO_MAP(tictac_io_map,0)
835MACHINE_DRIVER_END
836
714837static MACHINE_DRIVER_START( tictac )
715838   MDRV_IMPORT_FROM(pitboss)
716839
r841r842
774897   ROM_LOAD( "u40",          0x0000, 0x2000, CRC(b13a3fb1) SHA1(25760aa27c88b8be248a87df724bf8797d179e7a) )
775898ROM_END
776899
900ROM_START( bigappg )
901   ROM_REGION( 0x10000, REGION_CPU1, 0 )
902   ROM_LOAD( "merit.u5",     0x0000, 0x8000, CRC(47bad6fd) SHA1(87f6c603b52e184f82179869d7b58453cbd34814) )
777903
904   ROM_REGION( 0x6000, REGION_GFX1, 0 )
905   ROM_LOAD( "merit.u39",    0x0000, 0x2000, CRC(506e20b4) SHA1(cd28d4f56f83ed3f7cfa44280975c0a6af474707) )
906   ROM_LOAD( "merit.u38",    0x2000, 0x2000, CRC(1924feeb) SHA1(c4656a04e2284a265554ea9774d0201c44864809) )
907   ROM_LOAD( "merit.u37",    0x4000, 0x2000, CRC(12a04867) SHA1(8e3a6050d854ccc906ae473a104a16d610e4f1da) )
778908
779ROM_START( trvwhzho )
909   ROM_REGION( 0x2000, REGION_GFX2, 0 )
910   ROM_LOAD( "merit.u40",    0x0000, 0x2000, CRC(ac4983b8) SHA1(a552a15f813c331de67eaae2ed42cc037b26c5bd) )
911ROM_END
912
913ROM_START( trvwzh )
780914   ROM_REGION( 0x10000, REGION_CPU1, 0 )
781915   ROM_LOAD( "trivia.u5",    0x0000, 0x2000, CRC(731fd5b1) SHA1(1074780321029446da0e6765b9e036b06b067a48) )
782916   ROM_LOAD( "trivia.u6",    0x2000, 0x2000, CRC(af6886c0) SHA1(48005b921d7ce33ffc0ba160be82053a26382a9d) )
r841r842
798932   ROM_LOAD( "trivia.sx2",   0x58000, 0x8000, CRC(32519098) SHA1(d070e02bb10e04964893903599a69a8943f9ac8a) )
799933ROM_END
800934
801ROM_START( trvwhzha )
935ROM_START( trvwzha )
802936   ROM_REGION( 0x10000, REGION_CPU1, 0 )
803937   ROM_LOAD( "trivia.u5",    0x0000, 0x2000, CRC(731fd5b1) SHA1(1074780321029446da0e6765b9e036b06b067a48) )
804938   ROM_LOAD( "trivia.u6",    0x2000, 0x2000, CRC(af6886c0) SHA1(48005b921d7ce33ffc0ba160be82053a26382a9d) )
r841r842
817951   ROM_LOAD( "trivia2.spo",  0x28000, 0x8000, CRC(ee9263b3) SHA1(1644ab01f17e3af1e193e509d64dcbb243d3eb80) )
818952ROM_END
819953
820ROM_START( trvwhzve )
954ROM_START( trvwzv )
821955   ROM_REGION( 0x10000, REGION_CPU1, 0 )
822956   ROM_LOAD( "u5.bin",       0x0000, 0x2000, CRC(fd3531ac) SHA1(d11573df65676e704b28cc2d99fb004b48a358a4) )
823957   ROM_LOAD( "u6.bin",       0x2000, 0x2000, CRC(29e43d0e) SHA1(ad610748fe37436880648078f5d1a305cb147c5d) )
r841r842
839973   ROM_LOAD( "sex_001_02.bin", 0x58000, 0x8000, CRC(0be4ef9a) SHA1(c80080f1c853e1043bf7e47bea322540a8ac9195) )
840974ROM_END
841975
842ROM_START( trvwhzva )
976ROM_START( trvwzva )
843977   ROM_REGION( 0x10000, REGION_CPU1, 0 )
844978   ROM_LOAD( "u5.bin",       0x0000, 0x2000, CRC(fd3531ac) SHA1(d11573df65676e704b28cc2d99fb004b48a358a4) )
845979   ROM_LOAD( "u6.bin",       0x2000, 0x2000, CRC(29e43d0e) SHA1(ad610748fe37436880648078f5d1a305cb147c5d) )
r841r842
858992   ROM_LOAD( "spo_001_03.bin", 0x28000, 0x8000, CRC(a6af8e41) SHA1(64f672bfa5fb2c0575103614986e53e238c5984f) )
859993ROM_END
860994
861ROM_START( trvwhzii )
995ROM_START( trvwz2 )
862996   ROM_REGION( 0x10000, REGION_CPU1, 0 )
863997   ROM_LOAD( "u5_0e",        0x0000, 0x2000, CRC(97b8d320) SHA1(573945531113d8aae9418ba1e9a2063052227029) )
864998   ROM_LOAD( "u6_0e",        0x2000, 0x2000, CRC(2e86288d) SHA1(62c7024d8dfebed9bb05ea91302efe5d18cb7d2a) )
r841r842
8841018   ROM_LOAD( "sex-101.02a",  0x98000, 0x8000, CRC(2596091b) SHA1(7fbb9c2c3f74e12714513928c8cf3769bf29fc8b) )
8851019ROM_END
8861020
887ROM_START( trvwziii )
1021ROM_START( trvwz3h )
8881022   ROM_REGION( 0x10000, REGION_CPU1, 0 )
8891023   ROM_LOAD( "u5",           0x0000, 0x2000, CRC(ad4ab519) SHA1(80e99f4e5542115e34074b41bbc69906e01a408f) )
8901024   ROM_LOAD( "u6",           0x2000, 0x2000, CRC(21a44014) SHA1(331f8b4fa3f837de070b68b959c818122aedc68a) )
r841r842
9091043   ROM_LOAD( "15",           0x88000, 0x8000, CRC(b064876b) SHA1(588300fb6603f334de41a9685b1fcf8c642b5c16) )
9101044ROM_END
9111045
912ROM_START( trvwhziv )
1046ROM_START( trvwz3v )
9131047   ROM_REGION( 0x10000, REGION_CPU1, 0 )
1048   ROM_LOAD( "u5",    0x0000, 0x2000, CRC(97b8d320) SHA1(573945531113d8aae9418ba1e9a2063052227029) )
1049   ROM_LOAD( "u6",    0x2000, 0x2000, CRC(2e86288d) SHA1(62c7024d8dfebed9bb05ea91302efe5d18cb7d2a) )
1050
1051   ROM_REGION( 0x6000, REGION_GFX1, 0 )
1052   ROM_LOAD( "u39",   0x0000, 0x2000, CRC(b9d9a80e) SHA1(55b6a0d09f8619df93ba936e083835c859a557df) )
1053   ROM_LOAD( "u38",   0x2000, 0x2000, CRC(8348083e) SHA1(260a4c1ae043e7ceac65a8818c23940d32275879) )
1054   ROM_LOAD( "u37",   0x4000, 0x2000, CRC(b4d3c9f4) SHA1(dda99549306519c147d275d8c6af672e80a96b67) )
1055
1056   ROM_REGION( 0x2000, REGION_GFX2, 0 )
1057   ROM_LOAD( "u40",   0x0000, 0x2000, CRC(fbfae092) SHA1(b8569819952a5c805f11b6854d64b3ae9c857f97) )
1058
1059   ROM_REGION( 0xa0000, REGION_USER1, ROMREGION_ERASEFF ) // questions
1060   ROM_LOAD( "10",    0x08000, 0x8000, CRC(15d16703) SHA1(9184f63669e9ec93e88276777e1b7f209543c3e3) )
1061   ROM_LOAD( "8",     0x18000, 0x8000, CRC(647f3394) SHA1(636647ae620fd2f985b82e3516451e3bffd44040) )
1062   ROM_LOAD( "7",     0x28000, 0x8000, CRC(974dca96) SHA1(eb4a745c84307a1bbb220659877f97c28cd515ac) )
1063   ROM_LOAD( "6",     0x38000, 0x8000, CRC(e15ef8d0) SHA1(51c946311ffe507aa9031044bc34e5ae8d3473ab) )
1064   ROM_LOAD( "5",     0x48000, 0x8000, CRC(503115a1) SHA1(5e6630191465b3d2a590fab08b4f47f7408ecc44) )
1065   ROM_LOAD( "4",     0x58000, 0x8000, CRC(0e4fe73d) SHA1(9aee22a5837637ec5e360b72e71555942df1d26f) )
1066   ROM_LOAD( "3",     0x68000, 0x8000, CRC(f56c0935) SHA1(8e16133ad90829bbc0e0f2e9ee9c26e9d0c5057e) )
1067   ROM_LOAD( "2",     0x78000, 0x8000, CRC(057f6676) SHA1(a93a7a76fc8b8263568a50b00a57f3abe76c9aa3) )
1068   ROM_LOAD( "1",     0x88000, 0x8000, CRC(1fa46b86) SHA1(16d54d0932fe342399faf303eafa3c0b7ba2e202) )
1069   ROM_LOAD( "0",     0x98000, 0x8000, CRC(b395cd97) SHA1(a42c7c1687eaba64a725888cd6413568cc90b010) )
1070ROM_END
1071
1072ROM_START( trvwz4 )
1073   ROM_REGION( 0x10000, REGION_CPU1, 0 )
9141074   ROM_LOAD( "u5.bin",       0x0000, 0x8000, CRC(bc23a1ab) SHA1(b9601f316e373c568c5b208de417617094046559) )
9151075
9161076   ROM_REGION( 0x6000, REGION_GFX1, 0 )
r841r842
10581218
10591219GAME( 1983, pitboss,  0,       pitboss,  pitboss,  0,      ROT0,  "Merit", "Pit Boss",                                    GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
10601220GAME( 1983, casino5,  0,       pitboss,  pitboss,  0,      ROT0,  "Merit", "Casino 5",                                    GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
1061GAME( 1985, trvwhzho, 0,       trvwhiz,  trivia,   key_0,  ROT0,  "Merit", "Trivia ? Whiz (Horizontal - Question set 1)", GAME_WRONG_COLORS )
1062GAME( 1985, trvwhzha, trvwhzho,trvwhiz,  trivia,   key_0,  ROT0,  "Merit", "Trivia ? Whiz (Horizontal - Question set 2)", GAME_WRONG_COLORS )
1063GAME( 1985, trvwhzve, 0,       trvwhiz,  trivia,   key_0,  ROT90, "Merit", "Trivia ? Whiz (Vertical - Question set 1)",   GAME_WRONG_COLORS )
1064GAME( 1985, trvwhzva, trvwhzve,trvwhiz,  trivia,   key_0,  ROT90, "Merit", "Trivia ? Whiz (Vertical - Question set 2)",   GAME_WRONG_COLORS )
1065GAME( 1985, trvwhzii, 0,       trvwhiz,  trivia,   key_2,  ROT90, "Merit", "Trivia ? Whiz (Edition 2)",                   GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS )
1066GAME( 1985, trvwziii, 0,       trvwhiz,  trivia,   key_0,  ROT0,  "Merit", "Trivia ? Whiz (Edition 3)",                   GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS )
1067GAME( 1985, trvwhziv, 0,       trvwhziv, trvwhziv, key_5,  ROT90, "Merit", "Trivia ? Whiz (Edition 4)",                   GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS )
1221GAME( 1985, trvwzh,   0,       trvwhiz,  trivia,   key_0,  ROT0,  "Merit", "Trivia ? Whiz (Horizontal - Question set 1)", GAME_WRONG_COLORS )
1222GAME( 1985, trvwzha,  trvwzh,  trvwhiz,  trivia,   key_0,  ROT0,  "Merit", "Trivia ? Whiz (Horizontal - Question set 2)", GAME_WRONG_COLORS )
1223GAME( 1985, trvwzv,   0,       trvwhiz,  trivia,   key_0,  ROT90, "Merit", "Trivia ? Whiz (Vertical - Question set 1)",   GAME_WRONG_COLORS )
1224GAME( 1985, trvwzva,  trvwzv,  trvwhiz,  trivia,   key_0,  ROT90, "Merit", "Trivia ? Whiz (Vertical - Question set 2)",   GAME_WRONG_COLORS )
1225GAME( 1985, trvwz2,   0,       trvwhiz,  trivia,   key_2,  ROT90, "Merit", "Trivia ? Whiz (Edition 2)",                   GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS )
1226GAME( 1985, trvwz3h,  0,       trvwhiz,  trivia,   key_0,  ROT0,  "Merit", "Trivia ? Whiz (Edition 3 - Horizontal)",      GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS )
1227GAME( 1985, trvwz3v,  0,       trvwhiz,  trivia,   key_0,  ROT90, "Merit", "Trivia ? Whiz (Edition 3 - Vertical)",        GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS )
1228GAME( 1985, trvwz4,   0,       trvwhziv, trvwhziv, key_5,  ROT90, "Merit", "Trivia ? Whiz (Edition 4)",                   GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS )
10681229GAME( 1985, tictac,   0,       tictac,   tictac,   key_4,  ROT0,  "Merit", "Tic Tac Trivia",                              GAME_WRONG_COLORS )
10691230GAME( 1986, phrcraze, 0,       phrcraze, phrcraze, key_7,  ROT0,  "Merit", "Phraze Craze",                                GAME_WRONG_COLORS )
10701231GAME( 1986, phrcrazs, 0,       phrcraze, phrcrazs, key_7,  ROT90, "Merit", "Phraze Craze (Sex Kit)",                      GAME_WRONG_COLORS )
1232GAME( 1986, bigappg,  0,       bigappg,  bigappg,  0,      ROT0,  "Merit", "Big Apple Games ?",                           GAME_WRONG_COLORS | GAME_NOT_WORKING )
src/mame/drivers/amspdwy.c
r841r842
165165   PORT_DIPNAME( 0x10, 0x00, "Steering Test" )
166166   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
167167   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
168   PORT_BIT(     0xe0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
168   PORT_DIPUNUSED( 0x20, IP_ACTIVE_HIGH )
169   PORT_DIPUNUSED( 0x40, IP_ACTIVE_HIGH )
170   PORT_DIPUNUSED( 0x80, IP_ACTIVE_HIGH )
169171
170172   PORT_START_TAG("DSW2")
171173   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) )
r841r842
178180   PORT_DIPSETTING(    0x04, DEF_STR( Normal ) )
179181   PORT_DIPSETTING(    0x08, DEF_STR( Hard ) )
180182   PORT_DIPSETTING(    0x0c, DEF_STR( Hardest ) )
181   PORT_DIPNAME( 0x10, 0x00, "Time" )
183   PORT_DIPNAME( 0x30, 0x00, "Time" )                      /* code at 0x1770 */
184   PORT_DIPSETTING(    0x30, "20 sec" )
185   PORT_DIPSETTING(    0x20, "30 sec" )
182186   PORT_DIPSETTING(    0x10, "45 sec" )
183187   PORT_DIPSETTING(    0x00, "60 sec" )
184   PORT_BIT(     0xe0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
188   PORT_DIPUNUSED( 0x40, IP_ACTIVE_HIGH )
189   PORT_DIPUNUSED( 0x80, IP_ACTIVE_HIGH )
185190
186191   PORT_START_TAG("IN2")   // Player 1 Wheel + Coins
187192   PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL )   // wheel
r841r842
206211INPUT_PORTS_END
207212
208213
214INPUT_PORTS_START( amspdwya )
209215
216   PORT_INCLUDE(amspdwy)
210217
218   PORT_MODIFY("DSW2")
219   PORT_DIPNAME( 0x10, 0x00, "Time" )                      /* code at 0x2696 */
220   PORT_DIPSETTING(    0x10, "45 sec" )
221   PORT_DIPSETTING(    0x00, "60 sec" )
222   PORT_DIPUNUSED( 0x20, IP_ACTIVE_HIGH )
223INPUT_PORTS_END
224
225
226
211227/***************************************************************************
212228
213229
r841r842
381397
382398/* (C) 1987 ETI 8402 MAGNOLIA ST. #C SANTEE, CA 92071 */
383399
384GAME( 1987, amspdwy,  0,       amspdwy, amspdwy, 0, ROT0, "Enerdyne Technologies, Inc.", "American Speedway (set 1)", 0 )
385GAME( 1987, amspdwya, amspdwy, amspdwy, amspdwy, 0, ROT0, "Enerdyne Technologies, Inc.", "American Speedway (set 2)", 0 )
400GAME( 1987, amspdwy,  0,       amspdwy, amspdwy,  0, ROT0, "Enerdyne Technologies, Inc.", "American Speedway (set 1)", 0 )
401GAME( 1987, amspdwya, amspdwy, amspdwy, amspdwya, 0, ROT0, "Enerdyne Technologies, Inc.", "American Speedway (set 2)", 0 )
src/mame/drivers/naughtyb.c
r841r842
1818a800-afff 2Kb Sound Control B (mirrored)
1919b000-b7ff 2Kb 8bit Game Control read-only (mirrored)
2020b800-bfff 1Kb 8bit Dip Switch read-only (mirrored)
21c000-0000 16Kb Unused
21c000-ffff 16Kb Unused
2222
2323memory mapped ports:
2424
r841r842
107107#include "sound/tms36xx.h"
108108#include "includes/phoenix.h"
109109
110#define CLOCK_XTAL 12000000
111
110112static READ8_HANDLER( in0_port_r )
111113{
112114   int in0 = input_port_0_r(0);
r841r842
379381static MACHINE_DRIVER_START( naughtyb )
380382
381383   /* basic machine hardware */
382   MDRV_CPU_ADD(Z80, 1500000)   /* 3 MHz ? */
384   MDRV_CPU_ADD(Z80, CLOCK_XTAL / 4) /* 12 MHz clock, divided by 4. CPU is a Z80A */
383385   MDRV_CPU_PROGRAM_MAP(readmem,writemem)
384386   MDRV_CPU_VBLANK_INT(naughtyb_interrupt,1)
385387
r841r842
417419static MACHINE_DRIVER_START( popflame )
418420
419421   /* basic machine hardware */
420   MDRV_CPU_ADD(Z80, 1500000)   /* 3 MHz ? */
422   MDRV_CPU_ADD(Z80, CLOCK_XTAL / 4) /* 12 MHz clock, divided by 4. CPU is a Z80A */
421423   MDRV_CPU_PROGRAM_MAP(readmem,popflame_writemem)
422424   MDRV_CPU_VBLANK_INT(naughtyb_interrupt,1)
423425
r841r842
706708   ROM_LOAD( "comic_hi.u7",  0x1c000, 0x4000, CRC(8e8b5f71) SHA1(71514af2af2468a13cf5cc4237fa2590d7a16b27) )
707709ROM_END
708710
711/* These 'Trivia Genius' roms were found on a Naughty Boy pcb, factory?-retooled somewhat to use 8 2732s instead of 16 2716s. The pcb is a real Naughty Boy PCB, with Jaleco markings. Latest chip datecodes on the PCB are from 85 (on the two proms) but the other chips are dated 81 and 82 (which makes sense if they're formerly naughty boy pcbs).
712This may be a hacked/bootlegged version of trivia master, hacked to run on a naughty boy pcb, or (if ALL versions of trivia master ran on naughty boy pcbs) may be a 'second source bootleg', a bootleg of the trivia master naughty boy conversion.
713*/
714
709715ROM_START( trvgns )
710716   ROM_REGION( 0x10000, REGION_CPU1, 0 )
711717   ROM_LOAD( "trvgns.30",   0x0000, 0x1000, CRC(a17f172c) SHA1(b831673f860f6b7566e248b13b349d82379b5e72) )
r841r842
717723   ROM_LOAD( "trvgns.46",   0x1000, 0x1000, CRC(f4021941) SHA1(81a93b5b2bf46e2f5254a86b14e31b31b7821d4f) )
718724
719725   ROM_REGION( 0x2000, REGION_GFX2, ROMREGION_DISPOSE )
720   ROM_LOAD( "trvgns.48",   0x0000, 0x1000, NO_DUMP )
726   ROM_LOAD( "trvgns.48",   0x0000, 0x1000, CRC(6d05845e) SHA1(b427075ab05aea79298211d882b523d4fad1e9ad) )
721727   ROM_LOAD( "trvgns.50",   0x1000, 0x1000, CRC(ac292be8) SHA1(41f95273907b27158af0631c716fdb9301852e27) )
722   ROM_RELOAD(             0x0000, 0x1000 )   //until the rom is redumped
723728
724729   ROM_REGION( 0x0200, REGION_PROMS, 0 )
725   /* wrong! from trvmstr just to see the game */
726   ROM_LOAD( "ic64.bin",     0x0000, 0x0100, BAD_DUMP CRC(e9915da8) SHA1(7c64ea76e39eaff724179d52ff5482df363fcf56) )  /* palette low & high bits */
727   ROM_RELOAD(              0x0100, 0x0100 )
730   ROM_LOAD( "82s129.ic63.bin", 0x0000, 0x0100, CRC(8ab6076a) SHA1(042df008aa4fd0a99b662333fa91d20ed17bf045) ) /* palette low bits */
731   ROM_LOAD( "82s129.ic64.bin", 0x0100, 0x0100, CRC(c766c54a) SHA1(3ac001009ce1dbcb3eaacd2da2540c19259934c0) ) /* palette high bits */
728732
729733   ROM_REGION( 0x20000, REGION_USER1, 0 ) /* Question roms */
730734   ROM_LOAD( "trvgns.u2",   0x00000, 0x4000, CRC(109bd359) SHA1(ea8cb4b0a14a3ef4932947afdfa773ecc34c2b9b) )
r841r842
784788GAME( 1982, popflamn, popflame, naughtyb, naughtyb, 0,        ROT90, "Jaleco", "Pop Flamer (bootleg on Naughty Boy PCB)", 0 )
785789GAME( 1985, trvmstr,  0,      naughtyb, trvmstr,  trvmstr,  ROT90, "Enerdyne Technologies Inc.", "Trivia Master (set 1)", 0 )
786790GAME( 1985, trvmstra, trvmstr,  naughtyb, trvmstr,  trvmstr,  ROT90, "Enerdyne Technologies Inc.", "Trivia Master (set 2)", 0 )
787GAME( 198?, trvgns,   0,      naughtyb, trvmstr,  trvmstr,  ROT90, "Enerdyne Technologies Inc.", "Trivia Genius", GAME_WRONG_COLORS )
791GAME( 1985, trvgns,   0,      naughtyb, trvmstr,  trvmstr,  ROT90, "bootleg?", "Trivia Genius", 0 )
src/mame/drivers/firetrk.c
r841r842
11401140
11411141ROM_START( firetrk )
11421142   ROM_REGION( 0x4000, REGION_CPU1, 0 )
1143   ROM_LOAD(          "32823-02.c1", 0x2000, 0x800, CRC(9570bdd3) SHA1(4d26a9490d05d53da55fc59459a4dce5bca6c761) )
1144   ROM_LOAD(          "32824-01.d1", 0x2800, 0x800, CRC(a5fc5629) SHA1(bf20510d8623eda2740ff296a7813a3e6f7ec76e) )
1145   ROM_LOAD_NIB_HIGH( "32816-01.k1", 0x3000, 0x800, CRC(c0535598) SHA1(15cb6985b0b22140b7fae1e050e0b63dd4d0f793) )
1146   ROM_LOAD_NIB_LOW ( "32820-01.k2", 0x3000, 0x800, CRC(5733f9ed) SHA1(0f19a40793dadfb7de2c2b54a44929b414d0f4ed) )
1147   ROM_LOAD_NIB_HIGH( "32815-01.j1", 0x3800, 0x800, CRC(506ee759) SHA1(d111356c84f3d9942a27fbe243e716d14c258a16) )
1148   ROM_LOAD_NIB_LOW ( "32819-01.j2", 0x3800, 0x800, CRC(f1c3fa87) SHA1(d75cf4ad0bcac3289c068837fc24cfe84ce7542a) )
1143   ROM_LOAD(          "032823-02.c1", 0x2000, 0x800, CRC(9570bdd3) SHA1(4d26a9490d05d53da55fc59459a4dce5bca6c761) )
1144   ROM_LOAD(          "032824-01.d1", 0x2800, 0x800, CRC(a5fc5629) SHA1(bf20510d8623eda2740ff296a7813a3e6f7ec76e) )
1145   ROM_LOAD_NIB_HIGH( "032816-01.k1", 0x3000, 0x800, CRC(c0535598) SHA1(15cb6985b0b22140b7fae1e050e0b63dd4d0f793) )
1146   ROM_LOAD_NIB_LOW ( "032820-01.k2", 0x3000, 0x800, CRC(5733f9ed) SHA1(0f19a40793dadfb7de2c2b54a44929b414d0f4ed) )
1147   ROM_LOAD_NIB_HIGH( "032815-01.j1", 0x3800, 0x800, CRC(506ee759) SHA1(d111356c84f3d9942a27fbe243e716d14c258a16) )
1148   ROM_LOAD_NIB_LOW ( "032819-01.j2", 0x3800, 0x800, CRC(f1c3fa87) SHA1(d75cf4ad0bcac3289c068837fc24cfe84ce7542a) )
11491149
11501150   ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) /* text */
1151   ROM_LOAD( "32827-01.r3", 0x000, 0x800, CRC(cca31d2b) SHA1(78235176c9cb2abd73a5778b54560b87634ca0e4) )
1151   ROM_LOAD( "032827-01.r3", 0x000, 0x800, CRC(cca31d2b) SHA1(78235176c9cb2abd73a5778b54560b87634ca0e4) )
11521152
11531153   ROM_REGION( 0x0800, REGION_GFX2, ROMREGION_DISPOSE ) /* tiles */
1154   ROM_LOAD( "32828-02.f5", 0x000, 0x800, CRC(68ef5f19) SHA1(df227d6a57bba6298ebdeb5a118878da21d889f6) )
1154   ROM_LOAD( "032828-02.f5", 0x000, 0x800, CRC(68ef5f19) SHA1(df227d6a57bba6298ebdeb5a118878da21d889f6) )
11551155
1156   ROM_REGION( 0x0400, REGION_GFX3, ROMREGION_DISPOSE ) /* car */
1157   ROM_LOAD( "32831-01.p7", 0x000, 0x400, CRC(bb8d144f) SHA1(9a1355ea6f88e96926c32e0e36ac0525b0243906) )
1156   ROM_REGION( 0x0400, REGION_GFX3, ROMREGION_DISPOSE ) /* cab */
1157   ROM_LOAD( "032831-01.p7", 0x000, 0x400, CRC(bb8d144f) SHA1(9a1355ea6f88e96926c32e0e36ac0525b0243906) )
11581158
11591159   ROM_REGION( 0x1000, REGION_GFX4, ROMREGION_DISPOSE ) /* trailer */
1160   ROM_LOAD( "32829-01.j5", 0x000, 0x800, CRC(e7267d71) SHA1(7132b98622e899227a378ba8c010dde39c479978) )
1161   ROM_LOAD( "32830-01.l5", 0x800, 0x800, CRC(e4d8b685) SHA1(30978658899c83e32dabdf554a13cf5e5235c725) )
1160   ROM_LOAD( "032829-01.j5", 0x000, 0x800, CRC(e7267d71) SHA1(7132b98622e899227a378ba8c010dde39c479978) )
1161   ROM_LOAD( "032830-01.l5", 0x800, 0x800, CRC(e4d8b685) SHA1(30978658899c83e32dabdf554a13cf5e5235c725) )
11621162
11631163   ROM_REGION( 0x100, REGION_PROMS, 0 )
1164   ROM_LOAD( "9114.prm", 0x0000, 0x100, CRC(b8094b4c) SHA1(82dc6799a19984f3b204ee3aeeb007e55afc8be3) ) /* sync */
1164   ROM_LOAD( "009114.prm", 0x0000, 0x100, CRC(b8094b4c) SHA1(82dc6799a19984f3b204ee3aeeb007e55afc8be3) ) /* sync */
11651165ROM_END
11661166
11671167
11681168ROM_START( superbug )
11691169   ROM_REGION( 0x2000, REGION_CPU1, 0 )
1170   ROM_LOAD( "9121.d1", 0x0800, 0x800, CRC(350df308) SHA1(b957c830bb95e0752ea9793e3edcfdd52235e0ab) )
1171   ROM_LOAD( "9122.c1", 0x1000, 0x800, CRC(eb6e3e37) SHA1(5237f6bd3a7a3eca737c728296230cf0d1f436b0) )
1172   ROM_LOAD( "9123.a1", 0x1800, 0x800, CRC(f42c6bbe) SHA1(41470984fe951eac9f6dc77862b00ecfe8aaa51d) )
1170   ROM_LOAD( "009121.d1", 0x0800, 0x800, CRC(350df308) SHA1(b957c830bb95e0752ea9793e3edcfdd52235e0ab) )
1171   ROM_LOAD( "009122.c1", 0x1000, 0x800, CRC(eb6e3e37) SHA1(5237f6bd3a7a3eca737c728296230cf0d1f436b0) )
1172   ROM_LOAD( "009123.a1", 0x1800, 0x800, CRC(f42c6bbe) SHA1(41470984fe951eac9f6dc77862b00ecfe8aaa51d) )
11731173
11741174   ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) /* text */
1175   ROM_LOAD( "9124.m3", 0x0000, 0x400, CRC(f8af8dd5) SHA1(49ab85550f546f85048e2f73163837c602dde568) )
1176   ROM_LOAD( "9471.n3", 0x0400, 0x400, CRC(52250698) SHA1(cc55254c54dbcd3fd1465c82a715f2e567f44951) )
1175   ROM_LOAD( "009124.m3", 0x0000, 0x400, CRC(f8af8dd5) SHA1(49ab85550f546f85048e2f73163837c602dde568) )
1176   ROM_LOAD( "009471.n3", 0x0400, 0x400, CRC(52250698) SHA1(cc55254c54dbcd3fd1465c82a715f2e567f44951) )
11771177
11781178   ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE ) /* tiles */
1179   ROM_LOAD( "9126.f5", 0x0000, 0x400, CRC(ee695137) SHA1(295fdfef88e0c841fe8ad505151ca0837e77ef83) )
1180   ROM_LOAD( "9472.h5", 0x0400, 0x400, CRC(5ddb80ac) SHA1(bdbbbba6efdd4cca75630d203f7c7eaf41b1a32d) )
1181   ROM_LOAD( "9127.e5", 0x0800, 0x400, CRC(be1386b4) SHA1(17e92df58b25075ec7a383a958db02b42066578a) )
1179   ROM_LOAD( "009126.f5", 0x0000, 0x400, CRC(ee695137) SHA1(295fdfef88e0c841fe8ad505151ca0837e77ef83) )
1180   ROM_LOAD( "009472.h5", 0x0400, 0x400, CRC(5ddb80ac) SHA1(bdbbbba6efdd4cca75630d203f7c7eaf41b1a32d) )
1181   ROM_LOAD( "009127.e5", 0x0800, 0x400, CRC(be1386b4) SHA1(17e92df58b25075ec7a383a958db02b42066578a) )
11821182   ROM_RELOAD(          0x0C00, 0x400 )
11831183
11841184   ROM_REGION( 0x0400, REGION_GFX3, ROMREGION_DISPOSE ) /* car */
1185   ROM_LOAD( "9125.k6", 0x0000, 0x400, CRC(a3c835df) SHA1(e9b6dba1919c389bb55a8fe3c074b6702322e4e5) )
1185   ROM_LOAD( "009125.k6", 0x0000, 0x400, CRC(a3c835df) SHA1(e9b6dba1919c389bb55a8fe3c074b6702322e4e5) )
11861186
11871187   ROM_REGION( 0x0100, REGION_PROMS, 0 )
1188   ROM_LOAD( "9114.prm", 0x0000, 0x100, CRC(b8094b4c) SHA1(82dc6799a19984f3b204ee3aeeb007e55afc8be3) ) /* sync */
1188   ROM_LOAD( "009114.prm", 0x0000, 0x100, CRC(b8094b4c) SHA1(82dc6799a19984f3b204ee3aeeb007e55afc8be3) ) /* sync */
11891189ROM_END
11901190
11911191
src/mame/drivers/mcr.c
r841r842
799799
800800
801801/* verified from wiring diagram, plus DIP switches from manual */
802INPUT_PORTS_START( kicka )
802INPUT_PORTS_START( kickc )
803803   PORT_START_TAG("SSIO.IP0")   /* J4 1-8 */
804804   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
805805   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
r841r842
16671667   ROM_LOAD( "82s123.12d",   0x0000, 0x0020, CRC(e1281ee9) SHA1(9ac9b01d24affc0ee9227a4364c4fd8f8290343a) )   /* from shollow, assuming it's the same */
16681668ROM_END
16691669
1670ROM_START( kicka )
1670ROM_START( kickman )
16711671   ROM_REGION( 0x10000, REGION_CPU1, 0 )
1672   ROM_LOAD( "1200-a-ur.b3",  0x0000, 0x1000, CRC(d8cd9f0f) SHA1(a55f4423d57510256fb9b20b1bded06636c7bd05) )
1673   ROM_LOAD( "1300-b-ur.b4",  0x1000, 0x1000, CRC(4dee27bb) SHA1(b411d0c05339ae92732c89a4d0b7038d6b360475) )
1674   ROM_LOAD( "1400-c-ur.b5",  0x2000, 0x1000, CRC(06f070c9) SHA1(02eb19296e6c32544041ab5bf3dbb5a4f20c8ace) )
1675   ROM_LOAD( "1500-d-ur.d4",  0x3000, 0x1000, CRC(8d95b740) SHA1(93287324b599ec50dd84cc2dc70e82ccd8314a8a) )
1676   ROM_LOAD( "1600-e-ur.d5",  0x4000, 0x1000, CRC(f24bc0d7) SHA1(31dc996898c01f3427403e396a47444732904674) )
1677   ROM_LOAD( "1700-f-ur.d6",  0x5000, 0x1000, CRC(672361fc) SHA1(010029460c25935f2156eb64c9109c26ce40b752) )
1678
1679   ROM_REGION( 0x10000, REGION_CPU2, 0 )
1680   ROM_LOAD( "4200-a.a7",    0x0000, 0x1000, CRC(9e35c02e) SHA1(92afd0126dcfb2d4401927b2cf261090e186b6fa) )
1681   ROM_LOAD( "4300-b.a8",    0x1000, 0x1000, CRC(ca2b7c28) SHA1(fdcca3b755822c045c3c321cccc3f58112e2ad11) )
1682   ROM_LOAD( "4400-c.a9",    0x2000, 0x1000, CRC(d1901551) SHA1(fd7d6059f8ac59f95ae6f8ef12fbfce7ed16ec12) )
1683   ROM_LOAD( "4500-d.a10",   0x3000, 0x1000, CRC(d36ddcdc) SHA1(2d3ec83b9fa5a9d309c393a0c3ee45f0ba8192c9) )
1684
1685   ROM_REGION( 0x02000, REGION_GFX1, ROMREGION_DISPOSE )
1686   ROM_LOAD( "1800g-v2.g4",  0x0000, 0x1000, CRC(b4d120f3) SHA1(e61ae236f14eb1f519e196046fe8240c10932c2e) )
1687   ROM_LOAD( "1900h-v2.g5",  0x1000, 0x1000, CRC(c3ba4893) SHA1(76998db55519d7f1cf0f6b51d4f8ad7161b3a92e) )
1688
1689   ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE )
1690   ROM_LOAD( "2600a-v2.1e",  0x0000, 0x2000, CRC(2c5d6b55) SHA1(c326b8c7bcb903ea3a1a721443a37e1e8eabe975) )
1691   ROM_LOAD( "2700b-v2.1d",  0x2000, 0x2000, CRC(565ea97d) SHA1(4a30a371ad407bf774cf08bf528f824675383698) )
1692   ROM_LOAD( "2800c-v2.1b",  0x4000, 0x2000, CRC(f3be56a1) SHA1(eb3eb0379a918a2959565572d88f9b0f021d1c2a) )
1693   ROM_LOAD( "2900d-v2.1a",  0x6000, 0x2000, CRC(77da795e) SHA1(ebebc8551e7a7534d89bb8458eb2576713cfbeaf) )
1694
1695   ROM_REGION( 0x0020, REGION_PROMS, 0 )
1696   ROM_LOAD( "82s123.12d",   0x0000, 0x0020, CRC(e1281ee9) SHA1(9ac9b01d24affc0ee9227a4364c4fd8f8290343a) )   /* from shollow, assuming it's the same */
1697ROM_END
1698
1699ROM_START( kickc )
1700   ROM_REGION( 0x10000, REGION_CPU1, 0 )
16721701   ROM_LOAD( "1200-a.b3",    0x0000, 0x1000, CRC(22fa42ed) SHA1(3922ce1f13e21cae9ee8d1af58f2bbe83d5eb979) )
16731702   ROM_LOAD( "1300-b.b4",    0x1000, 0x1000, CRC(afaca819) SHA1(383f40d49e4c256e9eb83e778c140b0b97860f69) )
16741703   ROM_LOAD( "1400-c.b5",    0x2000, 0x1000, CRC(6054ee56) SHA1(77da5a8d6209c746b233808a452dbf1917da7f3e) )
r841r842
25132542/* 90009 CPU board + 91399 video gen + 90908 sound I/O */
25142543GAME( 1981, solarfox, 0,        mcr_90009,     solarfox, solarfox,  ROT90 ^ ORIENTATION_FLIP_Y, "Bally Midway", "Solar Fox (upright)", GAME_SUPPORTS_SAVE )
25152544GAME( 1981, kick,     0,        mcr_90009,     kick,     kick,      ORIENTATION_SWAP_XY,        "Midway", "Kick (upright)", GAME_SUPPORTS_SAVE )
2516GAME( 1981, kicka,    kick,     mcr_90009,     kicka,    kick,      ROT90,                      "Midway", "Kick (cocktail)", GAME_SUPPORTS_SAVE )
2545GAME( 1981, kickman,  kick,     mcr_90009,     kick,     kick,      ORIENTATION_SWAP_XY,        "Midway", "Kickman (upright)", GAME_SUPPORTS_SAVE )
2546GAME( 1981, kickc,    kick,     mcr_90009,     kickc,    kick,      ROT90,                      "Midway", "Kick (cocktail", GAME_SUPPORTS_SAVE )
25172547
25182548/* 90010 CPU board + 91399 video gen + 90913 sound I/O */
25192549GAME( 1981, shollow,  0,        mcr_90010,     shollow,  mcr_90010, ROT90, "Bally Midway", "Satan's Hollow (set 1)", GAME_SUPPORTS_SAVE )
src/mame/drivers/ninjaw.c
r841r842
118118B31-26.58
119119
120120
121Stephh's notes (based on the game M68000 code and some tests) :
122
1231) 'ninjaw*'
124
125  - Regoin stored at 0x01fffe.w
126  - Sets :
127      * 'ninjaw' : region = 0x0003
128      * 'ninjawj' : region = 0x0000
129  - Coinage relies on the region (code at 0x0013bc) :
130      * 0x0000 (Japan), 0x0001 (?) and 0x0002 (US) use TAITO_COINAGE_JAPAN_OLD
131      * 0x0003 (World) and 0x0004 to 0x0007 (licenced to xxx) use TAITO_COINAGE_WORLD
132  - Notice screen only if region = 0x0000
133  - According to the manual, DSWB bit 6 determines continue pricing :
134
135    PORT_DIPNAME( 0x40, 0x00, DEF_STR( Continue_Price ) ) PORT_DIPLOCATION("SW2:7")
136    PORT_DIPSETTING(    0x40, DEF_STR( 1C_1C ) )
137    PORT_DIPSETTING(    0x00, "Same as Start" )
138
139    However, many conditions are required to make it work due to code at 0x001404 :
140      * region must not be 0x0000
141      * coinage must be the same for both slots
142      * coinage must be 2C_1C
143    This is why this Dip Switch has NO effect in the sets we have :
144      * 'ninjaw' : coinage is always different for the 2 slots
145      * 'ninjawj' : region = 0x0000
146
147
1482) 'darius2'
149
150  - Regoin stored at 0x03fffe.w
151  - Sets :
152      * 'darius2' : region = 0x0001
153  - Coinage relies on the region (code at 0x00f37a) :
154      * 0x0000 (Asia ?), 0x0001 (Japan) and 0x0002 (US) use TAITO_COINAGE_JAPAN_OLD
155      * 0x0002 (US, licenced to ROMSTAR) use slighlty different TAITO_COINAGE_US :
156          . coin A : 4C_3C instead of 4C_1C, same other settings otherwise
157          . coin B : same settings
158      * 0x0003 (World) and 0x0004 to 0x0007 (?) use TAITO_COINAGE_WORLD
159  - Texts and game name rely on the region :
160      * 0x0001 : some texts in Japanese - game name is "Darius II"
161      * other : all texts in English - game name is "Sagaia"
162  - Notice screen only if region = 0x0001
163  - FBI logo only if region = 0x0002
164  - Japan version resets score on continue, other versions don't
165
166
121167TODO
122168====
123169
r841r842
145191***************************************************************************/
146192
147193#include "driver.h"
194#include "taitoipt.h"
148195#include "cpu/m68000/m68000.h"
149196#include "video/taitoic.h"
150197#include "audio/taitosnd.h"
r841r842
412459             INPUT PORTS, DIPs
413460***********************************************************/
414461
415#define NINJAW_DSWA \
416   PORT_START_TAG("DSWA") \
417   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:1") \
418   PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) \
419   PORT_DIPSETTING(    0x01, DEF_STR( On ) ) \
420   PORT_DIPUNUSED_DIPLOC( 0x02, IP_ACTIVE_LOW, "SW1:2" ) \
421   PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW1:3" ) \
422   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:4") \
423   PORT_DIPSETTING(    0x00, DEF_STR( Off ) ) \
424   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
462INPUT_PORTS_START( ninjaw )
463   /* 0x200000 (port 0) -> 0x0c2291.b and 0x24122c (shared RAM) */
464   PORT_START_TAG("DSWA")
465   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:1")
466   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
467   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
468   PORT_DIPUNUSED_DIPLOC( 0x02, IP_ACTIVE_LOW, "SW1:2" )
469   TAITO_DSWA_BITS_2_TO_3_LOC(SW1)
470   TAITO_COINAGE_WORLD_LOC(SW1)
425471
426#define NINJAW_DSWB \
427   PORT_START_TAG("DSWB") \
428   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") \
429   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) ) \
430   PORT_DIPSETTING(    0x03, DEF_STR( Medium ) ) \
431   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) ) \
432   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) ) \
433   PORT_DIPUNUSED_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW2:3" ) /* Manual shows switches 3, 4, 5, 6 & 8 as not used */ \
434   PORT_DIPUNUSED_DIPLOC( 0x08, IP_ACTIVE_LOW, "SW2:4" ) \
435   PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" ) \
436   PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" ) \
437   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Continue_Price ) ) PORT_DIPLOCATION("SW2:7") \
438   PORT_DIPSETTING(    0x40, "1 Credit" ) \
439   PORT_DIPSETTING(    0x00, "As start price" ) \
472   /* 0x200000 (port 1) -> 0x0c2290.b and 0x24122e (shared RAM) */
473   PORT_START_TAG("DSWB")
474   TAITO_DIFFICULTY_LOC(SW2)
475   PORT_DIPUNUSED_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW2:3" )        /* Manual shows switches 3, 4, 5, 6 & 8 as not used */
476   PORT_DIPUNUSED_DIPLOC( 0x08, IP_ACTIVE_LOW, "SW2:4" )
477   PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" )
478   PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" )
479   PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7" )        /* see notes */
440480   PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
441481
442#define TAITO_COINAGE_JAPAN_8 \
443   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") \
444   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) ) \
445   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
446   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
447   PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) ) \
448   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") \
449   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
450   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) ) \
451   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
452   PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
453
454#define TAITO_COINAGE_WORLD_8 \
455   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") \
456   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) ) \
457   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) ) \
458   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) ) \
459   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
460   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") \
461   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) ) \
462   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) ) \
463   PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) ) \
464   PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
465
466#define NINJAW_IN2 \
467   PORT_START_TAG("IN2") \
468   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )   /* Stops working if this is high */ \
469   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_UNKNOWN ) \
470   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) \
471   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 ) \
472   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1)   /* Freezes game */ \
473   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_UNKNOWN ) \
474   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN ) \
482   PORT_START_TAG("IN2")
483   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )                /* Stops working if this is high */
484   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_UNKNOWN )
485   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
486   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
487   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Freeze") PORT_CODE(KEYCODE_F1)
488   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_UNKNOWN )
489   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN )
475490   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_UNKNOWN )
476491
477#define NINJAW_IN3 \
478   PORT_START_TAG("IN3") \
479   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) \
480   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) \
481   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) \
482   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) \
483   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) \
484   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) \
485   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) \
486   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
492   PORT_START_TAG("IN3")
493   TAITO_JOY_DUAL_UDRL( 1, 2 )
487494
488#define NINJAW_IN4 \
489   PORT_START_TAG("IN4") \
490   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) \
491   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) \
492   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) \
493   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) \
494   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) \
495   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) \
496   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) \
495   PORT_START_TAG("IN4")
496   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )
497   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT )
498   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
499   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
500   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
501   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
502   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
497503   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
498
499INPUT_PORTS_START( ninjaw )
500   NINJAW_DSWA
501   TAITO_COINAGE_WORLD_8
502
503   NINJAW_DSWB
504
505   NINJAW_IN2
506
507   NINJAW_IN3
508
509   NINJAW_IN4
510504INPUT_PORTS_END
511505
506/* Can't use PORT_INCLUDE because of PORT_DIPLOCATION */
512507INPUT_PORTS_START( ninjawj )
513   NINJAW_DSWA
514   TAITO_COINAGE_JAPAN_8
508   PORT_INCLUDE(ninjaw)
515509
516   NINJAW_DSWB
517
518   NINJAW_IN2
519
520   NINJAW_IN3
521
522   NINJAW_IN4
510   PORT_MODIFY("DSWA")
511   TAITO_COINAGE_JAPAN_OLD_LOC(SW1)
523512INPUT_PORTS_END
524513
514/* Can't use PORT_INCLUDE because of PORT_DIPLOCATION */
525515INPUT_PORTS_START( darius2 )
526   PORT_START_TAG("DSWA")
527   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1")
516   PORT_INCLUDE(ninjaw)
517
518   /* 0x200000 (port 0) -> 0x0c2002 (-$5ffe,A5) and 0x0c2006 (-$5ffa,A5) */
519   PORT_MODIFY("DSWA")
520   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1")    /* code at 0x00c20e */
528521   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
529522   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
530523   PORT_DIPNAME( 0x02, 0x02, "Continuous Fire" ) PORT_DIPLOCATION("SW1:2")
531524   PORT_DIPSETTING(    0x02, DEF_STR( Normal ) )
532525   PORT_DIPSETTING(    0x00, "Fast" )
533   PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW1:3" )
534   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:4")
535   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
536   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
537   TAITO_COINAGE_JAPAN_8
526   TAITO_DSWA_BITS_2_TO_3_LOC(SW1)
527   TAITO_COINAGE_JAPAN_OLD_LOC(SW1)
538528
539   PORT_START_TAG("DSWB")
540   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2")
541   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
542   PORT_DIPSETTING(    0x03, DEF_STR( Medium ) )
543   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
544   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
529   /* 0x200000 (port 1) -> 0x0c2004 (-$5ffc,A5) and 0x0c2008 (-$5ff8,A5) */
530   PORT_MODIFY("DSWB")
531   TAITO_DIFFICULTY_LOC(SW2)
545532   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:3,4")
546   PORT_DIPSETTING(    0x00, "every 500k" )
547533   PORT_DIPSETTING(    0x0c, "every 700k" )
548534   PORT_DIPSETTING(    0x08, "every 800k" )
549535   PORT_DIPSETTING(    0x04, "every 900k" )
536   PORT_DIPSETTING(    0x00, "every 1000k" )
550537   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:5,6")
551538   PORT_DIPSETTING(    0x30, "3" )
552539   PORT_DIPSETTING(    0x20, "4" )
r841r842
558545   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:8")
559546   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
560547   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
561
562   NINJAW_IN2
563
564   NINJAW_IN3
565
566   NINJAW_IN4
567548INPUT_PORTS_END
568549
569550
src/mame/drivers/asuka.c
r841r842
7777Notes on Bonze DIPs by Stephane Humbert
7878---------------------------------------
7979
80The 2nd bonus life is awarded at the wrong score because of a bug in
80The 2nd bonus life may be awarded at the wrong score because of a bug in
8181the game code at $961E; and the unused DIP switch enables the built-in
8282map editor if the branch at $7572 is skipped.
8383
r841r842
104104***************************************************************************/
105105
106106#include "driver.h"
107#include "taitoipt.h"
107108#include "video/taitoic.h"
108109#include "audio/taitosnd.h"
109110#include "sound/2610intf.h"
r841r842
367368             INPUT PORTS, DIPs
368369***********************************************************/
369370
370
371#define TAITO_COINAGE_JAPAN_8 \
372   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \
373   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) ) \
374   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
375   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
376   PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) ) \
377   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \
378   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
379   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) ) \
380   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) \
381   PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
382
383#define TAITO_COINAGE_WORLD_8 \
384   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \
385   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) ) \
386   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) ) \
387   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) ) \
388   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
389   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \
390   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) ) \
391   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) ) \
392   PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) ) \
393   PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
394
395#define TAITO_COINAGE_US_8 \
396   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) \
397   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) ) \
398   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) ) \
399   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) ) \
400   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
401   PORT_DIPNAME( 0xc0, 0xc0, "Price to Continue" ) \
402   PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) ) \
403   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) \
404   PORT_DIPSETTING(    0x80, DEF_STR( 1C_1C ) ) \
405   PORT_DIPSETTING(    0xc0, "Same as Start" )
406
407#define TAITO_DIFFICULTY_8 \
408   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) \
409   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) ) \
410   PORT_DIPSETTING(    0x03, DEF_STR( Medium ) ) \
411   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) ) \
412   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
413
414#define ASUKA_PLAYERS_INPUT( player ) \
415   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(player) PORT_8WAY \
416   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(player) PORT_8WAY \
417   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(player) PORT_8WAY \
418   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) PORT_8WAY \
419   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) \
420   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player) \
421   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) \
422   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
423
424#define ASUKA_SYSTEM_INPUT \
425   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_TILT ) \
426   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 ) \
427   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_COIN1 ) \
428   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_COIN2 ) \
429   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) \
430   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) \
431   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_START1 ) \
432   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_START2 )
433
434371#define CADASH_PLAYERS_INPUT( player ) \
435372   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) \
436373   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) \
437374   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player) \
438375   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) \
439   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) PORT_8WAY \
440   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(player) PORT_8WAY \
441   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(player) PORT_8WAY \
442   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(player) PORT_8WAY
376   INPUT_GENERIC_JOY_HIGH_NIBBLE(player, IP_ACTIVE_LOW, PORT_8WAY, RIGHT, LEFT, DOWN, UP)
443377
444#define CADASH_SYSTEM_INPUT \
445   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_COIN1 ) \
446   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_COIN2 ) \
447   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_START2 ) \
448   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_START1 ) \
449   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_SERVICE1 ) \
450   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_TILT ) \
451   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN ) \
452   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_UNKNOWN )
453378
454
379/* different players and system inputs than 'asuka' */
455380INPUT_PORTS_START( bonzeadv )
381   /* 0x390000 -> 0x10cb7c ($b7c,A5) */
456382   PORT_START_TAG("DSWA")
457   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
458   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
459   PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) )
460   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
461   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
462   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
463   PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
464   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
465   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
466   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
467   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
468   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
469   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
470   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
471   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
472   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )
473   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) )
474   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
475   PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) )
476   PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
383   TAITO_MACHINE_COCKTAIL
384   TAITO_COINAGE_WORLD
477385
386   /* 0x3b0000 -> 0x10cb7e ($b7e,A5) */
478387   PORT_START_TAG("DSWB")
479   TAITO_DIFFICULTY_8
480   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
481   PORT_DIPSETTING(    0x08, "40k,100k" )
482   PORT_DIPSETTING(    0x0c, "50k,150k" )
483   PORT_DIPSETTING(    0x04, "60k,200k" )
484   PORT_DIPSETTING(    0x00, "80k,250k" )
388   TAITO_DIFFICULTY
389   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )            /* bogus due to code at 0x00961e */
390   PORT_DIPSETTING(    0x08, "40k 100k" )                       /* 300k 1000k 1500k 2000k 2500k 3000k 3500k 5000k */
391   PORT_DIPSETTING(    0x0c, "50k 150k" )                       /* 500k 1000k 2000k 3000k 4000k 5000k 6000k 7000k */
392   PORT_DIPSETTING(    0x04, "60k 200k" )                       /* 500k 1000k 2000k 3000k 4000k 5000k 6000k 7000k */
393   PORT_DIPSETTING(    0x00, "80k 250k" )                       /* 500k 1000k 2000k 3000k 4000k 5000k 6000k 7000k */
485394   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
486395   PORT_DIPSETTING(    0x20, "2" )
487396   PORT_DIPSETTING(    0x30, "3" )
r841r842
490399   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) )
491400   PORT_DIPSETTING(    0x40, DEF_STR( No ) )
492401   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
493   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
494   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
495   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
402   PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )                        /* previously map editor */
496403
497404   PORT_START_TAG("800007")
498405   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
r841r842
513420   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 )
514421   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 )
515422
516   PORT_START_TAG("80000d")
423   PORT_START_TAG("80000D")
517424   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
518425   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
519426   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
r841r842
524431   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
525432INPUT_PORTS_END
526433
527INPUT_PORTS_START( jigkmgri ) /* coinage DIPs differ from bonzeadv */
528   PORT_START_TAG("DSWA")
529   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
530   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
531   PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) )
532   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
533   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
534   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
535   PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
536   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
537   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
538   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
539   TAITO_COINAGE_JAPAN_8
434INPUT_PORTS_START( jigkmgri )
435   PORT_INCLUDE(bonzeadv)
540436
541   PORT_START_TAG("DSWB")
542   TAITO_DIFFICULTY_8
543   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
544   PORT_DIPSETTING(    0x08, "40k,100k" )
545   PORT_DIPSETTING(    0x0c, "50k,150k" )
546   PORT_DIPSETTING(    0x04, "60k,200k" )
547   PORT_DIPSETTING(    0x00, "80k,250k" )
548   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
549   PORT_DIPSETTING(    0x20, "2" )
550   PORT_DIPSETTING(    0x30, "3" )
551   PORT_DIPSETTING(    0x10, "4" )
552   PORT_DIPSETTING(    0x00, "5" )
553   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) )
554   PORT_DIPSETTING(    0x40, DEF_STR( No ) )
555   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
556   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
557   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
558   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
559
560   PORT_START_TAG("800007")
561   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
562   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
563   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
564
565   PORT_START_TAG("800009")
566   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
567   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
568
569   PORT_START_TAG("80000b")
570   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
571   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
572   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
573   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
574   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
575   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
576   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 )
577   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 )
578
579   PORT_START_TAG("80000d")
580   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
581   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
582   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
583   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
584   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
585   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
586   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
587   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
437   PORT_MODIFY("DSWA")
438   TAITO_COINAGE_JAPAN_OLD
588439INPUT_PORTS_END
589440
590441INPUT_PORTS_START( asuka )
442   /* 0x400000 -> 0x103618 */
591443   PORT_START_TAG("DSWA")
592   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) /* Listed as "Unused" in the manual */
593   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
594   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
595   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
596   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
597   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
598   PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
599   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
600   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
601   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
602   TAITO_COINAGE_JAPAN_8
444   TAITO_MACHINE_NO_COCKTAIL
445   TAITO_COINAGE_JAPAN_OLD
603446
447   /* 0x400002 -> 0x10361c */
604448   PORT_START_TAG("DSWB")
605   TAITO_DIFFICULTY_8
606   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
607   PORT_DIPSETTING(    0x0c, "500 Points" )
608   PORT_DIPSETTING(    0x08, "1500 Points" )
609   PORT_DIPSETTING(    0x04, "2000 Points" )
610   PORT_DIPSETTING(    0x00, "2500 Points" )
449   TAITO_DIFFICULTY
450   PORT_DIPNAME( 0x0c, 0x0c, "Bonus Points" )                   /* for each plane shot after each end of level boss */
451   PORT_DIPSETTING(    0x0c, "500" )
452   PORT_DIPSETTING(    0x08, "1500" )
453   PORT_DIPSETTING(    0x04, "2000" )
454   PORT_DIPSETTING(    0x00, "2500" )
611455   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
612456   PORT_DIPSETTING(    0x10, "1" )
613457   PORT_DIPSETTING(    0x20, "2" )
r841r842
620464   PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
621465
622466   PORT_START_TAG("IN0")
623   ASUKA_PLAYERS_INPUT( 1 )
467   TAITO_JOY_UDLR_2_BUTTONS( 1 )
624468
625469   PORT_START_TAG("IN1")
626   ASUKA_PLAYERS_INPUT( 2 )
470   TAITO_JOY_UDLR_2_BUTTONS( 2 )
627471
628472   PORT_START_TAG("IN2")
629   ASUKA_SYSTEM_INPUT
473   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_TILT )
474   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )
475   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_COIN1 )
476   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_COIN2 )
477   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
478   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
479   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_START1 )
480   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_START2 )
630481INPUT_PORTS_END
631482
632483INPUT_PORTS_START( mofflott )
633   PORT_START_TAG("DSWA")
634   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
635   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
636   PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) )
637   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
638   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
639   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
640   PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
641   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
642   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
643   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
644   TAITO_COINAGE_JAPAN_8
484   PORT_INCLUDE(asuka)
645485
646   PORT_START_TAG("DSWB")
647   TAITO_DIFFICULTY_8
486   /* 0x400000 -> 0x100a92.b */
487   PORT_MODIFY("DSWA")
488   TAITO_MACHINE_COCKTAIL
489   TAITO_COINAGE_JAPAN_OLD
490
491   /* 0x400002 -> 0x100a93.b */
492   PORT_MODIFY("DSWB")
493   TAITO_DIFFICULTY
648494   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
649495   PORT_DIPSETTING(    0x0c, "20k and every 50k" )
650496   PORT_DIPSETTING(    0x08, "50k and every 100k" )
r841r842
661507   PORT_DIPNAME( 0x80, 0x80, "Number of Keys" )
662508   PORT_DIPSETTING(    0x00, "14" ) /* Hard */
663509   PORT_DIPSETTING(    0x80, "16" ) /* Easy */
664
665   PORT_START_TAG("IN0")
666   ASUKA_PLAYERS_INPUT( 1 )
667
668   PORT_START_TAG("IN1")
669   ASUKA_PLAYERS_INPUT( 2 )
670
671   PORT_START_TAG("IN2")
672   ASUKA_SYSTEM_INPUT
673510INPUT_PORTS_END
674511
512/* different players and system inputs than 'asuka' */
675513INPUT_PORTS_START( cadash )
514   /* 0x900000 -> 0x10317a ($317a,A5) */
676515   PORT_START_TAG("DSWA")
677   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )   /* Manual says leave it off */
678   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
679   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
680   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
681   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
682   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
683   PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
684   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
685   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
686   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
687   TAITO_COINAGE_WORLD_8
516   TAITO_MACHINE_NO_COCKTAIL
517   TAITO_COINAGE_WORLD
688518
519   /* 0x900002 -> 0x10317c ($317c,A5) */
689520   PORT_START_TAG("DSWB")
690   TAITO_DIFFICULTY_8
521   TAITO_DIFFICULTY
691522   PORT_DIPNAME( 0x0c, 0x0c, "Starting Time" )
692523   PORT_DIPSETTING(    0x00, "5:00" )
693524   PORT_DIPSETTING(    0x04, "6:00" )
r841r842
717548   CADASH_PLAYERS_INPUT( 2 )
718549
719550   PORT_START_TAG("IN2")
720   CADASH_SYSTEM_INPUT
551   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_COIN1 )
552   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_COIN2 )
553   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_START2 )
554   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_START1 )
555   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_SERVICE1 )
556   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_TILT )
557   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN )
558   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_UNKNOWN )
721559INPUT_PORTS_END
722560
723561INPUT_PORTS_START( cadashj )
724   PORT_START_TAG("DSWA")
725   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )   /* Manual says leave it off */
726   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
727   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
728   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
729   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
730   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
731   PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
732   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
733   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
734   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
735   TAITO_COINAGE_JAPAN_8
562   PORT_INCLUDE(cadash)
736563
737   PORT_START_TAG("DSWB")
738   TAITO_DIFFICULTY_8
739   PORT_DIPNAME( 0x0c, 0x0c, "Starting Time" )
740   PORT_DIPSETTING(    0x00, "5:00" )
741   PORT_DIPSETTING(    0x04, "6:00" )
742   PORT_DIPSETTING(    0x0c, "7:00" )
743   PORT_DIPSETTING(    0x08, "8:00" )
744   PORT_DIPNAME( 0x30, 0x30, "Added Time (after round clear)" )
745   PORT_DIPSETTING(    0x00, "Default - 2:00" )
746   PORT_DIPSETTING(    0x10, "Default - 1:00" )
747   PORT_DIPSETTING(    0x30, "Default" )
748   PORT_DIPSETTING(    0x20, "Default + 1:00" )
749   PORT_DIPNAME( 0xc0, 0xc0, "Communication Mode" )
750   PORT_DIPSETTING(    0xc0, "Stand alone" )
751   PORT_DIPSETTING(    0x80, "Master" )
752   PORT_DIPSETTING(    0x00, "Slave" )
753//  PORT_DIPSETTING(    0x40, "Stand alone" )
754
755   PORT_START_TAG("IN0")
756   CADASH_PLAYERS_INPUT( 1 )
757
758   PORT_START_TAG("IN1")
759   CADASH_PLAYERS_INPUT( 2 )
760
761   PORT_START_TAG("IN2")
762   CADASH_SYSTEM_INPUT
564   PORT_MODIFY("DSWA")
565   TAITO_COINAGE_JAPAN_OLD
763566INPUT_PORTS_END
764567
765568INPUT_PORTS_START( cadashu )
766   PORT_START_TAG("DSWA")
767   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )   /* Manual says leave it off */
768   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
769   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
770   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
771   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
772   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
773   PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
774   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
775   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
776   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
777   TAITO_COINAGE_US_8
569   PORT_INCLUDE(cadash)
778570
779   PORT_START_TAG("DSWB")
780   TAITO_DIFFICULTY_8
781   PORT_DIPNAME( 0x0c, 0x0c, "Starting Time" )
782   PORT_DIPSETTING(    0x00, "5:00" )
783   PORT_DIPSETTING(    0x04, "6:00" )
784   PORT_DIPSETTING(    0x0c, "7:00" )
785   PORT_DIPSETTING(    0x08, "8:00" )
786   PORT_DIPNAME( 0x30, 0x30, "Added Time (after round clear)" )
787   PORT_DIPSETTING(    0x00, "Default - 2:00" )
788   PORT_DIPSETTING(    0x10, "Default - 1:00" )
789   PORT_DIPSETTING(    0x30, "Default" )
790   PORT_DIPSETTING(    0x20, "Default + 1:00" )
791   PORT_DIPNAME( 0xc0, 0xc0, "Communication Mode" )
792   PORT_DIPSETTING(    0xc0, "Stand alone" )
793   PORT_DIPSETTING(    0x80, "Master" )
794   PORT_DIPSETTING(    0x00, "Slave" )
795//  PORT_DIPSETTING(    0x40, "Stand alone" )
796
797   PORT_START_TAG("IN0")
798   CADASH_PLAYERS_INPUT( 1 )
799
800   PORT_START_TAG("IN1")
801   CADASH_PLAYERS_INPUT( 2 )
802
803   PORT_START_TAG("IN2")
804   CADASH_SYSTEM_INPUT
571   PORT_MODIFY("DSWA")
572   TAITO_COINAGE_US
805573INPUT_PORTS_END
806574
807575INPUT_PORTS_START( galmedes )
808   PORT_START_TAG("DSWA")
809   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) /* Listed as "Unused" in the manual */
810   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
811   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
812   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
813   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
814   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
815   PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
816   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
817   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
818   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
819   TAITO_COINAGE_JAPAN_8
576   PORT_INCLUDE(asuka)
820577
821   PORT_START_TAG("DSWB")
822   TAITO_DIFFICULTY_8
578   /* 0x400000 -> 0x100982 */
579   PORT_MODIFY("DSWA")
580   TAITO_MACHINE_NO_COCKTAIL
581   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
582   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00)
583   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00)
584   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80)
585   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00)
586   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80)
587   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00)
588   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80)
589   PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80)
590   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )
591   PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80)
592   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80)
593   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80)
594   PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80)
595   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00)
596   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00)
597   PORT_DIPSETTING(    0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00)
598   PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00)
599
600   /* 0x400002 -> 0x100984 */
601   PORT_MODIFY("DSWB")
602   TAITO_DIFFICULTY
823603   PORT_DIPNAME( 0x0c, 0x08, DEF_STR( Bonus_Life ) )
824604   PORT_DIPSETTING(    0x08, "every 100k" )
825605   PORT_DIPSETTING(    0x0c, "100k and every 200k" )
r841r842
830610   PORT_DIPSETTING(    0x10, "2" )
831611   PORT_DIPSETTING(    0x30, "3" )
832612   PORT_DIPSETTING(    0x00, "4" )
833   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) /* Listed as "Unused" in the manual */
834   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
835   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
613   PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
836614   PORT_DIPNAME( 0x80, 0x80, "Coin Mode" )
837   PORT_DIPSETTING(    0x80, "Mode A" ) /* Mode A is "TAITO_COINAGE_JAPAN_8" */
838   PORT_DIPSETTING(    0x00, "Mode B" ) /* Mode B is "TAITO_COINAGE_WORLD_8" */
839
840   PORT_START_TAG("IN0")
841   ASUKA_PLAYERS_INPUT( 1 )
842
843   PORT_START_TAG("IN1")
844   ASUKA_PLAYERS_INPUT( 2 )
845
846   PORT_START_TAG("IN2")
847   ASUKA_SYSTEM_INPUT
615   PORT_DIPSETTING(    0x80, "Mode A (Japan)" ) /* Mode A is TAITO_COINAGE_JAPAN_OLD */
616   PORT_DIPSETTING(    0x00, "Mode B (World)" ) /* Mode B is TAITO_COINAGE_WORLD */
848617INPUT_PORTS_END
849618
850619INPUT_PORTS_START( earthjkr )
851   PORT_START_TAG("DSWA")
852   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) /* Listed as "Unused" in the manual */
853   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
854   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
855   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
856   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
857   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
858   PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
859   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
860   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
861   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
862   TAITO_COINAGE_JAPAN_8
620   PORT_INCLUDE(asuka)
863621
864   PORT_START_TAG("DSWB")
865   TAITO_DIFFICULTY_8
622   /* 0x400000 -> 0x100932 */
623   PORT_MODIFY("DSWA")
624   TAITO_MACHINE_NO_COCKTAIL
625   TAITO_COINAGE_JAPAN_OLD
626
627   /* 0x400002 -> 0x1009842 */
628   PORT_MODIFY("DSWB")
629   TAITO_DIFFICULTY
866630   PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
867   PORT_DIPSETTING(    0x08, "100k Only" )
868   PORT_DIPSETTING(    0x00, "100k / 300k" )
869   PORT_DIPSETTING(    0x04, "200k Only" )
631   PORT_DIPSETTING(    0x00, "100k and 300k" )
632   PORT_DIPSETTING(    0x08, "100k only" )
633   PORT_DIPSETTING(    0x04, "200k only" )
870634   PORT_DIPSETTING(    0x0c, DEF_STR( None ) )
871635   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
872636   PORT_DIPSETTING(    0x00, "1" )
873637   PORT_DIPSETTING(    0x30, "2" )
874638   PORT_DIPSETTING(    0x20, "3" )
875639   PORT_DIPSETTING(    0x10, "4" )
876   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) /* Listed as "Unused" in the manual */
877   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
878   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
879   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) /* Listed as "Unused" in the manual */
880   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
881   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
882
883   PORT_START_TAG("IN0")
884   ASUKA_PLAYERS_INPUT( 1 )
885
886   PORT_START_TAG("IN1")
887   ASUKA_PLAYERS_INPUT( 2 )
888
889   PORT_START_TAG("IN2")
890   ASUKA_SYSTEM_INPUT
640   PORT_DIPNAME( 0x40, 0x40, "Copyright" )                      /* code at 0x00b982 and 0x00dbce */
641   PORT_DIPSETTING(    0x40, "Visco" )                          /* Japan notice screen ON */
642   PORT_DIPSETTING(    0x00, "Visco (distributed by Romstar)" ) /* Japan notice screen OFF */
643   PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )
891644INPUT_PORTS_END
892645
893646INPUT_PORTS_START( eto )
894   PORT_START_TAG("DSWA")
895   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
896   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
897   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
898   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
899   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
900   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
901   PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
902   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
903   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
904   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
905   TAITO_COINAGE_JAPAN_8
647   PORT_INCLUDE(asuka)
906648
907   PORT_START_TAG("DSWB")
908   TAITO_DIFFICULTY_8
909   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
910   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
911   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
912   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
913   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
914   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
915   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
916   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
917   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
918   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
919   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
920   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
921   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
922   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
923   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
924   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
925   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
926   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
649   /* 0x300000 -> 0x200914 */
650   PORT_MODIFY("DSWA")
651   TAITO_MACHINE_NO_COCKTAIL
652   TAITO_COINAGE_JAPAN_OLD
927653
928   PORT_START_TAG("IN0")
929   ASUKA_PLAYERS_INPUT( 1 )
930
931   PORT_START_TAG("IN1")
932   ASUKA_PLAYERS_INPUT( 2 )
933
934   PORT_START_TAG("IN2")
935   ASUKA_SYSTEM_INPUT
654   /* 0x400002 -> 0x200916 */
655   PORT_MODIFY("DSWB")
656   TAITO_DIFFICULTY
657   PORT_DIPUNUSED( 0x04, IP_ACTIVE_LOW )
658   PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW )
659   PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW )
660   PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW )                        /* value stored at 0x20090a but not read back */
661   PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
662   PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )
936663INPUT_PORTS_END
937664
938665
r841r842
15891316GAME( 1989, cadashi,  cadash,   cadash,   cadash,   0, ROT0,   "Taito Corporation Japan", "Cadash (Italy)", 0 )
15901317GAME( 1989, cadashf,  cadash,   cadash,   cadash,   0, ROT0,   "Taito Corporation Japan", "Cadash (France)", 0 )
15911318GAME( 1992, galmedes, 0,        galmedes, galmedes, 0, ROT270, "Visco", "Galmedes (Japan)", 0 )
1592GAME( 1993, earthjkr, 0,        galmedes, earthjkr, 0, ROT270, "Visco", "U.N. Defense Force: Earth Joker (Japan)", 0 )
1319GAME( 1993, earthjkr, 0,        galmedes, earthjkr, 0, ROT270, "Visco", "U.N. Defense Force: Earth Joker", 0 )
15931320GAME( 1994, eto,      0,        eto,      eto,      0, ROT0,   "Visco", "Kokontouzai Eto Monogatari (Japan)", 0 )
src/tools/chdcd.c
r841r842
134134            EATWHITESPACE
135135            TOKENIZE
136136
137            m = 0;
138            s = 0;
139            f = 0;
140
137141            if (token[0] == '#')
138142            {
139143               /* it's a decimal offset, use it */
140144               f = strtoul(&token[1], NULL, 10);
141145            }
142            else
146            else if (isdigit(token[0]))
143147            {
144               m = 0;
145               s = 0;
146               f = 0;
147
148148               sscanf( token, "%d:%d:%d", &m, &s, &f );
149149
150150               /* convert to just frames */
r841r842
159159            EATWHITESPACE
160160            TOKENIZE
161161
162            m = 0;
163            s = 0;
164            f = 0;
165
162166            if (isdigit(token[0]))
163167            {
164               m = 0;
165               s = 0;
166               f = 0;
167
168168               if( sscanf( token, "%d:%d:%d", &m, &s, &f ) == 1 )
169169               {
170170                  f = m;
r841r842
175175                  s += (m * 60);
176176                  f += (s * 75);
177177               }
178
179               outtoc->tracks[trknum].frames = f;
180178            }
181            else if( trknum == 0 )
179            else if( trknum == 0 && outinfo->offset[trknum] != 0 )
182180            {
183181               /* the 1st track might have a length with no offset */
184               outtoc->tracks[trknum].frames = outinfo->offset[trknum] / (outtoc->tracks[trknum].datasize + outtoc->tracks[trknum].subsize);
182               f = outinfo->offset[trknum] / (outtoc->tracks[trknum].datasize + outtoc->tracks[trknum].subsize);
185183               outinfo->offset[trknum] = 0;
186184            }
187185            else
r841r842
194192
195193               tlen /= (outtoc->tracks[trknum].datasize + outtoc->tracks[trknum].subsize);
196194
197               outtoc->tracks[trknum].frames = tlen;
195               f = tlen;
198196            }
197
198            outtoc->tracks[trknum].frames = f;
199199         }
200200         else if (!strcmp(token, "TRACK"))
201201         {
src/osd/windows/winmain.c
r841r842
185185
186186   // sound options
187187   { NULL,                       NULL,       OPTION_HEADER,     "WINDOWS SOUND OPTIONS" },
188   { "audio_latency(1-5)",       "1",        0,                 "set audio latency (increase to reduce glitches)" },
188   { "audio_latency(1-5)",       "2",        0,                 "set audio latency (increase to reduce glitches)" },
189189
190190   // input options
191191   { NULL,                       NULL,       OPTION_HEADER,     "INPUT DEVICE OPTIONS" },
src/emu/cpu/i386/i386dasm.c
r841r842
661661   {"???",            0,            0,               0,               0            },
662662   {"???",            0,            0,               0,               0            },
663663   // 0x10 - NEC V series only
664   {"test1",         0,            PARAM_RM8,         PARAM_1,         0            },
665   {"test1",         0,            PARAM_RM16,         PARAM_1,         0            },
666   {"clr1",         0,            PARAM_RM8,         PARAM_1,         0            },
667   {"clr1",         0,            PARAM_RM16,         PARAM_1,         0            },
668   {"set1",         0,            PARAM_RM8,         PARAM_1,         0            },
669   {"set1",         0,            PARAM_RM16,         PARAM_1,         0            },
670   {"not1",         0,            PARAM_RM8,         PARAM_1,         0            },
671   {"not1",         0,            PARAM_RM16,         PARAM_1,         0            },
672   {"test1",         0,            PARAM_RM8,         PARAM_I8,         0            },
673   {"test1",         0,            PARAM_RM16,         PARAM_I8,         0            },
674   {"clr1",         0,            PARAM_RM8,         PARAM_I8,         0            },
675   {"clr1",         0,            PARAM_RM16,         PARAM_I8,         0            },
676   {"set1",         0,            PARAM_RM8,         PARAM_I8,         0            },
677   {"set1",         0,            PARAM_RM16,         PARAM_I8,         0            },
678   {"not1",         0,            PARAM_RM8,         PARAM_I8,         0            },
679   {"not1",         0,            PARAM_RM16,         PARAM_I8,         0            },
664   {"test1",         MODRM,         PARAM_RM8,         PARAM_1,         0            },
665   {"test1",         MODRM,         PARAM_RM16,         PARAM_1,         0            },
666   {"clr1",         MODRM,         PARAM_RM8,         PARAM_1,         0            },
667   {"clr1",         MODRM,         PARAM_RM16,         PARAM_1,         0            },
668   {"set1",         MODRM,         PARAM_RM8,         PARAM_1,         0            },
669   {"set1",         MODRM,         PARAM_RM16,         PARAM_1,         0            },
670   {"not1",         MODRM,         PARAM_RM8,         PARAM_1,         0            },
671   {"not1",         MODRM,         PARAM_RM16,         PARAM_1,         0            },
672   {"test1",         MODRM,         PARAM_RM8,         PARAM_I8,         0            },
673   {"test1",         MODRM,         PARAM_RM16,         PARAM_I8,         0            },
674   {"clr1",         MODRM,         PARAM_RM8,         PARAM_I8,         0            },
675   {"clr1",         MODRM,         PARAM_RM16,         PARAM_I8,         0            },
676   {"set1",         MODRM,         PARAM_RM8,         PARAM_I8,         0            },
677   {"set1",         MODRM,         PARAM_RM16,         PARAM_I8,         0            },
678   {"not1",         MODRM,         PARAM_RM8,         PARAM_I8,         0            },
679   {"not1",         MODRM,         PARAM_RM16,         PARAM_I8,         0            },
680680   // 0x20
681681   {"mov",            MODRM,         PARAM_REG,         PARAM_CREG,         0            },
682682   {"mov",            MODRM,         PARAM_REG,         PARAM_DREG,         0            },
src/emu/cpu/mips/dismips.mak
r841r842
1..\..\..\dismips.exe: dismips.c mipsdasm.c r3kdasm.c mips3dsm.c
2   gcc -O3 -Wall -I../.. -I../../debug -I../../windows -DINLINE="static __inline__" -DSTANDALONE -DMAME_DEBUG -DLSB_FIRST dismips.c mipsdasm.c r3kdasm.c mips3dsm.c -o../../../dismips
1..\..\..\..\dismips.exe: dismips.c mipsdasm.c r3kdasm.c mips3dsm.c ../../../lib/util/corestr.c
2   gcc -O3 -Wall -I../../../emu -I../../../lib/util -I../../../osd -DINLINE="static __inline__" -DSTANDALONE -DMAME_DEBUG -DLSB_FIRST dismips.c mipsdasm.c r3kdasm.c mips3dsm.c ../../../lib/util/corestr.c -o../../../../dismips
src/emu/cpu/mips/dismips.c
r841r842
163163            {
164164               usage();
165165            }
166            if( stricmp( argv[ i ], "bin" ) == 0 )
166            if( mame_stricmp( argv[ i ], "bin" ) == 0 )
167167            {
168168               format = FORMAT_BIN;
169169            }
170            else if( stricmp( argv[ i ], "psx" ) == 0 )
170            else if( mame_stricmp( argv[ i ], "psx" ) == 0 )
171171            {
172172               format = FORMAT_PSX;
173173            }
r841r842
182182            {
183183               usage();
184184            }
185            if( stricmp( argv[ i ], "psx" ) == 0 )
185            if( mame_stricmp( argv[ i ], "psx" ) == 0 )
186186            {
187187               cpu = CPU_PSX;
188188            }
189            else if( stricmp( argv[ i ], "r3000" ) == 0 )
189            else if( mame_stricmp( argv[ i ], "r3000" ) == 0 )
190190            {
191191               cpu = CPU_R3000;
192192            }
193            else if( stricmp( argv[ i ], "r4000" ) == 0 )
193            else if( mame_stricmp( argv[ i ], "r4000" ) == 0 )
194194            {
195195               cpu = CPU_R4000;
196196            }
src/emu/cpu/saturn/saturnds.c
r841r842
5656static const char number_2_hex[]=
5757{ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
5858
59static INT8 saturn_peekop_dis8(int pc)
60{
61   return cpu_readop(pc)|(cpu_readop(pc+1)<<4);
62}
59#define   SATURN_PEEKOP_DIS8(v)   v = (INT8)( oprom[pos] | ( oprom[pos+1] << 4 ) ); pos+= 2;
6360
64static int saturn_peekop_dis12(int pc)
65{
66   int ret=cpu_readop(pc)|(cpu_readop(pc+1)<<4)|(cpu_readop(pc+2)<<8);
67   if (ret&0x800) return -0x1000+ret;
68   else return ret;
69}
61#define SATURN_PEEKOP_DIS12(v)   v = oprom[pos] | ( oprom[pos+1] << 4 ) | ( oprom[pos+2] << 8 );   \
62                        pos += 3;                                          \
63                        if ( v & 0x0800 )   v = -0x1000 + v;
7064
71static INT16 saturn_peekop_dis16(int pc)
72{
73   INT16 ret=cpu_readop(pc)|(cpu_readop(pc+1)<<4)|(cpu_readop(pc+2)<<8)|(cpu_readop(pc+3)<<12);
74   return ret;
75}
65#define SATURN_PEEKOP_DIS16(v)   v = (INT16)( oprom[pos] | ( oprom[pos+1] << 4 ) | ( oprom[pos+2] << 8 ) | ( oprom[pos+3] << 12 ) ); pos += 4;
7666
77static int saturn_peekop_adr(int pc)
78{
79   return cpu_readop(pc)|(cpu_readop(pc+1)<<4)|(cpu_readop(pc+2)<<8)
80      |(cpu_readop(pc+3)<<12)|(cpu_readop(pc+4)<<16);
81}
67#define SATURN_PEEKOP_ADR(v)   v = oprom[pos] | ( oprom[pos+1] << 4 ) | ( oprom[pos+2] << 8 ) | ( oprom[pos+3] << 12 ) | ( oprom[pos+4] << 16 ); pos += 5;
8268
69
8370// don't split branch and return, source relies on this ordering
8471typedef enum {
8572   Return, ReturnSetXM, ReturnSetCarry, ReturnClearCarry, ReturnFromInterrupt,
r841r842
12761263   char number[17];
12771264   OPCODE *level=opcodes[0]; //pointer to current digit
12781265   int op; // currently fetched nibble
1266   int   pos = 0;
12791267
12801268   int i,c,v;
12811269
12821270   while (cont)
12831271   {
1284      op=*(oprom++);
1272      op = oprom[pos++];
12851273      level+=op;
12861274      switch (level->sel) {
12871275      case Illegal:
r841r842
13041292            adr=field_adr_b[op&7];
13051293            break;
13061294         default:
1307            assert(0);
1295            cont = 0;
1296            bin[binsize++]=number_2_hex[op];
1297            bin[binsize]=0;
1298            sprintf(dst, "???%s",bin);
1299            break;
13081300         }
13091301         break;
13101302      case Complete:
r841r842
13141306            strcpy(dst, mnemonics[level->mnemonic].name[set]);
13151307            break;
13161308         case Imm:
1317            sprintf(dst, mnemonics[level->mnemonic].name[set], *(oprom++));
1309            sprintf(dst, mnemonics[level->mnemonic].name[set], oprom[pos++]);
13181310            break;
13191311         case ImmCount:
1320            sprintf(dst, mnemonics[level->mnemonic].name[set], *(oprom++)+1);
1312            sprintf(dst, mnemonics[level->mnemonic].name[set], oprom[pos++]+1);
13211313            break;
13221314         case AdrCount: // mnemonics have string %s for address field
1323            snprintf(number,sizeof(number),"%x",*(oprom++)+1);
1315            snprintf(number,sizeof(number),"%x",oprom[pos++]+1);
13241316            sprintf(dst, mnemonics[level->mnemonic].name[set], number);
13251317            break;
13261318         case Imm2:
1327            v=*(oprom++);
1328            v|=*(oprom++)<<4;
1319            v=oprom[pos++];
1320            v|=oprom[pos++]<<4;
13291321            sprintf(dst, mnemonics[level->mnemonic].name[set], v);
13301322            break;
13311323         case Imm4:
1332            v=*(oprom++);
1333            v|=*(oprom++)<<4;
1334            v|=*(oprom++)<<8;
1335            v|=*(oprom++)<<12;
1324            v=oprom[pos++];
1325            v|=oprom[pos++]<<4;
1326            v|=oprom[pos++]<<8;
1327            v|=oprom[pos++]<<12;
13361328            sprintf(dst, mnemonics[level->mnemonic].name[set], v);
13371329            break;
13381330         case Imm5:
1339            v=*(oprom++);
1340            v|=*(oprom++)<<4;
1341            v|=*(oprom++)<<8;
1342            v|=*(oprom++)<<12;
1343            v|=*(oprom++)<<16;
1331            v=oprom[pos++];
1332            v|=oprom[pos++]<<4;
1333            v|=oprom[pos++]<<8;
1334            v|=oprom[pos++]<<12;
1335            v|=oprom[pos++]<<16;
13441336            sprintf(dst, mnemonics[level->mnemonic].name[set], v);
13451337            break;
13461338         case ImmCload:
1347            c=i=*(oprom++);
1339            c=i=oprom[pos++];
13481340            number[i+1]=0;
1349            for (;i>=0; i--) number[i]=number_2_hex[*(oprom++)];
1341            for (;i>=0; i--) number[i]=number_2_hex[oprom[pos++]];
13501342            sprintf(dst, mnemonics[level->mnemonic].name[set], c+1, number);
13511343            break;
13521344         case Dis3:
1353            v=saturn_peekop_dis12(pc);
1354            c=(pc+v)%0xfffff;
1355            pc+=3;
1345            SATURN_PEEKOP_DIS12(v);
1346            c=(pc+pos-3+v)%0xfffff;
13561347            sprintf(dst, mnemonics[level->mnemonic].name[set], c );
13571348            break;
13581349         case Dis3Call:
1359            v=saturn_peekop_dis12(pc);
1360            pc+=3;
1361            c=(pc+v)%0xfffff;
1350            SATURN_PEEKOP_DIS12(v);
1351            c=(pc+pos-3+v)%0xfffff;
13621352            sprintf(dst, mnemonics[level->mnemonic].name[set], c );
13631353            break;
13641354         case Dis4:
1365            v=saturn_peekop_dis16(pc);
1366            c=(pc+v)%0xfffff;
1367            pc+=4;
1355            SATURN_PEEKOP_DIS16(v);
1356            c=(pc+pos-4+v)%0xfffff;
13681357            sprintf(dst, mnemonics[level->mnemonic].name[set], c );
13691358            break;
13701359         case Dis4Call:
1371            v=saturn_peekop_dis16(pc);
1372            pc+=4;
1373            c=(pc+v)%0xfffff;
1360            SATURN_PEEKOP_DIS16(v);
1361            c=(pc+pos-4+v)%0xfffff;
13741362            sprintf(dst, mnemonics[level->mnemonic].name[set], c );
13751363            break;
13761364         case Abs:
1377            v=saturn_peekop_adr(pc);
1378            pc+=5;
1365            SATURN_PEEKOP_ADR(v);
13791366            sprintf(dst, mnemonics[level->mnemonic].name[set], v );
13801367            break;
13811368         case BranchReturn:
1382            v=saturn_peekop_dis8(pc);
1369            SATURN_PEEKOP_DIS8(v);
13831370            if (v==0) {
13841371               strcpy(dst, mnemonics[level->mnemonic+1].name[set]);
13851372            } else {
1386               c=(pc+v)&0xfffff;
1373               c=(pc+pos-2+v)&0xfffff;
13871374               sprintf(dst, mnemonics[level->mnemonic].name[set], c);
13881375            }
1389            pc+=2;
13901376            break;
13911377         case ABranchReturn:
1392            v=saturn_peekop_dis8(pc);
1378            SATURN_PEEKOP_DIS8(v);
13931379            if (v==0) {
13941380               sprintf(dst, mnemonics[level->mnemonic+1].name[set], A);
13951381            } else {
1396               c=(pc+v)&0xfffff;
1382               c=(pc+pos-2+v)&0xfffff;
13971383               sprintf(dst, mnemonics[level->mnemonic].name[set], A, c);
13981384            }
1399            pc+=2;
14001385            break;
14011386         case xBranchReturn:
1402            v=saturn_peekop_dis8(pc);
1387            SATURN_PEEKOP_DIS8(v);
14031388            if (v==0) {
14041389               sprintf(dst, mnemonics[level->mnemonic+1].name[set], field_2_string(adr));
14051390            } else {
1406               c=(pc+v)&0xfffff;
1391               c=(pc+pos-2+v)&0xfffff;
14071392               sprintf(dst, mnemonics[level->mnemonic].name[set], field_2_string(adr), c);
14081393            }
1409            pc+=2;
14101394            break;
14111395         case TestBranchRet:
1412            i=*(oprom++);
1413            v=saturn_peekop_dis8(pc);
1396            i=oprom[pos++];
1397            SATURN_PEEKOP_DIS8(v);
14141398            if (v==0) {
14151399               sprintf(dst, mnemonics[level->mnemonic+1].name[set], i);
14161400            } else {
1417               c=(pc+v)&0xfffff;
1401               c=(pc+pos-2+v)&0xfffff;
14181402               sprintf(dst, mnemonics[level->mnemonic].name[set], i, c);
14191403            }
1420            pc+=2;
14211404            break;
14221405         case ImmBranch:
1423            i=*(oprom++);
1424            v=saturn_peekop_dis8(pc);
1425            c=(pc+v)&0xfffff;
1406            i=oprom[pos++];
1407            SATURN_PEEKOP_DIS8(v);
1408            c=(pc+pos-2+v)&0xfffff;
14261409            sprintf(dst, mnemonics[level->mnemonic].name[set], i, c);
1427            pc+=2; // hp48s 13413
14281410            break;
14291411         case FieldP:
14301412            sprintf(dst, mnemonics[level->mnemonic].name[set], P );
r841r842
14541436            sprintf(dst, mnemonics[level->mnemonic].name[set], W );
14551437            break;
14561438         case AdrA:
1457            sprintf(dst, mnemonics[level->mnemonic].name[set], adr_a[*(oprom++)] );
1439            sprintf(dst, mnemonics[level->mnemonic].name[set], adr_a[oprom[pos++]] );
14581440            break;
14591441         case AdrAF:
1460            sprintf(dst, mnemonics[level->mnemonic].name[set], adr_af[*(oprom++)] );
1442            sprintf(dst, mnemonics[level->mnemonic].name[set], adr_af[oprom[pos++]] );
14611443            break;
14621444         case AdrB:
1463            sprintf(dst, mnemonics[level->mnemonic].name[set], adr_b[*(oprom++)&0x7] );
1445            sprintf(dst, mnemonics[level->mnemonic].name[set], adr_b[oprom[pos++]&0x7] );
14641446            break;
14651447         }
14661448         break;
r841r842
14681450      level = opcodes[level->sel];
14691451   }
14701452
1471   return oprom - opram;
1453   return pos;
14721454}
src/emu/cpu/saturn/saturn.c
r841r842
320320      case CPUINFO_INT_ENDIANNESS:               info->i = CPU_IS_LE;               break;
321321      case CPUINFO_INT_CLOCK_DIVIDER:               info->i = 1;                     break;
322322      case CPUINFO_INT_MIN_INSTRUCTION_BYTES:         info->i = 1;                     break;
323      case CPUINFO_INT_MAX_INSTRUCTION_BYTES:         info->i = 4;                     break;
323      case CPUINFO_INT_MAX_INSTRUCTION_BYTES:         info->i = 20; /* 20 nibbles max */      break;
324324      case CPUINFO_INT_MIN_CYCLES:               info->i = 2;                     break;
325325      case CPUINFO_INT_MAX_CYCLES:               info->i = 21;                     break;
326326
src/emu/emuopts.c
r841r842
7474   { "seconds_to_run;str",          "0",         0,                 "number of emulated seconds to run before automatically exiting" },
7575   { "throttle",                    "1",         OPTION_BOOLEAN,    "enable throttling to keep game running in sync with real time" },
7676   { "sleep",                       "1",         OPTION_BOOLEAN,    "enable sleeping, which gives time back to other applications when idle" },
77   { "speed(0.01-100)",             "1.0",       0,                 "controls the speed of gameplay, relative to realtime; smaller numbers are slower" },
7778
7879   /* rotation options */
7980   { NULL,                          NULL,        OPTION_HEADER,     "CORE ROTATION OPTIONS" },
src/emu/emuopts.h
r841r842
7272#define OPTION_SECONDS_TO_RUN      "seconds_to_run"
7373#define OPTION_THROTTLE            "throttle"
7474#define OPTION_SLEEP            "sleep"
75#define OPTION_SPEED            "speed"
7576
7677/* core rotation options */
7778#define OPTION_ROTATE            "rotate"
src/emu/video.c
r841r842
119119   UINT8               fastforward;      /* flag: TRUE if we're currently fast-forwarding */
120120   UINT32               seconds_to_run;      /* number of seconds to run before quitting */
121121   UINT8               auto_frameskip;      /* flag: TRUE if we're automatically frameskipping */
122   UINT32               speed;            /* overall speed (*100) */
122123
123124   /* frameskipping */
124125   UINT8               frameskip_level;   /* current frameskip level */
r841r842
279280   global.auto_frameskip = options_get_bool(mame_options(), OPTION_AUTOFRAMESKIP);
280281   global.frameskip_level = options_get_int(mame_options(), OPTION_FRAMESKIP);
281282   global.seconds_to_run = options_get_int(mame_options(), OPTION_SECONDS_TO_RUN);
283   global.speed = (options_get_float(mame_options(), OPTION_SPEED) * 100.0 + 0.5);
282284
283285   /* allocate memory for our private data */
284286   viddata = machine->video_data = auto_malloc(sizeof(*viddata));
r841r842
11221124
11231125
11241126/*-------------------------------------------------
1127    video_get_speed_factor - return the speed
1128    factor as an integer * 100
1129-------------------------------------------------*/
1130
1131int video_get_speed_factor(void)
1132{
1133   return global.speed;
1134}
1135
1136
1137/*-------------------------------------------------
11251138    video_get_speed_text - print the text to
11261139    be displayed in the upper-right corner
11271140-------------------------------------------------*/
r841r842
13041317   osd_ticks_t target_ticks;
13051318   osd_ticks_t diff_ticks;
13061319
1320   /* apply speed factor to emu time */
1321   if (global.speed != 0 && global.speed != 100)
1322   {
1323      /* multiply emutime by 100 */
1324      emutime = scale_up_mame_time(emutime, 100);
1325
1326      /* divide emutime by the global speed factor */
1327      emutime.subseconds /= global.speed;
1328      emutime.subseconds += (emutime.seconds % global.speed) * (MAX_SUBSECONDS / global.speed);
1329      emutime.seconds /= global.speed;
1330   }
1331
13071332   /* compute conversion factors up front */
13081333   ticks_per_second = osd_ticks_per_second();
13091334   subseconds_per_tick = MAX_SUBSECONDS / ticks_per_second;
r841r842
13271352   if (emu_delta_subseconds < 0 || emu_delta_subseconds > MAX_SUBSECONDS / 10)
13281353   {
13291354      if (LOG_THROTTLE)
1330         logerror("Resync due to weird emutime delta: 0.%09d%09d\n", (int)(emu_delta_subseconds / 1000000000), (int)(emu_delta_subseconds % 1000000000));
1355         logerror("Resync due to weird emutime delta: 0.%09d%09d\n", (int)(emu_delta_subseconds / MAX_SUBSECONDS_SQRT), (int)(emu_delta_subseconds % MAX_SUBSECONDS_SQRT));
13311356      goto resync;
13321357   }
13331358
r841r842
13681393      (real_is_ahead_subseconds < 0 && popcount[global.throttle_history & 0xff] < 6))
13691394   {
13701395      if (LOG_THROTTLE)
1371         logerror("Resync due to being behind: 0.%09d%09d (history=%08X)\n", (int)(-real_is_ahead_subseconds / 1000000000), (int)((-real_is_ahead_subseconds) % 1000000000), global.throttle_history);
1396         logerror("Resync due to being behind: 0.%09d%09d (history=%08X)\n", (int)(-real_is_ahead_subseconds / MAX_SUBSECONDS_SQRT), (int)((-real_is_ahead_subseconds) % MAX_SUBSECONDS_SQRT), global.throttle_history);
13721397      goto resync;
13731398   }
13741399
src/emu/video.h
r841r842
125125/* are we skipping the current frame? */
126126int video_skip_this_frame(void);
127127
128/* return the speed factor as an integer * 100 */
129int video_get_speed_factor(void);
130
128131/* return text to display about the current speed */
129132const char *video_get_speed_text(void);
130133
src/emu/mame.c
r841r842
244244
245245extern int mame_validitychecks(const game_driver *driver);
246246
247static void parse_ini_file(const char *name);
247static int parse_ini_file(const char *name);
248248
249249static running_machine *create_machine(const game_driver *driver);
250250static void reset_machine(running_machine *machine);
r841r842
12551255      if (drv.video_attributes & VIDEO_TYPE_VECTOR)
12561256         parse_ini_file("vector");
12571257
1258      /* then parse "<sourcefile>.ini" */
1258      /* next parse "source/<sourcefile>.ini"; if that doesn't exist, try <sourcefile>.ini */
12591259      sourcename = core_filename_extract_base(astring_alloc(), driver->source_file, TRUE);
1260      parse_ini_file(astring_c(sourcename));
1260      astring_insc(sourcename, 0, "source" PATH_SEPARATOR);
1261      if (!parse_ini_file(astring_c(sourcename)))
1262      {
1263         core_filename_extract_base(sourcename, driver->source_file, TRUE);
1264         parse_ini_file(astring_c(sourcename));
1265      }
12611266      astring_free(sourcename);
12621267
12631268      /* then parent the grandparent, parent, and game-specific INIs */
r841r842
12741279    parse_ini_file - parse a single INI file
12751280-------------------------------------------------*/
12761281
1277static void parse_ini_file(const char *name)
1282static int parse_ini_file(const char *name)
12781283{
12791284   file_error filerr;
12801285   mame_file *file;
r841r842
12821287
12831288   /* don't parse if it has been disabled */
12841289   if (!options_get_bool(mame_options(), OPTION_READCONFIG))
1285      return;
1290      return FALSE;
12861291
12871292   /* open the file; if we fail, that's ok */
12881293   fname = astring_assemble_2(astring_alloc(), name, ".ini");
12891294   filerr = mame_fopen(SEARCHPATH_INI, astring_c(fname), OPEN_FLAG_READ, &file);
12901295   astring_free(fname);
12911296   if (filerr != FILERR_NONE)
1292      return;
1297      return FALSE;
12931298
12941299   /* parse the file and close it */
1300   mame_printf_verbose("Parsing %s.ini\n", name);
12951301   options_parse_ini_file(mame_options(), mame_core_file(file), OPTION_PRIORITY_INI);
12961302   mame_fclose(file);
1303   return TRUE;
12971304}
12981305
12991306
src/emu/rendersw.c
r841r842
17651765               if (ta != 0)
17661766               {
17671767                  UINT32 dpix = NO_DEST_READ ? 0 : *dest;
1768                  UINT32 r = ((SOURCE32_R(pix) * sr * ta) >> 16) + DEST_R(dpix);
1769                  UINT32 g = ((SOURCE32_G(pix) * sg * ta) >> 16) + DEST_G(dpix);
1770                  UINT32 b = ((SOURCE32_B(pix) * sb * ta) >> 16) + DEST_B(dpix);
1768                  UINT32 r = ((SOURCE32_R(pix) * sr * ta) >> 24) + DEST_R(dpix);
1769                  UINT32 g = ((SOURCE32_G(pix) * sg * ta) >> 24) + DEST_G(dpix);
1770                  UINT32 b = ((SOURCE32_B(pix) * sb * ta) >> 24) + DEST_B(dpix);
17711771                  r = (r | -(r >> (8 - SRCSHIFT_R))) & (0xff >> SRCSHIFT_R);
17721772                  g = (g | -(g >> (8 - SRCSHIFT_G))) & (0xff >> SRCSHIFT_G);
17731773                  b = (b | -(b >> (8 - SRCSHIFT_B))) & (0xff >> SRCSHIFT_B);
src/emu/sound/tms5220.c
r841r842
9090   UINT16 target_pitch;
9191   INT32 target_k[10];
9292
93   UINT16 previous_energy;         /* needed for lattice filter to match patent */
94
9395   UINT8 interp_count;      /* number of interp periods (0-7) */
9496   UINT8 sample_count;      /* sample number within interp (0-24) */
9597   UINT16 pitch_count;
r841r842
98100   INT32 x[10];
99101
100102   INT32 RNG;      /* the random noise generator configuration is: 1 + x + x^3 + x^4 + x^13 */
103   INT8 excitation_data;
101104
102
103105   /* R Nabet : These have been added to emulate speech Roms */
104106   int (*read_callback)(int count);
105107   void (*load_address_callback)(int data);
r841r842
178180   state_save_register_item("tms5220", index, tms->target_pitch);
179181   state_save_register_item_array("tms5220", index, tms->target_k);
180182
183   state_save_register_item("tms5220", index, tms->previous_energy);
184
181185   state_save_register_item("tms5220", index, tms->interp_count);
182186   state_save_register_item("tms5220", index, tms->sample_count);
183187   state_save_register_item("tms5220", index, tms->pitch_count);
r841r842
186190   state_save_register_item_array("tms5220", index, tms->x);
187191
188192   state_save_register_item("tms5220", index, tms->RNG);
193   state_save_register_item("tms5220", index, tms->excitation_data);
189194
190195   state_save_register_item("tms5220", index, tms->schedule_dummy_read);
191196   state_save_register_item("tms5220", index, tms->data_register);
r841r842
474479{
475480   struct tms5220 *tms = chip;
476481    int buf_count=0;
477    int i, interp_period;
482    int i, interp_period, bitout;
478483
479484tryagain:
480485
r841r842
532537    /* loop until the buffer is full or we've stopped speaking */
533538   while ((size > 0) && tms->talk_status)
534539    {
535        int current_val;
536540
537541        /* if we're ready for a new frame */
538542        if ((tms->interp_count == 0) && (tms->sample_count == 0))
r841r842
636640        if (tms->old_energy == 0)
637641        {
638642            /* generate silent samples here */
639 current_val = 0x00;
643         tms->excitation_data = 0x00; /* I'm not sure if this is actually RIGHT, the current_energy may be forced to zero when we've just passed a zero energy frame. However, this does work too. May be removed later. */
640644        }
641645        else if (tms->old_pitch == 0)
642646        {
643647            /* generate unvoiced samples here */
644          int bitout, randbit;
645          if (tms->RNG&1)
646                randbit = -64; /* according to the patent it is (either + or -) half of the maximum value in the chirp table */
647            else
648                randbit = 64;
649
650            bitout = ((tms->RNG>>12)&1) ^
651                     ((tms->RNG>>10)&1) ^
652                     ((tms->RNG>> 9)&1) ^
653                     ((tms->RNG>> 0)&1);
654            tms->RNG >>= 1;
655            tms->RNG |= (bitout<<12);
656
657            current_val = (randbit * tms->current_energy) / 256;
648         if (tms->RNG & 1)
649            tms->excitation_data = -0x40; /* according to the patent it is (either + or -) half of the maximum value in the chirp table, so +-64 */
650         else
651            tms->excitation_data = 0x40;
658652        }
659653        else
660654        {
661655            /* generate voiced samples here */
662            current_val = (chirptable[tms->pitch_count%sizeof(chirptable)] * tms->current_energy) / 256;
656         tms->excitation_data = chirptable[tms->pitch_count%sizeof(chirptable)];
663657        }
664658
659        /* Update LFSR every clock, like patent shows */
660        bitout = ((tms->RNG >> 12) & 1) ^
661                 ((tms->RNG >> 10) & 1) ^
662                 ((tms->RNG >>  9) & 1) ^
663                 ((tms->RNG >>  0) & 1);
664        tms->RNG >>= 1;
665        tms->RNG |= bitout << 12;
665666
666   buffer[buf_count] = clip_and_wrap(lattice_filter(tms, current_val)); /* execute lattice filter and clipping/wrapping */
667      buffer[buf_count] = clip_and_wrap(lattice_filter(tms)); /* execute lattice filter and clipping/wrapping */
667668
668669        /* Update all counts */
669670
r841r842
715716
716717/**********************************************************************************************
717718
718     lattice_filter -- executes one 'full run' of the lattice filter on a specific byte of excitation data, and returns the resulting sample
719     Note: the current_k processing here by dividing the result by 32768 is unnecessary and will be removed later.
719     lattice_filter -- executes one 'full run' of the lattice filter on a specific byte of
720     excitation data, and specific values of all the current k constants,  and returns the
721     resulting sample.
722     Note: the current_k processing here by dividing the result by 32768 is necessary, as the stored
723     parameters in the lookup table are the 10 bit coefficients but are pre-multiplied by 512 for
724     ease of storage. This is undone on the real chip by a shifter here, after the multiply.
720725
721726***********************************************************************************************/
722727
723INT16 lattice_filter(void *chip, signed char excitation_data)
728INT16 lattice_filter(void *chip)
724729{
725730        struct tms5220 *tms = chip;
726731        /* Lattice filter here */
r841r842
731736           Kn = tms->current_k[n-1]
732737           bn = tms->x[n-1]
733738    */
734        tms->u[10] = excitation_data; /* Y(11) */
739        tms->u[10] = (tms->excitation_data * tms->previous_energy) >> 8; /* Y(11) */
735740        tms->u[9] = tms->u[10] - ((tms->current_k[9] * tms->x[9]) / 32768);
736741        tms->u[8] = tms->u[9] - ((tms->current_k[8] * tms->x[8]) / 32768);
737742        tms->x[9] = tms->x[8] + ((tms->current_k[8] * tms->u[8]) / 32768);
r841r842
752757        tms->u[0] = tms->u[1] - ((tms->current_k[0] * tms->x[0]) / 32768);
753758        tms->x[1] = tms->x[0] + ((tms->current_k[0] * tms->u[0]) / 32768);
754759        tms->x[0] = tms->u[0];
760        tms->previous_energy = tms->current_energy;
755761        return tms->u[0];
756762}
757763
src/emu/sound/tms5220.h
r841r842
1414int tms5220_int_read(void *chip);
1515
1616void tms5220_process(void *chip, INT16 *buffer, unsigned int size);
17INT16 lattice_filter(void *chip, signed char excitation_data);
17INT16 lattice_filter(void *chip);
1818INT16 clip_and_wrap(INT16 cliptemp);
1919
2020/* three variables added by R Nabet */
src/emu/sound.c
r841r842
100100static speaker_info speaker[MAX_SPEAKER];
101101
102102static INT16 *finalmix;
103static UINT32 finalmix_leftover;
103104static INT32 *leftmix, *rightmix;
104105
105106static int sound_muted;
r841r842
666667
667668static TIMER_CALLBACK( sound_update )
668669{
670   UINT32 finalmix_step, finalmix_offset;
669671   int samples_this_update = 0;
670672   int sample, spknum;
671673
r841r842
737739   }
738740
739741   /* now downmix the final result */
740   for (sample = 0; sample < samples_this_update; sample++)
742   finalmix_step = video_get_speed_factor();
743   finalmix_offset = 0;
744   for (sample = finalmix_leftover; sample < samples_this_update * 100; sample += finalmix_step)
741745   {
746      int sampindex = sample / 100;
742747      INT32 samp;
743748
744749      /* clamp the left side */
745      samp = leftmix[sample];
750      samp = leftmix[sampindex];
746751      if (samp < -32768)
747752         samp = -32768;
748753      else if (samp > 32767)
749754         samp = 32767;
750      finalmix[sample*2+0] = samp;
755      finalmix[finalmix_offset++] = samp;
751756
752757      /* clamp the right side */
753      samp = rightmix[sample];
758      samp = rightmix[sampindex];
754759      if (samp < -32768)
755760         samp = -32768;
756761      else if (samp > 32767)
757762         samp = 32767;
758      finalmix[sample*2+1] = samp;
763      finalmix[finalmix_offset++] = samp;
759764   }
765   finalmix_leftover = sample - samples_this_update * 100;
760766
761767   /* play the result */
762   if (samples_this_update > 0)
768   if (finalmix_offset > 0)
763769   {
764      osd_update_audio_stream(finalmix, samples_this_update);
770      osd_update_audio_stream(finalmix, finalmix_offset / 2);
765771      if (wavfile != NULL)
766         wav_add_data_16(wavfile, finalmix, samples_this_update * 2);
772         wav_add_data_16(wavfile, finalmix, finalmix_offset);
767773   }
768774
769775   /* update the streamer */
src/emu/clifront.c
r841r842
4747***************************************************************************/
4848
4949static int execute_simple_commands(const char *exename);
50static int execute_commands(const char *exename);
50static int execute_commands(const char *exename, const game_driver *driver);
5151static void display_help(void);
5252
5353/* informational functions */
r841r842
138138   core_filename_extract_base(gamename, options_get_string(mame_options(), OPTION_GAMENAME), TRUE);
139139   driver = driver_get_name(astring_c(gamename));
140140
141   /* parse any relevant INI files */
142   mame_parse_ini_files(mame_options(), driver);
143
144141   /* execute any commands specified */
145   result = execute_commands(astring_c(exename));
142   result = execute_commands(astring_c(exename), driver);
146143   if (result != -1)
147144      goto error;
148145
r841r842
228225    commands
229226-------------------------------------------------*/
230227
231static int execute_commands(const char *exename)
228static int execute_commands(const char *exename, const game_driver *driver)
232229{
233230   static const struct
234231   {
r841r842
258255      file_error filerr;
259256      mame_file *file;
260257
258      /* parse any relevant INI files before proceeding */
259      mame_parse_ini_files(mame_options(), driver);
260
261261      /* make the output filename */
262262      filerr = mame_fopen(NULL, CONFIGNAME ".ini", OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
263263
r841r842
277277   /* showconfig? */
278278   if (options_get_bool(mame_options(), CLIOPTION_SHOWCONFIG))
279279   {
280      /* parse any relevant INI files before proceeding */
281      mame_parse_ini_files(mame_options(), driver);
280282      options_output_ini_stdfile(mame_options(), stdout);
281283      return MAMERR_NONE;
282284   }
r841r842
286288      if (options_get_bool(mame_options(), info_commands[i].option))
287289      {
288290         const char *gamename = options_get_string(mame_options(), OPTION_GAMENAME);
291
292         /* parse any relevant INI files before proceeding */
293         mame_parse_ini_files(mame_options(), driver);
289294         return (*info_commands[i].function)((gamename[0] == 0) ? "*" : gamename);
290295      }
291296
src/lib/util/huffman.c
r841r842
8787{
8888   UINT32         buffer;
8989   int            bits;
90   UINT8 *         data;
90   union
91   {
92      const UINT8 *read;
93      UINT8 *      write;
94   } data;
9195   UINT32         doffset;
9296   UINT32         dlength;
9397   int            overflow;
r841r842
133137***************************************************************************/
134138
135139/*-------------------------------------------------
136    bit_buffer_init - initialize a bit buffer
140    bit_buffer_write_init - initialize a bit
141    buffer for writing
137142-------------------------------------------------*/
138143
139INLINE void bit_buffer_init(bit_buffer *bitbuf, UINT8 *data, UINT32 dlength)
144INLINE void bit_buffer_write_init(bit_buffer *bitbuf, UINT8 *data, UINT32 dlength)
140145{
141146   /* fill in the basic data structure */
142147   bitbuf->buffer = 0;
143148   bitbuf->bits = 0;
144   bitbuf->data = data;
149   bitbuf->data.write = data;
145150   bitbuf->doffset = 0;
146151   bitbuf->dlength = dlength;
147152   bitbuf->overflow = FALSE;
r841r842
161166      while (bitbuf->bits >= 8)
162167      {
163168         if (bitbuf->doffset < bitbuf->dlength)
164            bitbuf->data[bitbuf->doffset] = bitbuf->buffer >> 24;
169            bitbuf->data.write[bitbuf->doffset] = bitbuf->buffer >> 24;
165170         else
166171            bitbuf->overflow = TRUE;
167172         bitbuf->doffset++;
r841r842
188193   while (bitbuf->bits > 0)
189194   {
190195      if (bitbuf->doffset < bitbuf->dlength)
191         bitbuf->data[bitbuf->doffset] = bitbuf->buffer >> 24;
196         bitbuf->data.write[bitbuf->doffset] = bitbuf->buffer >> 24;
192197      else
193198         bitbuf->overflow = TRUE;
194199      bitbuf->doffset++;
r841r842
200205
201206
202207/*-------------------------------------------------
208    bit_buffer_read_init - initialize a bit
209    buffer for reading
210-------------------------------------------------*/
211
212INLINE void bit_buffer_read_init(bit_buffer *bitbuf, const UINT8 *data, UINT32 dlength)
213{
214   /* fill in the basic data structure */
215   bitbuf->buffer = 0;
216   bitbuf->bits = 0;
217   bitbuf->data.read = data;
218   bitbuf->doffset = 0;
219   bitbuf->dlength = dlength;
220   bitbuf->overflow = FALSE;
221}
222
223
224/*-------------------------------------------------
203225    bit_buffer_read - read 'numbits' bits from
204226    the buffer, returning the right-justified
205227-------------------------------------------------*/
r841r842
214236      while (bitbuf->bits <= 24)
215237      {
216238         if (bitbuf->doffset < bitbuf->dlength)
217            bitbuf->buffer |= bitbuf->data[bitbuf->doffset] << (24 - bitbuf->bits);
239            bitbuf->buffer |= bitbuf->data.read[bitbuf->doffset] << (24 - bitbuf->bits);
218240         bitbuf->doffset++;
219241         bitbuf->bits += 8;
220242      }
r841r842
350372   int numbits;
351373
352374   /* initialize the input buffer */
353   bit_buffer_init(&bitbuf, (UINT8 *)source, slength);
375   bit_buffer_read_init(&bitbuf, source, slength);
354376
355377   /* bits per entry depends on the maxbits */
356378   if (context->maxbits >= 16)
r841r842
416438   int i;
417439
418440   /* initialize the output buffer */
419   bit_buffer_init(&bitbuf, dest, dlength);
441   bit_buffer_write_init(&bitbuf, dest, dlength);
420442
421443   /* bits per entry depends on the maxbits */
422444   if (context->maxbits >= 16)
r841r842
483505   UINT32 soffset;
484506
485507   /* initialize the output buffer */
486   bit_buffer_init(&bitbuf, dest, dlength);
508   bit_buffer_write_init(&bitbuf, dest, dlength);
487509
488510   /* loop over source data and encode */
489511   for (soffset = 0; soffset < slength; soffset++)
r841r842
507529   UINT32 soffset;
508530
509531   /* initialize the output buffer */
510   bit_buffer_init(&bitbuf, dest, dlength);
532   bit_buffer_write_init(&bitbuf, dest, dlength);
511533
512534   /* loop over source data and encode */
513535   for (soffset = 0; soffset < slength; soffset += 2)
docs/messnew.txt
r841r842
2626
2727Source Changes:
2828----------------
29- The core is based on MAME 0.118u1.  This incorporates all features of the
29- The core is based on MAME 0.118u2.  This incorporates all features of the
3030  update to this core.  [MAME team]
3131
3232
makefile
r841r842
341341# and make all errors into warnings
342342ifneq ($(OPTIMIZE),0)
343343CFLAGS += -Werror $(ARCH) -fno-strict-aliasing
344#CFLAGS += $(ARCH) -fno-strict-aliasing
344345endif
345346
346347

Previous 15994 Revisions Next


© 1998-2018 The MESS Team