本文整理汇总了C++中address_space::write_dword方法的典型用法代码示例。如果您正苦于以下问题:C++ address_space::write_dword方法的具体用法?C++ address_space::write_dword怎么用?C++ address_space::write_dword使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类address_space
的用法示例。
在下文中一共展示了address_space::write_dword方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void dc_state::g2_dma_execute(address_space &space, int channel)
{
UINT32 src,dst,size;
dst = m_g2_dma[channel].g2_addr;
src = m_g2_dma[channel].root_addr;
size = 0;
/* 0 rounding size = 32 Mbytes */
if (m_g2_dma[channel].size == 0) { m_g2_dma[channel].size = 0x200000; }
if (m_g2_dma[channel].dir == 0)
{
for (; size<m_g2_dma[channel].size; size += 4)
{
space.write_dword(dst,space.read_dword(src));
src+=4;
dst+=4;
}
}
else
{
for (; size<m_g2_dma[channel].size; size += 4)
{
space.write_dword(src,space.read_dword(dst));
src+=4;
dst+=4;
}
}
/* update the params*/
m_g2_dma[channel].g2_addr = g2bus_regs[SB_ADSTAG + (channel * 8)] = dst;
m_g2_dma[channel].root_addr = g2bus_regs[SB_ADSTAR + (channel * 8)] = src;
m_g2_dma[channel].size = g2bus_regs[SB_ADLEN + (channel * 8)] = 0;
m_g2_dma[channel].flag = (m_g2_dma[channel].indirect & 1) ? 1 : 0;
/* Note: if you trigger an instant DMA IRQ trigger, sfz3upper doesn't play any bgm. */
/* TODO: timing of this */
machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(m_g2_dma[channel].size / 4), timer_expired_delegate(FUNC(dc_state::g2_dma_irq), this), channel);
}