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

« back to all changes in this revision

Viewing changes to src/mame/drivers/ninjaw.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:
335
335
 
336
336
}
337
337
 
338
 
static WRITE16_HANDLER( cpua_ctrl_w )
 
338
WRITE16_MEMBER(ninjaw_state::cpua_ctrl_w)
339
339
{
340
 
        ninjaw_state *state = space->machine().driver_data<ninjaw_state>();
341
340
 
342
341
        if ((data &0xff00) && ((data &0xff) == 0))
343
342
                data = data >> 8;
344
 
        state->m_cpua_ctrl = data;
345
 
 
346
 
        parse_control(space->machine());
347
 
 
348
 
        logerror("CPU #0 PC %06x: write %04x to cpu control\n", cpu_get_pc(&space->device()), data);
 
343
        m_cpua_ctrl = data;
 
344
 
 
345
        parse_control(machine());
 
346
 
 
347
        logerror("CPU #0 PC %06x: write %04x to cpu control\n", cpu_get_pc(&space.device()), data);
349
348
}
350
349
 
351
350
 
356
355
static void reset_sound_region( running_machine &machine )
357
356
{
358
357
        ninjaw_state *state = machine.driver_data<ninjaw_state>();
359
 
        memory_set_bank(machine, "bank10", state->m_banknum);
360
 
}
361
 
 
362
 
static WRITE8_HANDLER( sound_bankswitch_w )
363
 
{
364
 
        ninjaw_state *state = space->machine().driver_data<ninjaw_state>();
365
 
 
366
 
        state->m_banknum = data & 7;
367
 
        reset_sound_region(space->machine());
368
 
}
369
 
 
370
 
static WRITE16_HANDLER( ninjaw_sound_w )
371
 
{
372
 
        ninjaw_state *state = space->machine().driver_data<ninjaw_state>();
 
358
        state->membank("bank10")->set_entry(state->m_banknum);
 
359
}
 
360
 
 
361
WRITE8_MEMBER(ninjaw_state::sound_bankswitch_w)
 
362
{
 
363
 
 
364
        m_banknum = data & 7;
 
365
        reset_sound_region(machine());
 
366
}
 
367
 
 
368
WRITE16_MEMBER(ninjaw_state::ninjaw_sound_w)
 
369
{
373
370
 
374
371
        if (offset == 0)
375
 
                tc0140syt_port_w(state->m_tc0140syt, 0, data & 0xff);
 
372
                tc0140syt_port_w(m_tc0140syt, 0, data & 0xff);
376
373
        else if (offset == 1)
377
 
                tc0140syt_comm_w(state->m_tc0140syt, 0, data & 0xff);
 
374
                tc0140syt_comm_w(m_tc0140syt, 0, data & 0xff);
378
375
 
379
376
#ifdef MAME_DEBUG
380
377
        if (data & 0xff00)
382
379
#endif
383
380
}
384
381
 
385
 
static READ16_HANDLER( ninjaw_sound_r )
 
382
READ16_MEMBER(ninjaw_state::ninjaw_sound_r)
386
383
{
387
 
        ninjaw_state *state = space->machine().driver_data<ninjaw_state>();
388
384
 
389
385
        if (offset == 1)
390
 
                return ((tc0140syt_comm_r(state->m_tc0140syt, 0) & 0xff));
 
386
                return ((tc0140syt_comm_r(m_tc0140syt, 0) & 0xff));
391
387
        else
392
388
                return 0;
393
389
}
395
391
 
396
392
/**** sound pan control ****/
397
393
 
398
 
static WRITE8_HANDLER( ninjaw_pancontrol )
 
394
WRITE8_MEMBER(ninjaw_state::ninjaw_pancontrol)
399
395
{
400
 
        ninjaw_state *state = space->machine().driver_data<ninjaw_state>();
401
396
        device_t *flt = NULL;
402
397
        offset &= 3;
403
398
 
404
399
        switch (offset)
405
400
        {
406
 
                case 0: flt = state->m_2610_1l; break;
407
 
                case 1: flt = state->m_2610_1r; break;
408
 
                case 2: flt = state->m_2610_2l; break;
409
 
                case 3: flt = state->m_2610_2r; break;
 
401
                case 0: flt = m_2610_1l; break;
 
402
                case 1: flt = m_2610_1r; break;
 
403
                case 2: flt = m_2610_2l; break;
 
404
                case 3: flt = m_2610_2r; break;
410
405
        }
411
406
 
412
 
        state->m_pandata[offset] = (float)data * (100.f / 255.0f);
413
 
        //popmessage(" pan %02x %02x %02x %02x", state->m_pandata[0], state->m_pandata[1], state->m_pandata[2], state->m_pandata[3] );
414
 
        flt_volume_set_volume(flt, state->m_pandata[offset] / 100.0);
 
407
        m_pandata[offset] = (float)data * (100.f / 255.0f);
 
408
        //popmessage(" pan %02x %02x %02x %02x", m_pandata[0], m_pandata[1], m_pandata[2], m_pandata[3] );
 
409
        flt_volume_set_volume(flt, m_pandata[offset] / 100.0);
415
410
}
416
411
 
417
412
 
418
 
static WRITE16_HANDLER( tc0100scn_triple_screen_w )
 
413
WRITE16_MEMBER(ninjaw_state::tc0100scn_triple_screen_w)
419
414
{
420
 
        ninjaw_state *state = space->machine().driver_data<ninjaw_state>();
421
415
 
422
 
        tc0100scn_word_w(state->m_tc0100scn_1, offset, data, mem_mask);
423
 
        tc0100scn_word_w(state->m_tc0100scn_2, offset, data, mem_mask);
424
 
        tc0100scn_word_w(state->m_tc0100scn_3, offset, data, mem_mask);
 
416
        tc0100scn_word_w(m_tc0100scn_1, offset, data, mem_mask);
 
417
        tc0100scn_word_w(m_tc0100scn_2, offset, data, mem_mask);
 
418
        tc0100scn_word_w(m_tc0100scn_3, offset, data, mem_mask);
425
419
}
426
420
 
427
421
/***********************************************************
428
422
             MEMORY STRUCTURES
429
423
***********************************************************/
430
424
 
431
 
static ADDRESS_MAP_START( ninjaw_master_map, AS_PROGRAM, 16 )
 
425
static ADDRESS_MAP_START( ninjaw_master_map, AS_PROGRAM, 16, ninjaw_state )
432
426
        AM_RANGE(0x000000, 0x0bffff) AM_ROM
433
427
        AM_RANGE(0x0c0000, 0x0cffff) AM_RAM                                                                                                             /* main ram */
434
 
        AM_RANGE(0x200000, 0x200001) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_portreg_r, tc0220ioc_portreg_w, 0x00ff)
435
 
        AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0x00ff)
 
428
        AM_RANGE(0x200000, 0x200001) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_portreg_r, tc0220ioc_portreg_w, 0x00ff)
 
429
        AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0x00ff)
436
430
        AM_RANGE(0x210000, 0x210001) AM_WRITE(cpua_ctrl_w)
437
431
        AM_RANGE(0x220000, 0x220003) AM_READWRITE(ninjaw_sound_r,ninjaw_sound_w)
438
432
        AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE("share1")
439
 
        AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("share2") AM_BASE_SIZE_MEMBER(ninjaw_state, m_spriteram, m_spriteram_size)
440
 
        AM_RANGE(0x280000, 0x293fff) AM_DEVREAD("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w)    /* tilemaps (1st screen/all screens) */
441
 
        AM_RANGE(0x2a0000, 0x2a000f) AM_DEVREADWRITE("tc0100scn_1", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
442
 
        AM_RANGE(0x2c0000, 0x2d3fff) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_word_r, tc0100scn_word_w)         /* tilemaps (2nd screen) */
443
 
        AM_RANGE(0x2e0000, 0x2e000f) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
444
 
        AM_RANGE(0x300000, 0x313fff) AM_DEVREADWRITE("tc0100scn_3", tc0100scn_word_r, tc0100scn_word_w)         /* tilemaps (3rd screen) */
445
 
        AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE("tc0100scn_3", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
446
 
        AM_RANGE(0x340000, 0x340007) AM_DEVREADWRITE("tc0110pcr_1", tc0110pcr_word_r, tc0110pcr_step1_word_w)           /* palette (1st screen) */
447
 
        AM_RANGE(0x350000, 0x350007) AM_DEVREADWRITE("tc0110pcr_2", tc0110pcr_word_r, tc0110pcr_step1_word_w)           /* palette (2nd screen) */
448
 
        AM_RANGE(0x360000, 0x360007) AM_DEVREADWRITE("tc0110pcr_3", tc0110pcr_word_r, tc0110pcr_step1_word_w)           /* palette (3rd screen) */
 
433
        AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("spriteram")
 
434
        AM_RANGE(0x280000, 0x293fff) AM_DEVREAD_LEGACY("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w)     /* tilemaps (1st screen/all screens) */
 
435
        AM_RANGE(0x2a0000, 0x2a000f) AM_DEVREADWRITE_LEGACY("tc0100scn_1", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
 
436
        AM_RANGE(0x2c0000, 0x2d3fff) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_word_r, tc0100scn_word_w)          /* tilemaps (2nd screen) */
 
437
        AM_RANGE(0x2e0000, 0x2e000f) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
 
438
        AM_RANGE(0x300000, 0x313fff) AM_DEVREADWRITE_LEGACY("tc0100scn_3", tc0100scn_word_r, tc0100scn_word_w)          /* tilemaps (3rd screen) */
 
439
        AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE_LEGACY("tc0100scn_3", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
 
440
        AM_RANGE(0x340000, 0x340007) AM_DEVREADWRITE_LEGACY("tc0110pcr_1", tc0110pcr_word_r, tc0110pcr_step1_word_w)            /* palette (1st screen) */
 
441
        AM_RANGE(0x350000, 0x350007) AM_DEVREADWRITE_LEGACY("tc0110pcr_2", tc0110pcr_word_r, tc0110pcr_step1_word_w)            /* palette (2nd screen) */
 
442
        AM_RANGE(0x360000, 0x360007) AM_DEVREADWRITE_LEGACY("tc0110pcr_3", tc0110pcr_word_r, tc0110pcr_step1_word_w)            /* palette (3rd screen) */
449
443
ADDRESS_MAP_END
450
444
 
451
445
// NB there could be conflicts between which cpu writes what to the
452
446
// palette, as our interleaving won't match the original board.
453
447
 
454
 
static ADDRESS_MAP_START( ninjaw_slave_map, AS_PROGRAM, 16 )
 
448
static ADDRESS_MAP_START( ninjaw_slave_map, AS_PROGRAM, 16, ninjaw_state )
455
449
        AM_RANGE(0x000000, 0x05ffff) AM_ROM
456
450
        AM_RANGE(0x080000, 0x08ffff) AM_RAM     /* main ram */
457
 
        AM_RANGE(0x200000, 0x200001) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_portreg_r, tc0220ioc_portreg_w, 0x00ff)
458
 
        AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0x00ff)
 
451
        AM_RANGE(0x200000, 0x200001) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_portreg_r, tc0220ioc_portreg_w, 0x00ff)
 
452
        AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0x00ff)
459
453
        AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE("share1")
460
 
        AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("share2")
461
 
        AM_RANGE(0x280000, 0x293fff) AM_DEVREAD("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w)    /* tilemaps (1st screen/all screens) */
462
 
        AM_RANGE(0x340000, 0x340007) AM_DEVREADWRITE("tc0110pcr_1", tc0110pcr_word_r, tc0110pcr_step1_word_w)           /* palette (1st screen) */
463
 
        AM_RANGE(0x350000, 0x350007) AM_DEVREADWRITE("tc0110pcr_2", tc0110pcr_word_r, tc0110pcr_step1_word_w)           /* palette (2nd screen) */
464
 
        AM_RANGE(0x360000, 0x360007) AM_DEVREADWRITE("tc0110pcr_3", tc0110pcr_word_r, tc0110pcr_step1_word_w)           /* palette (3rd screen) */
 
454
        AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("spriteram")
 
455
        AM_RANGE(0x280000, 0x293fff) AM_DEVREAD_LEGACY("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w)     /* tilemaps (1st screen/all screens) */
 
456
        AM_RANGE(0x340000, 0x340007) AM_DEVREADWRITE_LEGACY("tc0110pcr_1", tc0110pcr_word_r, tc0110pcr_step1_word_w)            /* palette (1st screen) */
 
457
        AM_RANGE(0x350000, 0x350007) AM_DEVREADWRITE_LEGACY("tc0110pcr_2", tc0110pcr_word_r, tc0110pcr_step1_word_w)            /* palette (2nd screen) */
 
458
        AM_RANGE(0x360000, 0x360007) AM_DEVREADWRITE_LEGACY("tc0110pcr_3", tc0110pcr_word_r, tc0110pcr_step1_word_w)            /* palette (3rd screen) */
465
459
ADDRESS_MAP_END
466
460
 
467
 
static ADDRESS_MAP_START( darius2_master_map, AS_PROGRAM, 16 )
 
461
static ADDRESS_MAP_START( darius2_master_map, AS_PROGRAM, 16, ninjaw_state )
468
462
        AM_RANGE(0x000000, 0x0bffff) AM_ROM
469
463
        AM_RANGE(0x0c0000, 0x0cffff) AM_RAM                                                     /* main ram */
470
 
        AM_RANGE(0x200000, 0x200001) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_portreg_r, tc0220ioc_portreg_w, 0x00ff)
471
 
        AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0x00ff)
 
464
        AM_RANGE(0x200000, 0x200001) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_portreg_r, tc0220ioc_portreg_w, 0x00ff)
 
465
        AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0x00ff)
472
466
        AM_RANGE(0x210000, 0x210001) AM_WRITE(cpua_ctrl_w)
473
467
        AM_RANGE(0x220000, 0x220003) AM_READWRITE(ninjaw_sound_r,ninjaw_sound_w)
474
468
        AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE("share1")
475
 
        AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("share2") AM_BASE_SIZE_MEMBER(ninjaw_state, m_spriteram, m_spriteram_size)
476
 
        AM_RANGE(0x280000, 0x293fff) AM_DEVREAD("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w)    /* tilemaps (1st screen/all screens) */
477
 
        AM_RANGE(0x2a0000, 0x2a000f) AM_DEVREADWRITE("tc0100scn_1", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
478
 
        AM_RANGE(0x2c0000, 0x2d3fff) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_word_r, tc0100scn_word_w)         /* tilemaps (2nd screen) */
479
 
        AM_RANGE(0x2e0000, 0x2e000f) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
480
 
        AM_RANGE(0x300000, 0x313fff) AM_DEVREADWRITE("tc0100scn_3", tc0100scn_word_r, tc0100scn_word_w)         /* tilemaps (3rd screen) */
481
 
        AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE("tc0100scn_3", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
482
 
        AM_RANGE(0x340000, 0x340007) AM_DEVREADWRITE("tc0110pcr_1", tc0110pcr_word_r, tc0110pcr_step1_word_w)           /* palette (1st screen) */
483
 
        AM_RANGE(0x350000, 0x350007) AM_DEVREADWRITE("tc0110pcr_2", tc0110pcr_word_r, tc0110pcr_step1_word_w)           /* palette (2nd screen) */
484
 
        AM_RANGE(0x360000, 0x360007) AM_DEVREADWRITE("tc0110pcr_3", tc0110pcr_word_r, tc0110pcr_step1_word_w)           /* palette (3rd screen) */
 
469
        AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("spriteram")
 
470
        AM_RANGE(0x280000, 0x293fff) AM_DEVREAD_LEGACY("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w)     /* tilemaps (1st screen/all screens) */
 
471
        AM_RANGE(0x2a0000, 0x2a000f) AM_DEVREADWRITE_LEGACY("tc0100scn_1", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
 
472
        AM_RANGE(0x2c0000, 0x2d3fff) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_word_r, tc0100scn_word_w)          /* tilemaps (2nd screen) */
 
473
        AM_RANGE(0x2e0000, 0x2e000f) AM_DEVREADWRITE_LEGACY("tc0100scn_2", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
 
474
        AM_RANGE(0x300000, 0x313fff) AM_DEVREADWRITE_LEGACY("tc0100scn_3", tc0100scn_word_r, tc0100scn_word_w)          /* tilemaps (3rd screen) */
 
475
        AM_RANGE(0x320000, 0x32000f) AM_DEVREADWRITE_LEGACY("tc0100scn_3", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
 
476
        AM_RANGE(0x340000, 0x340007) AM_DEVREADWRITE_LEGACY("tc0110pcr_1", tc0110pcr_word_r, tc0110pcr_step1_word_w)            /* palette (1st screen) */
 
477
        AM_RANGE(0x350000, 0x350007) AM_DEVREADWRITE_LEGACY("tc0110pcr_2", tc0110pcr_word_r, tc0110pcr_step1_word_w)            /* palette (2nd screen) */
 
478
        AM_RANGE(0x360000, 0x360007) AM_DEVREADWRITE_LEGACY("tc0110pcr_3", tc0110pcr_word_r, tc0110pcr_step1_word_w)            /* palette (3rd screen) */
485
479
ADDRESS_MAP_END
486
480
 
487
 
static ADDRESS_MAP_START( darius2_slave_map, AS_PROGRAM, 16 )
 
481
static ADDRESS_MAP_START( darius2_slave_map, AS_PROGRAM, 16, ninjaw_state )
488
482
        AM_RANGE(0x000000, 0x05ffff) AM_ROM
489
483
        AM_RANGE(0x080000, 0x08ffff) AM_RAM                                                                                                             /* main ram */
490
 
        AM_RANGE(0x200000, 0x200001) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_portreg_r, tc0220ioc_portreg_w, 0x00ff)
491
 
        AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0x00ff)
 
484
        AM_RANGE(0x200000, 0x200001) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_portreg_r, tc0220ioc_portreg_w, 0x00ff)
 
485
        AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0x00ff)
492
486
        AM_RANGE(0x240000, 0x24ffff) AM_RAM AM_SHARE("share1")
493
 
        AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("share2")
494
 
        AM_RANGE(0x280000, 0x293fff) AM_DEVREAD("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w)    /* tilemaps (1st screen/all screens) */
 
487
        AM_RANGE(0x260000, 0x263fff) AM_RAM AM_SHARE("spriteram")
 
488
        AM_RANGE(0x280000, 0x293fff) AM_DEVREAD_LEGACY("tc0100scn_1", tc0100scn_word_r) AM_WRITE(tc0100scn_triple_screen_w)     /* tilemaps (1st screen/all screens) */
495
489
ADDRESS_MAP_END
496
490
 
497
491
 
498
492
/***************************************************************************/
499
493
 
500
 
static ADDRESS_MAP_START( ninjaw_sound_map, AS_PROGRAM, 8 )
 
494
static ADDRESS_MAP_START( ninjaw_sound_map, AS_PROGRAM, 8, ninjaw_state )
501
495
        AM_RANGE(0x0000, 0x3fff) AM_ROM
502
496
        AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank10")
503
497
        AM_RANGE(0xc000, 0xdfff) AM_RAM
504
 
        AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE("ymsnd", ym2610_r,ym2610_w)
505
 
        AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_slave_port_w)
506
 
        AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_slave_comm_r,tc0140syt_slave_comm_w)
 
498
        AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r,ym2610_w)
 
499
        AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
 
500
        AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r,tc0140syt_slave_comm_w)
507
501
        AM_RANGE(0xe400, 0xe403) AM_WRITE(ninjaw_pancontrol) /* pan */
508
502
        AM_RANGE(0xea00, 0xea00) AM_READNOP
509
503
        AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
763
757
{
764
758
        ninjaw_state *state = machine.driver_data<ninjaw_state>();
765
759
 
766
 
        memory_configure_bank(machine, "bank10", 0, 8, machine.region("audiocpu")->base() + 0xc000, 0x4000);
 
760
        state->membank("bank10")->configure_entries(0, 8, state->memregion("audiocpu")->base() + 0xc000, 0x4000);
767
761
 
768
762
        state->m_maincpu = machine.device("maincpu");
769
763
        state->m_audiocpu = machine.device("audiocpu");