saturn.cpp: Added Rotation Parameter read control register, fixes at least Riddler stage ROZ positioning in Batman Forever [Angelo Salese]

This commit is contained in:
angelosa 2016-11-08 22:22:25 +01:00
parent b80710c868
commit 4efb459374

View File

@ -2145,6 +2145,34 @@ void saturn_state::stv_vdp2_fill_rotation_parameter_table( uint8_t rot_parameter
stv_current_rotation_parameter_table.dkast= (m_vdp2_vram[address/4 + 22] & 0x03ffffc0) | ((m_vdp2_vram[address/4 + 22] & 0x02000000) ? 0xfc000000 : 0x00000000 );
stv_current_rotation_parameter_table.dkax = (m_vdp2_vram[address/4 + 23] & 0x03ffffc0) | ((m_vdp2_vram[address/4 + 23] & 0x02000000) ? 0xfc000000 : 0x00000000 );
// check rotation parameter read control, override if specific bits are disabled
// (Batman Forever The Riddler stage relies on this)
switch(rot_parameter)
{
case 1:
if(!STV_VDP2_RAXSTRE)
stv_current_rotation_parameter_table.xst = 0;
if(!STV_VDP2_RAYSTRE)
stv_current_rotation_parameter_table.yst = 0;
if(!STV_VDP2_RAKASTRE)
stv_current_rotation_parameter_table.dkax = 0;
break;
case 2:
if(!STV_VDP2_RBXSTRE)
stv_current_rotation_parameter_table.xst = 0;
if(!STV_VDP2_RBYSTRE)
stv_current_rotation_parameter_table.yst = 0;
if(!STV_VDP2_RBKASTRE)
stv_current_rotation_parameter_table.dkax = 0;
break;
}
#define RP stv_current_rotation_parameter_table
if(LOG_ROZ == 1) logerror( "Rotation parameter table (%d)\n", rot_parameter );
@ -4778,6 +4806,8 @@ void saturn_state::stv_vdp2_copy_roz_bitmap(bitmap_rgb32 &bitmap,
}
else
{
popmessage("%08x",STV_VDP2_RPRCTL);
for (hcnt = cliprect.min_x; hcnt <= cliprect.max_x; hcnt++ )
{
switch( coeff_table_size )