本文整理汇总了C++中prg32函数的典型用法代码示例。如果您正苦于以下问题:C++ prg32函数的具体用法?C++ prg32怎么用?C++ prg32使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了prg32函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: prg32
void nes_cne_fsb_device::pcb_reset()
{
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
prg32(0xff);
chr8(0, m_chr_source);
}
示例2: switch
void nes_exrom_device::update_prg()
{
int bank0, bank1, bank2, bank3;
switch (m_prg_mode)
{
case 0: // 32k banks
bank3 = m_prg_regs[3] >> 2;
prg32(bank3);
break;
case 1: // 16k banks
bank1 = m_prg_regs[1] >> 1;
bank3 = m_prg_regs[3] >> 1;
if (m_prg_ram_mapped[1])
{
m_ram_hi_banks[0] = ((bank1 << 1) & 0x07);
m_ram_hi_banks[1] = ((bank1 << 1) & 0x07) | 1;
}
else
prg16_89ab(bank1);
prg16_cdef(bank3);
break;
case 2: // 16k-8k banks
bank1 = m_prg_regs[1] >> 1;
bank2 = m_prg_regs[2];
bank3 = m_prg_regs[3];
if (m_prg_ram_mapped[1])
{
m_ram_hi_banks[0] = ((bank1 << 1) & 0x07);
m_ram_hi_banks[1] = ((bank1 << 1) & 0x07) | 1;
}
else
prg16_89ab(bank1);
if (m_prg_ram_mapped[2])
m_ram_hi_banks[2] = (bank2 & 0x07);
else
prg8_cd(bank2);
prg8_ef(bank3);
break;
case 3: // 8k banks
bank0 = m_prg_regs[0];
bank1 = m_prg_regs[1];
bank2 = m_prg_regs[2];
bank3 = m_prg_regs[3];
if (m_prg_ram_mapped[0])
m_ram_hi_banks[0] = (bank0 & 0x07);
else
prg8_89(bank0);
if (m_prg_ram_mapped[1])
m_ram_hi_banks[1] = (bank1 & 0x07);
else
prg8_ab(bank1);
if (m_prg_ram_mapped[2])
m_ram_hi_banks[2] = (bank2 & 0x07);
else
prg8_cd(bank2);
prg8_ef(bank3);
break;
}
}
示例3: chr8
void nes_mmalee_device::pcb_reset()
{
chr8(0, CHRROM);
prg32(0);
}