Skip to content

Commit

Permalink
floppy: Gently de-jitter/precomp WDATA line
Browse files Browse the repository at this point in the history
This can be enough to handle heavily-precompensated marginal write
signals.
  • Loading branch information
keirf committed Jan 10, 2024
1 parent 69e2c54 commit 359d964
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/floppy_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,8 @@ static void IRQ_wdata_dma(void)
if (!(bc_prod&31))
bc_buf[((bc_prod-1) / 32) & bc_bufmask] = htobe32(bc_dat);
}
curr += cell >> 1; /* remove the 1/2-cell bias */
prev -= curr >> 3; /* de-jitter/precomp: carry 1/8 of phase error */
bc_dat = (bc_dat << 1) | 1;
bc_prod++;
switch (sync) {
Expand Down

0 comments on commit 359d964

Please sign in to comment.