From cc21d65b3c3c71d064459822689749177f692d0a Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 19 Apr 2018 19:15:38 +0200 Subject: stvvdp1.cpp: preliminary implementation of PMOD 7 (gouraud + half transparent), fixes Lupin the 3rd Pyramid no Kenja enemy shadows [Angelo Salese] --- src/devices/video/stvvdp1.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/devices/video/stvvdp1.cpp b/src/devices/video/stvvdp1.cpp index 3f439bdb89e..d8bafd6570c 100644 --- a/src/devices/video/stvvdp1.cpp +++ b/src/devices/video/stvvdp1.cpp @@ -1062,6 +1062,19 @@ void saturn_state::drawpixel_generic(int x, int y, int patterndata, int offsetcn case 4: /* Gouraud shading */ m_vdp1.framebuffer_draw_lines[y][x] = stv_vdp1_apply_gouraud_shading( x, y, pix ); break; + case 7: /* Gouraud-shading + half-transparent */ + // Lupin the 3rd Pyramid no Kenja enemy shadows + // Death Crimson lives indicators + // TODO: latter looks really bad. + if ( m_vdp1.framebuffer_draw_lines[y][x] & 0x8000 ) + { + m_vdp1.framebuffer_draw_lines[y][x] = stv_vdp1_apply_gouraud_shading( x, y, alpha_blend_r16( m_vdp1.framebuffer_draw_lines[y][x], pix, 0x80 ) | 0x8000 ); + } + else + { + m_vdp1.framebuffer_draw_lines[y][x] = stv_vdp1_apply_gouraud_shading( x, y, pix ); + } + break; default: // TODO: mode 5: prohibited, mode 6: gouraud shading + half-luminance, mode 7: gouraud-shading + half-transparent popmessage("VDP1 PMOD = %02x, contact MAMEdev",stv2_current_sprite.CMDPMOD & 0x7); -- cgit v1.2.3