Previous 199869 Revisions Next

r21202 Wednesday 20th February, 2013 at 03:22:01 UTC by Angelo Salese
Added IRQ 6
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21201r21202
352352   UINT32 screen_update_coolridr1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
353353   UINT32 screen_update_coolridr2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
354354   INTERRUPT_GEN_MEMBER(system_h1);
355   TIMER_DEVICE_CALLBACK_MEMBER(system_h1_main);
355356   TIMER_DEVICE_CALLBACK_MEMBER(system_h1_sub);
356357};
357358
r21201r21202
14541455
14551456
14561457// IRQs 4 & 6 are valid on SH-2
1457INTERRUPT_GEN_MEMBER(coolridr_state::system_h1)
1458TIMER_DEVICE_CALLBACK_MEMBER(coolridr_state::system_h1_main)
14581459{
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
14601468}
14611469
14621470TIMER_DEVICE_CALLBACK_MEMBER(coolridr_state::system_h1_sub)
r21201r21202
15431551static MACHINE_CONFIG_START( coolridr, coolridr_state )
15441552   MCFG_CPU_ADD("maincpu", SH2, MAIN_CLOCK)  // 28 mhz
15451553   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)
15471555
15481556   MCFG_CPU_ADD("soundcpu", M68000, 11289600) //256 x 44100 Hz = 11.2896 MHz
15491557   MCFG_CPU_PROGRAM_MAP(system_h1_sound_map)
15501558
15511559   MCFG_CPU_ADD("sub", SH1, 16000000)  // SH7032 HD6417032F20!! 16 mhz
15521560   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)
15541562
15551563   MCFG_I8237_ADD("i8237", 16000000, dmac_intf)
15561564
r21201r21202
16391647#endif
16401648ROM_END
16411649
1642#if 0
1643READ32_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;
16481650
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/*
1652TODO: 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*/
16541655READ32_MEMBER(coolridr_state::coolridr_hack2_r)
16551656{
16561657   offs_t pc = downcast<cpu_device *>(&space.device())->pc();

Previous 199869 Revisions Next


© 1997-2024 The MAME Team