diff options
author | hap <happppp@users.noreply.github.com> | 2022-12-03 17:10:16 +0100 |
---|---|---|
committer | hap <happppp@users.noreply.github.com> | 2022-12-03 17:10:26 +0100 |
commit | 1ccce4761892761145c247ebf60fc4c0ab062d3c (patch) | |
tree | 1991e61d4427a803cfc2fcf5401c2cc823f07f10 /src/mame | |
parent | 25a1b3073094f4add3005a748e00dae9d66aff47 (diff) |
zaccaria: fix cocktail mode [iq_132]
Diffstat (limited to 'src/mame')
-rw-r--r-- | src/mame/namco/namcos22_v.cpp | 3 | ||||
-rw-r--r-- | src/mame/zaccaria/zaccaria.h | 2 | ||||
-rw-r--r-- | src/mame/zaccaria/zaccaria_v.cpp | 37 |
3 files changed, 31 insertions, 11 deletions
diff --git a/src/mame/namco/namcos22_v.cpp b/src/mame/namco/namcos22_v.cpp index e31b69f05b4..bf9372b0952 100644 --- a/src/mame/namco/namcos22_v.cpp +++ b/src/mame/namco/namcos22_v.cpp @@ -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 diff --git a/src/mame/zaccaria/zaccaria.h b/src/mame/zaccaria/zaccaria.h index 45f115f4029..e7d967534c5 100644 --- a/src/mame/zaccaria/zaccaria.h +++ b/src/mame/zaccaria/zaccaria.h @@ -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); diff --git a/src/mame/zaccaria/zaccaria_v.cpp b/src/mame/zaccaria/zaccaria_v.cpp index eb5333dae2b..8393678d0fc 100644 --- a/src/mame/zaccaria/zaccaria_v.cpp +++ b/src/mame/zaccaria/zaccaria_v.cpp @@ -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) |