1 /****************************************************************************
2 
3 Some Dynax games using the first version of their blitter
4 
5 driver by Nicola Salmoria, blitter support based on work by Luca Elia
6 
7 CPU:	Z80-A
8 Sound:	YM2203C
9 		M5205
10 OSC:	20.0000MHz
11 Video:	HD46505SP
12 
13 ---------------------------------------
14 Year + Game					Board
15 ---------------------------------------
16 87 Hana Yayoi				D0208298L1
17 87 Hana Fubuki				D0602048
18 87 Untouchable				D0806298
19 ---------------------------------------
20 
21 Notes:
22 - In service mode, press "analyzer" (0) and "test" (F1) to see a gfx test
23 
24 - hnfubuki doesn't have a service mode dip, press "analyzer" instead
25 
26 - untoucha doesn't have it either; press "test" during boot for one kind
27   of service menu, "analyzer" at any other time for another menu (including
28   dip switch settings)
29 
30 TODO:
31 - dips/inputs for all games
32 
33 ****************************************************************************/
34 
35 #include "driver.h"
36 
37 
38 VIDEO_START( hnayayoi );
39 VIDEO_START( untoucha );
40 VIDEO_UPDATE( hnayayoi );
41 
42 WRITE_HANDLER( dynax_blitter_rev1_param_w );
43 WRITE_HANDLER( dynax_blitter_rev1_start_w );
44 WRITE_HANDLER( dynax_blitter_rev1_clear_w );
45 WRITE_HANDLER( hnayayoi_palbank_w );
46 
47 
48 
49 static int keyb;
50 
READ_HANDLER(keyboard_0_r)51 static READ_HANDLER( keyboard_0_r )
52 {
53 	int res = 0x3f;
54 	int i;
55 
56 	for (i = 0;i < 5;i++)
57 		if (~keyb & (1 << i)) res &= readinputport(4+i);
58 
59 	return res;
60 }
61 
READ_HANDLER(keyboard_1_r)62 static READ_HANDLER( keyboard_1_r )
63 {
64 	/* Player 2 not supported */
65 	return 0x3f;
66 }
67 
WRITE_HANDLER(keyboard_w)68 static WRITE_HANDLER( keyboard_w )
69 {
70 	keyb = data;
71 }
72 
73 
WRITE_HANDLER(adpcm_data_w)74 static WRITE_HANDLER( adpcm_data_w )
75 {
76 	MSM5205_data_w(0,data);
77 }
78 
WRITE_HANDLER(adpcm_vclk_w)79 static WRITE_HANDLER( adpcm_vclk_w )
80 {
81 	MSM5205_vclk_w(0,data & 1);
82 }
83 
WRITE_HANDLER(adpcm_reset_w)84 static WRITE_HANDLER( adpcm_reset_w )
85 {
86 	MSM5205_reset_w(0,data & 1);
87 }
88 
WRITE_HANDLER(adpcm_reset_inv_w)89 static WRITE_HANDLER( adpcm_reset_inv_w )
90 {
91 	MSM5205_reset_w(0,~data & 1);
92 }
93 
MACHINE_INIT(hnayayoi)94 static MACHINE_INIT( hnayayoi )
95 {
96 	/* start with the MSM5205 reset */
97 	MSM5205_reset_w(0,1);
98 }
99 
100 
101 
MEMORY_READ_START(hnayayoi_readmem)102 static MEMORY_READ_START( hnayayoi_readmem )
103 	{ 0x0000, 0x77ff, MRA_ROM },
104 	{ 0x7800, 0x7fff, MRA_RAM },
105 	{ 0x8000, 0xffff, MRA_ROM },
106 MEMORY_END
107 
108 static MEMORY_WRITE_START( hnayayoi_writemem )
109 	{ 0x0000, 0x77ff, MWA_ROM },
110 	{ 0x7800, 0x7fff, MWA_RAM, &generic_nvram, &generic_nvram_size },
111 	{ 0x8000, 0xffff, MWA_ROM },
112 MEMORY_END
113 
114 
115 static PORT_READ_START( hnayayoi_readport )
116 	{ 0x02, 0x02, YM2203_status_port_0_r },
117 	{ 0x03, 0x03, YM2203_read_port_0_r },
118 	{ 0x04, 0x04, input_port_2_r },
119 	{ 0x41, 0x41, keyboard_0_r },
120 	{ 0x42, 0x42, keyboard_1_r },
121 	{ 0x43, 0x43, input_port_3_r },
122 PORT_END
123 
124 static PORT_WRITE_START( hnayayoi_writeport )
125 	{ 0x00, 0x00, YM2203_control_port_0_w },
126 	{ 0x01, 0x01, YM2203_write_port_0_w },
127 	{ 0x06, 0x06, adpcm_data_w },
128 /*	{ 0x08, 0x08, IOWP_NOP },	*/ /* CRT Controller*/
129 /*	{ 0x09, 0x09, IOWP_NOP },	*/ /* CRT Controller*/
130 	{ 0x0a, 0x0a, dynax_blitter_rev1_start_w },
131 	{ 0x0c, 0x0c, dynax_blitter_rev1_clear_w },
132 	{ 0x23, 0x23, adpcm_vclk_w },
133 	{ 0x24, 0x24, adpcm_reset_w },
134 	{ 0x40, 0x40, keyboard_w },
135 	{ 0x60, 0x61, hnayayoi_palbank_w },
136 	{ 0x62, 0x67, dynax_blitter_rev1_param_w },
137 PORT_END
138 
139 
140 static MEMORY_READ_START( hnfubuki_readmem )
141 	{ 0x0000, 0x77ff, MRA_ROM },
142 	{ 0x7800, 0x7fff, MRA_RAM },
143 	{ 0x8000, 0xfeff, MRA_ROM },
144 	{ 0xff02, 0xff02, YM2203_status_port_0_r },
145 	{ 0xff03, 0xff03, YM2203_read_port_0_r },
146 	{ 0xff04, 0xff04, input_port_2_r },
147 	{ 0xff41, 0xff41, keyboard_0_r },
148 	{ 0xff42, 0xff42, keyboard_1_r },
149 	{ 0xff43, 0xff43, input_port_3_r },
150 MEMORY_END
151 
152 static MEMORY_WRITE_START( hnfubuki_writemem )
153 	{ 0x0000, 0x77ff, MWA_ROM },
154 	{ 0x7800, 0x7fff, MWA_RAM, &generic_nvram, &generic_nvram_size },
155 	{ 0x8000, 0xfeff, MWA_ROM },
156 	{ 0xff00, 0xff00, YM2203_control_port_0_w },
157 	{ 0xff01, 0xff01, YM2203_write_port_0_w },
158 	{ 0xff06, 0xff06, adpcm_data_w },
159 /*	{ 0xff08, 0xff08, IOWP_NOP },	*/ /* CRT Controller*/
160 /*	{ 0xff09, 0xff09, IOWP_NOP },	*/ /* CRT Controller*/
161 	{ 0xff0a, 0xff0a, dynax_blitter_rev1_start_w },
162 	{ 0xff0c, 0xff0c, dynax_blitter_rev1_clear_w },
163 	{ 0xff23, 0xff23, adpcm_vclk_w },
164 	{ 0xff24, 0xff24, adpcm_reset_inv_w },
165 	{ 0xff40, 0xff40, keyboard_w },
166 	{ 0xff60, 0xff61, hnayayoi_palbank_w },
167 	{ 0xff62, 0xff67, dynax_blitter_rev1_param_w },
168 MEMORY_END
169 
170 
171 static PORT_READ_START( hnfubuki_readport )
172 PORT_END
173 
174 static PORT_WRITE_START( hnfubuki_writeport )
175 PORT_END
176 
177 
178 static MEMORY_READ_START( untoucha_readmem )
179 	{ 0x0000, 0x77ff, MRA_ROM },
180 	{ 0x7800, 0x7fff, MRA_RAM },
181 	{ 0x8000, 0xffff, MRA_ROM },
182 MEMORY_END
183 
184 static MEMORY_WRITE_START( untoucha_writemem )
185 	{ 0x0000, 0x77ff, MWA_ROM },
186 	{ 0x7800, 0x7fff, MWA_RAM, &generic_nvram, &generic_nvram_size },
187 	{ 0x8000, 0xffff, MWA_ROM },
188 MEMORY_END
189 
190 
191 static PORT_READ_START( untoucha_readport )
192 	{ 0x11, 0x11, YM2203_status_port_0_r },
193 	{ 0x51, 0x51, YM2203_read_port_0_r },
194 	{ 0x16, 0x16, keyboard_0_r },	/* bit 7 = blitter busy flag*/
195 	{ 0x15, 0x15, keyboard_1_r },
196 	{ 0x14, 0x14, input_port_3_r },
197 PORT_END
198 
199 static PORT_WRITE_START( untoucha_writeport )
200 	{ 0x10, 0x10, YM2203_control_port_0_w },
201 	{ 0x50, 0x50, YM2203_write_port_0_w },
202 	{ 0x13, 0x13, adpcm_data_w },
203 /*	{ 0x12, 0x12, IOWP_NOP },	*/ /* CRT Controller*/
204 /*	{ 0x52, 0x52, IOWP_NOP },	*/ /* CRT Controller*/
205 	{ 0x28, 0x28, dynax_blitter_rev1_start_w },
206 	{ 0x20, 0x20, dynax_blitter_rev1_clear_w },
207 	{ 0x31, 0x31, adpcm_vclk_w },
208 	{ 0x32, 0x32, adpcm_reset_inv_w },
209 	{ 0x17, 0x17, keyboard_w },
210 	{ 0x18, 0x19, hnayayoi_palbank_w },
211 	{ 0x1a, 0x1f, dynax_blitter_rev1_param_w },
212 PORT_END
213 
214 
215 
216 INPUT_PORTS_START( hnayayoi )
217 	PORT_START	/* DSW1 */
218 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
219 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
220 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
221 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
222 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
223 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
224 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
225 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
226 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
227 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
228 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
229 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
230 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
231 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
232 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
233 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
234 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
235 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
236 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
237 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
238 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
239 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
240 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
241 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
242 
243 	PORT_START	/* DSW2 */
244 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
245 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
246 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
247 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
248 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
249 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
250 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
251 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
252 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
253 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
254 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
255 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
256 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
257 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
258 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
259 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
260 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
261 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
262 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
263 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
264 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
265 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
266 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
267 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
268 
269 	PORT_START	/* DSW3 */
270 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )	/* blitter busy flag*/
271 	PORT_SERVICE( 0x02, IP_ACTIVE_LOW )
272 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
273 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
274 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
275 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
276 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
277 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
278 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
279 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
280 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
281 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
282 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
283 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
284 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
285 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
286 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
287 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
288 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
289 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
290 
291 	PORT_START	/* COIN */
292 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
293 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
294 	PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, "Test", KEYCODE_F1, IP_JOY_NONE )	/* Test */
295 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 )	/* Analizer (Statistics) */
296 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
297 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )	/* "Note" ("Paper Money") = 10 Credits */
298 	PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN1, 2 )
299 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
300 
301 	PORT_START	/* P1 keyboard */
302 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 A",            KEYCODE_A,         IP_JOY_NONE )
303 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 E",            KEYCODE_E,         IP_JOY_NONE )
304 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 I",            KEYCODE_I,         IP_JOY_NONE )
305 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 M",            KEYCODE_M,         IP_JOY_NONE )
306 	PORT_BITX(0x10, IP_ACTIVE_LOW, 0, "P1 Kan",          KEYCODE_LCONTROL,  IP_JOY_NONE )
307 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
308 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
309 
310 	PORT_START
311 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 B",            KEYCODE_B,         IP_JOY_NONE )
312 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 F",            KEYCODE_F,         IP_JOY_NONE )
313 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 J",            KEYCODE_J,         IP_JOY_NONE )
314 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 N",            KEYCODE_N,         IP_JOY_NONE )
315 	PORT_BITX(0x10, IP_ACTIVE_LOW, 0, "P1 Reach",        KEYCODE_LSHIFT,    IP_JOY_NONE )
316 	PORT_BITX(0x20, IP_ACTIVE_LOW, 0, "P1 Bet",          KEYCODE_3,         IP_JOY_NONE )
317 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
318 
319 	PORT_START
320 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 C",            KEYCODE_C,         IP_JOY_NONE )
321 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 G",            KEYCODE_G,         IP_JOY_NONE )
322 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 K",            KEYCODE_K,         IP_JOY_NONE )
323 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 Chi",          KEYCODE_SPACE,     IP_JOY_NONE )
324 	PORT_BITX(0x10, IP_ACTIVE_LOW, 0, "P1 Ron",          KEYCODE_Z,         IP_JOY_NONE )
325 	PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
326 
327 	PORT_START
328 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 D",            KEYCODE_D,         IP_JOY_NONE )
329 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 H",            KEYCODE_H,         IP_JOY_NONE )
330 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 L",            KEYCODE_L,         IP_JOY_NONE )
331 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 Pon",          KEYCODE_LALT,      IP_JOY_NONE )
332 	PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
333 
334 	PORT_START
335 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 Last Chance",  KEYCODE_RALT,      IP_JOY_NONE )
336 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 Take Score",   KEYCODE_RCONTROL,  IP_JOY_NONE )
337 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 Double Up",    KEYCODE_RSHIFT,    IP_JOY_NONE )
338 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 Flip Flop",    KEYCODE_X,         IP_JOY_NONE )
339 	PORT_BITX(0x10, IP_ACTIVE_LOW, 0, "P1 Big",          KEYCODE_ENTER,     IP_JOY_NONE )
340 	PORT_BITX(0x20, IP_ACTIVE_LOW, 0, "P1 Small",        KEYCODE_BACKSPACE, IP_JOY_NONE )
341 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
342 INPUT_PORTS_END
343 
344 
345 INPUT_PORTS_START( hnfubuki )
346 	PORT_START	/* DSW1 */
347 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
348 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
349 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
350 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
351 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
352 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
353 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
354 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
355 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
356 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
357 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
358 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
359 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
360 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
361 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
362 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
363 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
364 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
365 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
366 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
367 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
368 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
369 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
370 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
371 
372 	PORT_START	/* DSW2 */
373 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
374 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
375 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
376 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
377 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
378 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
379 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
380 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
381 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
382 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
383 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
384 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
385 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
386 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
387 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
388 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
389 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
390 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
391 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
392 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
393 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
394 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
395 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
396 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
397 
398 	PORT_START	/* DSW3 */
399 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )	/* blitter busy flag*/
400 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
401 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
402 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
403 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
404 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
405 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
406 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
407 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
408 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
409 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
410 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
411 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
412 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
413 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
414 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
415 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
416 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
417 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
418 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
419 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
420 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
421 
422 	PORT_START	/* COIN */
423 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
424 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
425 	PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, "Test", KEYCODE_F1, IP_JOY_NONE )	/* Test */
426 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 )	/* Analizer (Statistics) */
427 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
428 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )	/* "Note" ("Paper Money") = 10 Credits */
429 	PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN1, 2 )
430 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
431 
432 	PORT_START	/* P1 keyboard */
433 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 A",            KEYCODE_A,         IP_JOY_NONE )
434 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 E",            KEYCODE_E,         IP_JOY_NONE )
435 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 I",            KEYCODE_I,         IP_JOY_NONE )
436 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 M",            KEYCODE_M,         IP_JOY_NONE )
437 	PORT_BITX(0x10, IP_ACTIVE_LOW, 0, "P1 Kan",          KEYCODE_LCONTROL,  IP_JOY_NONE )
438 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
439 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
440 
441 	PORT_START
442 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 B",            KEYCODE_B,         IP_JOY_NONE )
443 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 F",            KEYCODE_F,         IP_JOY_NONE )
444 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 J",            KEYCODE_J,         IP_JOY_NONE )
445 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 N",            KEYCODE_N,         IP_JOY_NONE )
446 	PORT_BITX(0x10, IP_ACTIVE_LOW, 0, "P1 Reach",        KEYCODE_LSHIFT,    IP_JOY_NONE )
447 	PORT_BITX(0x20, IP_ACTIVE_LOW, 0, "P1 Bet",          KEYCODE_3,         IP_JOY_NONE )
448 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
449 
450 	PORT_START
451 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 C",            KEYCODE_C,         IP_JOY_NONE )
452 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 G",            KEYCODE_G,         IP_JOY_NONE )
453 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 K",            KEYCODE_K,         IP_JOY_NONE )
454 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 Chi",          KEYCODE_SPACE,     IP_JOY_NONE )
455 	PORT_BITX(0x10, IP_ACTIVE_LOW, 0, "P1 Ron",          KEYCODE_Z,         IP_JOY_NONE )
456 	PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
457 
458 	PORT_START
459 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 D",            KEYCODE_D,         IP_JOY_NONE )
460 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 H",            KEYCODE_H,         IP_JOY_NONE )
461 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 L",            KEYCODE_L,         IP_JOY_NONE )
462 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 Pon",          KEYCODE_LALT,      IP_JOY_NONE )
463 	PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
464 
465 	PORT_START
466 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 Last Chance",  KEYCODE_RALT,      IP_JOY_NONE )
467 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 Take Score",   KEYCODE_RCONTROL,  IP_JOY_NONE )
468 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 Double Up",    KEYCODE_RSHIFT,    IP_JOY_NONE )
469 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 Flip Flop",    KEYCODE_X,         IP_JOY_NONE )
470 	PORT_BITX(0x10, IP_ACTIVE_LOW, 0, "P1 Big",          KEYCODE_ENTER,     IP_JOY_NONE )
471 	PORT_BITX(0x20, IP_ACTIVE_LOW, 0, "P1 Small",        KEYCODE_BACKSPACE, IP_JOY_NONE )
472 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
473 INPUT_PORTS_END
474 
475 
476 INPUT_PORTS_START( untoucha )
477 	PORT_START	/* DSW1 */
478 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
479 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
480 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
481 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
482 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
483 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
484 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
485 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
486 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
487 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
488 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
489 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
490 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
491 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
492 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
493 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
494 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
495 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
496 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
497 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
498 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
499 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
500 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
501 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
502 
503 	PORT_START	/* DSW2 */
504 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
505 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
506 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
507 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
508 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
509 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
510 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
511 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
512 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
513 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
514 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
515 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
516 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
517 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
518 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
519 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
520 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
521 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
522 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
523 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
524 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
525 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
526 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
527 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
528 
529 	PORT_START	/* not used */
530 	PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
531 
532 	PORT_START	/* COIN */
533 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
534 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
535 	PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, "Test", KEYCODE_F1, IP_JOY_NONE )	/* Test */
536 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 )	/* Analizer (Statistics) */
537 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
538 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )	/* "Note" ("Paper Money") = 10 Credits */
539 	PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN1, 2 )
540 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
541 
542 	PORT_START	/* P1 keyboard */
543 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 Hold 1",       KEYCODE_Z,         IP_JOY_NONE )
544 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 Hold 3",       KEYCODE_C,         IP_JOY_NONE )
545 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 Hold 5",       KEYCODE_B,         IP_JOY_NONE )
546 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
547 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
548 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
549 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
550 
551 	PORT_START
552 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
553 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
554 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
555 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 Bet",          KEYCODE_3,         IP_JOY_NONE )
556 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
557 	PORT_BITX(0x20, IP_ACTIVE_LOW, 0, "P1 Take Score",   KEYCODE_RCONTROL,  IP_JOY_NONE )
558 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
559 
560 	PORT_START
561 	PORT_BITX(0x01, IP_ACTIVE_LOW, 0, "P1 Hold 2",       KEYCODE_X,         IP_JOY_NONE )
562 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 Hold 4",       KEYCODE_V,         IP_JOY_NONE )
563 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
564 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
565 	PORT_BITX(0x10, IP_ACTIVE_LOW, 0, "P1 Cancel",       KEYCODE_N,         IP_JOY_NONE )
566 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
567 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
568 
569 	PORT_START
570 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
571 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
572 	PORT_BITX(0x04, IP_ACTIVE_LOW, 0, "P1 Deal",         KEYCODE_1,         IP_JOY_NONE )
573 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
574 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
575 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
576 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
577 
578 	PORT_START
579 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
580 	PORT_BITX(0x02, IP_ACTIVE_LOW, 0, "P1 Double Up",    KEYCODE_RSHIFT,    IP_JOY_NONE )
581 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
582 	PORT_BITX(0x08, IP_ACTIVE_LOW, 0, "P1 Flip Flop",    KEYCODE_F,         IP_JOY_NONE )
583 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
584 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
585 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
586 INPUT_PORTS_END
587 
588 
589 
590 static void irqhandler(int irq)
591 {
592 usrintf_showmessage("irq");
593 /*	cpu_set_irq_line(2,0,irq ? ASSERT_LINE : CLEAR_LINE);*/
594 }
595 
596 
597 static struct YM2203interface ym2203_interface =
598 {
599 	1,			/* 1 chip */
600 	20000000/8,	/* 2.5 MHz???? */
601 	{ YM2203_VOL(80,25) },
602 	{ input_port_0_r },
603 	{ input_port_1_r },
604 	{ 0 },
605 	{ 0 },
606 	{ irqhandler }
607 };
608 
609 struct MSM5205interface msm5205_interface =
610 {
611 	1,
612 	384000,					/* ???? */
613 	{ 0 },					/* IRQ handler */
614 	{ MSM5205_SEX_4B },
615 	{ 100 }
616 };
617 
618 
619 
620 static MACHINE_DRIVER_START( hnayayoi )
621 	/* basic machine hardware */
622 	MDRV_CPU_ADD_TAG("main", Z80, 20000000/4 )        /* 5 MHz ???? */
MDRV_CPU_MEMORY(hnayayoi_readmem,hnayayoi_writemem)623 	MDRV_CPU_MEMORY(hnayayoi_readmem,hnayayoi_writemem)
624 	MDRV_CPU_PORTS(hnayayoi_readport,hnayayoi_writeport)
625 	MDRV_CPU_VBLANK_INT(irq0_line_hold,1)
626 	MDRV_CPU_PERIODIC_INT(nmi_line_pulse,8000)
627 
628 	MDRV_FRAMES_PER_SECOND(60)
629 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
630 	MDRV_MACHINE_INIT(hnayayoi)
631 
632 	MDRV_NVRAM_HANDLER(generic_0fill)
633 
634 	/* video hardware */
635 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER|VIDEO_PIXEL_ASPECT_RATIO_1_2)
636 	MDRV_SCREEN_SIZE(512, 256)
637 	MDRV_VISIBLE_AREA(0, 512-1, 0, 256-1)
638 	MDRV_PALETTE_LENGTH(256)
639 
640 	MDRV_PALETTE_INIT(RRRR_GGGG_BBBB)
641 	MDRV_VIDEO_START(hnayayoi)
642 	MDRV_VIDEO_UPDATE(hnayayoi)
643 
644 	/* sound hardware */
645 	MDRV_SOUND_ADD(YM2203, ym2203_interface)
646 	MDRV_SOUND_ADD(MSM5205, msm5205_interface)
647 MACHINE_DRIVER_END
648 
649 static MACHINE_DRIVER_START( hnfubuki )
650 	MDRV_IMPORT_FROM(hnayayoi)
651 	MDRV_CPU_MODIFY("main")
652 	MDRV_CPU_MEMORY(hnfubuki_readmem,hnfubuki_writemem)
653 	MDRV_CPU_PORTS(hnfubuki_readport,hnfubuki_writeport)
654 MACHINE_DRIVER_END
655 
656 static MACHINE_DRIVER_START( untoucha )
657 	MDRV_IMPORT_FROM(hnayayoi)
658 	MDRV_CPU_MODIFY("main")
659 	MDRV_CPU_MEMORY(untoucha_readmem,untoucha_writemem)
660 	MDRV_CPU_PORTS(untoucha_readport,untoucha_writeport)
661 
662 	MDRV_VIDEO_START(untoucha)
663 MACHINE_DRIVER_END
664 
665 
666 /***************************************************************************
667 
668   Game driver(s)
669 
670 ***************************************************************************/
671 
672 ROM_START( hnayayoi )
673 	ROM_REGION( 0x10000, REGION_CPU1, 0 )
674 	ROM_LOAD( "021.4a",     0x00000, 0x08000, CRC(d9734da4) SHA1(a2c8f5113c8136bea990c282d60f67b2793f9a2c) )
675 	ROM_LOAD( "022.3a",     0x08000, 0x08000, CRC(e6be5af4) SHA1(cdc56705ba0d191930f892618512cb687975ecbb) )
676 
677 	ROM_REGION( 0x38000, REGION_GFX1, 0 )	/* blitter data */
678 	ROM_LOAD( "023.8f",     0x00000, 0x08000, CRC(81ae7317) SHA1(9e37dad046420138b4655d0692fe4bac3a8e09de) )
679 	ROM_LOAD( "024.9f",     0x08000, 0x08000, CRC(413ab77a) SHA1(4b44d2a76c37f25f126e3759ab61fadba02e2b55) )
680 	ROM_LOAD( "025.10f",    0x10000, 0x08000, CRC(56d16426) SHA1(38162f2a240ce6828232d4280120acc576f71200) )
681 	ROM_LOAD( "026.12f",    0x18000, 0x08000, CRC(a99779d9) SHA1(1c4586c5070ec9646440cafefa8cf8a550ad17bd) )
682 	ROM_LOAD( "027.8d",     0x20000, 0x08000, CRC(209c149a) SHA1(4b7232f1b8b7f88fd8e53b719baff85afce72541) )
683 	ROM_LOAD( "028.9d",     0x28000, 0x08000, CRC(6981b043) SHA1(9d8f54945bce4ef149290ff34ef6e4532f4e6e8f) )
684 	ROM_LOAD( "029.10d",    0x30000, 0x08000, CRC(a266f1eb) SHA1(525d8c350cdad2461cb814e4eaa785e84b6fc529) )
685 
686 	ROM_REGION( 0x0300, REGION_PROMS, 0 )
687 	ROM_LOAD( "r.16b",      0x0000, 0x0100, CRC(b6e9ac04) SHA1(f3ec1c285d40e6189ad8722fab202d2b877f7f75) )
688 	ROM_LOAD( "g.17b",      0x0100, 0x0100, CRC(a595f310) SHA1(6bd16897d3abcceae76a613a1296992c2e9e1a37) )
689 	ROM_LOAD( "b.17c",      0x0200, 0x0100, CRC(e33bd9ea) SHA1(47395511d7bd44a27fa55d43094c67c5551cdfbf) )
690 ROM_END
691 
692 ROM_START( hnfubuki )
693 	ROM_REGION( 0x10000, REGION_CPU1, 0 )
694 	ROM_LOAD( "s1.s2c",     0x00000, 0x10000, CRC(afe3179c) SHA1(fdfba1e7073318f9782d628f3c7dd0d9c84cbeea) )
695 
696 	ROM_REGION( 0x40000, REGION_GFX1, 0 )	/* blitter data */
697 	ROM_LOAD( "062.8f",     0x00000, 0x10000, CRC(0d96a540) SHA1(1cadf19d8fd48962acb0e45a50431fabd6f13672) )
698 	ROM_LOAD( "063.9f",     0x10000, 0x10000, CRC(14250093) SHA1(8459024ebe5f8c3fa146e3303a155c2cf5c487b3) )
699 	ROM_LOAD( "064.10f",    0x20000, 0x10000, CRC(41546fb9) SHA1(3c6028c19aa65dcb7ccfc01c223c2cba36cc9bb4) )
700 	ROM_LOAD( "0652.12f",   0x30000, 0x10000, CRC(e7b54ea3) SHA1(157306db5f3e3cc652fcdb7b42d33f0b93eda07b) )
701 
702 	ROM_REGION( 0x0300, REGION_PROMS, 0 )
703 	ROM_LOAD( "r-16b",      0x0000, 0x0100, CRC(e6fd8f5d) SHA1(fb9dedd46c4aaa707d4f7d2614227435eea0bca3) )
704 	ROM_LOAD( "g-17b",      0x0100, 0x0100, CRC(3f425f67) SHA1(3b0c6585d74871638681749f7162b0780318645c) )
705 	ROM_LOAD( "b-17c",      0x0200, 0x0100, CRC(d1f912e5) SHA1(0e0b61498ef5e4685754c0786b7288156b8a56ce) )
706 ROM_END
707 
708 ROM_START( untoucha )
709 	ROM_REGION( 0x10000, REGION_CPU1, 0 )
710 	ROM_LOAD( "b4.10b",     0x00000, 0x10000, CRC(4df04e41) SHA1(4d5232c2f383640394d85417aa973f92c78184c9) )
711 
712 	ROM_REGION( 0x90000, REGION_GFX1, 0 )	/* blitter data */
713 	ROM_LOAD( "081.10f",    0x00000, 0x10000, CRC(36ba990d) SHA1(10b2865f1d19c01cc898029a23489f47ade2ce86) )
714 	ROM_LOAD( "082.12f",    0x10000, 0x10000, CRC(2beb6277) SHA1(ea57970051c674800a9bedd581d734bd9beaa894) )
715 	ROM_LOAD( "083.13f",    0x20000, 0x10000, CRC(c3fed8ff) SHA1(405a6563ff7420686063e04fb99dfe6f0f7378dc) )
716 	ROM_LOAD( "084.14f",    0x30000, 0x10000, CRC(10de3aae) SHA1(c006f58f03f261ed104da870e944e3e3bed3ecfe) )
717 	ROM_LOAD( "085.16f",    0x40000, 0x10000, CRC(527e5879) SHA1(3a126e64890157f346320923427889ab24a39fcc) )
718 	ROM_LOAD( "086.10h",    0x50000, 0x10000, CRC(be3f0a2e) SHA1(46b52e05c340d32de49769ebf69c9f4f8c1baf1e) )
719 	ROM_LOAD( "087.12h",    0x60000, 0x10000, CRC(35e072b7) SHA1(e15d56fbc7ec71b21a22a12121ab6d2bfdfc530d) )
720 	ROM_LOAD( "088.13h",    0x70000, 0x10000, CRC(742cf3c0) SHA1(542fe62feea752e57895c20932865d53953e4945) )
721 	ROM_LOAD( "089.14h",    0x80000, 0x10000, CRC(ff497db1) SHA1(c786d1b6d07c889e6fc1f812d7dac50674eae356) )
722 
723 	ROM_REGION( 0x0300, REGION_PROMS, 0 )
724 	ROM_LOAD( "08r.9f",     0x0000, 0x0100, CRC(308e65b4) SHA1(73ec6df141502270148d898376f0ed3211436f04) )
725 	ROM_LOAD( "08g.8f",     0x0100, 0x0100, CRC(349c3de3) SHA1(ffbbc3a049a749cea5867f575ac77cfd8f5299b1) )
726 	ROM_LOAD( "08b.7f",     0x0200, 0x0100, CRC(2007435a) SHA1(2fae6f349b36f700e65ae9b980adce691bdc6dde) )
727 ROM_END
728 
729 
730 static DRIVER_INIT( hnfubuki )
731 {
732 	UINT8 *rom = memory_region(REGION_GFX1);
733 	int len = memory_region_length(REGION_GFX1);
734 	int i,j;
735 
736 	/* interestingly, the blitter data has a slight encryption */
737 
738 	/* swap address bits 4 and 5 */
739 	for (i = 0;i < len;i += 0x40)
740 	{
741 		for (j = 0;j < 0x10;j++)
742 		{
743 			UINT8 t = rom[i + j + 0x10];
744 			rom[i + j + 0x10] = rom[i + j + 0x20];
745 			rom[i + j + 0x20] = t;
746 		}
747 	}
748 
749 	/* swap data bits 0 and 1 */
750 	for (i = 0;i < len;i++)
751 	{
752 		rom[i] = BITSWAP8(rom[i],7,6,5,4,3,2,0,1);
753 	}
754 }
755 
756 
757 GAME( 1987, hnayayoi, 0,        hnayayoi, hnayayoi, 0,        ROT0, "Dyna Electronics", "Hana Yayoi (Japan)" )
758 GAME( 1987, hnfubuki, hnayayoi, hnfubuki, hnfubuki, hnfubuki, ROT0, "Dynax", "Hana Fubuki [BET] (Japan)" )
759 GAME( 1987, untoucha, 0,        untoucha, untoucha, 0,        ROT0, "Dynax", "Untouchable (Japan)" )
760