@@ -323,8 +323,14 @@ void model2c_state::machine_reset()
323323void model2_state::palette_w (offs_t offset, u16 data, u16 mem_mask)
324324{
325325 COMBINE_DATA (&m_palram[offset]);
326- u16 color = m_palram[offset];
327- m_palette->set_pen_color (offset, pal5bit (color >> 0 ), pal5bit (color >> 5 ), pal5bit (color >> 10 ));
326+ u16 palcolor = m_palram[offset];
327+ u8 r = m_colorxlat[0x0080 / 2 + ((palcolor >> 0 ) & 0x1f ) * 0x100 ];
328+ u8 g = m_colorxlat[0x4080 / 2 + ((palcolor >> 5 ) & 0x1f ) * 0x100 ];
329+ u8 b = m_colorxlat[0x8080 / 2 + ((palcolor >> 10 ) & 0x1f ) * 0x100 ];
330+ r = m_gamma_table[r];
331+ g = m_gamma_table[g];
332+ b = m_gamma_table[b];
333+ m_palette->set_pen_color (offset, r, g, b);
328334}
329335
330336u16 model2_state::palette_r (offs_t offset)
@@ -335,6 +341,10 @@ u16 model2_state::palette_r(offs_t offset)
335341void model2_state::colorxlat_w (offs_t offset, u16 data, u16 mem_mask)
336342{
337343 COMBINE_DATA (&m_colorxlat[offset]);
344+
345+ // if writing to the scroll color table, mark the palette as dirty
346+ if ((offset & 0xff ) == 0x80 / 2 )
347+ m_palette_dirty = true ;
338348}
339349
340350u16 model2_state::colorxlat_r (offs_t offset)
@@ -7575,9 +7585,9 @@ GAME( 1994, vstrikero, vstriker, model2b, vstriker, model2b_state, empty_
75757585GAME( 1995 , fvipers, 0 , model2b, vf2, model2b_state, empty_init, ROT0, " Sega" , " Fighting Vipers (Revision D)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
75767586GAME( 1995 , fvipersb, fvipers, model2b, vf2, model2b_state, empty_init, ROT0, " Sega" , " Fighting Vipers (Revision B)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
75777587GAME( 1995 , gunblade, 0 , gunblade, gunblade, model2b_state, empty_init, ROT0, " Sega" , " Gunblade NY (Revision A)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
7578- GAME( 1995 , indy500, 0 , indy500, indy500, model2b_state, empty_init, ROT0, " Sega" , " INDY 500 Twin (Revision A, Newer)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
7579- GAME( 1995 , indy500d, indy500, indy500, indy500, model2b_state, empty_init, ROT0, " Sega" , " INDY 500 Deluxe (Revision A)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
7580- GAME( 1995 , indy500to, indy500, indy500, indy500, model2b_state, empty_init, ROT0, " Sega" , " INDY 500 Twin (Revision A)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
7588+ GAMEL( 1995 , indy500, 0 , indy500, indy500, model2b_state, empty_init, ROT0, " Sega" , " INDY 500 Twin (Revision A, Newer)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS, layout_vr )
7589+ GAMEL( 1995 , indy500d, indy500, indy500, indy500, model2b_state, empty_init, ROT0, " Sega" , " INDY 500 Deluxe (Revision A)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS, layout_vr )
7590+ GAMEL( 1995 , indy500to, indy500, indy500, indy500, model2b_state, empty_init, ROT0, " Sega" , " INDY 500 Twin (Revision A)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS, layout_vr )
75817591GAME( 1995 , von, 0 , model2b, von, model2b_state, empty_init, ROT0, " Sega" , " Cyber Troopers Virtual-On - Twin (Export)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
75827592GAME( 1995 , vonu, von, model2b, von, model2b_state, empty_init, ROT0, " Sega" , " Cyber Troopers Virtual-On - Twin (USA, Revision B)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
75837593GAME( 1995 , vonj, von, model2b, von, model2b_state, empty_init, ROT0, " Sega" , " Cyber Troopers Virtual-On - Twin (Japan, Revision B)" , MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
0 commit comments