trunk/src/mame/drivers/namcos23.c
| r18667 | r18668 | |
| 1408 | 1408 | DECLARE_READ16_MEMBER(s23_c422_r); |
| 1409 | 1409 | DECLARE_WRITE16_MEMBER(s23_c422_w); |
| 1410 | 1410 | DECLARE_WRITE32_MEMBER(s23_mcuen_w); |
| 1411 | | DECLARE_READ32_MEMBER(gorgon_sharedram_r); |
| 1412 | | DECLARE_WRITE32_MEMBER(gorgon_sharedram_w); |
| 1413 | 1411 | DECLARE_READ32_MEMBER(s23_unk_status_r); |
| 1414 | 1412 | DECLARE_READ32_MEMBER(p3d_r); |
| 1415 | 1413 | DECLARE_WRITE32_MEMBER(p3d_w); |
| r18667 | r18668 | |
| 1441 | 1439 | DECLARE_MACHINE_START(s23); |
| 1442 | 1440 | DECLARE_VIDEO_START(ss23); |
| 1443 | 1441 | DECLARE_MACHINE_RESET(gmen); |
| 1442 | virtual void machine_reset(); |
| 1444 | 1443 | UINT32 screen_update_ss23(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 1445 | 1444 | INTERRUPT_GEN_MEMBER(s23_interrupt); |
| 1446 | 1445 | TIMER_CALLBACK_MEMBER(c361_timer_cb); |
| r18667 | r18668 | |
| 1867 | 1866 | } |
| 1868 | 1867 | } |
| 1869 | 1868 | |
| 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 | | |
| 1876 | | READ32_MEMBER(namcos23_state::gorgon_sharedram_r) |
| 1877 | | { |
| 1878 | | return m_shared_ram[offset]; |
| 1879 | | } |
| 1880 | | |
| 1881 | | WRITE32_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 | | |
| 1893 | 1869 | // Panic Park sits in a tight loop waiting for this AND 0002 to be non-zero (at PC=BFC02F00) |
| 1894 | 1870 | READ32_MEMBER(namcos23_state::s23_unk_status_r) |
| 1895 | 1871 | { |
| r18667 | r18668 | |
| 2454 | 2430 | AM_RANGE(0x00000000, 0x003fffff) AM_RAM |
| 2455 | 2431 | AM_RANGE(0x01000000, 0x010000ff) AM_READWRITE(p3d_r, p3d_w ) |
| 2456 | 2432 | 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) |
| 2458 | 2434 | |
| 2459 | 2435 | AM_RANGE(0x04c3ff08, 0x04c3ff0b) AM_WRITE(s23_mcuen_w ) |
| 2460 | 2436 | AM_RANGE(0x04c3ff0c, 0x04c3ff0f) AM_RAM |
| r18667 | r18668 | |
| 2540 | 2516 | |
| 2541 | 2517 | MACHINE_RESET_MEMBER(namcos23_state,gmen) |
| 2542 | 2518 | { |
| 2519 | machine_reset(); |
| 2520 | |
| 2543 | 2521 | // halt the SH-2 until we need it |
| 2544 | 2522 | machine().device("gmen")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 2545 | 2523 | } |
| r18667 | r18668 | |
| 3151 | 3129 | } |
| 3152 | 3130 | } |
| 3153 | 3131 | |
| 3132 | void namcos23_state::machine_reset() |
| 3133 | { |
| 3134 | machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 3135 | } |
| 3136 | |
| 3154 | 3137 | #define XOR(a) WORD2_XOR_BE(a) |
| 3155 | 3138 | |
| 3156 | 3139 | static const gfx_layout namcos23_cg_layout = |