~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/mame/drivers/jangou.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        UINT8        m_pen_data[0x10];
65
65
        UINT8        m_blit_data[6];
66
66
        UINT8        m_blit_buffer[256 * 256];
 
67
        DECLARE_WRITE8_MEMBER(blitter_process_w);
 
68
        DECLARE_WRITE8_MEMBER(blit_vregs_w);
 
69
        DECLARE_WRITE8_MEMBER(mux_w);
 
70
        DECLARE_WRITE8_MEMBER(output_w);
 
71
        DECLARE_WRITE8_MEMBER(sound_latch_w);
 
72
        DECLARE_READ8_MEMBER(sound_latch_r);
 
73
        DECLARE_WRITE8_MEMBER(cvsd_w);
 
74
        DECLARE_WRITE8_MEMBER(adpcm_w);
 
75
        DECLARE_READ8_MEMBER(master_com_r);
 
76
        DECLARE_WRITE8_MEMBER(master_com_w);
 
77
        DECLARE_READ8_MEMBER(slave_com_r);
 
78
        DECLARE_WRITE8_MEMBER(slave_com_w);
 
79
        DECLARE_READ8_MEMBER(jngolady_rng_r);
67
80
};
68
81
 
69
82
 
76
89
/* guess: use the same resistor values as Crazy Climber (needs checking on the real HW) */
77
90
static PALETTE_INIT( jangou )
78
91
{
 
92
        const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
79
93
        static const int resistances_rg[3] = { 1000, 470, 220 };
80
94
        static const int resistances_b [2] = { 470, 220 };
81
95
        double weights_rg[3], weights_b[2];
154
168
 
155
169
static UINT8 jangou_gfx_nibble( running_machine &machine, UINT16 niboffset )
156
170
{
157
 
        const UINT8 *const blit_rom = machine.region("gfx")->base();
 
171
        const UINT8 *const blit_rom = machine.root_device().memregion("gfx")->base();
158
172
 
159
173
        if (niboffset & 1)
160
174
                return (blit_rom[(niboffset >> 1) & 0xffff] & 0xf0) >> 4;
176
190
                state->m_blit_buffer[(y * 256) + (x >> 1)] = (state->m_blit_buffer[(y * 256) + (x >> 1)] & 0xf0) | (pix & 0x0f);
177
191
}
178
192
 
179
 
static WRITE8_HANDLER( blitter_process_w )
 
193
WRITE8_MEMBER(jangou_state::blitter_process_w)
180
194
{
181
 
        jangou_state *state = space->machine().driver_data<jangou_state>();
182
195
        int src, x, y, h, w, flipx;
183
 
        state->m_blit_data[offset] = data;
 
196
        m_blit_data[offset] = data;
184
197
 
185
198
        if (offset == 5)
186
199
        {
187
200
                int count = 0;
188
201
                int xcount, ycount;
189
202
 
190
 
                /* printf("%02x %02x %02x %02x %02x %02x\n", state->m_blit_data[0], state->m_blit_data[1], state->m_blit_data[2],
191
 
                    state->m_blit_data[3], state->m_blit_data[4], state->m_blit_data[5]); */
192
 
                w = (state->m_blit_data[4] & 0xff) + 1;
193
 
                h = (state->m_blit_data[5] & 0xff) + 1;
194
 
                src = ((state->m_blit_data[1] << 8)|(state->m_blit_data[0] << 0));
195
 
                x = (state->m_blit_data[2] & 0xff);
196
 
                y = (state->m_blit_data[3] & 0xff);
 
203
                /* printf("%02x %02x %02x %02x %02x %02x\n", m_blit_data[0], m_blit_data[1], m_blit_data[2],
 
204
                    m_blit_data[3], m_blit_data[4], m_blit_data[5]); */
 
205
                w = (m_blit_data[4] & 0xff) + 1;
 
206
                h = (m_blit_data[5] & 0xff) + 1;
 
207
                src = ((m_blit_data[1] << 8)|(m_blit_data[0] << 0));
 
208
                x = (m_blit_data[2] & 0xff);
 
209
                y = (m_blit_data[3] & 0xff);
197
210
 
198
211
                // lowest bit of src controls flipping / draw direction?
199
 
                flipx = (state->m_blit_data[0] & 1);
 
212
                flipx = (m_blit_data[0] & 1);
200
213
 
201
214
                if (!flipx)
202
215
                        src += (w * h) - 1;
209
222
                        {
210
223
                                int drawx = (x + xcount) & 0xff;
211
224
                                int drawy = (y + ycount) & 0xff;
212
 
                                UINT8 dat = jangou_gfx_nibble(space->machine(), src + count);
213
 
                                UINT8 cur_pen_hi = state->m_pen_data[(dat & 0xf0) >> 4];
214
 
                                UINT8 cur_pen_lo = state->m_pen_data[(dat & 0x0f) >> 0];
 
225
                                UINT8 dat = jangou_gfx_nibble(machine(), src + count);
 
226
                                UINT8 cur_pen_hi = m_pen_data[(dat & 0xf0) >> 4];
 
227
                                UINT8 cur_pen_lo = m_pen_data[(dat & 0x0f) >> 0];
215
228
 
216
229
                                dat = cur_pen_lo | (cur_pen_hi << 4);
217
230
 
218
231
                                if ((dat & 0xff) != 0)
219
 
                                        plot_jangou_gfx_pixel(space->machine(), dat, drawx, drawy);
 
232
                                        plot_jangou_gfx_pixel(machine(), dat, drawx, drawy);
220
233
 
221
234
                                if (!flipx)
222
235
                                        count--;
228
241
}
229
242
 
230
243
/* What is the bit 5 (0x20) for?*/
231
 
static WRITE8_HANDLER( blit_vregs_w )
 
244
WRITE8_MEMBER(jangou_state::blit_vregs_w)
232
245
{
233
 
        jangou_state *state = space->machine().driver_data<jangou_state>();
234
246
 
235
247
        //  printf("%02x %02x\n", offset, data);
236
 
        state->m_pen_data[offset] = data & 0xf;
 
248
        m_pen_data[offset] = data & 0xf;
237
249
}
238
250
 
239
251
/*************************************
242
254
 *
243
255
 *************************************/
244
256
 
245
 
static WRITE8_HANDLER( mux_w )
 
257
WRITE8_MEMBER(jangou_state::mux_w)
246
258
{
247
 
        jangou_state *state = space->machine().driver_data<jangou_state>();
248
 
        state->m_mux_data = ~data;
 
259
        m_mux_data = ~data;
249
260
}
250
261
 
251
 
static WRITE8_HANDLER( output_w )
 
262
WRITE8_MEMBER(jangou_state::output_w)
252
263
{
253
264
        /*
254
265
    --x- ---- ? (polls between high and low in irq routine,probably signals the vblank routine)
256
267
    ---- ---x coin counter
257
268
    */
258
269
//  printf("%02x\n", data);
259
 
        coin_counter_w(space->machine(), 0, data & 0x01);
 
270
        coin_counter_w(machine(), 0, data & 0x01);
260
271
//  flip_screen_set(data & 0x04);
261
 
//  coin_lockout_w(space->machine(), 0, ~data & 0x20);
 
272
//  coin_lockout_w(machine(), 0, ~data & 0x20);
262
273
}
263
274
 
264
275
static READ8_DEVICE_HANDLER( input_mux_r )
266
277
        jangou_state *state = device->machine().driver_data<jangou_state>();
267
278
        switch(state->m_mux_data)
268
279
        {
269
 
                case 0x01: return input_port_read(device->machine(), "PL1_1");
270
 
                case 0x02: return input_port_read(device->machine(), "PL1_2");
271
 
                case 0x04: return input_port_read(device->machine(), "PL2_1");
272
 
                case 0x08: return input_port_read(device->machine(), "PL2_2");
273
 
                case 0x10: return input_port_read(device->machine(), "PL1_3");
274
 
                case 0x20: return input_port_read(device->machine(), "PL2_3");
 
280
                case 0x01: return state->ioport("PL1_1")->read();
 
281
                case 0x02: return state->ioport("PL1_2")->read();
 
282
                case 0x04: return state->ioport("PL2_1")->read();
 
283
                case 0x08: return state->ioport("PL2_2")->read();
 
284
                case 0x10: return state->ioport("PL1_3")->read();
 
285
                case 0x20: return state->ioport("PL2_3")->read();
275
286
        }
276
287
 
277
 
        return input_port_read(device->machine(), "IN_NOMUX");
 
288
        return device->machine().root_device().ioport("IN_NOMUX")->read();
278
289
}
279
290
 
280
291
static READ8_DEVICE_HANDLER( input_system_r )
281
292
{
282
 
        return input_port_read(device->machine(), "SYSTEM");
 
293
        return device->machine().root_device().ioport("SYSTEM")->read();
283
294
}
284
295
 
285
296
 
289
300
 *
290
301
 *************************************/
291
302
 
292
 
static WRITE8_HANDLER( sound_latch_w )
 
303
WRITE8_MEMBER(jangou_state::sound_latch_w)
293
304
{
294
 
        jangou_state *state = space->machine().driver_data<jangou_state>();
295
 
        soundlatch_w(space, 0, data & 0xff);
296
 
        device_set_input_line(state->m_cpu_1, INPUT_LINE_NMI, ASSERT_LINE);
 
305
        soundlatch_byte_w(space, 0, data & 0xff);
 
306
        device_set_input_line(m_cpu_1, INPUT_LINE_NMI, ASSERT_LINE);
297
307
}
298
308
 
299
 
static READ8_HANDLER( sound_latch_r )
 
309
READ8_MEMBER(jangou_state::sound_latch_r)
300
310
{
301
 
        jangou_state *state = space->machine().driver_data<jangou_state>();
302
 
        device_set_input_line(state->m_cpu_1, INPUT_LINE_NMI, CLEAR_LINE);
303
 
        return soundlatch_r(space, 0);
 
311
        device_set_input_line(m_cpu_1, INPUT_LINE_NMI, CLEAR_LINE);
 
312
        return soundlatch_byte_r(space, 0);
304
313
}
305
314
 
306
315
/* Jangou HC-55516 CVSD */
307
 
static WRITE8_HANDLER( cvsd_w )
 
316
WRITE8_MEMBER(jangou_state::cvsd_w)
308
317
{
309
 
        jangou_state *state = space->machine().driver_data<jangou_state>();
310
 
        state->m_cvsd_shiftreg = data;
 
318
        m_cvsd_shiftreg = data;
311
319
}
312
320
 
313
321
static TIMER_CALLBACK( cvsd_bit_timer_callback )
325
333
 
326
334
 
327
335
/* Jangou Lady MSM5218 (MSM5205-compatible) ADPCM */
328
 
static WRITE8_HANDLER( adpcm_w )
 
336
WRITE8_MEMBER(jangou_state::adpcm_w)
329
337
{
330
 
        jangou_state *state = space->machine().driver_data<jangou_state>();
331
 
        state->m_adpcm_byte = data;
 
338
        m_adpcm_byte = data;
332
339
}
333
340
 
334
341
static void jngolady_vclk_cb( device_t *device )
353
360
 *
354
361
 *************************************/
355
362
 
356
 
static READ8_HANDLER( master_com_r )
357
 
{
358
 
        jangou_state *state = space->machine().driver_data<jangou_state>();
359
 
        return state->m_z80_latch;
360
 
}
361
 
 
362
 
static WRITE8_HANDLER( master_com_w )
363
 
{
364
 
        jangou_state *state = space->machine().driver_data<jangou_state>();
365
 
 
366
 
        device_set_input_line(state->m_nsc, 0, HOLD_LINE);
367
 
        state->m_nsc_latch = data;
368
 
}
369
 
 
370
 
static READ8_HANDLER( slave_com_r )
371
 
{
372
 
        jangou_state *state = space->machine().driver_data<jangou_state>();
373
 
        return state->m_nsc_latch;
374
 
}
375
 
 
376
 
static WRITE8_HANDLER( slave_com_w )
377
 
{
378
 
        jangou_state *state = space->machine().driver_data<jangou_state>();
379
 
        state->m_z80_latch = data;
 
363
READ8_MEMBER(jangou_state::master_com_r)
 
364
{
 
365
        return m_z80_latch;
 
366
}
 
367
 
 
368
WRITE8_MEMBER(jangou_state::master_com_w)
 
369
{
 
370
 
 
371
        device_set_input_line(m_nsc, 0, HOLD_LINE);
 
372
        m_nsc_latch = data;
 
373
}
 
374
 
 
375
READ8_MEMBER(jangou_state::slave_com_r)
 
376
{
 
377
        return m_nsc_latch;
 
378
}
 
379
 
 
380
WRITE8_MEMBER(jangou_state::slave_com_w)
 
381
{
 
382
        m_z80_latch = data;
380
383
}
381
384
 
382
385
/*************************************
385
388
 *
386
389
 *************************************/
387
390
 
388
 
static ADDRESS_MAP_START( cpu0_map, AS_PROGRAM, 8 )
 
391
static ADDRESS_MAP_START( cpu0_map, AS_PROGRAM, 8, jangou_state )
389
392
        AM_RANGE(0x0000, 0x9fff) AM_ROM
390
393
        AM_RANGE(0xc000, 0xc7ff) AM_RAM
391
394
ADDRESS_MAP_END
392
395
 
393
 
static ADDRESS_MAP_START( cpu0_io, AS_IO, 8 )
 
396
static ADDRESS_MAP_START( cpu0_io, AS_IO, 8, jangou_state )
394
397
        ADDRESS_MAP_GLOBAL_MASK(0xff)
395
 
        AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_r)
396
 
        AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_data_address_w)
 
398
        AM_RANGE(0x01,0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r)
 
399
        AM_RANGE(0x02,0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w)
397
400
        AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") //dsw + blitter busy flag
398
401
        AM_RANGE(0x10,0x10) AM_WRITE(output_w)
399
402
        AM_RANGE(0x11,0x11) AM_WRITE(mux_w)
404
407
ADDRESS_MAP_END
405
408
 
406
409
 
407
 
static ADDRESS_MAP_START( cpu1_map, AS_PROGRAM, 8 )
 
410
static ADDRESS_MAP_START( cpu1_map, AS_PROGRAM, 8, jangou_state )
408
411
        AM_RANGE(0x0000, 0x7fff) AM_ROM AM_WRITENOP
409
412
ADDRESS_MAP_END
410
413
 
411
 
static ADDRESS_MAP_START( cpu1_io, AS_IO, 8 )
 
414
static ADDRESS_MAP_START( cpu1_io, AS_IO, 8, jangou_state )
412
415
        ADDRESS_MAP_GLOBAL_MASK(0xff)
413
416
        AM_RANGE(0x00,0x00) AM_READ(sound_latch_r)
414
417
        AM_RANGE(0x01,0x01) AM_WRITE(cvsd_w)
422
425
 *
423
426
 *************************************/
424
427
 
425
 
static ADDRESS_MAP_START( jngolady_cpu0_map, AS_PROGRAM, 8 )
 
428
static ADDRESS_MAP_START( jngolady_cpu0_map, AS_PROGRAM, 8, jangou_state )
426
429
        AM_RANGE(0x0000, 0x9fff) AM_ROM
427
430
        AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE("share1")
428
431
        AM_RANGE(0xe000, 0xe000) AM_READWRITE(master_com_r,master_com_w)
429
432
ADDRESS_MAP_END
430
433
 
431
434
 
432
 
static ADDRESS_MAP_START( jngolady_cpu1_map, AS_PROGRAM, 8 )
 
435
static ADDRESS_MAP_START( jngolady_cpu1_map, AS_PROGRAM, 8, jangou_state )
433
436
        AM_RANGE(0x0000, 0x7fff) AM_ROM AM_WRITENOP
434
437
ADDRESS_MAP_END
435
438
 
436
 
static ADDRESS_MAP_START( jngolady_cpu1_io, AS_IO, 8 )
 
439
static ADDRESS_MAP_START( jngolady_cpu1_io, AS_IO, 8, jangou_state )
437
440
        ADDRESS_MAP_GLOBAL_MASK(0xff)
438
441
        AM_RANGE(0x00,0x00) AM_READ(sound_latch_r)
439
442
        AM_RANGE(0x01,0x01) AM_WRITE(adpcm_w)
441
444
ADDRESS_MAP_END
442
445
 
443
446
 
444
 
static ADDRESS_MAP_START( nsc_map, AS_PROGRAM, 8 )
 
447
static ADDRESS_MAP_START( nsc_map, AS_PROGRAM, 8, jangou_state )
445
448
        AM_RANGE(0x0000, 0x007f) AM_RAM //internal ram for irq etc.
446
449
        AM_RANGE(0x8000, 0x8000) AM_WRITENOP //write-only,irq related?
447
450
        AM_RANGE(0x9000, 0x9000) AM_READWRITE(slave_com_r,slave_com_w)
455
458
 *
456
459
 *************************************/
457
460
 
458
 
static ADDRESS_MAP_START( cntrygrl_cpu0_map, AS_PROGRAM, 8 )
 
461
static ADDRESS_MAP_START( cntrygrl_cpu0_map, AS_PROGRAM, 8, jangou_state )
459
462
        AM_RANGE(0x0000, 0x3fff) AM_ROM
460
463
//  AM_RANGE(0xc000, 0xc7ff) AM_RAM
461
464
        AM_RANGE(0xe000, 0xefff) AM_RAM
462
465
ADDRESS_MAP_END
463
466
 
464
 
static ADDRESS_MAP_START( cntrygrl_cpu0_io, AS_IO, 8 )
 
467
static ADDRESS_MAP_START( cntrygrl_cpu0_io, AS_IO, 8, jangou_state )
465
468
        ADDRESS_MAP_GLOBAL_MASK(0xff)
466
 
        AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_r)
467
 
        AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_data_address_w)
 
469
        AM_RANGE(0x01,0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r)
 
470
        AM_RANGE(0x02,0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w)
468
471
        AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") //dsw + blitter busy flag
469
472
        AM_RANGE(0x10,0x10) AM_WRITE(output_w)
470
473
        AM_RANGE(0x11,0x11) AM_WRITE(mux_w)
480
483
 *
481
484
 *************************************/
482
485
 
483
 
static ADDRESS_MAP_START( roylcrdn_cpu0_map, AS_PROGRAM, 8 )
 
486
static ADDRESS_MAP_START( roylcrdn_cpu0_map, AS_PROGRAM, 8, jangou_state )
484
487
        AM_RANGE(0x0000, 0x2fff) AM_ROM
485
488
        AM_RANGE(0x7000, 0x77ff) AM_RAM AM_SHARE("nvram")       /* MK48Z02B-15 ZEROPOWER RAM */
486
489
ADDRESS_MAP_END
487
490
 
488
 
static ADDRESS_MAP_START( roylcrdn_cpu0_io, AS_IO, 8 )
 
491
static ADDRESS_MAP_START( roylcrdn_cpu0_io, AS_IO, 8, jangou_state )
489
492
        ADDRESS_MAP_GLOBAL_MASK(0xff)
490
 
        AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_r)
491
 
        AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_data_address_w)
 
493
        AM_RANGE(0x01,0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r)
 
494
        AM_RANGE(0x02,0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w)
492
495
        AM_RANGE(0x10,0x10) AM_READ_PORT("DSW")                 /* DSW + blitter busy flag */
493
496
        AM_RANGE(0x10,0x10) AM_WRITENOP                                 /* Writes continuosly 0's in attract mode, and 1's in game */
494
497
        AM_RANGE(0x11,0x11) AM_WRITE(mux_w)
592
595
        PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6")
593
596
        PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
594
597
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
595
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK ) // guess
 
598
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // guess
596
599
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag
597
600
INPUT_PORTS_END
598
601
 
653
656
        PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6")
654
657
        PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
655
658
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
656
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK ) // guess
 
659
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // guess
657
660
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag
658
661
INPUT_PORTS_END
659
662
 
779
782
        PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6")
780
783
        PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
781
784
        PORT_DIPSETTING(    0x00, DEF_STR( On ) )
782
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK )
 
785
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
783
786
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) //blitter busy flag
784
787
INPUT_PORTS_END
785
788
 
1353
1356
 *************************************/
1354
1357
 
1355
1358
/*Temporary kludge for make the RNG work*/
1356
 
static READ8_HANDLER( jngolady_rng_r )
 
1359
READ8_MEMBER(jangou_state::jngolady_rng_r)
1357
1360
{
1358
 
        return space->machine().rand();
 
1361
        return machine().rand();
1359
1362
}
1360
1363
 
1361
1364
static DRIVER_INIT( jngolady )
1362
1365
{
1363
 
        machine.device("nsc")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x08, 0x08, FUNC(jngolady_rng_r) );
 
1366
        jangou_state *state = machine.driver_data<jangou_state>();
 
1367
        machine.device("nsc")->memory().space(AS_PROGRAM)->install_read_handler(0x08, 0x08, read8_delegate(FUNC(jangou_state::jngolady_rng_r),state) );
1364
1368
}
1365
1369
 
1366
1370
static DRIVER_INIT (luckygrl)
1367
1371
{
1368
1372
        // this is WRONG
1369
1373
        int A;
1370
 
        UINT8 *ROM = machine.region("cpu0")->base();
 
1374
        UINT8 *ROM = machine.root_device().memregion("cpu0")->base();
1371
1375
 
1372
1376
        unsigned char patn1[32] = {
1373
1377
                0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0,