Previous 199869 Revisions Next

r18797 Wednesday 31st October, 2012 at 19:38:06 UTC by hap
bonus optimization
[src/mame/drivers]namcos23.c

trunk/src/mame/drivers/namcos23.c
r18796r18797
13331333      m_audiocpu(*this, "audiocpu"),
13341334      m_iocpu(*this, "iocpu"),
13351335        m_rtc(*this, "rtc"),
1336      m_mainram(*this, "mainram"),
13361337      m_shared_ram(*this, "shared_ram"),
13371338      m_charram(*this, "charram"),
13381339      m_textram(*this, "textram"),
r18796r18797
13451346   required_device<cpu_device> m_audiocpu;
13461347   optional_device<cpu_device> m_iocpu;
13471348    required_device<rtc4543_device> m_rtc;
1349   required_shared_ptr<UINT32> m_mainram;
13481350   required_shared_ptr<UINT32> m_shared_ram;
13491351   required_shared_ptr<UINT32> m_charram;
13501352   required_shared_ptr<UINT32> m_textram;
r18796r18797
14581460   DECLARE_READ8_MEMBER(s23_iob_analog_r);
14591461   DECLARE_DRIVER_INIT(ss23);
14601462   TILE_GET_INFO_MEMBER(TextTilemapGetInfo);
1461   DECLARE_MACHINE_START(s23);
14621463   DECLARE_VIDEO_START(ss23);
14631464   DECLARE_MACHINE_RESET(gmen);
1465   virtual void machine_start();
14641466   virtual void machine_reset();
14651467   UINT32 screen_update_ss23(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
14661468   INTERRUPT_GEN_MEMBER(s23_interrupt);
r18796r18797
15061508{
15071509   UINT16 data = nthword( m_textram,tile_index );
15081510  /**
1509    * x---.----.----.---- blend
15101511    * xxxx.----.----.---- palette select
15111512    * ----.xx--.----.---- flip
15121513    * ----.--xx.xxxx.xxxx code
r18796r18797
25452546   render.count[render.cur] = 0;
25462547}
25472548
2548MACHINE_START_MEMBER(namcos23_state,s23)
2549void namcos23_state::machine_start()
25492550{
25502551   c361_t &c361 = m_c361;
25512552   c361.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(namcos23_state::c361_timer_cb),this));
25522553   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()));
25532556}
25542557
25552558static ADDRESS_MAP_START( gorgon_map, AS_PROGRAM, 32, namcos23_state )
25562559   ADDRESS_MAP_GLOBAL_MASK(0xfffffff)
2557   AM_RANGE(0x00000000, 0x003fffff) AM_RAM
2560   AM_RANGE(0x00000000, 0x003fffff) AM_RAM AM_SHARE("mainram")
25582561   AM_RANGE(0x01000000, 0x010000ff) AM_READWRITE(p3d_r, p3d_w)
25592562   AM_RANGE(0x02000000, 0x0200000f) AM_READWRITE16(s23_c417_r, s23_c417_w, 0xffffffff)
25602563   AM_RANGE(0x04400000, 0x0440ffff) AM_RAM AM_SHARE("shared_ram") // Communication RAM (C416)
r18796r18797
25782581
25792582static ADDRESS_MAP_START( ss23_map, AS_PROGRAM, 32, namcos23_state )
25802583   ADDRESS_MAP_GLOBAL_MASK(0xfffffff)
2581   AM_RANGE(0x00000000, 0x00ffffff) AM_RAM
2584   AM_RANGE(0x00000000, 0x00ffffff) AM_RAM AM_SHARE("mainram")
25822585   AM_RANGE(0x01000000, 0x010000ff) AM_READWRITE(p3d_r, p3d_w)
25832586   AM_RANGE(0x02000000, 0x0200000f) AM_READWRITE16(s23_c417_r, s23_c417_w, 0xffffffff)
25842587   AM_RANGE(0x04400000, 0x0440ffff) AM_RAM AM_SHARE("shared_ram") // Communication RAM (C416)
r18796r18797
33193322
33203323   MCFG_VIDEO_START_OVERRIDE(namcos23_state,ss23)
33213324
3322   MCFG_MACHINE_START_OVERRIDE(namcos23_state,s23)
3323
33243325   /* sound hardware */
33253326   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
33263327
r18796r18797
33663367
33673368   MCFG_VIDEO_START_OVERRIDE(namcos23_state,ss23)
33683369
3369   MCFG_MACHINE_START_OVERRIDE(namcos23_state,s23)
3370
33713370   /* sound hardware */
33723371   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
33733372
r18796r18797
34093408
34103409   MCFG_VIDEO_START_OVERRIDE(namcos23_state,ss23)
34113410
3412   MCFG_MACHINE_START_OVERRIDE(namcos23_state,s23)
3413
34143411   /* sound hardware */
34153412   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
34163413

Previous 199869 Revisions Next


© 1997-2024 The MAME Team