Exemple #1
0
void playch10_state::machine_start()
{
	m_vrom = memregion("gfx2")->base();

	/* allocate 4K of nametable ram here */
	/* move to individual boards as documentation of actual boards allows */
	m_nt_ram = auto_alloc_array(machine(), UINT8, 0x1000);

	machine().device("ppu")->memory().space(AS_PROGRAM).install_readwrite_handler(0, 0x1fff, read8_delegate(FUNC(playch10_state::pc10_chr_r),this), write8_delegate(FUNC(playch10_state::pc10_chr_w),this));
	machine().device("ppu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8_delegate(FUNC(playch10_state::pc10_nt_r),this),write8_delegate(FUNC(playch10_state::pc10_nt_w),this));

	if (NULL != m_vram)
		set_videoram_bank(0, 8, 0, 8);
	else pc10_set_videorom_bank(0, 8, 0, 8);

	nvram_device *nvram = machine().device<nvram_device>("nvram");
	if (nvram != NULL)
		nvram->set_base(memregion("cart" )->base() + 0x6000, 0x1000);
}
Exemple #2
0
void playch10_state::machine_start()
{
	m_timedigits.resolve();

	m_vrom = (m_vrom_region != nullptr) ? m_vrom_region->base() : nullptr;

	/* allocate 4K of nametable ram here */
	/* move to individual boards as documentation of actual boards allows */
	m_nt_ram = std::make_unique<uint8_t[]>(0x1000);

	m_ppu->space(AS_PROGRAM).install_readwrite_handler(0, 0x1fff, read8_delegate(FUNC(playch10_state::pc10_chr_r),this), write8_delegate(FUNC(playch10_state::pc10_chr_w),this));
	m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8_delegate(FUNC(playch10_state::pc10_nt_r),this),write8_delegate(FUNC(playch10_state::pc10_nt_w),this));

	if (nullptr != m_vram)
		set_videoram_bank(0, 8, 0, 8);
	else pc10_set_videorom_bank(0, 8, 0, 8);

	nvram_device *nvram = subdevice<nvram_device>("nvram");
	if (nvram != nullptr)
		nvram->set_base(memregion("cart")->base() + 0x6000, 0x1000);
}