saturn.cpp: Worked around VDP1 timings in Sega Saturn, fixes regression with Batman Forever gameplay speed [Angelo Salese]

This commit is contained in:
angelosa 2016-11-07 03:41:40 +01:00
parent 846dfa8ffd
commit 5387680831
3 changed files with 15 additions and 1 deletions

View File

@ -1752,6 +1752,8 @@ TIMER_CALLBACK_MEMBER(saturn_state::vdp1_draw_end )
/* set CEF to 1*/
CEF_1;
// TODO: temporary for Batman Forever, presumably anonymous timer not behaving well.
#if 0
if(!(m_scu.ism & IRQ_VDP1_END))
{
m_maincpu->set_input_line_and_vector(0x2, HOLD_LINE, 0x4d);
@ -1759,6 +1761,7 @@ TIMER_CALLBACK_MEMBER(saturn_state::vdp1_draw_end )
}
else
m_scu.ist |= (IRQ_VDP1_END);
#endif
}

View File

@ -647,7 +647,6 @@ MACHINE_START_MEMBER(sat_console_state, saturn)
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
{
//printf("HI!\n");
using namespace std::placeholders;
machine().debugger().console().register_command("saturn", CMDFLAG_NONE, 0, 1, 4, std::bind(&saturn_state::debug_commands, this, _1, _2, _3));
}

View File

@ -862,6 +862,18 @@ TIMER_DEVICE_CALLBACK_MEMBER(saturn_state::saturn_scanline)
m_vdp1.framebuffer_clear_on_next_frame = 1;
}
// TODO: temporary for Batman Forever, presumably anonymous timer not behaving well.
// VDP1 timing needs some HW work anyway so I'm currently firing VDP1 after 8 scanlines for now, will de-anon the timers in a later stage.
if(scanline == (vblank_line+8)*y_step)
{
if(!(m_scu.ism & IRQ_VDP1_END))
{
m_maincpu->set_input_line_and_vector(0x2, HOLD_LINE, 0x4d);
scu_do_transfer(6);
}
else
m_scu.ist |= (IRQ_VDP1_END);
}
if(scanline == (m_scu_regs[36] & 0x3ff)*y_step)
{