Skip to content

Commit

Permalink
DMD: Fix Alvin.G. backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vbousquet committed Sep 14, 2024
1 parent 242676b commit fff79df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wpc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2963,8 +2963,8 @@ void core_dmd_update_pwm(core_tDMDPWMState* dmd_state) {
const UINT8* const frame3 = dmd_state->rawFrames + ((dmd_state->nextFrame + (dmd_state->nFrames - 4)) % dmd_state->nFrames) * dmd_state->rawFrameSize;
for (int kk = 0; kk < dmd_state->rawFrameSize; kk++) {
UINT8 v0 = frame0[kk], v1 = frame1[kk], v2 = frame2[kk], v3 = frame3[kk];
for (int ii = 0; ii < 8; ii++, v0 >>= 1, v1 >>= 1, v2 >>= 1, v3 >>= 1)
*rawData++ = (v0 & 0x01) + (v1 & 0x01) + (v1 & 0x02) + (v3 & 0x01);
for (int ii = 0; ii < 8; ii++, v0 <<= 1, v1 <<= 1, v2 <<= 1, v3 <<= 1)
*rawData++ = ((v0 >> 7) & 0x01) + ((v1 >> 7) & 0x01) + ((v1 >> 7) & 0x02) + ((v3 >> 7) & 0x01);
}
}
break;
Expand Down

0 comments on commit fff79df

Please sign in to comment.