trunk/src/mame/drivers/coolridr.c
| r21201 | r21202 | |
| 352 | 352 | UINT32 screen_update_coolridr1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 353 | 353 | UINT32 screen_update_coolridr2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 354 | 354 | INTERRUPT_GEN_MEMBER(system_h1); |
| 355 | TIMER_DEVICE_CALLBACK_MEMBER(system_h1_main); |
| 355 | 356 | TIMER_DEVICE_CALLBACK_MEMBER(system_h1_sub); |
| 356 | 357 | }; |
| 357 | 358 | |
| r21201 | r21202 | |
| 1454 | 1455 | |
| 1455 | 1456 | |
| 1456 | 1457 | // IRQs 4 & 6 are valid on SH-2 |
| 1457 | | INTERRUPT_GEN_MEMBER(coolridr_state::system_h1) |
| 1458 | TIMER_DEVICE_CALLBACK_MEMBER(coolridr_state::system_h1_main) |
| 1458 | 1459 | { |
| 1459 | | device.execute().set_input_line(4, HOLD_LINE); |
| 1460 | int scanline = param; |
| 1461 | |
| 1462 | if(scanline == 384) |
| 1463 | m_maincpu->set_input_line(4, HOLD_LINE); |
| 1464 | |
| 1465 | if(scanline == 0) |
| 1466 | m_maincpu->set_input_line(6, HOLD_LINE); |
| 1467 | |
| 1460 | 1468 | } |
| 1461 | 1469 | |
| 1462 | 1470 | TIMER_DEVICE_CALLBACK_MEMBER(coolridr_state::system_h1_sub) |
| r21201 | r21202 | |
| 1543 | 1551 | static MACHINE_CONFIG_START( coolridr, coolridr_state ) |
| 1544 | 1552 | MCFG_CPU_ADD("maincpu", SH2, MAIN_CLOCK) // 28 mhz |
| 1545 | 1553 | MCFG_CPU_PROGRAM_MAP(system_h1_map) |
| 1546 | | MCFG_CPU_VBLANK_INT_DRIVER("lscreen", coolridr_state, system_h1) |
| 1554 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", coolridr_state, system_h1_main, "lscreen", 0, 1) |
| 1547 | 1555 | |
| 1548 | 1556 | MCFG_CPU_ADD("soundcpu", M68000, 11289600) //256 x 44100 Hz = 11.2896 MHz |
| 1549 | 1557 | MCFG_CPU_PROGRAM_MAP(system_h1_sound_map) |
| 1550 | 1558 | |
| 1551 | 1559 | MCFG_CPU_ADD("sub", SH1, 16000000) // SH7032 HD6417032F20!! 16 mhz |
| 1552 | 1560 | MCFG_CPU_PROGRAM_MAP(coolridr_submap) |
| 1553 | | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", coolridr_state, system_h1_sub, "lscreen", 0, 1) |
| 1561 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer2", coolridr_state, system_h1_sub, "lscreen", 0, 1) |
| 1554 | 1562 | |
| 1555 | 1563 | MCFG_I8237_ADD("i8237", 16000000, dmac_intf) |
| 1556 | 1564 | |
| r21201 | r21202 | |
| 1639 | 1647 | #endif |
| 1640 | 1648 | ROM_END |
| 1641 | 1649 | |
| 1642 | | #if 0 |
| 1643 | | READ32_MEMBER(coolridr_state::coolridr_hack1_r) |
| 1644 | | { |
| 1645 | | offs_t pc = downcast<cpu_device *>(&space.device())->pc(); |
| 1646 | | if(pc == 0x6012374 || pc == 0x6012392) |
| 1647 | | return 0; |
| 1648 | 1650 | |
| 1649 | | return m_sysh1_workram_h[0xd88a4/4]; |
| 1650 | | } |
| 1651 | | #endif |
| 1652 | | |
| 1653 | | /*TODO: there must be an irq line with custom vector located somewhere that writes to here...*/ |
| 1651 | /* |
| 1652 | TODO: both irq routines writes 1 to 0x60d8894, sets up the Watchdog timer then expect that this buffer goes low IN the irq routine. |
| 1653 | Cache issue? Shared RAM? |
| 1654 | */ |
| 1654 | 1655 | READ32_MEMBER(coolridr_state::coolridr_hack2_r) |
| 1655 | 1656 | { |
| 1656 | 1657 | offs_t pc = downcast<cpu_device *>(&space.device())->pc(); |