aquarium - fixed video priorities too based on reference video, also fixed bg colour based on WDUD logo in US set.
This commit is contained in:
parent
de2689bbd3
commit
28c29a1598
@ -26,6 +26,10 @@ Notes:
|
|||||||
- A bug in the program code causes the OKI to be reset on the very
|
- A bug in the program code causes the OKI to be reset on the very
|
||||||
first coin inserted.
|
first coin inserted.
|
||||||
|
|
||||||
|
// Sound banking + video references
|
||||||
|
// https://www.youtube.com/watch?v=nyAQPrkt_a4
|
||||||
|
// https://www.youtube.com/watch?v=0gn2Kj2M46Q
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -62,10 +66,6 @@ WRITE16_MEMBER(aquarium_state::aquarium_sound_w)
|
|||||||
|
|
||||||
WRITE8_MEMBER(aquarium_state::aquarium_z80_bank_w)
|
WRITE8_MEMBER(aquarium_state::aquarium_z80_bank_w)
|
||||||
{
|
{
|
||||||
// banking reference
|
|
||||||
// https://www.youtube.com/watch?v=nyAQPrkt_a4
|
|
||||||
// (video also shows our video priority is incorrect)
|
|
||||||
|
|
||||||
// uses bits ---x --xx
|
// uses bits ---x --xx
|
||||||
data = BITSWAP8(data, 7, 6, 5, 2, 3, 1, 4, 0);
|
data = BITSWAP8(data, 7, 6, 5, 2, 3, 1, 4, 0);
|
||||||
|
|
||||||
@ -402,5 +402,5 @@ ROM_START( aquariumj )
|
|||||||
ROM_LOAD( "aquar4", 0x000000, 0x80000, CRC(9a4af531) SHA1(bb201b7a6c9fd5924a0d79090257efffd8d4aba1) )
|
ROM_LOAD( "aquar4", 0x000000, 0x80000, CRC(9a4af531) SHA1(bb201b7a6c9fd5924a0d79090257efffd8d4aba1) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
GAME( 1996, aquarium, 0, aquarium, aquarium, aquarium_state, aquarium, ROT0, "Excellent System", "Aquarium (US)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
|
GAME( 1996, aquarium, 0, aquarium, aquarium, aquarium_state, aquarium, ROT0, "Excellent System", "Aquarium (US)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
|
||||||
GAME( 1996, aquariumj,aquarium, aquarium, aquarium, aquarium_state, aquarium, ROT0, "Excellent System", "Aquarium (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
|
GAME( 1996, aquariumj,aquarium, aquarium, aquarium, aquarium_state, aquarium, ROT0, "Excellent System", "Aquarium (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
|
||||||
|
@ -17,14 +17,16 @@ public:
|
|||||||
m_oki(*this, "oki"),
|
m_oki(*this, "oki"),
|
||||||
m_gfxdecode(*this, "gfxdecode"),
|
m_gfxdecode(*this, "gfxdecode"),
|
||||||
m_palette(*this, "palette"),
|
m_palette(*this, "palette"),
|
||||||
m_sprgen(*this, "spritegen"){ }
|
m_sprgen(*this, "spritegen"),
|
||||||
|
m_screen(*this, "screen")
|
||||||
|
{ }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_mid_videoram;
|
required_shared_ptr<UINT16> m_mid_videoram;
|
||||||
required_shared_ptr<UINT16> m_bak_videoram;
|
required_shared_ptr<UINT16> m_bak_videoram;
|
||||||
required_shared_ptr<UINT16> m_txt_videoram;
|
required_shared_ptr<UINT16> m_txt_videoram;
|
||||||
required_shared_ptr<UINT16> m_scroll;
|
required_shared_ptr<UINT16> m_scroll;
|
||||||
|
|
||||||
/* video-related */
|
/* video-related */
|
||||||
tilemap_t *m_txt_tilemap;
|
tilemap_t *m_txt_tilemap;
|
||||||
tilemap_t *m_mid_tilemap;
|
tilemap_t *m_mid_tilemap;
|
||||||
@ -59,5 +61,8 @@ public:
|
|||||||
required_device<gfxdecode_device> m_gfxdecode;
|
required_device<gfxdecode_device> m_gfxdecode;
|
||||||
required_device<palette_device> m_palette;
|
required_device<palette_device> m_palette;
|
||||||
required_device<excellent_spr_device> m_sprgen;
|
required_device<excellent_spr_device> m_sprgen;
|
||||||
|
required_device<screen_device> m_screen;
|
||||||
|
|
||||||
|
void mix_sprite_bitmap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority_mask, int priority_value);
|
||||||
|
bitmap_ind16 m_temp_sprite_bitmap;
|
||||||
};
|
};
|
||||||
|
@ -14,6 +14,9 @@ TILE_GET_INFO_MEMBER(aquarium_state::get_aquarium_txt_tile_info)
|
|||||||
tileno = (m_txt_videoram[tile_index] & 0x0fff);
|
tileno = (m_txt_videoram[tile_index] & 0x0fff);
|
||||||
colour = (m_txt_videoram[tile_index] & 0xf000) >> 12;
|
colour = (m_txt_videoram[tile_index] & 0xf000) >> 12;
|
||||||
SET_TILE_INFO_MEMBER(2, tileno, colour, 0);
|
SET_TILE_INFO_MEMBER(2, tileno, colour, 0);
|
||||||
|
|
||||||
|
tileinfo.category = (m_txt_videoram[tile_index] & 0x8000) >> 15;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(aquarium_state::aquarium_txt_videoram_w)
|
WRITE16_MEMBER(aquarium_state::aquarium_txt_videoram_w)
|
||||||
@ -70,6 +73,28 @@ void aquarium_state::video_start()
|
|||||||
|
|
||||||
m_txt_tilemap->set_transparent_pen(0);
|
m_txt_tilemap->set_transparent_pen(0);
|
||||||
m_mid_tilemap->set_transparent_pen(0);
|
m_mid_tilemap->set_transparent_pen(0);
|
||||||
|
m_bak_tilemap->set_transparent_pen(0);
|
||||||
|
|
||||||
|
m_screen->register_screen_bitmap(m_temp_sprite_bitmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
void aquarium_state::mix_sprite_bitmap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority_mask, int priority_value)
|
||||||
|
{
|
||||||
|
for (int y = cliprect.min_y;y <= cliprect.max_y;y++)
|
||||||
|
{
|
||||||
|
UINT16* srcline = &m_temp_sprite_bitmap.pix16(y);
|
||||||
|
UINT16* dstline = &bitmap.pix16(y);
|
||||||
|
|
||||||
|
for (int x = cliprect.min_x;x <= cliprect.max_x;x++)
|
||||||
|
{
|
||||||
|
UINT16 pixel = srcline[x];
|
||||||
|
|
||||||
|
if (pixel & 0xf)
|
||||||
|
if ((pixel & priority_mask) == priority_value)
|
||||||
|
dstline[x] = pixel;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32 aquarium_state::screen_update_aquarium(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
UINT32 aquarium_state::screen_update_aquarium(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
@ -80,14 +105,22 @@ UINT32 aquarium_state::screen_update_aquarium(screen_device &screen, bitmap_ind1
|
|||||||
m_bak_tilemap->set_scrolly(0, m_scroll[3]);
|
m_bak_tilemap->set_scrolly(0, m_scroll[3]);
|
||||||
m_txt_tilemap->set_scrollx(0, m_scroll[4]);
|
m_txt_tilemap->set_scrollx(0, m_scroll[4]);
|
||||||
m_txt_tilemap->set_scrolly(0, m_scroll[5]);
|
m_txt_tilemap->set_scrolly(0, m_scroll[5]);
|
||||||
|
|
||||||
|
bitmap.fill(0, cliprect); // WDUD logo suggests this
|
||||||
|
|
||||||
|
m_temp_sprite_bitmap.fill(0, cliprect);
|
||||||
|
m_sprgen->aquarium_draw_sprites(m_temp_sprite_bitmap, cliprect, m_gfxdecode, 16);
|
||||||
|
|
||||||
|
|
||||||
m_bak_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
m_bak_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||||
|
mix_sprite_bitmap(screen, bitmap, cliprect, 0x80, 0x80);
|
||||||
m_mid_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
m_mid_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||||
|
m_txt_tilemap->draw(screen, bitmap, cliprect, 1, 0);
|
||||||
m_sprgen->aquarium_draw_sprites(bitmap, cliprect, m_gfxdecode, 16);
|
|
||||||
|
|
||||||
m_bak_tilemap->draw(screen, bitmap, cliprect, 1, 0);
|
m_bak_tilemap->draw(screen, bitmap, cliprect, 1, 0);
|
||||||
|
mix_sprite_bitmap(screen, bitmap, cliprect, 0x80, 0x00);
|
||||||
m_mid_tilemap->draw(screen, bitmap, cliprect, 1, 0);
|
m_mid_tilemap->draw(screen, bitmap, cliprect, 1, 0);
|
||||||
m_txt_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
m_txt_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user