Previous 199869 Revisions Next

r18668 Tuesday 23rd October, 2012 at 00:13:07 UTC by hap
put the mcu in reset state at boot (just like namcos22)
[src/mame/drivers]namcos23.c

trunk/src/mame/drivers/namcos23.c
r18667r18668
14081408   DECLARE_READ16_MEMBER(s23_c422_r);
14091409   DECLARE_WRITE16_MEMBER(s23_c422_w);
14101410   DECLARE_WRITE32_MEMBER(s23_mcuen_w);
1411   DECLARE_READ32_MEMBER(gorgon_sharedram_r);
1412   DECLARE_WRITE32_MEMBER(gorgon_sharedram_w);
14131411   DECLARE_READ32_MEMBER(s23_unk_status_r);
14141412   DECLARE_READ32_MEMBER(p3d_r);
14151413   DECLARE_WRITE32_MEMBER(p3d_w);
r18667r18668
14411439   DECLARE_MACHINE_START(s23);
14421440   DECLARE_VIDEO_START(ss23);
14431441   DECLARE_MACHINE_RESET(gmen);
1442   virtual void machine_reset();
14441443   UINT32 screen_update_ss23(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
14451444   INTERRUPT_GEN_MEMBER(s23_interrupt);
14461445   TIMER_CALLBACK_MEMBER(c361_timer_cb);
r18667r18668
18671866   }
18681867}
18691868
1870/*
1871    Final Furlong has a bug: it forgets to halt the H8/3002 before it zeros out the shared RAM
1872    which contains the H8's stack and other working set.  This crashes MAME due to the PC going
1873    off into the weeds, so we intercept
1874*/
1875
1876READ32_MEMBER(namcos23_state::gorgon_sharedram_r)
1877{
1878   return m_shared_ram[offset];
1879}
1880
1881WRITE32_MEMBER(namcos23_state::gorgon_sharedram_w)
1882{
1883   COMBINE_DATA(&m_shared_ram[offset]);
1884
1885   // hack for final furlong
1886   if ((offset == 0x6000/4) && (data == 0) && (mem_mask == 0xff000000))
1887   {
1888      logerror("S23: Final Furlong hack stopping H8/3002\n");
1889      machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
1890   }
1891}
1892
18931869// Panic Park sits in a tight loop waiting for this AND 0002 to be non-zero (at PC=BFC02F00)
18941870READ32_MEMBER(namcos23_state::s23_unk_status_r)
18951871{
r18667r18668
24542430   AM_RANGE(0x00000000, 0x003fffff) AM_RAM
24552431   AM_RANGE(0x01000000, 0x010000ff) AM_READWRITE(p3d_r, p3d_w )
24562432   AM_RANGE(0x02000000, 0x0200000f) AM_READWRITE16(s23_c417_r, s23_c417_w, 0xffffffff )
2457   AM_RANGE(0x04400000, 0x0440ffff) AM_READWRITE(gorgon_sharedram_r, gorgon_sharedram_w ) AM_SHARE("shared_ram") // Communication RAM (C416)
2433   AM_RANGE(0x04400000, 0x0440ffff) AM_RAM AM_SHARE("shared_ram") // Communication RAM (C416)
24582434
24592435   AM_RANGE(0x04c3ff08, 0x04c3ff0b) AM_WRITE(s23_mcuen_w )
24602436   AM_RANGE(0x04c3ff0c, 0x04c3ff0f) AM_RAM
r18667r18668
25402516
25412517MACHINE_RESET_MEMBER(namcos23_state,gmen)
25422518{
2519   machine_reset();
2520
25432521   // halt the SH-2 until we need it
25442522   machine().device("gmen")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
25452523}
r18667r18668
31513129   }
31523130}
31533131
3132void namcos23_state::machine_reset()
3133{
3134   machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
3135}
3136
31543137#define XOR(a) WORD2_XOR_BE(a)
31553138
31563139static const gfx_layout namcos23_cg_layout =

Previous 199869 Revisions Next


© 1997-2024 The MAME Team