diff options
author | angelosa <salese_corp_ltd@email.it> | 2018-01-09 16:44:38 +0100 |
---|---|---|
committer | angelosa <salese_corp_ltd@email.it> | 2018-01-09 17:50:05 +0100 |
commit | 53f19de81d80247e418d88e491954f7b8e0e2f88 (patch) | |
tree | 8cfc841d8a2f1deaf965056e33cea1116595c292 | |
parent | ec5a3624e46ab12e98d709b5ddaddfe16d433f28 (diff) |
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;
-rw-r--r-- | src/mame/video/ms32.cpp | 67 |
1 files changed, 26 insertions, 41 deletions
diff --git a/src/mame/video/ms32.cpp b/src/mame/video/ms32.cpp index 2811d62696f..08aac4de5fc 100644 --- a/src/mame/video/ms32.cpp +++ b/src/mame/video/ms32.cpp @@ -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) - { - 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 == 0) - 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 +// 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->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 if (asc_pri == 2) - 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); + } - /* 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) |