trunk/src/mame/drivers/namcos23.c
| r18796 | r18797 | |
| 1333 | 1333 | m_audiocpu(*this, "audiocpu"), |
| 1334 | 1334 | m_iocpu(*this, "iocpu"), |
| 1335 | 1335 | m_rtc(*this, "rtc"), |
| 1336 | m_mainram(*this, "mainram"), |
| 1336 | 1337 | m_shared_ram(*this, "shared_ram"), |
| 1337 | 1338 | m_charram(*this, "charram"), |
| 1338 | 1339 | m_textram(*this, "textram"), |
| r18796 | r18797 | |
| 1345 | 1346 | required_device<cpu_device> m_audiocpu; |
| 1346 | 1347 | optional_device<cpu_device> m_iocpu; |
| 1347 | 1348 | required_device<rtc4543_device> m_rtc; |
| 1349 | required_shared_ptr<UINT32> m_mainram; |
| 1348 | 1350 | required_shared_ptr<UINT32> m_shared_ram; |
| 1349 | 1351 | required_shared_ptr<UINT32> m_charram; |
| 1350 | 1352 | required_shared_ptr<UINT32> m_textram; |
| r18796 | r18797 | |
| 1458 | 1460 | DECLARE_READ8_MEMBER(s23_iob_analog_r); |
| 1459 | 1461 | DECLARE_DRIVER_INIT(ss23); |
| 1460 | 1462 | TILE_GET_INFO_MEMBER(TextTilemapGetInfo); |
| 1461 | | DECLARE_MACHINE_START(s23); |
| 1462 | 1463 | DECLARE_VIDEO_START(ss23); |
| 1463 | 1464 | DECLARE_MACHINE_RESET(gmen); |
| 1465 | virtual void machine_start(); |
| 1464 | 1466 | virtual void machine_reset(); |
| 1465 | 1467 | UINT32 screen_update_ss23(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 1466 | 1468 | INTERRUPT_GEN_MEMBER(s23_interrupt); |
| r18796 | r18797 | |
| 1506 | 1508 | { |
| 1507 | 1509 | UINT16 data = nthword( m_textram,tile_index ); |
| 1508 | 1510 | /** |
| 1509 | | * x---.----.----.---- blend |
| 1510 | 1511 | * xxxx.----.----.---- palette select |
| 1511 | 1512 | * ----.xx--.----.---- flip |
| 1512 | 1513 | * ----.--xx.xxxx.xxxx code |
| r18796 | r18797 | |
| 2545 | 2546 | render.count[render.cur] = 0; |
| 2546 | 2547 | } |
| 2547 | 2548 | |
| 2548 | | MACHINE_START_MEMBER(namcos23_state,s23) |
| 2549 | void namcos23_state::machine_start() |
| 2549 | 2550 | { |
| 2550 | 2551 | c361_t &c361 = m_c361; |
| 2551 | 2552 | c361.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(namcos23_state::c361_timer_cb),this)); |
| 2552 | 2553 | c361.timer->adjust(attotime::never); |
| 2554 | |
| 2555 | mips3drc_add_fastram(m_maincpu, 0, m_mainram.bytes()-1, FALSE, reinterpret_cast<UINT32 *>(machine().root_device().memshare("mainram")->ptr())); |
| 2553 | 2556 | } |
| 2554 | 2557 | |
| 2555 | 2558 | static ADDRESS_MAP_START( gorgon_map, AS_PROGRAM, 32, namcos23_state ) |
| 2556 | 2559 | ADDRESS_MAP_GLOBAL_MASK(0xfffffff) |
| 2557 | | AM_RANGE(0x00000000, 0x003fffff) AM_RAM |
| 2560 | AM_RANGE(0x00000000, 0x003fffff) AM_RAM AM_SHARE("mainram") |
| 2558 | 2561 | AM_RANGE(0x01000000, 0x010000ff) AM_READWRITE(p3d_r, p3d_w) |
| 2559 | 2562 | AM_RANGE(0x02000000, 0x0200000f) AM_READWRITE16(s23_c417_r, s23_c417_w, 0xffffffff) |
| 2560 | 2563 | AM_RANGE(0x04400000, 0x0440ffff) AM_RAM AM_SHARE("shared_ram") // Communication RAM (C416) |
| r18796 | r18797 | |
| 2578 | 2581 | |
| 2579 | 2582 | static ADDRESS_MAP_START( ss23_map, AS_PROGRAM, 32, namcos23_state ) |
| 2580 | 2583 | ADDRESS_MAP_GLOBAL_MASK(0xfffffff) |
| 2581 | | AM_RANGE(0x00000000, 0x00ffffff) AM_RAM |
| 2584 | AM_RANGE(0x00000000, 0x00ffffff) AM_RAM AM_SHARE("mainram") |
| 2582 | 2585 | AM_RANGE(0x01000000, 0x010000ff) AM_READWRITE(p3d_r, p3d_w) |
| 2583 | 2586 | AM_RANGE(0x02000000, 0x0200000f) AM_READWRITE16(s23_c417_r, s23_c417_w, 0xffffffff) |
| 2584 | 2587 | AM_RANGE(0x04400000, 0x0440ffff) AM_RAM AM_SHARE("shared_ram") // Communication RAM (C416) |
| r18796 | r18797 | |
| 3319 | 3322 | |
| 3320 | 3323 | MCFG_VIDEO_START_OVERRIDE(namcos23_state,ss23) |
| 3321 | 3324 | |
| 3322 | | MCFG_MACHINE_START_OVERRIDE(namcos23_state,s23) |
| 3323 | | |
| 3324 | 3325 | /* sound hardware */ |
| 3325 | 3326 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 3326 | 3327 | |
| r18796 | r18797 | |
| 3366 | 3367 | |
| 3367 | 3368 | MCFG_VIDEO_START_OVERRIDE(namcos23_state,ss23) |
| 3368 | 3369 | |
| 3369 | | MCFG_MACHINE_START_OVERRIDE(namcos23_state,s23) |
| 3370 | | |
| 3371 | 3370 | /* sound hardware */ |
| 3372 | 3371 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 3373 | 3372 | |
| r18796 | r18797 | |
| 3409 | 3408 | |
| 3410 | 3409 | MCFG_VIDEO_START_OVERRIDE(namcos23_state,ss23) |
| 3411 | 3410 | |
| 3412 | | MCFG_MACHINE_START_OVERRIDE(namcos23_state,s23) |
| 3413 | | |
| 3414 | 3411 | /* sound hardware */ |
| 3415 | 3412 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 3416 | 3413 | |