Example #1
0
VIDEO_START_MEMBER(megasys1_state,megasys1)
{
	int i;

	m_spriteram = &m_ram[0x8000/2];

	m_buffer_objectram = std::make_unique<UINT16[]>(0x2000);
	m_buffer_spriteram16 = std::make_unique<UINT16[]>(0x2000);
	m_buffer2_objectram = std::make_unique<UINT16[]>(0x2000);
	m_buffer2_spriteram16 = std::make_unique<UINT16[]>(0x2000);

	create_tilemaps();
	m_tmap[0] = m_tilemap[0][0][0];
	m_tmap[1] = m_tilemap[1][0][0];
	m_tmap[2] = m_tilemap[2][0][0];

	m_active_layers = m_sprite_bank = m_screen_flag = m_sprite_flag = 0;

	for (i = 0; i < 3; i ++)
	{
		m_scroll_flag[i] = m_scrollx[i] = m_scrolly[i] = 0;
	}

	m_bits_per_color_code = 4;

/*
    The tile code of a specific layer is multiplied for a constant
    depending on the tile mode (8x8 or 16x16)

    The most reasonable arrangement seems a 1:1 mapping (meaning we
    must multiply by 4 the tile code in 16x16 mode, since we decode
    the graphics like 8x8)

    However, this is probably a game specific thing, as Soldam uses
    layer 1 in both modes, and even with 8x8 tiles the tile code must
    be multiplied by 4! (for the High Score table)

    AFAIK, the other games use a layer in one mode only (always 8x8 or
    16x16) so it could be that the multiplication factor is constant
    for each layer and hardwired to 1x or 4x for both tile sizes
*/

	m_8x8_scroll_factor[0] = 1; m_16x16_scroll_factor[0] = 4;
	m_8x8_scroll_factor[1] = 1; m_16x16_scroll_factor[1] = 4;
	m_8x8_scroll_factor[2] = 1; m_16x16_scroll_factor[2] = 4;

	if (strcmp(machine().system().name, "soldam") == 0 ||
		strcmp(machine().system().name, "soldamj") == 0)
	{
		m_8x8_scroll_factor[1] = 4; m_16x16_scroll_factor[1] = 4;
	}

	m_hardware_type_z = 0;
	if (strcmp(machine().system().name, "lomakai") == 0 ||
		strcmp(machine().system().name, "makaiden") == 0)
		m_hardware_type_z = 1;

	m_screen->register_screen_bitmap(m_sprite_buffer_bitmap);
}
Example #2
0
void deco_bac06_device::device_start()
{
	pf_data = auto_alloc_array_clear(this->machine(), UINT16, 0x4000 / 2); // 0x2000 is the maximum needed, some games / chip setups map less and mirror - stadium hero banks this to 0x4000?!
	pf_rowscroll = auto_alloc_array_clear(this->machine(), UINT16, 0x2000 / 2);
	pf_colscroll = auto_alloc_array_clear(this->machine(), UINT16, 0x2000 / 2);

	create_tilemaps(m_gfxregion8x8, m_gfxregion16x16);
	m_gfxcolmask = 0x0f;

	m_bppmult = 0x10;
	m_bppmask = 0x0f;
	m_rambank = 0;
}
Example #3
0
void deco_bac06_device::device_start()
{
	m_pf_data = auto_alloc_array_clear(machine(), UINT16, 0x4000 / 2); // 0x2000 is the maximum needed, some games / chip setups map less and mirror - stadium hero banks this to 0x4000?!
	m_pf_rowscroll = auto_alloc_array_clear(machine(), UINT16, 0x2000 / 2);
	m_pf_colscroll = auto_alloc_array_clear(machine(), UINT16, 0x2000 / 2);

	create_tilemaps(m_gfxregion8x8, m_gfxregion16x16);
	m_gfxcolmask = 0x0f;

	m_bppmult = 0x10;
	m_bppmask = 0x0f;
	m_rambank = 0;

	save_pointer(NAME(m_pf_data), 0x4000/2);
	save_pointer(NAME(m_pf_rowscroll), 0x2000/2);
	save_pointer(NAME(m_pf_colscroll), 0x2000/2);
	save_pointer(NAME(m_pf_control_0), 8);
	save_pointer(NAME(m_pf_control_1), 8);

	save_item(NAME(m_rambank));
}
Example #4
0
void deco_bac06_device::device_start()
{
	if(!m_gfxdecode->started())
		throw device_missing_dependencies();

	m_pf_data = make_unique_clear<uint16_t[]>(0x4000 / 2); // 0x2000 is the maximum needed, some games / chip setups map less and mirror - stadium hero banks this to 0x4000?!
	m_pf_rowscroll = make_unique_clear<uint16_t[]>(0x2000 / 2);
	m_pf_colscroll = make_unique_clear<uint16_t[]>(0x2000 / 2);

	create_tilemaps(m_gfxregion8x8, m_gfxregion16x16);
	m_gfxcolmask = 0x0f;

	m_bppmult = 0x10;
	m_bppmask = 0x0f;
	m_rambank = 0;

	save_pointer(NAME(m_pf_data.get()), 0x4000/2);
	save_pointer(NAME(m_pf_rowscroll.get()), 0x2000/2);
	save_pointer(NAME(m_pf_colscroll.get()), 0x2000/2);
	save_item(NAME(m_pf_control_0));
	save_item(NAME(m_pf_control_1));
	save_item(NAME(m_gfxcolmask));
	save_item(NAME(m_rambank));
}