mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
ms32.cpp: Improved and cleaned up tile-tile priorities [Angelo Salese]
* Fixes title screen in Suchie Pai 2, Gratia intermissions and Hayaoshi Quiz Nettou Namahousou flame screen during attract;
This commit is contained in:
parent
ec5a3624e4
commit
53f19de81d
@ -411,54 +411,38 @@ uint32_t ms32_state::screen_update_ms32(screen_device &screen, bitmap_rgb32 &bit
|
||||
else
|
||||
scr_pri++;
|
||||
|
||||
if((m_priram[0x3a00 / 2] & 0x00ff) == 0x000c)
|
||||
// Suchiepai 2 title & Gratia gameplay intermissions uses 0x0f
|
||||
// hayaosi3 uses 0x09 during flames screen on attract
|
||||
// this is otherwise 0x17 most of the time except for 0x15 in hayaosi3, tetris plus 2 & world pk soccer 2
|
||||
// kirarast flips between 0x16 in gameplay and 0x17 otherwise
|
||||
if((m_priram[0x3a00 / 2] & 0x0030) == 0x00)
|
||||
scr_pri++;
|
||||
else
|
||||
rot_pri++;
|
||||
|
||||
if (rot_pri == 0)
|
||||
draw_roz(screen, m_temp_bitmap_tilemaps, cliprect, 1 << 1);
|
||||
else if (scr_pri == 0)
|
||||
if (m_tilemaplayoutcontrol&1)
|
||||
// popmessage("%02x %02x %02x",m_priram[0x2b00 / 2],m_priram[0x2e00 / 2],m_priram[0x3a00 / 2]);
|
||||
|
||||
// tile-tile mixing
|
||||
for(int prin=0;prin<3;prin++)
|
||||
{
|
||||
if(rot_pri == prin)
|
||||
draw_roz(screen, m_temp_bitmap_tilemaps, cliprect, 1 << 1);
|
||||
else if (scr_pri == prin)
|
||||
{
|
||||
m_bg_tilemap_alt->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 0);
|
||||
if (m_tilemaplayoutcontrol&1)
|
||||
{
|
||||
m_bg_tilemap_alt->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bg_tilemap->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bg_tilemap->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 0);
|
||||
}
|
||||
else if (asc_pri == 0)
|
||||
m_tx_tilemap->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 2);
|
||||
else if(asc_pri == prin)
|
||||
m_tx_tilemap->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 2);
|
||||
}
|
||||
|
||||
if (rot_pri == 1)
|
||||
draw_roz(screen, m_temp_bitmap_tilemaps, cliprect, 1 << 1);
|
||||
else if (scr_pri == 1)
|
||||
if (m_tilemaplayoutcontrol&1)
|
||||
{
|
||||
m_bg_tilemap_alt->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bg_tilemap->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 0);
|
||||
}
|
||||
else if (asc_pri == 1)
|
||||
m_tx_tilemap->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 2);
|
||||
|
||||
if (rot_pri == 2)
|
||||
draw_roz(screen, m_temp_bitmap_tilemaps, cliprect, 1 << 1);
|
||||
else if (scr_pri == 2)
|
||||
if (m_tilemaplayoutcontrol&1)
|
||||
{
|
||||
m_bg_tilemap_alt->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bg_tilemap->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 0);
|
||||
}
|
||||
else if (asc_pri == 2)
|
||||
m_tx_tilemap->draw(screen, m_temp_bitmap_tilemaps, cliprect, 0, 1 << 2);
|
||||
|
||||
/* MIX it! */
|
||||
// tile-sprite mixing
|
||||
/* this mixing isn't 100% accurate, it should be using ALL the data in
|
||||
the priority ram, probably for per-pixel / pen mixing, or more levels
|
||||
than are supported here.. I don't know, it will need hw tests I think */
|
||||
@ -505,6 +489,7 @@ uint32_t ms32_state::screen_update_ms32(screen_device &screen, bitmap_rgb32 &bit
|
||||
if (m_priram[(spritepri | 0x0a00 | 0x0000) / 2] & 0x38) primask |= 1 << 7;
|
||||
|
||||
|
||||
// TODO: spaghetti code ...
|
||||
if (primask == 0x00)
|
||||
{
|
||||
if (src_tilepri==0x00)
|
||||
|
Loading…
Reference in New Issue
Block a user