1 /***************************************************************************
2
3 Oh My God! (c) 1993 Atlus
4 Naname de Magic! (c) 1994 Atlus
5
6 driver by Nicola Salmoria
7
8 Notes:
9 - not sure about the scroll registers
10 - lots of unknown RAM, maybe other gfx planes not used by this game
11
12 ***************************************************************************/
13
14 #include "driver.h"
15 #include "vidhrdw/generic.h"
16
17
18 extern data16_t *ohmygod_videoram;
19
20 WRITE16_HANDLER( ohmygod_videoram_w );
21 WRITE16_HANDLER( ohmygod_spritebank_w );
22 WRITE16_HANDLER( ohmygod_scrollx_w );
23 WRITE16_HANDLER( ohmygod_scrolly_w );
24 VIDEO_START( ohmygod );
25 VIDEO_UPDATE( ohmygod );
26
27
28 static int adpcm_bank_shift;
29 static int sndbank;
30 static int nosound_kludge_step;
31
MACHINE_INIT(ohmygod)32 static MACHINE_INIT( ohmygod )
33 {
34 unsigned char *rom = memory_region(REGION_SOUND1);
35
36 /* the game requires the watchdog to fire during boot, so we have
37 to initialize it */
38 watchdog_reset_r(0);
39
40 sndbank = 0;
41 memcpy(rom + 0x20000,rom + 0x40000 + 0x20000 * sndbank,0x20000);
42
43 nosound_kludge_step = 0;
44 }
45
WRITE16_HANDLER(ohmygod_ctrl_w)46 WRITE16_HANDLER( ohmygod_ctrl_w )
47 {
48 if (ACCESSING_LSB)
49 {
50 unsigned char *rom = memory_region(REGION_SOUND1);
51
52 /* ADPCM bank switch */
53 if (sndbank != ((data >> adpcm_bank_shift) & 0x0f))
54 {
55 sndbank = (data >> adpcm_bank_shift) & 0x0f;
56 memcpy(rom + 0x20000,rom + 0x40000 + 0x20000 * sndbank,0x20000);
57 }
58 }
59 if (ACCESSING_MSB)
60 {
61 coin_counter_w(0,data & 0x1000);
62 coin_counter_w(1,data & 0x2000);
63 }
64 }
65
READ16_HANDLER(ohmygod_sound_status_r)66 READ16_HANDLER( ohmygod_sound_status_r )
67 {
68 if(Machine->sample_rate == 0)
69 {
70 /* strobe 'sample playing' flags of the OKIM6295 to make it start up */
71
72 int data = 0x00F0;
73
74 if(nosound_kludge_step < 4)
75 {
76 data |= 1 << nosound_kludge_step;
77 }
78
79 nosound_kludge_step++;
80
81 if(nosound_kludge_step >= 5)
82 {
83 nosound_kludge_step = 0;
84 }
85
86 return data;
87 }
88
89 return OKIM6295_status_0_lsb_r(offset, mem_mask);
90 }
91
MEMORY_READ16_START(readmem)92 static MEMORY_READ16_START( readmem )
93 { 0x000000, 0x07ffff, MRA16_ROM },
94 { 0x300000, 0x303fff, MRA16_RAM },
95 { 0x304000, 0x307fff, MRA16_RAM },
96 { 0x308000, 0x30ffff, MRA16_RAM },
97 { 0x700000, 0x703fff, MRA16_RAM },
98 { 0x704000, 0x707fff, MRA16_RAM },
99 { 0x708000, 0x70ffff, MRA16_RAM },
100 { 0x800000, 0x800001, input_port_0_word_r },
101 { 0x800002, 0x800003, input_port_1_word_r },
102 { 0xa00000, 0xa00001, input_port_2_word_r },
103 { 0xa00002, 0xa00003, input_port_3_word_r },
104 { 0xb00000, 0xb00001, ohmygod_sound_status_r },
105 { 0xc00000, 0xc00001, watchdog_reset16_r },
106 MEMORY_END
107
108 static MEMORY_WRITE16_START( writemem )
109 { 0x000000, 0x07ffff, MWA16_ROM },
110 { 0x300000, 0x303fff, MWA16_RAM },
111 { 0x304000, 0x307fff, ohmygod_videoram_w, &ohmygod_videoram },
112 { 0x308000, 0x30ffff, MWA16_RAM },
113 { 0x400000, 0x400001, ohmygod_scrollx_w },
114 { 0x400002, 0x400003, ohmygod_scrolly_w },
115 { 0x600000, 0x6007ff, paletteram16_xGGGGGRRRRRBBBBB_word_w, &paletteram16 },
116 { 0x700000, 0x703fff, MWA16_RAM, &spriteram16, &spriteram_size },
117 { 0x704000, 0x707fff, MWA16_RAM },
118 { 0x708000, 0x70ffff, MWA16_RAM }, /* work RAM */
119 { 0x900000, 0x900001, ohmygod_ctrl_w },
120 { 0xb00000, 0xb00001, OKIM6295_data_0_lsb_w },
121 { 0xd00000, 0xd00001, ohmygod_spritebank_w },
122 MEMORY_END
123
124
125
126 INPUT_PORTS_START( ohmygod )
127 PORT_START
128 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 )
129 PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1 )
130 PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1 )
131 PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 )
132 PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
133 PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
134 PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
135 PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
136 PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 )
137 PORT_BITX(0x0200, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
138 PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
139 PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
140 PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
141 PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
142 PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
143 PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
144
145 PORT_START
146 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 )
147 PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 )
148 PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 )
149 PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 )
150 PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
151 PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
152 PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
153 PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 )
154 PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 )
155 PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE1 )
156 PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
157 PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
158 PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
159 PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
160 PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
161 PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
162
163 PORT_START
164 PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
165 PORT_DIPNAME( 0x0f00, 0x0f00, DEF_STR( Coin_A ) )
166 PORT_DIPSETTING( 0x0700, DEF_STR( 4C_1C ) )
167 PORT_DIPSETTING( 0x0800, DEF_STR( 3C_1C ) )
168 PORT_DIPSETTING( 0x0500, "6 Coins/3 Credits" )
169 PORT_DIPSETTING( 0x0900, DEF_STR( 2C_1C ) )
170 PORT_DIPSETTING( 0x0400, DEF_STR( 4C_3C ) )
171 PORT_DIPSETTING( 0x0f00, DEF_STR( 1C_1C ) )
172 PORT_DIPSETTING( 0x0300, "5 Coins/6 Credits" )
173 PORT_DIPSETTING( 0x0200, DEF_STR( 4C_5C ) )
174 /* PORT_DIPSETTING( 0x0600, DEF_STR( 2C_3C ) )*/
175 PORT_DIPSETTING( 0x0100, DEF_STR( 2C_3C ) )
176 PORT_DIPSETTING( 0x0e00, DEF_STR( 1C_2C ) )
177 PORT_DIPSETTING( 0x0d00, DEF_STR( 1C_3C ) )
178 PORT_DIPSETTING( 0x0c00, DEF_STR( 1C_4C ) )
179 PORT_DIPSETTING( 0x0b00, DEF_STR( 1C_5C ) )
180 PORT_DIPSETTING( 0x0a00, DEF_STR( 1C_6C ) )
181 PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) )
182 PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coin_B ) )
183 PORT_DIPSETTING( 0x7000, DEF_STR( 4C_1C ) )
184 PORT_DIPSETTING( 0x8000, DEF_STR( 3C_1C ) )
185 PORT_DIPSETTING( 0x5000, "6 Coins/3 Credits" )
186 PORT_DIPSETTING( 0x9000, DEF_STR( 2C_1C ) )
187 PORT_DIPSETTING( 0x4000, DEF_STR( 4C_3C ) )
188 PORT_DIPSETTING( 0xf000, DEF_STR( 1C_1C ) )
189 PORT_DIPSETTING( 0x3000, "5 Coins/6 Credits" )
190 PORT_DIPSETTING( 0x2000, DEF_STR( 4C_5C ) )
191 /* PORT_DIPSETTING( 0x6000, DEF_STR( 2C_3C ) )*/
192 PORT_DIPSETTING( 0x1000, DEF_STR( 2C_3C ) )
193 PORT_DIPSETTING( 0xe000, DEF_STR( 1C_2C ) )
194 PORT_DIPSETTING( 0xd000, DEF_STR( 1C_3C ) )
195 PORT_DIPSETTING( 0xc000, DEF_STR( 1C_4C ) )
196 PORT_DIPSETTING( 0xb000, DEF_STR( 1C_5C ) )
197 PORT_DIPSETTING( 0xa000, DEF_STR( 1C_6C ) )
198 PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) )
199
200 PORT_START
201 PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
202 PORT_DIPNAME( 0x0300, 0x0300, "1P Difficulty" )
203 PORT_DIPSETTING( 0x0200, "Easy" )
204 PORT_DIPSETTING( 0x0300, "Normal" )
205 PORT_DIPSETTING( 0x0100, "Hard" )
206 PORT_DIPSETTING( 0x0000, "Very Hard" )
207 PORT_DIPNAME( 0x0c00, 0x0c00, "VS Difficulty" )
208 PORT_DIPSETTING( 0x0c00, "Normal Jake" )
209 PORT_DIPSETTING( 0x0800, "Hard Jake" )
210 PORT_DIPSETTING( 0x0400, "Normal" )
211 PORT_DIPSETTING( 0x0000, "Hard" )
212 PORT_DIPNAME( 0x1000, 0x1000, "Vs Matches/Credit" )
213 PORT_DIPSETTING( 0x0000, "1" )
214 PORT_DIPSETTING( 0x1000, "3" )
215 PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds ) )
216 PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
217 PORT_DIPSETTING( 0x2000, DEF_STR( On ) )
218 PORT_DIPNAME( 0x4000, 0x4000, "Balls Have Eyes" )
219 PORT_DIPSETTING( 0x0000, DEF_STR( No ) )
220 PORT_DIPSETTING( 0x4000, DEF_STR( Yes ) )
221 PORT_DIPNAME( 0x8000, 0x8000, "Test Mode" )
222 PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
223 PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
224 INPUT_PORTS_END
225
226 INPUT_PORTS_START( naname )
227 PORT_START
228 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 )
229 PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1 )
230 PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1 )
231 PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 )
232 PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
233 PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
234 PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
235 PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
236 PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 )
237 PORT_BITX(0x0200, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
238 PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
239 PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
240 PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
241 PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
242 PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
243 PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
244
245 PORT_START
246 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 )
247 PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 )
248 PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 )
249 PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 )
250 PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
251 PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
252 PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
253 PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 )
254 PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 )
255 PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE1 )
256 PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
257 PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
258 PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
259 PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
260 PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
261 PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
262
263 PORT_START
264 PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
265 PORT_DIPNAME( 0x0f00, 0x0f00, DEF_STR( Coin_A ) )
266 PORT_DIPSETTING( 0x0700, DEF_STR( 4C_1C ) )
267 PORT_DIPSETTING( 0x0800, DEF_STR( 3C_1C ) )
268 PORT_DIPSETTING( 0x0500, "6 Coins/3 Credits" )
269 PORT_DIPSETTING( 0x0900, DEF_STR( 2C_1C ) )
270 PORT_DIPSETTING( 0x0400, DEF_STR( 4C_3C ) )
271 PORT_DIPSETTING( 0x0f00, DEF_STR( 1C_1C ) )
272 PORT_DIPSETTING( 0x0300, "5 Coins/6 Credits" )
273 PORT_DIPSETTING( 0x0200, DEF_STR( 4C_5C ) )
274 /* PORT_DIPSETTING( 0x0600, DEF_STR( 2C_3C ) )*/
275 PORT_DIPSETTING( 0x0100, DEF_STR( 2C_3C ) )
276 PORT_DIPSETTING( 0x0e00, DEF_STR( 1C_2C ) )
277 PORT_DIPSETTING( 0x0d00, DEF_STR( 1C_3C ) )
278 PORT_DIPSETTING( 0x0c00, DEF_STR( 1C_4C ) )
279 PORT_DIPSETTING( 0x0b00, DEF_STR( 1C_5C ) )
280 PORT_DIPSETTING( 0x0a00, DEF_STR( 1C_6C ) )
281 PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) )
282 PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coin_B ) )
283 PORT_DIPSETTING( 0x7000, DEF_STR( 4C_1C ) )
284 PORT_DIPSETTING( 0x8000, DEF_STR( 3C_1C ) )
285 PORT_DIPSETTING( 0x5000, "6 Coins/3 Credits" )
286 PORT_DIPSETTING( 0x9000, DEF_STR( 2C_1C ) )
287 PORT_DIPSETTING( 0x4000, DEF_STR( 4C_3C ) )
288 PORT_DIPSETTING( 0xf000, DEF_STR( 1C_1C ) )
289 PORT_DIPSETTING( 0x3000, "5 Coins/6 Credits" )
290 PORT_DIPSETTING( 0x2000, DEF_STR( 4C_5C ) )
291 /* PORT_DIPSETTING( 0x6000, DEF_STR( 2C_3C ) )*/
292 PORT_DIPSETTING( 0x1000, DEF_STR( 2C_3C ) )
293 PORT_DIPSETTING( 0xe000, DEF_STR( 1C_2C ) )
294 PORT_DIPSETTING( 0xd000, DEF_STR( 1C_3C ) )
295 PORT_DIPSETTING( 0xc000, DEF_STR( 1C_4C ) )
296 PORT_DIPSETTING( 0xb000, DEF_STR( 1C_5C ) )
297 PORT_DIPSETTING( 0xa000, DEF_STR( 1C_6C ) )
298 PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) )
299
300 PORT_START
301 PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
302 PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) )
303 PORT_DIPSETTING( 0x0200, "Easy" )
304 PORT_DIPSETTING( 0x0300, "Normal" )
305 PORT_DIPSETTING( 0x0100, "Hard" )
306 PORT_DIPSETTING( 0x0000, "Hardest" )
307 PORT_DIPNAME( 0x0c00, 0x0c00, "Time Difficulty" )
308 PORT_DIPSETTING( 0x0800, "Easy" )
309 PORT_DIPSETTING( 0x0c00, "Normal" )
310 PORT_DIPSETTING( 0x0400, "Hard" )
311 PORT_DIPSETTING( 0x0000, "Hardest" )
312 PORT_DIPNAME( 0x1000, 0x1000, "Vs Matches/Credit" )
313 PORT_DIPSETTING( 0x1000, "1" )
314 PORT_DIPSETTING( 0x0000, "3" )
315 PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds ) )
316 PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
317 PORT_DIPSETTING( 0x2000, DEF_STR( On ) )
318 PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Flip_Screen ) )
319 PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
320 PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
321 PORT_DIPNAME( 0x8000, 0x8000, "Freeze" )
322 PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
323 PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
324 INPUT_PORTS_END
325
326
327
328 static struct GfxLayout charlayout =
329 {
330 8,8,
331 RGN_FRAC(1,1),
332 4,
333 { 0, 1, 2, 3 },
334 { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
335 { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
336 32*8
337 };
338
339 static struct GfxLayout spritelayout =
340 {
341 16,16,
342 RGN_FRAC(1,1),
343 4,
344 { 0, 1, 2, 3 },
345 { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4,
346 8*4, 9*4, 10*4, 11*4, 12*4, 13*4, 14*4, 15*4, },
347 { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
348 8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
349 128*8
350 };
351
352 static struct GfxDecodeInfo gfxdecodeinfo[] =
353 {
354 { REGION_GFX1, 0, &charlayout, 0, 16 }, /* colors 0-255 */
355 { REGION_GFX2, 0, &spritelayout, 512, 16 }, /* colors 512-767 */
356 { -1 } /* end of array */
357 };
358
359
360
361 static struct OKIM6295interface okim6295_interface =
362 {
363 1, /* 1 chip */
364 { 14000000/8/132 }, /* 13.257 kHz ??? COMPLETE GUESS!! (not even sure about the xtal) */
365 { REGION_SOUND1 }, /* memory region */
366 { 100 }
367 };
368
369
370
371 static MACHINE_DRIVER_START( ohmygod )
372
373 /* basic machine hardware */
374 MDRV_CPU_ADD(M68000, 12000000)
MDRV_CPU_MEMORY(readmem,writemem)375 MDRV_CPU_MEMORY(readmem,writemem)
376 MDRV_CPU_VBLANK_INT(irq1_line_hold,1)
377
378 MDRV_FRAMES_PER_SECOND(60)
379 MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
380
381 MDRV_MACHINE_INIT(ohmygod)
382
383 /* video hardware */
384 MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
385 MDRV_SCREEN_SIZE(64*8, 32*8)
386 MDRV_VISIBLE_AREA(12*8, (64-12)*8-1, 0*8, 30*8-1 )
387 MDRV_GFXDECODE(gfxdecodeinfo)
388 MDRV_PALETTE_LENGTH(1024)
389
390 MDRV_VIDEO_START(ohmygod)
391 MDRV_VIDEO_UPDATE(ohmygod)
392
393 /* sound hardware */
394 MDRV_SOUND_ADD(OKIM6295, okim6295_interface)
395 MACHINE_DRIVER_END
396
397
398 /***************************************************************************
399
400 Game driver(s)
401
402 ***************************************************************************/
403
404 ROM_START( ohmygod )
405 ROM_REGION( 0x80000, REGION_CPU1, 0 )
406 ROM_LOAD16_WORD_SWAP( "omg-p.114", 0x00000, 0x80000, CRC(48fa40ca) SHA1(b1d91e1a4a888526febbe53a12b73e375f604f2b) )
407
408 ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE )
409 ROM_LOAD( "omg-b.117", 0x00000, 0x80000, CRC(73621fa6) SHA1(de28c123eeaab78af83ab673431f90c97569450b) )
410
411 ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE )
412 ROM_LOAD( "omg-s.120", 0x00000, 0x80000, CRC(6413bd36) SHA1(52c455d727496eae80bfab9460127c4c5a874e32) )
413
414 ROM_REGION( 0x240000, REGION_SOUND1, 0 )
415 ROM_LOAD( "omg-g.107", 0x00000, 0x200000, CRC(7405573c) SHA1(f4e7318c0a58f43d3c6370490637aea53b28547e) )
416 /* 00000-1ffff is fixed, 20000-3ffff is banked */
417 ROM_RELOAD( 0x40000, 0x200000 )
418 ROM_END
419
420 ROM_START( naname )
421 ROM_REGION( 0x80000, REGION_CPU1, 0 )
422 ROM_LOAD16_WORD_SWAP( "036-prg.114", 0x00000, 0x80000, CRC(3b7362f7) SHA1(ba16ec9df8569bacd387561ef2b3ea5b17cb650c) )
423
424 ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE )
425 ROM_LOAD( "036-bg.117", 0x00000, 0x80000, CRC(f53e8da5) SHA1(efaec4bb90cad75380ac6eb6859379cdefd187ac) )
426
427 ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE )
428 ROM_LOAD( "036-spr.120", 0x00000, 0x80000, CRC(e36d8731) SHA1(652709d7884d40459c95761c8abcb394c4b712bf) )
429
430 ROM_REGION( 0x240000, REGION_SOUND1, 0 )
431 ROM_LOAD( "036-snd.107", 0x00000, 0x200000, CRC(a3e0caf4) SHA1(35b0eb4ae5b9df1b7c99ec2476a6d834ea50d2e3) )
432 /* 00000-1ffff is fixed, 20000-3ffff is banked */
433 ROM_RELOAD( 0x40000, 0x200000 )
434 ROM_END
435
436
437
438 static DRIVER_INIT( ohmygod )
439 {
440 adpcm_bank_shift = 4;
441 }
442
DRIVER_INIT(naname)443 static DRIVER_INIT( naname )
444 {
445 adpcm_bank_shift = 0;
446 }
447
448
449 GAMEX( 1993, ohmygod, 0, ohmygod, ohmygod, ohmygod, ROT0, "Atlus", "Oh My God! (Japan)", GAME_NO_COCKTAIL )
450 GAMEX( 1994, naname, 0, ohmygod, naname, naname, ROT0, "Atlus", "Naname de Magic! (Japan)", GAME_NO_COCKTAIL )
451