stvvdp1.cpp: disable transmask code for mode 2 sprites, fix Sasissu racing stage background clouds color [Angelo Salese]

This commit is contained in:
angelosa 2018-05-02 23:14:06 +02:00
parent de8a9428a6
commit 1f07c3e5ec
2 changed files with 18 additions and 6 deletions

View File

@ -947,6 +947,7 @@ void saturn_state::drawpixel_generic(int x, int y, int patterndata, int offsetcn
((((m_vdp1_vram[(((stv2_current_sprite.CMDCOLR&0xffff)*8)>>2)+((pix2&0xfffe)/2)])) & 0xffff0000) >> 16); ((((m_vdp1_vram[(((stv2_current_sprite.CMDCOLR&0xffff)*8)>>2)+((pix2&0xfffe)/2)])) & 0xffff0000) >> 16);
//mode = 5; //mode = 5;
// TODO: transparency code wrong for after burner 2
transmask = 0xffff; transmask = 0xffff;
if ( !spd ) if ( !spd )
@ -965,7 +966,8 @@ void saturn_state::drawpixel_generic(int x, int y, int patterndata, int offsetcn
pix = m_vdp1.gfx_decode[(patterndata+offsetcnt) & 0xfffff]; pix = m_vdp1.gfx_decode[(patterndata+offsetcnt) & 0xfffff];
//mode = 2; //mode = 2;
pix = pix+(stv2_current_sprite.CMDCOLR&0xffc0); pix = pix+(stv2_current_sprite.CMDCOLR&0xffc0);
transmask = 0x3f; // disable transmask since transparent pen is checked below (sasissu racing stage background clouds)
transmask = 0xffff;
// Scud: the disposable assassin wants transparent pen on 0 // Scud: the disposable assassin wants transparent pen on 0
if ( !spd ) if ( !spd )
@ -993,15 +995,23 @@ void saturn_state::drawpixel_generic(int x, int y, int patterndata, int offsetcn
//mode = 4; //mode = 4;
break; break;
case 0x0028: // mode 5 32,768 colour RGB mode (16bits) case 0x0028: // mode 5 32,768 colour RGB mode (16bits)
pix = m_vdp1.gfx_decode[(patterndata+offsetcnt*2+1) & 0xfffff] | (m_vdp1.gfx_decode[(patterndata+offsetcnt*2) & 0xfffff]<<8) ; pix = m_vdp1.gfx_decode[(patterndata+offsetcnt*2+1) & 0xfffff] | (m_vdp1.gfx_decode[(patterndata+offsetcnt*2) & 0xfffff]<<8);
//mode = 5; //mode = 5;
transmask = -1; /* TODO: check me */ // TODO: check transmask
transmask = -1;
break;
case 0x0038: // invalid
// game tengoku uses this on hi score screen (tate mode)
// according to Charles, reads from VRAM address 0
pix = m_vdp1.gfx_decode[1] | (m_vdp1.gfx_decode[0]<<8) ;
// TODO: check transmask
transmask = -1;
break; break;
default: // other settings illegal default: // other settings illegal
pix = machine().rand(); pix = machine().rand();
//mode = 0; //mode = 0;
transmask = 0xff; transmask = 0xff;
popmessage("Illegal Sprite Mode, contact MAMEdev"); popmessage("Illegal Sprite Mode %02x, contact MAMEdev",stv2_current_sprite.CMDPMOD&0x0038);
} }

View File

@ -4526,7 +4526,8 @@ void saturn_state::stv_vdp2_check_tilemap(bitmap_rgb32 &bitmap, const rectangle
stv_vdp2_draw_basic_tilemap(bitmap, mycliprect); stv_vdp2_draw_basic_tilemap(bitmap, mycliprect);
} }
/* post-processing functions (TODO: needs layer bitmaps to be individual planes to work correctly) */ /* post-processing functions */
// (TODO: needs layer bitmaps to be individual planes to work correctly)
if(stv2_current_tilemap.line_screen_enabled && TEST_FUNCTIONS) if(stv2_current_tilemap.line_screen_enabled && TEST_FUNCTIONS)
stv_vdp2_draw_line(bitmap,cliprect); stv_vdp2_draw_line(bitmap,cliprect);
@ -6838,7 +6839,8 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
}; };
// Pretty Fighter X, Game Tengoku shadows // Pretty Fighter X, Game Tengoku shadows
// TODO: former doesn't read what's behind, VDP1 bug? // TODO: Pretty Fighter X doesn't read what's behind on title screen, VDP1 bug?
// TODO: seldomly Game Tengoku shadows aren't drawn properly
if(pix & 0x8000 && STV_VDP2_SDCTL & 0x100) if(pix & 0x8000 && STV_VDP2_SDCTL & 0x100)
{ {
rgb_t p = bitmap_line[x]; rgb_t p = bitmap_line[x];