newppu-fix bug in scroll reg logic causing mis-scrolls in p'radikus conflict

This commit is contained in:
zeromus 2011-09-24 23:37:56 +00:00
parent baf1d6d8f2
commit ab4e68da8c
1 changed files with 7 additions and 3 deletions

View File

@ -207,11 +207,15 @@ struct PPUREGS {
void increment_vs() {
fv++;
vt += (fv>>3);
int fv_overflow = (fv >> 3);
vt += fv_overflow;
vt &= 31; //fixed tecmo super bowl
v += (vt==30)?1:0;
if(vt == 30 && fv_overflow==1) //caution here (only do it at the exact instant of overflow) fixes p'radikus conflict
{
v++;
vt=0;
}
fv &= 7;
if(vt==30) vt=0;
v &= 1;
}