I need to do a fast write of 128 bytes are of the sat.
normally having the sat in ram i can only issue a otir or outi x 128 .
however i must account for the r#24 value by adjusting the y sat value according to r24 value to keep sprites in the same y pos.
now i can simply add a offset value to the y value like this:
ld a, (HL)
add a,d // d = offset
out (0x99h),a
outi // X
outi // dummy color byte
outi // pt no.
however, when a+d = magic value sprites disappear so to correct the problem i forced to do something like this:
ld a, (HL)
add a,d
cp magicvalue
jr nz, noadjust
inc a
noadjust:
out (0x99),a
this increases the sat write time by adding cp+jr+inc , about 24 T-States! that multiplied by 32 gives 768 !
anyone know a better method to avoid this stupid bottleneck?

.