mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
zaccaria: fix cocktail mode [iq_132]
This commit is contained in:
parent
25a1b30730
commit
1ccce47618
4 changed files with 32 additions and 13 deletions
|
@ -1617,8 +1617,7 @@ tilemap_manager::~tilemap_manager()
|
|||
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_flip_all - set a global flip for all the
|
||||
// tilemaps
|
||||
// create - allocate a tilemap
|
||||
//-------------------------------------------------
|
||||
|
||||
tilemap_t &tilemap_manager::create(device_gfx_interface &decoder, tilemap_get_info_delegate tile_get_info, tilemap_mapper_delegate mapper, u16 tilewidth, u16 tileheight, u32 cols, u32 rows, tilemap_t *allocated)
|
||||
|
|
|
@ -1172,8 +1172,9 @@ void namcos22_state::blit_quads(int addr, int len, float m[4][4])
|
|||
used in:
|
||||
- acedrive/victlap sparks
|
||||
- adillor title logo
|
||||
- alpinr2b spinning yellow best times in attract mode
|
||||
- alpinr2b mountains in selection screen
|
||||
- alpinr2b spinning yellow best times in attract mode
|
||||
- alpinr2b highscore entry letters
|
||||
- propcycl score/time
|
||||
- propcycl Solitar pillars
|
||||
- ridgerac car when entering highscore
|
||||
|
|
|
@ -40,6 +40,8 @@ private:
|
|||
DECLARE_WRITE_LINE_MEMBER(nmi_mask_w);
|
||||
void videoram_w(offs_t offset, uint8_t data);
|
||||
void attributes_w(offs_t offset, uint8_t data);
|
||||
uint8_t read_attr(offs_t offset);
|
||||
void update_colscroll();
|
||||
DECLARE_WRITE_LINE_MEMBER(flip_screen_x_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(flip_screen_y_w);
|
||||
void dsw_sel_w(uint8_t data);
|
||||
|
|
|
@ -111,11 +111,11 @@ void zaccaria_state::palette(palette_device &palette) const
|
|||
|
||||
TILE_GET_INFO_MEMBER(zaccaria_state::get_tile_info)
|
||||
{
|
||||
uint8_t attr = m_videoram[tile_index + 0x400];
|
||||
tileinfo.set(0,
|
||||
m_videoram[tile_index] + ((attr & 0x03) << 8),
|
||||
((attr & 0x0c) >> 2) + ((m_attributesram[2 * (tile_index % 32) + 1] & 0x07) << 2),
|
||||
0);
|
||||
uint8_t attr = m_videoram[tile_index | 0x400];
|
||||
uint16_t code = m_videoram[tile_index] | ((attr & 0x03) << 8);
|
||||
attr = (attr & 0x0c) >> 2 | (read_attr((tile_index & 0x1f) << 1 | 1) & 0x07) << 2;
|
||||
|
||||
tileinfo.set(0, code, attr, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -149,21 +149,38 @@ void zaccaria_state::videoram_w(offs_t offset, uint8_t data)
|
|||
|
||||
void zaccaria_state::attributes_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (offset & 1)
|
||||
uint8_t prev = m_attributesram[offset];
|
||||
m_attributesram[offset] = data;
|
||||
|
||||
if (prev != data)
|
||||
{
|
||||
if (m_attributesram[offset] != data)
|
||||
if (offset & 1)
|
||||
{
|
||||
if (flip_screen_x()) offset ^= 0x1f << 1;
|
||||
for (int i = offset / 2; i < 0x400; i += 32)
|
||||
m_bg_tilemap->mark_tile_dirty(i);
|
||||
}
|
||||
else
|
||||
update_colscroll();
|
||||
}
|
||||
else
|
||||
m_bg_tilemap->set_scrolly(offset / 2,data);
|
||||
}
|
||||
|
||||
m_attributesram[offset] = data;
|
||||
uint8_t zaccaria_state::read_attr(offs_t offset)
|
||||
{
|
||||
if (flip_screen_x()) offset ^= 0x1f << 1;
|
||||
return m_attributesram[offset];
|
||||
}
|
||||
|
||||
void zaccaria_state::update_colscroll()
|
||||
{
|
||||
for (int i = 0; i < 0x20; i++)
|
||||
m_bg_tilemap->set_scrolly(i, read_attr(i * 2));
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(zaccaria_state::flip_screen_x_w)
|
||||
{
|
||||
flip_screen_x_set(state);
|
||||
update_colscroll();
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(zaccaria_state::flip_screen_y_w)
|
||||
|
|
Loading…
Reference in a new issue