mirror of
https://github.com/holub/mame
synced 2025-10-08 09:30:17 +03:00
Fixed H-Blank IN regression, made CH2 DMA to fire irq via CPU cycles, miscellanea
This commit is contained in:
parent
e2f109e05e
commit
b6220ce5a5
@ -411,7 +411,7 @@ void saturn_state::scu_dma_direct(address_space &space, UINT8 dma_ch)
|
|||||||
if(LOG_SCU) printf("Start Add %04x Destination Add %04x\n",m_scu.src_add[dma_ch],m_scu.dst_add[dma_ch]);
|
if(LOG_SCU) printf("Start Add %04x Destination Add %04x\n",m_scu.src_add[dma_ch],m_scu.dst_add[dma_ch]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Game Basic and World Cup 98 trips this, according to the docs the SCU can't transfer from BIOS area (can't communicate from/to that bus) */
|
/* Game Basic and World Cup 98 trips this, according to the docs the SCU can't transfer from BIOS area (can't communicate from/to that bus) */
|
||||||
if(BIOS_BUS(m_scu.src[dma_ch]))
|
if(BIOS_BUS(m_scu.src[dma_ch]))
|
||||||
{
|
{
|
||||||
popmessage("Warning: SCU transfer from BIOS area, contact MAMEdev");
|
popmessage("Warning: SCU transfer from BIOS area, contact MAMEdev");
|
||||||
|
@ -145,7 +145,7 @@ WRITE8_MEMBER(dc_state::pvr_irq)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case powervr2_device::HBL_IN_IRQ:
|
case powervr2_device::HBL_IN_IRQ:
|
||||||
dc_sysctrl_regs[SB_ISTNRM] |= IST_VBL_IN;
|
dc_sysctrl_regs[SB_ISTNRM] |= IST_HBL_IN;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case powervr2_device::EOR_VIDEO_IRQ:
|
case powervr2_device::EOR_VIDEO_IRQ:
|
||||||
@ -431,9 +431,9 @@ WRITE64_MEMBER(dc_state::dc_sysctrl_w )
|
|||||||
else //direct texture path
|
else //direct texture path
|
||||||
dc_sysctrl_regs[SB_C2DSTAT]=address+ddtdata.length;
|
dc_sysctrl_regs[SB_C2DSTAT]=address+ddtdata.length;
|
||||||
|
|
||||||
/* 200 usecs breaks sfz3upper */
|
/* TODO: timing is a guess */
|
||||||
machine().scheduler().timer_set(attotime::from_usec(50), timer_expired_delegate(FUNC(dc_state::ch2_dma_irq),this));
|
machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(ddtdata.length/4), timer_expired_delegate(FUNC(dc_state::ch2_dma_irq),this));
|
||||||
/* simulate YUV FIFO processing here */
|
/* simulate YUV FIFO processing here (HACK! should go inside the YUV FIFO itself) */
|
||||||
if((address & 0x1800000) == 0x0800000)
|
if((address & 0x1800000) == 0x0800000)
|
||||||
machine().scheduler().timer_set(attotime::from_usec(500), timer_expired_delegate(FUNC(dc_state::yuv_fifo_irq),this));
|
machine().scheduler().timer_set(attotime::from_usec(500), timer_expired_delegate(FUNC(dc_state::yuv_fifo_irq),this));
|
||||||
}
|
}
|
||||||
|
@ -3165,17 +3165,17 @@ void powervr2_device::device_reset()
|
|||||||
dc_framebuffer_ram = state->dc_framebuffer_ram.target();
|
dc_framebuffer_ram = state->dc_framebuffer_ram.target();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* called by TIMER_ADD_PERIODIC, in driver sections */
|
/* called by TIMER_ADD_PERIODIC, in driver sections (controlled by SPG, that's a PVR sub-device) */
|
||||||
void powervr2_device::pvr_scanline_timer(int vpos)
|
void powervr2_device::pvr_scanline_timer(int vpos)
|
||||||
{
|
{
|
||||||
int vbin_line = spg_vblank_int & 0x3ff;
|
int vbin_line = spg_vblank_int & 0x3ff;
|
||||||
int vbout_line = (spg_vblank_int >> 16) & 0x3ff;
|
int vbout_line = (spg_vblank_int >> 16) & 0x3ff;
|
||||||
|
int spg_hblank_int & 0x3ff
|
||||||
|
|
||||||
if(vbin_line == vpos)
|
if(vbin_line == vpos)
|
||||||
irq_cb(VBL_IN_IRQ);
|
irq_cb(VBL_IN_IRQ);
|
||||||
|
|
||||||
if(vbout_line == vpos)
|
if(vbout_line == vpos)
|
||||||
irq_cb(VBL_OUT_IRQ);
|
irq_cb(VBL_OUT_IRQ);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,8 +49,8 @@
|
|||||||
|
|
||||||
READ64_MEMBER(dc_cons_state::dcus_idle_skip_r )
|
READ64_MEMBER(dc_cons_state::dcus_idle_skip_r )
|
||||||
{
|
{
|
||||||
if (space.device().safe_pc()==0xc0ba52a)
|
//if (space.device().safe_pc()==0xc0ba52a)
|
||||||
space.device().execute().spin_until_time(attotime::from_usec(2500));
|
// space.device().execute().spin_until_time(attotime::from_usec(2500));
|
||||||
// device_spinuntil_int(&space.device());
|
// device_spinuntil_int(&space.device());
|
||||||
|
|
||||||
return dc_ram[0x2303b0/8];
|
return dc_ram[0x2303b0/8];
|
||||||
@ -58,8 +58,8 @@ READ64_MEMBER(dc_cons_state::dcus_idle_skip_r )
|
|||||||
|
|
||||||
READ64_MEMBER(dc_cons_state::dcjp_idle_skip_r )
|
READ64_MEMBER(dc_cons_state::dcjp_idle_skip_r )
|
||||||
{
|
{
|
||||||
if (space.device().safe_pc()==0xc0bac62)
|
//if (space.device().safe_pc()==0xc0bac62)
|
||||||
space.device().execute().spin_until_time(attotime::from_usec(2500));
|
// space.device().execute().spin_until_time(attotime::from_usec(2500));
|
||||||
// device_spinuntil_int(&space.device());
|
// device_spinuntil_int(&space.device());
|
||||||
|
|
||||||
return dc_ram[0x2302f8/8];
|
return dc_ram[0x2302f8/8];
|
||||||
|
Loading…
Reference in New Issue
Block a user