1 /*****************************************************************************
2
3 Quiz DNA no Hanran (c) 1992 Face
4 Quiz Gakuen Paradise (c) 1991 NMK
5 Quiz Gekiretsu Scramble (Gakuen Paradise 2) (c) 1993 Face
6
7 Driver by Uki
8
9 *****************************************************************************/
10
11 #include "driver.h"
12 #include "vidhrdw/generic.h"
13
14 #define MCLK 16000000
15
16 VIDEO_START( quizdna );
17 VIDEO_UPDATE( quizdna );
18
19 WRITE_HANDLER( quizdna_fg_ram_w );
20 WRITE_HANDLER( quizdna_bg_ram_w );
21 WRITE_HANDLER( quizdna_bg_yscroll_w );
22 WRITE_HANDLER( quizdna_bg_xscroll_w );
23 WRITE_HANDLER( quizdna_screen_ctrl_w );
24
25 WRITE_HANDLER( paletteram_xBGR_RRRR_GGGG_BBBB_w );
26
27
WRITE_HANDLER(quizdna_rombank_w)28 static WRITE_HANDLER( quizdna_rombank_w )
29 {
30 data8_t *ROM = memory_region(REGION_CPU1);
31 cpu_setbank(1,&ROM[0x10000+0x4000*(data & 0x3f)]);
32 }
33
WRITE_HANDLER(gekiretu_rombank_w)34 static WRITE_HANDLER( gekiretu_rombank_w )
35 {
36 data8_t *ROM = memory_region(REGION_CPU1);
37 cpu_setbank(1,&ROM[0x10000+0x4000*((data & 0x3f) ^ 0x0a)]);
38 }
39
40 /****************************************************************************/
41
MEMORY_READ_START(quizdna_readmem)42 static MEMORY_READ_START( quizdna_readmem )
43 { 0x0000, 0x7fff, MRA_ROM },
44 { 0x8000, 0xbfff, MRA_BANK1 },
45 { 0xc000, 0xffff, MRA_RAM },
46 MEMORY_END
47
48 static MEMORY_WRITE_START( quizdna_writemem )
49 { 0x0000, 0x7fff, MWA_ROM },
50 { 0x8000, 0x9fff, quizdna_fg_ram_w },
51 { 0xa000, 0xbfff, quizdna_bg_ram_w },
52 { 0xc000, 0xdfff, MWA_RAM },
53 { 0xe000, 0xe1ff, MWA_RAM, &spriteram, &spriteram_size },
54 { 0xe200, 0xefff, MWA_RAM },
55 { 0xf000, 0xffff, paletteram_xBGR_RRRR_GGGG_BBBB_w, &paletteram },
56 MEMORY_END
57
58 static MEMORY_WRITE_START( gekiretu_writemem )
59 { 0x0000, 0x7fff, MWA_ROM },
60 { 0x8000, 0x9fff, quizdna_fg_ram_w },
61 { 0xa000, 0xbfff, quizdna_bg_ram_w },
62 { 0xc000, 0xdfff, MWA_RAM },
63 { 0xe000, 0xefff, paletteram_xBGR_RRRR_GGGG_BBBB_w, &paletteram },
64 { 0xf000, 0xf1ff, MWA_RAM, &spriteram, &spriteram_size },
65 { 0xf200, 0xffff, MWA_RAM },
66 MEMORY_END
67
68 static PORT_READ_START( quizdna_readport )
69 { 0x80, 0x80, input_port_2_r },
70 { 0x81, 0x81, input_port_3_r },
71 { 0x90, 0x90, input_port_4_r },
72 { 0x91, 0x91, input_port_5_r },
73 { 0xe0, 0xe0, YM2203_status_port_0_r },
74 { 0xe1, 0xe1, YM2203_read_port_0_r },
75 { 0xf0, 0xf0, OKIM6295_status_0_r },
76
77 PORT_END
78
79 static PORT_WRITE_START( quizdna_writeport )
80 { 0x02, 0x03, quizdna_bg_xscroll_w },
81 { 0x04, 0x04, quizdna_bg_yscroll_w },
82 { 0x05, 0x06, IOWP_NOP }, /* unknown */
83 { 0xc0, 0xc0, quizdna_rombank_w },
84 { 0xd0, 0xd0, quizdna_screen_ctrl_w },
85 { 0xe0, 0xe0, YM2203_control_port_0_w },
86 { 0xe1, 0xe1, YM2203_write_port_0_w },
87 { 0xf0, 0xf0, OKIM6295_data_0_w },
88 PORT_END
89
90 static PORT_WRITE_START( gakupara_writeport )
91 { 0x00, 0x01, quizdna_bg_xscroll_w },
92 { 0x02, 0x02, quizdna_bg_yscroll_w },
93 { 0x03, 0x04, IOWP_NOP }, /* unknown */
94 { 0xc0, 0xc0, quizdna_rombank_w },
95 { 0xd0, 0xd0, quizdna_screen_ctrl_w },
96 { 0xe0, 0xe0, YM2203_control_port_0_w },
97 { 0xe1, 0xe1, YM2203_write_port_0_w },
98 { 0xf0, 0xf0, OKIM6295_data_0_w },
99 PORT_END
100
101 static PORT_WRITE_START( gekiretu_writeport )
102 { 0x02, 0x03, quizdna_bg_xscroll_w },
103 { 0x04, 0x04, quizdna_bg_yscroll_w },
104 { 0x05, 0x06, IOWP_NOP }, /* unknown */
105 { 0xc0, 0xc0, gekiretu_rombank_w },
106 { 0xd0, 0xd0, quizdna_screen_ctrl_w },
107 { 0xe0, 0xe0, YM2203_control_port_0_w },
108 { 0xe1, 0xe1, YM2203_write_port_0_w },
109 { 0xf0, 0xf0, OKIM6295_data_0_w },
110 PORT_END
111
112 /****************************************************************************/
113
114 INPUT_PORTS_START( quizdna )
115 PORT_START /* sw2 */
116 PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) )
117 PORT_DIPSETTING( 0x01, DEF_STR( 9C_1C ) )
118 PORT_DIPSETTING( 0x02, DEF_STR( 8C_1C ) )
119 PORT_DIPSETTING( 0x03, DEF_STR( 7C_1C ) )
120 PORT_DIPSETTING( 0x04, DEF_STR( 6C_1C ) )
121 PORT_DIPSETTING( 0x05, DEF_STR( 5C_1C ) )
122 PORT_DIPSETTING( 0x06, DEF_STR( 4C_1C ) )
123 PORT_DIPSETTING( 0x07, DEF_STR( 3C_1C ) )
124 PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) )
125 PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) )
126 PORT_DIPSETTING( 0x08, DEF_STR( 2C_3C ) )
127 PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) )
128 PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) )
129 PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) )
130 PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) )
131 PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) )
132 PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
133 PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
134 PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
135 PORT_DIPSETTING( 0x10, DEF_STR( On ) )
136 PORT_DIPNAME( 0x20, 0x20, "Unknown 2-6" )
137 PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
138 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
139 PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
140 PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
141 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
142 PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
143
144 PORT_START /* sw3 */
145 PORT_DIPNAME( 0x03, 0x02, "Timer" )
146 PORT_DIPSETTING( 0x03, "Slow" )
147 PORT_DIPSETTING( 0x02, "Normal" )
148 PORT_DIPSETTING( 0x01, "Fast" )
149 PORT_DIPSETTING( 0x00, "Very Fast" )
150 PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
151 PORT_DIPSETTING( 0x08, "1" )
152 PORT_DIPSETTING( 0x04, "2" )
153 PORT_DIPSETTING( 0x0c, "3" )
154 PORT_DIPSETTING( 0x00, "4" )
155 PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) )
156 PORT_DIPSETTING( 0x30, "Every 500k" )
157 PORT_DIPSETTING( 0x20, "Every 1000k" )
158 PORT_DIPSETTING( 0x10, "Every 2000k" )
159 PORT_DIPSETTING( 0x00, "None" )
160 PORT_DIPNAME( 0x40, 0x40, "Carat" )
161 PORT_DIPSETTING( 0x40, "20" )
162 PORT_DIPSETTING( 0x00, "0" )
163 PORT_DIPNAME( 0x80, 0x80, "Allow Continue" )
164 PORT_DIPSETTING( 0x00, DEF_STR( No ) )
165 PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
166
167 PORT_START
168 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
169 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
170 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
171 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 )
172 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
173 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
174 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
175 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
176
177 PORT_START
178 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
179 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
180 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
181 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER2 )
182 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
183 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
184 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
185 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
186
187 PORT_START
188 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
189 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
190 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
191 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
192 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
193 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
194 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
195 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
196
197 PORT_START
198 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
199 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
200 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
201 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
202 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
203 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
204 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
205 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
206 INPUT_PORTS_END
207
208 INPUT_PORTS_START( gakupara )
209 PORT_START /* sw2 */
210 PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) )
211 PORT_DIPSETTING( 0x00, "10 Coins/1 Credit" )
212 PORT_DIPSETTING( 0x01, DEF_STR( 9C_1C ) )
213 PORT_DIPSETTING( 0x02, DEF_STR( 8C_1C ) )
214 PORT_DIPSETTING( 0x03, DEF_STR( 7C_1C ) )
215 PORT_DIPSETTING( 0x04, DEF_STR( 6C_1C ) )
216 PORT_DIPSETTING( 0x05, DEF_STR( 5C_1C ) )
217 PORT_DIPSETTING( 0x06, DEF_STR( 4C_1C ) )
218 PORT_DIPSETTING( 0x07, DEF_STR( 3C_1C ) )
219 PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) )
220 PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) )
221 PORT_DIPSETTING( 0x08, DEF_STR( 2C_3C ) )
222 PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) )
223 PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) )
224 PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) )
225 PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) )
226 PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) )
227 PORT_DIPNAME( 0x10, 0x00, "Demo Music" )
228 PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
229 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
230 PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
231 PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
232 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
233 PORT_DIPNAME( 0xc0, 0x80, "Timer" )
234 PORT_DIPSETTING( 0xc0, "Slow" )
235 PORT_DIPSETTING( 0x80, "Normal" )
236 PORT_DIPSETTING( 0x40, "Fast" )
237 PORT_DIPSETTING( 0x00, "Very Fast" )
238
239 PORT_START /* sw3 */
240 PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
241 PORT_DIPNAME( 0x02, 0x02, "Unknown 3-2" )
242 PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
243 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
244 PORT_DIPNAME( 0x04, 0x04, "Unknown 3-3" )
245 PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
246 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
247 PORT_DIPNAME( 0x08, 0x08, "Unknown 3-4" )
248 PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
249 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
250 PORT_DIPNAME( 0x10, 0x10, "Unknown 3-5" )
251 PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
252 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
253 PORT_DIPNAME( 0x20, 0x20, "Unknown 3-6" )
254 PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
255 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
256 PORT_DIPNAME( 0x40, 0x40, "Unknown 3-7" )
257 PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
258 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
259 PORT_DIPNAME( 0x80, 0x80, "Unknown 3-8" )
260 PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
261 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
262
263 PORT_START
264 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
265 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
266 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
267 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 )
268 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
269 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
270 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
271 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
272
273 PORT_START
274 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
275 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
276 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
277 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER2 )
278 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
279 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
280 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
281 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
282
283 PORT_START
284 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
285 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
286 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
287 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
288 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
289 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
290 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
291 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
292
293 PORT_START
294 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
295 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
296 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
297 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
298 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
299 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
300 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
301 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
302 INPUT_PORTS_END
303
304 INPUT_PORTS_START( gekiretu )
305 PORT_START /* dsw2 */
306 PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) )
307 PORT_DIPSETTING( 0x01, DEF_STR( 9C_1C ) )
308 PORT_DIPSETTING( 0x02, DEF_STR( 8C_1C ) )
309 PORT_DIPSETTING( 0x03, DEF_STR( 7C_1C ) )
310 PORT_DIPSETTING( 0x04, DEF_STR( 6C_1C ) )
311 PORT_DIPSETTING( 0x05, DEF_STR( 5C_1C ) )
312 PORT_DIPSETTING( 0x06, DEF_STR( 4C_1C ) )
313 PORT_DIPSETTING( 0x07, DEF_STR( 3C_1C ) )
314 PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) )
315 PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) )
316 PORT_DIPSETTING( 0x08, DEF_STR( 2C_3C ) )
317 PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) )
318 PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) )
319 PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) )
320 PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) )
321 PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) )
322 PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
323 PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
324 PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
325 PORT_DIPSETTING( 0x10, DEF_STR( On ) )
326 PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
327 PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
328 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
329 PORT_DIPNAME( 0x40, 0x40, "Unknown 2-7" )
330 PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
331 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
332 PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
333
334 PORT_START /* dsw3 */
335 PORT_DIPNAME( 0x03, 0x03, "Timer" )
336 PORT_DIPSETTING( 0x03, "Slow" )
337 PORT_DIPSETTING( 0x02, "Normal" )
338 PORT_DIPSETTING( 0x01, "Fast" )
339 PORT_DIPSETTING( 0x00, "Very Fast" )
340 PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
341 PORT_DIPSETTING( 0x04, "1" )
342 PORT_DIPSETTING( 0x08, "2" )
343 PORT_DIPSETTING( 0x0c, "3" )
344 PORT_DIPSETTING( 0x00, "4" )
345 PORT_DIPNAME( 0x10, 0x10, "Unknown 3-5" )
346 PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
347 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
348 PORT_DIPNAME( 0x20, 0x20, "Unknown 3-6" )
349 PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
350 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
351 PORT_DIPNAME( 0x40, 0x40, "Unknown 3-7" )
352 PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
353 PORT_DIPSETTING( 0x00, DEF_STR( On ) )
354 PORT_DIPNAME( 0x80, 0x80, "Allow Continue" )
355 PORT_DIPSETTING( 0x00, DEF_STR( No ) )
356 PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
357
358 PORT_START
359 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
360 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
361 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
362 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 )
363 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
364 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
365 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
366 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
367
368 PORT_START
369 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
370 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
371 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
372 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER2 )
373 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
374 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
375 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
376 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
377
378 PORT_START
379 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
380 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
381 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
382 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
383 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
384 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
385 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
386 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
387
388 PORT_START
389 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
390 PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
391 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
392 PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
393 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
394 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
395 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
396 PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
397 INPUT_PORTS_END
398
399 /****************************************************************************/
400
401 static struct GfxLayout fglayout =
402 {
403 16,8, /* 16*8 characters */
404 8192*2, /* 16384 characters */
405 1, /* 1 bit per pixel */
406 {0},
407 { STEP16(0,1) },
408 { STEP8(0,16) },
409 16*8
410 };
411
412 static struct GfxLayout bglayout =
413 {
414 8,8, /* 8*8 characters */
415 32768+1024, /* 32768+1024 characters */
416 4, /* 4 bits per pixel */
417 {0,1,2,3},
418 { STEP8(0,4) },
419 { STEP8(0,32) },
420 8*8*4
421 };
422
423 static struct GfxLayout objlayout =
424 {
425 16,16, /* 16*16 characters */
426 8192+256, /* 8192+256 characters */
427 4, /* 4 bits per pixel */
428 {0,1,2,3},
429 { STEP16(0,4) },
430 { STEP16(0,64) },
431 16*16*4
432 };
433
434 static struct GfxDecodeInfo quizdna_gfxdecodeinfo[] =
435 {
436 { REGION_GFX1, 0x0000, &fglayout, 0x7e0, 16 },
437 { REGION_GFX2, 0x0000, &bglayout, 0x000, 128 },
438 { REGION_GFX3, 0x0000, &objlayout, 0x600, 32 },
439 { -1 } /* end of array */
440 };
441
442
443 static struct YM2203interface ym2203_interface =
444 {
445 1,
446 MCLK/4, /* 4.000 MHz */
447 { YM2203_VOL(40,10) },
448 { input_port_1_r },
449 { input_port_0_r },
450 { 0 },
451 { 0 }
452 };
453
454 static struct OKIM6295interface okim6295_interface =
455 {
456 1,
457 { MCLK/1024 }, /* 15.625KHz */
458 { REGION_SOUND1 },
459 { 30 }
460 };
461
462
463 static MACHINE_DRIVER_START( quizdna )
464
465 /* basic machine hardware */
466 MDRV_CPU_ADD_TAG("main", Z80, MCLK/2) /* 8.000 MHz */
467 MDRV_CPU_MEMORY(quizdna_readmem,quizdna_writemem)
468 MDRV_CPU_PORTS(quizdna_readport,quizdna_writeport)
469 MDRV_CPU_VBLANK_INT(irq0_line_hold,1)
470
471 MDRV_FRAMES_PER_SECOND(60)
472 MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
473
474 /* video hardware */
475 MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
476 MDRV_SCREEN_SIZE(64*8, 32*8)
477 MDRV_VISIBLE_AREA(8*8, 56*8-1, 2*8, 30*8-1)
478 MDRV_GFXDECODE(quizdna_gfxdecodeinfo)
479 MDRV_PALETTE_LENGTH(2048)
480
481 MDRV_VIDEO_START(quizdna)
482 MDRV_VIDEO_UPDATE(quizdna)
483
484 /* sound hardware */
485 MDRV_SOUND_ADD(YM2203, ym2203_interface)
486 MDRV_SOUND_ADD(OKIM6295, okim6295_interface)
487
488 MACHINE_DRIVER_END
489
490 static MACHINE_DRIVER_START( gakupara )
491
492 /* basic machine hardware */
493 MDRV_IMPORT_FROM(quizdna)
494
495 MDRV_CPU_MODIFY("main")
496 MDRV_CPU_PORTS(quizdna_readport,gakupara_writeport)
497
498 MACHINE_DRIVER_END
499
500 static MACHINE_DRIVER_START( gekiretu )
501
502 /* basic machine hardware */
503 MDRV_IMPORT_FROM(quizdna)
504
505 MDRV_CPU_MODIFY("main")
506 MDRV_CPU_MEMORY(quizdna_readmem,gekiretu_writemem)
507 MDRV_CPU_PORTS(quizdna_readport,gekiretu_writeport)
508
509 MACHINE_DRIVER_END
510
511
512 /****************************************************************************/
513
514 ROM_START( quizdna )
515 ROM_REGION( 0xd0000, REGION_CPU1, 0 ) /* CPU */
516 ROM_LOAD( "quiz2-pr.28", 0x00000, 0x08000, CRC(a428ede4) SHA1(cdca3bd84b2ea421fb05502ea29e9eb605e574eb) )
517 ROM_CONTINUE( 0x18000, 0x78000 ) /* banked */
518 /* empty */
519
520 ROM_REGION( 0x40000, REGION_GFX1, ROMREGION_DISPOSE ) /* fg */
521 ROM_LOAD( "quiz2.102", 0x00000, 0x20000, CRC(62402ac9) SHA1(bf52d22b119d54410dad4949b0687bb0edf3e143) )
522 /* empty */
523
524 ROM_REGION( 0x108000, REGION_GFX2, ROMREGION_DISPOSE ) /* bg */
525 ROM_LOAD( "quiz2-bg.100", 0x000000, 0x100000, CRC(f1d0cac2) SHA1(26d25c1157d1916dfe4496c6cf119c4a9339e31c) )
526 /* empty */
527
528 ROM_REGION( 0x108000, REGION_GFX3, ROMREGION_DISPOSE ) /* obj */
529 ROM_LOAD( "quiz2-ob.98", 0x000000, 0x100000, CRC(682f19a6) SHA1(6b8e6e583f423cf8ef9095f2c300201db7d7b8b3) )
530 ROM_LOAD( "quiz2ob2.97", 0x100000, 0x008000, CRC(03736b1a) SHA1(bc42ac293260f58a8a138702d890f69aec99c05e) )
531
532 ROM_REGION( 0x80000, REGION_SOUND1, 0 ) /* samples */
533 ROM_LOAD( "quiz2-sn.32", 0x000000, 0x040000, CRC(1c044637) SHA1(dc749295e149f968495272f1a3ec27c6b719be8e) )
534
535 ROM_REGION( 0x00020, REGION_USER1, 0 ) /* fg control */
536 ROM_LOAD( "quiz2.148", 0x000000, 0x000020, CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
537
538 ROM_END
539
540 ROM_START( gakupara )
541 ROM_REGION( 0xd0000, REGION_CPU1, 0 ) /* CPU */
542 ROM_LOAD( "u28.bin", 0x00000, 0x08000, CRC(72124bb8) SHA1(e734acff7e9d6b8c6a95c76860732320a2e3a828) )
543 ROM_CONTINUE( 0x18000, 0x78000 ) /* banked */
544 ROM_LOAD( "u29.bin", 0x90000, 0x40000, CRC(09f4948e) SHA1(21ccf5af6935cf40c0cf73fbee14bff3c4e1d23d) ) /* banked */
545
546 ROM_REGION( 0x40000, REGION_GFX1, ROMREGION_DISPOSE ) /* fg */
547 ROM_LOAD( "u102.bin", 0x00000, 0x20000, CRC(62402ac9) SHA1(bf52d22b119d54410dad4949b0687bb0edf3e143) )
548 ROM_LOAD( "u103.bin", 0x20000, 0x20000, CRC(38644251) SHA1(ebfdc43c38e1380709ed08575c346b2467ad1592) )
549
550 ROM_REGION( 0x108000, REGION_GFX2, ROMREGION_DISPOSE ) /* bg */
551 ROM_LOAD( "u100.bin", 0x000000, 0x100000, CRC(f9d886ea) SHA1(d7763f54a165af720216b96e601a66fbc59e3568) )
552 ROM_LOAD( "u99.bin", 0x100000, 0x008000, CRC(ac224d0a) SHA1(f187c3b74bc18606d0fe638f6a829f71c109998d) )
553
554 ROM_REGION( 0x108000, REGION_GFX3, ROMREGION_DISPOSE ) /* obj */
555 ROM_LOAD( "u98.bin", 0x000000, 0x100000, CRC(a6e8cb56) SHA1(2fc85c1769513cc7aa5e23afaf0c99c38de9b855) )
556 ROM_LOAD( "u97.bin", 0x100000, 0x008000, CRC(9dacd5c9) SHA1(e40211059e71408be3d67807463304f4d4ecae37) )
557
558 ROM_REGION( 0x80000, REGION_SOUND1, 0 ) /* samples */
559 ROM_LOAD( "u32.bin", 0x000000, 0x040000, CRC(eb03c535) SHA1(4d6c749ccab4681eee0a1fb243e9f3dbe61b9f94) )
560
561 ROM_REGION( 0x00020, REGION_USER1, 0 ) /* fg control */
562 ROM_LOAD( "u148.bin", 0x000000, 0x000020, CRC(971df9d2) SHA1(280f5b386922b9902ca9211c719642c2bd0ba899) )
563
564 ROM_END
565
566 ROM_START( gekiretu )
567 ROM_REGION( 0xd0000, REGION_CPU1, 0 ) /* CPU */
568 ROM_LOAD( "quiz3-pr.28", 0x00000, 0x08000, CRC(a761e86f) SHA1(85331ef53598491e78c2d123b1ebd358aff46436) )
569 ROM_CONTINUE( 0x18000, 0x78000 ) /* banked */
570 /* empty */
571
572 ROM_REGION( 0x40000, REGION_GFX1, ROMREGION_DISPOSE ) /* fg */
573 ROM_LOAD( "quiz3.102", 0x00000, 0x20000, CRC(62402ac9) SHA1(bf52d22b119d54410dad4949b0687bb0edf3e143) )
574 /* empty */
575
576 ROM_REGION( 0x108000, REGION_GFX2, ROMREGION_DISPOSE ) /* bg */
577 ROM_LOAD( "quiz3-bg.100", 0x000000, 0x100000, CRC(cb9272fd) SHA1(cfc1ff93d1fdc7d144e161a77e534cea75d7f181) )
578 /* empty */
579
580 ROM_REGION( 0x108000, REGION_GFX3, ROMREGION_DISPOSE ) /* obj */
581 ROM_LOAD( "quiz3-ob.98", 0x000000, 0x100000, CRC(01bed020) SHA1(5cc56c8823ee5e538371debe1cbeb57c4976677b) )
582 /* empty */
583
584 ROM_REGION( 0x80000, REGION_SOUND1, 0 ) /* samples */
585 ROM_LOAD( "quiz3-sn.32", 0x000000, 0x040000, CRC(36dca582) SHA1(2607602e942244cfaae931da2ad36da9a8f855f7) )
586
587 ROM_REGION( 0x00020, REGION_USER1, 0 ) /* fg control */
588 ROM_LOAD( "quiz3.148", 0x000000, 0x000020, CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
589
590 ROM_END
591
592 GAME( 1991, gakupara, 0, gakupara, gakupara, 0, ROT0, "NMK", "Quiz Gakuen Paradise (Japan)" )
593 GAME( 1992, quizdna, 0, quizdna, quizdna, 0, ROT0, "Face", "Quiz DNA no Hanran (Japan)" )
594 GAME( 1992, gekiretu, 0, gekiretu, gekiretu, 0, ROT0, "Face", "Quiz Gekiretsu Scramble (Japan)" )
595